Difference between revisions of "IDP Programmer Guide"
From ESS-WIKI
(Created page with "=Make the IDP Cross-compiler SDK includes kernel source= 1. Configure a build and then add the following to your local.conf file. This could be included within a layer using,...") |
(No difference)
|
Revision as of 04:49, 7 April 2016
Make the IDP Cross-compiler SDK includes kernel source
1. Configure a build and then add the following to your local.conf file. This could be included within a layer using, for example, a template.conf file too:
TOOLCHAIN_TARGET_TASK_append = " python-dev kernel-dev"
2. Build and install the SDK:
$ make export-sdk
$ export/wrlinux-6.0.0.11-eglibc-x86_64-intel_x86_64-w rlinux-image-glibc-std-sdk.sh
Enter target directory for SDK (default: /opt/windriver/wrlinux/6.0-intel-x86-64): /path/to/sdk
You are about to install the SDK to "/path/to/sdk". Proceed[Y/n]?
Extracting SDK...done
Setting it up...done
SDK has been successfully set up and is ready to be used.
3. Source the SDK environment:
$ cd /path/to/sdk/
$ source env.sh
4. Build the needed scripts
$ cd /path/to/sdk/sysroots/x86_64-wrs-linux/usr/src/kernel
$ make CROSS_COMPILE=$CROSS_COMPILE ARCH=$ARCH scripts
HOSTCC scripts/basic/fixdep
CC scripts/mod/empty.o
HOSTCC scripts /mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
HOSTCC scripts/recordmcount
HOSTCC scripts/sortextable
5. You should then be able to build your kernel module:
$ cd /path/to/your/module
$ make -C /path/to/sdk/sysroots/x86_64-wrs-linux/usr/src/kernel/ CROSS_COMPILE=$CROSS_COMPILE ARCH=$ARCH M=`pwd`
make: Entering directory `/path/to/sdk/sysroots/x86_64-wrs-linux/usr/src/kerne l-3.10.38-ltsi-wr6.0.0.11-standard'
CC [M] /path/to/your/module/mymod.o
Building modules, stage 2.
MODPOST 1 modules
CC /path/to/your/module/mymod.mod.o
LD [M] /path/to/your/module/mymod.ko
make: Leaving directory `/path/to/sdk/sysroots/x86_64-wrs-lin ux/usr/src/kernel-3.10.38-ltsi-wr6.0.0.11-standard'