三.Uboot初次编译
1.Ubuntu下安装ncurses库
点击查看代码
sudo apt-get install libncurses5-dev
2.编译uboot前需要先配置
点击查看代码
#make 架构 交叉编译器 指令
#!/bin/bash (.sh脚本开头要加这个)
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- -j12 #编译,V=1:输出编译信息,-j12:内核为12核
3.编译完成后生成uboot.bin,必须向.bin文件添加头部信息(会通过/tools/mkimage自动添加),生成uboot.imx
4.移植uboot.imx,到mgftool下,file和firmware中(file中的是最终烧到外存的系统,fiemware中的是第一步烧到DDR的,用于启动file中的系统)
5.执行mfgtool下的vbs烧录(此方法烧录整个系统)
6.注意:如果配置过uboot,不要执行distclean,否则会清除配置
7.为了方便开发,直接在uboot的顶层Makefile中更改ARCH,CROSS_COMPILE(250行左右定义)
点击查看代码
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-gnueabihf-
然后直接
点击查看代码
make V=1 -j12
浙公网安备 33010602011771号