【问题标题】:Cross-compilation of rtl8192cu driver failsrtl8192cu 驱动的交叉编译失败
【发布时间】:2014-04-27 11:17:27
【问题描述】:

我正在尝试在我的 Linux x86 机器上为 ARM 机器交叉编译 rtl8192cu 驱动程序。我从Realtek website 下载了驱动程序。编译指南参考编辑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

INFO: x86 机器上的跨工具链来自 CodeSourcery。我在CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin 位置运行arm-none-linux-gnueabi-gcc helloworld.c –o helloworld,为BB 交叉编译了一个helloworld.c。

【问题讨论】:

  • 你在 x86 或 beagle board 上编译吗?
  • 如果您在 x86 上进行交叉编译,请确保 usr/src/linux-2.6.32.61 已针对 beagle 板进行交叉编译或至少配置为 beagle 板,以便 makefile 获得正确的架构。
  • 我编辑了我的问题。如果您能看一看,我将不胜感激。

标签: makefile arm cross-compiling toolchain codesourcery


【解决方案1】:

_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.2013模块

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

制作 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 模块

【讨论】:

  • 跨编译器问题已解决。但是,make 再次失败,因为它发现 BB 的内核源代码有问题: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: scripts/basic/fixdep: Permission denied。我认为这是由于 linux-2.6.32.61 文件的权限。
  • 检查编译内核源的权限
猜你喜欢
  • 2018-08-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-06-11
  • 2021-04-12
  • 2016-03-09
相关资源
最近更新 更多