内核编译 出错 arm-linux-gcc: not found

原因:在安装交叉编译器时没有写入环境变量找不到gcc编译器。或者是写入了环境变量却没有导入系统。

首先安装交叉编译器:forlinx的arm-linux-gcc.4.3.2.tgz拷贝到/usr/local/arm

在/usr/local/arm目录下 tar zxvf arm-linux-gcc-4.3.2.tgz得到 4.3.2

方法1:

# gedit /etc/profile

再把以下四行加入文件的头部

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

接下来:

source /etc/profile

然后在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 一般用户身份


你可能感兴趣的:(OK6410,uboot1.1.6编译)