![构建 u-boot /bin/bash 时:arm-none-linux-gnueabi-gcc:未找到命令](https://linux22.com/image/975426/%E6%9E%84%E5%BB%BA%20u-boot%20%2Fbin%2Fbash%20%E6%97%B6%EF%BC%9Aarm-none-linux-gnueabi-gcc%EF%BC%9A%E6%9C%AA%E6%89%BE%E5%88%B0%E5%91%BD%E4%BB%A4.png)
我目前在 64 位机器上运行 Ubuntu 12.0.4。我有一块 AM335X 开发板。随套件一起提供的还有压缩内核 (linux 3,2)、rootfs、u-boot 和 ARM 交叉编译器 (arm-2010q1)。
我将所有内容解压到一个子文件夹 (/home/brent/work)。
我已将以下内容添加到我的 .bashrc 文件中:
PATH=/home/brent/work/arm-2010q1/bin:$PATH
CROSS_COMPILE=arm-none-linux-gnueabi-
我还安装了以下内容:
sudo apt-get install ia32-libs
当我去构建 u-boot 时,我正在执行以下操作(根据套件附带的说明):
brent@brent~/work/u-boot$ sudo make distclean
awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }' boards.cfg > .boards.depend
brent@brent~/work/u-boot$ sudo make myd_am335x_lcd4.3_config
awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }' boards.cfg > .boards.depend
Configuring for myd_am335x_lcd4.3 - Board: myd_am335x, Options: DISPLAY_LCD43
brent@brent~/work/u-boot$ sudo make
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
Generating include/autoconf.mk
/bin/bash: line 3: arm-none-linux-gnueabi-gcc: command not found
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
Generating include/autoconf.mk.dep
/bin/bash: line 3: arm-none-linux-gnueabi-gcc: command not found
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
/bin/bash: arm-none-linux-gnueabi-ld: command not found
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
arm-none-linux-gnueabi-gcc -DDO_DEPS_ONLY \
-g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -I/home/brent/CropVentures/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem -pipe -DCONFIG_ARM -D__ARM__ -march=armv5 -Wall -Wstrict-prototypes \
-o lib/asm-offsets.s lib/asm-offsets.c -c -S
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
make: *** [lib/asm-offsets.s] Error 127
我已经验证二进制文件位于 /home/brent/work/arm-2010q1/bin
我也不确定为什么我需要将 sudo 作为命令的一部分?如果不这样做,我会收到权限错误。
任何有关我做错的事情的帮助或信息都将非常感激。
答案1
检查你的 arm 工具链是否适用于 64 位,你可以使用以下命令:
file <arm-tool-chain>/bin/arm-none-linux-gnueabi-gcc
如果没有显示精灵 64 位那么它将不起作用。将 arm 工具链从 32 位更改为 64 位。