makefilearmcross-compilingtoolchaincodesourcery

Cross-compilation of rtl8192cu driver fails


I 'm trying to cross-compile rtl8192cu Driver in my Linux x86 machine for an ARM machine. I downloaded driver from Realtek website. Compilation guide refers editing Makefile as follows:

  1. Ensure that the $PATH variable includes the location of the toolchain that you will be using to cross-compile the module. Refer to the setup instructions for the location of this directory.

  2. Set the KSRC environment variable is set to the location of your Beagleboard's kernel source (see cross-compilation environment setup instructions for this directory path).

  3. Set the KVER environment variable to your beagleboard's kernel version.

For this reson, I edited:

KVER := 2.6.32 (2.6.32. is BB's kernel version)

KSRC ?= /home/demetres/linux-2.6.32.61 (compiled kernel sources, taken from BB, stored on home/demetres/linux-2.6.32.61 location)

My question is:

What do I have to edit on Makefile's field CROSS_COMPILE:? I edited the path /home/demetres/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin but make fails with these errors:

make ARCH=arm CROSS_COMPILE=/home/demetres/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin -C /home/demetres/linux-2.6.32.61 M=/home/demetres/Downloads/rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911  modules
make[1]: /home/demetres/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bingcc: Command not found
make[1]: Entering directory `/home/demetres/linux-2.6.32.61'
  CC [M]  /home/demetres/Downloads/rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911/core/rtw_cmd.o
/bin/sh: /home/demetres/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bingcc: No such file or directory
make[2]: *** [/home/demetres/Downloads/rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911/core/rtw_cmd.o] Error 1
make[1]: *** [_module_/home/demetres/Downloads/rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911] Error 2
make[1]: Leaving directory `/home/demetres/linux-2.6.32.61'
make: *** [modules] Error 2

INFO: Cross-toolchain on x86 machine is from CodeSourcery. I cross-compiled a helloworld.c for BB, by running arm-none-linux-gnueabi-gcc helloworld.c –o helloworld, on CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin location.


Solution

  • _CodeBench_Lite_for_ARM_GNU_Linux/bingcc: Command not found

    This error is due to you are not passing correct parameter

    pass arm-none-linux-gnueabi-

    where ever it finds {CROSS_COMPILE}gcc {CROSS_COMPILE}ld ...etc

    this will be replaced with arm-none-linux-gnueabi-gcc arm-none-linux-gnueabi-ld

    Edit

    make ARCH=arm CROSS_COMPILE=/home/demetres/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi- -C /home/demetres/linux-2.6.32.61 M=/home/demetres/Downloads/rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911 modules

    If your cross-toolchain exported then try this

    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -C /home/demetres/linux-2.6.32.61 M=/home/demetres/Downloads/rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911 modules