0

クロスコンパイルを使用して、Android 用の rt73.ko Linux ドライバーをビルドしようとしています。Android NDK とターゲット システム (Rockchip RK3066) のカーネル ソースをダウンロードしましたが、ドライバーをビルドすると、次のエラーが発生します。

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 mod-ules 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

上記のエラーを克服するのを手伝ってもらえますか?

4

1 に答える 1

0

クロス コンパイルしますが、コンパイルできるのはカーネルだけです。scripts/basic/fixdep はユーザーランド プログラムです。

これを克服するには、たとえばhttp://crosstool-ng.org/を使用する必要があります。

于 2013-06-29T15:44:46.430 に答える