缘由:在安装交叉编译器时没有写入环境变量找不到gcc编译器。或者是写入了环境变量却没有导入系统。linux
首先安装交叉编译器:forlinx的arm-linux-gcc.4.3.2.tgz拷贝到/usr/local/arm shell
在/usr/local/arm目录下 tar zxvf arm-linux-gcc-4.3.2.tgz获得 4.3.2 spa
方法1:
编译器
# gedit /etc/profile
it
再把如下四行加入文件的头部 编译
export PATH=/usr/local/arm/4.3.2/bin:$PATH
export TOOLCHAIN=/usr/local/arm/4.3.2
export TB_CC_PREFIX=arm-linux-
export PKG_CONFIG_PREFIX=$TOOLCHAIN/arm-none-linux-gnueabi
变量
接下来: gcc
source /etc/profile file
而后在uboot1.1.6目录下运行 make forlinx_nand_ram128_config 终端
以后运行make clean 清理下编译过程垃圾
最后make 大功告成。
方法2:
export PATH=$PATH:你的编译器所在的位置
例如export PATH=$PATH:/usr/local/arm/4.3.2/bin
make 也可成功运行。
若是仍是不行运行 sudo -s 打开超级终端的shell 变为root环境,而后运行
export PATH=$PATH:/usr/local/arm/4.3.2/bin
顺便友情提醒,make zImage 必须root用户才能够运行
make uboot 通常用户身份