uclinux编译错误

我正在尝试使用硬件制造商提供的工具链交叉编译uclinux。

当我运行make命令时,出现一个我无法理解的错误:

 yannick@ubuntu:~/uclinux-dist$ make make -C tools/ucfront make[1]: Entering directory `/home/yannick/uclinux-dist/tools/ucfront' make[1]: `ucfront' is up to date. make[1]: Leaving directory `/home/yannick/uclinux-dist/tools/ucfront' ln -sf /home/yannick/uclinux-dist/tools/ucfront/ucfront tools/ucfront-gcc ln -sf /home/yannick/uclinux-dist/tools/ucfront/ucfront tools/ucfront-g++ make ARCH=arm CROSS_COMPILE=arm-uclinux-elf- -C linux-2.6.x || exit 1 make[1]: arm-uclinux-elf-gcc: Command not found make[1]: Entering directory `/home/yannick/uclinux-dist/linux-2.6.x' CHK include/linux/version.h make[2]: `include/asm-arm/mach-types.h' is up to date. CC arch/arm/kernel/asm-offsets.s /bin/sh: 1: arm-uclinux-elf-gcc: not found make[2]: *** [arch/arm/kernel/asm-offsets.s] Error 127 make[1]: *** [prepare0] Error 2 make[1]: Leaving directory `/home/yannick/uclinux-dist/linux-2.6.x' make: *** [linux] Error 1 yannick@ubuntu:~/uclinux-dist$ locate arm-uclinux-elf-gcc ... /usr/local/arm-uclinux-tools/bin/arm-uclinux-elf-gcc ... yannick@ubuntu:~/uclinux-dist$ echo $PATH /usr/local/arm-uclinux-tools/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games yannick@ubuntu:~/uclinux-dist$ ls -l /usr/local/bin ... lrwxrwxrwx 1 root root 52 May 20 22:53 arm-uclinux-elf-gcc -> /usr/local/arm-uclinux-tools/bin/arm-uclinux-elf-gcc ... yannick@ubuntu:~/uclinux-dist$ ls -l /usr/local/arm-uclinux-tools/bin/ ... -rwxr-xr-x 1 root root 81832 May 20 19:27 arm-uclinux-elf-gcc ... yannick@ubuntu:~/uclinux-dist$ 

谢谢 !!

运行make时的路径值不一定是执行命令时的值。 在你试图编译源文件之前,我会在实际的makefile放置一个echo $PATH

这至少会说明在构建过程中是否会改变你的路径。

你还应该在环境变量中加上这个

跨工具的路径

导出CROSS_COMPILE = arm-uclinux-elf-