[oe] Problems building a kernelmodule for OE
Stanislav Brabec
utx at penguin.cz
Tue Oct 28 23:10:12 UTC 2008
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-angstrom-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
More information about the Openembedded-devel
mailing list