Skip to contentSkip to conversation

Compiling against different kernel

DISCUSSION Ed W 1 participant 1 message Aug 25, 2009

lore
Share & tools
lore

Ed W

author
#0 lore raw

Hi, I am building a kernel for an embedded 32bit x86 kernel on my x86_64 machine. I have a 32bit x86 build environment in a chroot, but obviously "uname" still looks like the host

I try to compile compat-wireless (2009-08-24) like this:

make ARCH=x86 KLIB=/usr/src/linux-2.6.30.5-grsecurity-2.1.14-aufs/ KLIB_BUILD=/usr/src/linux-2.6.30.5-grsecurity-2.1.14-aufs/

I get:

FATAL: Could not load /lib/modules/2.6.29.6-grsec2.1.14-vs2.3.0.36.14/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.29.6-grsec2.1.14-vs2.3.0.36.14/modules.dep: No such file or directory ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
FATAL: Could not load /lib/modules/2.6.29.6-grsec2.1.14-vs2.3.0.36.14/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.29.6-grsec2.1.14-vs2.3.0.36.14/modules.dep: No such file or directory make -C /usr/src/linux-2.6.30.5-grsecurity-2.1.14-aufs/ M=/usr/src/compat-wireless-2009-08-24 modules ..etc..

(where it's clearly trying to find the modules dir for the running 64bit kernel, rather than the I'm looking through the makefile, but I can't see how it's trying to adapt depmod to use the correct modules.dep?

Can someone please help with the correct incantation to cross compile?

Thanks

Ed W