编译正点原子提供的版级uboot
- 找到uboot源码
- 传到vm虚拟机的目录下,解压。
- 确定DDR3和EMMC大小
- 编译过程(注意必须要有gcc环境)
sudo apt install build-essential
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mx6ull_14x14_ddr512_emmc_defconfig
make V=1 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8
可以在顶层makefile中配置交叉编译器和编译的架构
ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf-
uboot编译注意点
首次编译生成的u-boot.bin和u-boot.imx,一个u-boot.bin是uboot的代码,直接烧录是用不了的。对于imx6ull来说,BootROM启动必须读取flash头部第一个扇区4KB里面的IVT,DCD,DATA等内容然后初始化ddr。随后才会跳转到uboot,u-boot.imx是u-boot.bin已经添加了头部信息的可直接运行文件。
首先,defconfig配置文件,必须要和板子上的ddr,flash对应。比如emmc_defconfig说明要用emmc,nand_defconfig说明要用到nand。