【问题标题】:/bin/sh: scripts/basic/fixdep: cannot execute binary file/bin/sh: scripts/basic/fixdep: 无法执行二进制文件
【发布时间】:2013-06-29 23:44:46
【问题描述】:

我尝试使用交叉编译为 android 构建 rt73.ko linux 驱动程序。我已经下载了目标系统(Rockchip RK3066)的android NDK和内核源代码,当我构建驱动程序时出现以下错误:

root@slax:~/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module# make CROSS_COMPILE=arm-linux-androideabi-make -C /root/kernel SUBDIRS=/root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module 模块 make[1]: 进入目录/root/kernel' CC [M] /root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module/rtmp_main.o /root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module/rtmp_main.c: In function 'usb_rtusb_probe': /root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module/rtmp_main.c:1152:3: warning: return makes integer from pointer without a cast [enabled by default] /root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module/rtmp_main.c: In function 'usb_rtusb_disconnect': /root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module/rtmp_main.c:1315:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] /root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module/rtmp_main.c: In function 'usb_rtusb_close': /root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module/rtmp_main.c:655:1: warning: the frame size of 2128 bytes is larger than 1024 bytes [-Wframe-larger-than=] /root/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/as: /usr/lib/libz.so.1: no version information available (required by /root/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/as) /bin/sh: scripts/basic/fixdep: cannot execute binary file make[2]: *** [/root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module/rtmp_main.o] Error 126 make[1]: *** [_module_/root/2011_0210_RT73_Linux_STA_Drv1.1.0.5/Module] Error 2 make[1]: Leaving directory/root/kernel' make: * [all] 错误2

您能帮我克服上述错误吗?

【问题讨论】:

    标签: android cross-compiling


    【解决方案1】:

    虽然你交叉编译,但只能编译内核。 scripts/basic/fixdep 是用户态程序。

    要克服这个问题,您需要使用 http://crosstool-ng.org/ 为例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-03
      • 1970-01-01
      • 1970-01-01
      • 2019-10-14
      • 2019-01-26
      • 2019-12-25
      • 2020-04-21
      • 1970-01-01
      相关资源
      最近更新 更多