As said: I need the compiled kernel and modules available to cross compile some external drivers. I am actually crosscompile the redpine wlan module and need the kernel sources and modules.
What I now do is I create the .config with bitbake and copy it to the sdk kernel directory. That works for the time being.
In my experience, it is easier to do this kind of “heavy kernel development” outside of OpenEmbedded/bitbake. OE is great to build rootfs, but during Linux kernel development, it seems to add more complexity than necessary.
After development, when the changes are tested and proven, one can either commit them to a local git repository and point the OE recipe to the local git repository, or create a patch and add the patch to the OE recipe.
You could add the nativesdk-ncurses-dev package to the sdk build to get the ncurses developer headers deployed with the sdk, e.g. adding the following line to conf/local/conf
Probably this is enough to get the kernel host tools build-able for the make menuconfig case.
One other solution would probably be to not source the sdk environment script but instead use only the SDK compiler.
E.g. by setting the environment variables ARCH and CROSS_COMPILE.
Test that ARCH is empty to proof that the environment has not been sourced in the current process:
$ echo $ARCH
Set the environment for kernel compilation and make your config
cd /usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/usr/src/kernel
export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
PATH=$PATH:/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/arm-angstrom-linux-gnueabi/
make colibri_vf_defconfig menuconfig
I had the same issue. If sourcing environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi building the kernel worked, but make menuconfig was broken. But if I only set ARCH, PATH and CROSS_COMPILE as suggested in Build U-Boot and Linux Kernel from Source Code the kernel won’t build:
Can't locate strict.pm in @INC (you may need to install the strict module) (@INC contains: //usr/lib/perl/site_perl/5.22.1 //usr/lib/perl/vendor_perl/5.22.1 //usr/lib/perl/5.22.1 /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/site_perl/5.22.1/ /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/site_perl/5.22.1 /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/vendor_perl/5.22.1/ /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/vendor_perl/5.22.1 /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/5.22.1/ /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/5.22.1 /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/lib/perl/5.22.1 .) at ./lib/build_OID_registry line 14.
BEGIN failed--compilation aborted at ./lib/build_OID_registry line 14.
make[1]: *** [lib/Makefile:195: lib/oid_registry_data.c] Error 2
make: *** [Makefile:950: lib] Error 2
make: *** Waiting for unfinished jobs....
For the latter to work I also had to specify OECORE_NATIVE_SYSROOT as specified in environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi.
And for the record: It is PKG_CONFIG_PATH in environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi which breaks make menuconfig.