我正在尝试在我的 Linux x86 机器中为 ARM 机器交叉编译rtl8192cu 驱动程序。我从Realtek 网站下载了驱动程序。编译指南是指编辑 Makefile 如下:
确保 $PATH 变量包含您将用于交叉编译模块的工具链的位置。有关此目录的位置,请参阅设置说明。
将 KSRC 环境变量设置为 Beagleboard 内核源的位置(请参阅此目录路径的交叉编译环境设置说明)。
将 KVER 环境变量设置为 beagleboard 的内核版本。
为此,我编辑了:
KVER := 2.6.32
(2.6.32.是BB的内核版本)
KSRC ?= /home/demetres/linux-2.6.32.61
(编译的内核源代码,取自 BB,存储在home/demetres/linux-2.6.32.61
本地)
我的问题是:
我必须在 Makefile 的字段上编辑CROSS_COMPILE:
什么?我编辑了路径/home/demetres/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin
,但因
make
以下错误而失败:
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
信息: x86 机器上的跨工具链来自 CodeSourcery。arm-none-linux-gnueabi-gcc helloworld.c –o helloworld
我通过在CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin
位置运行 , 为 BB 交叉编译了一个 helloworld.c