centos配置arm-linux-gnueabihf交叉编译环境

下载交叉编译工具:

https://launchpad.net/linaro-toolchain-binaries/+download

选择gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.bz2进行下载

wget https://launchpad.net/linaro-toolchain-binaries/trunk/2013.10/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.bz2

解压缩:

tar -jxvf gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.bz2

设置环境变量

export PATH=/root/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/:$PATH

编译

make uImage CROSS_COMPILE=arm-linux-gnueabihf- -j2 ARCH=arm

如果编译到最后出现如下错误:

"mkimage" command not found - U-Boot images will not be built
make[1]: *** [arch/arm/boot/uImage] 错误 1
make: *** [uImage] 错误 2

则安装mkiamge工具

yum inatall uboot-tools.i686

最后显示如下信息,则表示编译成功

Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-3.4.104-00136-gd47d367
Created:      Wed Aug  3 15:02:47 2016
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4354392 Bytes = 4252.34 kB = 4.15 MB
Load Address: 40008000
Entry Point:  40008000
  Image arch/arm/boot/uImage is ready

<完>

这篇文章目前没有评论

Leave a Reply

(必填项)

(必填项)

(可选)