[oe] Problems building a kernelmodule for OE

Henk Geraads linux at hf-electronics.com
Wed Oct 29 13:46:31 UTC 2008


Hi Stanislav,

Thanks for the remarks, ideed it seems the .config file was messed up.
I did repopulate the kernel source tree again. Did "make ARCH=arm menuconfig"
Created a new kernel and also did use this new tree to succesfully build my own kernel module.

Best regards,

Henk


> -----Oorspronkelijk bericht-----
> Van: openembedded-devel-bounces at lists.openembedded.org
> [mailto:openembedded-devel-bounces at lists.openembedded.org]Namens
> Stanislav Brabec
> Verzonden: woensdag 29 oktober 2008 0:10
> Aan: openembedded-devel at lists.openembedded.org
> Onderwerp: Re: [oe] Problems building a kernelmodule for OE
> 
> 
> Henk Geraads wrote:
> 
> > Found the problem with __LINUX_ARM_ARCH__!
> > the "-march=armv5t"  in the makefie compiler line did mess up things!!
> 
> It is very probably still not correct. When cross compiling the kernel,
> you need to pass "ARCH=arm" to make (and set CPU type in .config.
> Otherwise compile options may be invalid (and you can even corrupt
> your .config file) and then correct -march should be generated by make.
> 
> > the include of the "pxa-regs.h" and "gpio.h" solved the other problem.
> > 
> > Now I've got strange error's from the linker;
> > 	make[2]: *** 
> [/home/henk/SystemDev/module/cfi-ktst/cfi-mod.ko] Error 1
> > 	make[1]: *** [modules] Error 2
> > 	make: *** [default] Error 2
> > 	arm-angstrom-linux-gnueabi-ld: unrecognized option 
> '-Wl,-rpath-link,/home/armcore/oe/build/tmp/angstrom/staging/arm-a
> ngstrom-linux-gnueabi/lib'
> > 	arm-angstrom-linux-gnueabi-ld: use the --help option for 
> usage information
> > 	make[2]: *** 
> [/home/henk/SystemDev/module/cfi-ktst/cfi-mod.ko] Error 1
> > 	make[1]: *** [modules] Error 2
> > 	make: *** [default] Error 2
> > 
> > I thought linker option's are very common?
> 
> -Wl is not an option for linker, but cor compiler. Linker should get
> only parameters of -Wl. Additionally -rpath-link is not useful for
> kernel (dynamic linking is an user space issue). Something went wrong
> and make passed bad arguments to the linker.
> 
> Here is a make syntax I am using for kernel cross compilation:
> make ARCH=arm CC=arm-angstrom-linux-gnueabi-gcc 
> LD=arm-angstrom-linux-gnueabi-ld INSTALL_PATH=$PWD/INSTALL/boot 
> INSTALL_MOD_PATH=$PWD/INSTALL
> You may need to add target (e. g. zImage, install, zinstall,
> modules_install).
> 
> 
> ________________________________________________________________________
> Stanislav Brabec
> http://www.penguin.cz/~utx/zaurus
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel






More information about the Openembedded-devel mailing list