0

我正在尝试在我的 Linux x86 机器中为 ARM 机器交叉编译rtl8192cu 驱动程序。我从Realtek 网站下载了驱动程序。编译指南是指编辑 Makefile 如下:

  1. 确保 $PATH 变量包含您将用于交叉编译模块的工具链的位置。有关此目录的位置,请参阅设置说明。

  2. 将 KSRC 环境变量设置为 Beagleboard 内核源的位置(请参阅此目录路径的交叉编译环境设置说明)。

  3. 将 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

4

1 回答 1

3

_CodeBench_Lite_for_ARM_GNU_Linux/bingcc: Command not found

此错误是由于您没有传递正确的参数

经过arm-none-linux-gnueabi-

它在哪里找到{CROSS_COMPILE}gcc{CROSS_COMPILE}ld ...等

这将被替换为arm-none-linux-gnueabi-gcc arm-none-linux-gnueabi-ld

编辑

使 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 模块

如果您的交叉工具链已导出,请尝试此操作

使 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 模块

于 2014-03-21T03:49:48.753 回答