build - Cross-compiling kernel module for ARM -


i want cross-compile rtl8192cu driver targeting arm angstrom (beagleboard), on x86 ubuntu 13.04.

cross-compile prerequisites:

  1. rtl8192cu driver
  2. cross-toolchain (codesourcery / arm-angstrom-linux-gnueabi)
  3. kernel sources

for reason, copied kernel sources usr/src directory of beagleboard, on ubuntu machine (they heve been compiled on beagleboard, needed rebuild kernel).

running make cross-compile, error:

make arch=arm cross_compile=/home/demetres/codesourcery/sourcery_codebench_lite_for_arm_gnu_linux/bin/arm-none-linux-gnueabi- -c /home/demetres/desktop/ks1 m=/home/demetres/desktop/rtl3  modules make[1]: entering directory `/home/demetres/desktop/ks1'   cc [m]  /home/demetres/desktop/rtl3/core/rtw_cmd.o /bin/sh: scripts/basic/fixdep: cannot execute binary file make[2]: *** [/home/demetres/desktop/rtl3/core/rtw_cmd.o] error 126 make[1]: *** [_module_/home/demetres/desktop/rtl3] error 2 make[1]: leaving directory `/home/demetres/desktop/ks1' make: *** [modules] error 2 

if run file fixdep get:

fixdep: elf 32-bit lsb executable, arm, version 1 (sysv), dynamically linked (uses shared libs), gnu/linux 2.6.16, not stripped 

this makes sense, fixdep, part of kernel sources (compiled on arm platform).

my query is: procedure correct , how can fix error?

edit:

running make v=1:

make arch=arm cross_compile=/home/demetres/codesourcery/sourcery_codebench_lite_for_arm_gnu_linux/bin/arm-none-linux-gnueabi- -c /home/demetres/desktop/ks m=/home/demetres/desktop/rtl  modules make[1]: entering directory `/home/demetres/desktop/ks' test -e include/linux/autoconf.h -a -e include/config/auto.conf || (        \     echo;                               \     echo "  error: kernel configuration invalid.";       \     echo "         include/linux/autoconf.h or include/config/auto.conf missing.";  \     echo "         run 'make oldconfig && make prepare' on kernel src fix it.";  \     echo;                               \     /bin/false) mkdir -p /home/demetres/desktop/rtl/.tmp_versions ; rm -f /home/demetres/desktop/rtl/.tmp_versions/* make -f scripts/makefile.build obj=/home/demetres/desktop/rtl   /home/demetres/codesourcery/sourcery_codebench_lite_for_arm_gnu_linux/bin/arm-none-linux-gnueabi-gcc -wp,-md,/home/demetres/desktop/rtl/core/.rtw_cmd.o.d  -nostdinc -isystem /home/demetres/codesourcery/sourcery_codebench_lite_for_arm_gnu_linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.7.3/include -iinclude  -i/home/demetres/desktop/ks/arch/arm/include -include include/linux/autoconf.h -d__kernel__ -mlittle-endian -iarch/arm/mach-versatile/include -wall -wundef -wstrict-prototypes -wno-trigraphs -fno-strict-aliasing -fno-common -werror-implicit-function-declaration -wno-format-security -fno-delete-null-pointer-checks -os -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=apcs-gnu -mno-thumb-interwork -d__linux_arm_arch__=5 -march=armv5te -mtune=arm9tdmi -msoft-float -uarm -wframe-larger-than=1024 -fno-stack-protector -wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -wdeclaration-after-statement -wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -o1 -wno-unused-variable -wno-unused-value -wno-unused-label -wno-unused-parameter -wno-unused-function -wno-unused -wno-uninitialized -i/home/demetres/desktop/rtl/include -dconfig_power_saving -dconfig_little_endian  -dmodule -d"kbuild_str(s)=#s" -d"kbuild_basename=kbuild_str(rtw_cmd)"  -d"kbuild_modname=kbuild_str(8192cu)"  -c -o /home/demetres/desktop/rtl/core/rtw_cmd.o /home/demetres/desktop/rtl/core/rtw_cmd.c /bin/sh: scripts/basic/fixdep: cannot execute binary file make[2]: *** [/home/demetres/desktop/rtl/core/rtw_cmd.o] error 126 make[1]: *** [_module_/home/demetres/desktop/rtl] error 2 make[1]: leaving directory `/home/demetres/desktop/ks' make: *** [modules] error 2 

fixdep arm binary , trying run on x86 machine(intel). have recompile kernel resources (just make them) , try cross compiling again.


Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -