我正在嘗試使用mipsel-linux-gcc編譯器交叉編譯內核和rootfs。主機是64位,而要構建的rootfs是32位。我試圖安裝ia32-libs和ia32-libs-multiarch。但失敗了。我已經使用apt-get安裝了gcc-multilib。但是,我無法建立。我已將PATH變量更新爲所使用的工具鏈。mipsel-linux-gcc:命令未找到
echo $PATH
USR/local/sbin中:在/ usr/local/bin目錄:/ usr/sbin目錄:在/ usr/bin中:/ sbin目錄:/ bin中:在/ usr /遊戲:/opt/toolchains/stbgcc-4.5。 3-1.1/bin中
錯誤,我得到:
[email protected]:uclinux-rootfs# make vmlinuz-7425b0-android
make TFTPHOST=android-build TFTPDIR=/tftpboot/$USER TFTPPATH=$USER defaults-7425b0-android
make[1]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
WARNING: using toolchain binaries in:
/opt/toolchains/stbgcc-4.5.3-1.1/bin
The recommended toolchain for this release is:
stbgcc-4.5.3-2.4
perl -w bin/config.pl save_defaults 7425b0-android
make[2]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -f Makefile savedefconfig
make[3]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
make[3]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[2]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -j1 silentoldconfig
make[2]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
WARNING: using toolchain binaries in:
/opt/toolchains/stbgcc-4.5.3-1.1/bin
The recommended toolchain for this release is:
stbgcc-4.5.3-2.4
make -C linux ARCH=mips silentoldconfig
make[3]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -f Makefile silentoldconfig
make[4]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
scripts/kconfig/conf --silentoldconfig Kconfig
make[4]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[3]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -C linux ARCH=mips prepare scripts
make[3]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -f Makefile prepare
/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
make[4]: mipsel-linux-gcc: Command not found
make[4]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC kernel/bounds.s
/bin/sh: mipsel-linux-gcc: not found
make[5]: *** [kernel/bounds.s] Error 127
make[4]: *** [prepare0] Error 2
make[4]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[3]: *** [prepare] Error 2
make[3]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[2]: *** [silentoldconfig] Error 2
make[2]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
make[1]: *** [defaults-7425b0-android] Error 2
make[1]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
make: *** [vmlinuz-7425b0-android] Error 2
但我得到這mipsel體系Linux的海灣合作委員會給出了正確的答案
which mipsel-linux-uclibc-gcc
/opt/toolchains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc
可能是什麼變數,我需要出口?
嘗試調用'/opt/toolchains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc -v',如果系統仍然說*找不到*,那麼你沒有適當的32位庫。試試'ldd/opt/toolchains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc'。 – yegorich 2014-09-03 08:14:01
ldd顯示「不是一個動態的可執行文件」 – 2014-09-04 08:35:11
我有這樣的預期。 ldd不瞭解它的格式。 'ls -l/opt/toolchains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc'和'file /opt/toolchains/stbgcc-4.5.3-1.1/bin/mipsel-linux是什麼-uclibc-gcc'說?只是爲了確定,這些簡單的事情是O.K. – yegorich 2014-09-04 08:44:34