文章摘要:
本文主要描述了imx6 uboot编译及详细说明。

硬件平台: 正点原子i.mx6u-alpha


清除编译:

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean

生成默认配置:

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mx6ull_14x14_evk_emmc_defconfig 

mx6ull_alientek_emmc_defconfig

编译u-boot:

$ make V=1 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

生成文件说明:

u-boot: 编译出来的ELF格式的uboot镜像文件
u-boot.bin: 编译出来的 二进制格式uboot可执行镜像文件
u-boot.cfg: uboot的另外一种配置文件
u-boot.imx: u-boot.bin添加头部信息以后的文件,NXP的CPU专用文件
u-boot.lds: 链接脚本
u-boot.map: uboot映射文件,通过查看此可以知道某个函数被链接到了哪地址上
u-boot.srec:S-Record格式的镜像文件
u-boot.sym: uboot符号文件
u-boot-nodtb.bin:和u-boot.bin一样,u-boot.bin就是 u-boot-nodtb.bin的复制文件

注意事项:
NXP的uboot也需要添加专用的head信息才能用于启动;
执行make命令时会自动执行该命令生成u-boot.imx文件,无须单独操作。

以下列出命令参数以供参考:

$ ./tools/mkimage -n board/freescale/mx6ullevk/imximage-ddr512.cfg.cfgtmp -T imximage -e 0x87800000 -d u-boot.bin u-boot.imx 
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    385024 Bytes = 376.00 kB = 0.37 MB
Load Address: 877ff420
Entry Point:  87800000

-n 指定image文件的名子?
-T 指定输入文件的类型,如"kernel"、"filesystem"、"firmware"、"ramdisk"
-e 内核程序入口地址
-d 指定输入的程序文件