Skip to end of metadata
Go to start of metadata

Introduction

This document contains detailed instructions for Platform development for the GENIVI Demo Platform (GDP-ivi7)

Setup Environment

To setup the environment please follow the instructions for SDK preparation, build and setup.

Prepare Linux Kernel Sources

Prepare the Linux kernel sources for out-of-tree kernel module compilation:

Renesas (Koelsch)

$ cd $HOME/gdp-sdk/koelsch
$ source ./environment-setup-cortexa15hf-vfp-neon-poky-linux-gnueabi 
$ cd sysroots/cortexa15hf-vfp-neon-poky-linux-gnueabi/usr/src/kernel/
$ make scripts

QEMU (x86-64)

$ cd $HOME/gdp-sdk/qemux86-64
$ source ./environment-setup-core2-64-poky-linux
$ cd sysroots/core2-64-poky-linux/usr/src/kernel/
$ make scripts

Platform Development Examples

Download, Build, and Run an Extra Kernel Module against Kernel Source

Download the hello-mod source code

$ cd $HOME/gdp-sdk
$ mkdir extra-kernel-module
$ wget --no-parent --no-host-directories --cut-dirs=6 --recursive \
  http://git.yoctoproject.org/cgit/cgit.cgi/poky/plain/meta-skeleton/recipes-kernel/hello-mod/

Build the hello-mod kernel module

Renesas (Koelsch)

$ cd $HOME/gdp-sdk/koelsch
$ source ./environment-setup-cortexa15hf-vfp-neon-poky-linux-gnueabi
$ cd $HOME/gdp-sdk/extra-kernel-module/hello-mod/files
$ export KERNEL_SRC=$HOME/gdp-sdk/koelsch/sysroots/cortexa15hf-vfp-neon-poky-linux-gnueabi/usr/src/kernel
$ make -C $KERNEL_SRC M=`pwd`
$ file hello.ko  # check that everything went well
hello.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=3f90ecff4b57a02770a705f654653bc0e2890251, not stripped

QEMU (x86-64)

$ cd $HOME/gdp-sdk/qemux86-64
$ source ./environment-setup-core2-64-poky-linux
$ cd $HOME/gdp-sdk/extra-kernel-module/hello-mod/files
$ export KERNEL_SRC=$HOME/gdp-sdk/qemux86-64/sysroots/core2-64-poky-linux/usr/src/kernel
$ make -C $KERNEL_SRC M=`pwd`

Test the hello-mod kernel module

Copy the 'hello.ko' file to target board (koelsch) or the QEMU virtual machine (qemux86-64). (Using scp is recommended)
And insert (or remove) module into kernel to check module working.

Debug the hello-mod kernel module

Kernel debugging is outside the scope of this document.