1、下载u-boot源码
git clone git://github.com/Xilinx/u-boot-xlnx.git
git checkout -b xilinx-v2014.4
2、设置环境变量 ARCH和CROSS_COMPILE
export ARCH=arm
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
3、配置U_boot编译设置
make zynq_mitx_defconfig
或者使用
make menuconfig
手动配置
4、编译
make
![](https://img.haomeiwen.com/i9120120/c4349e74c05c19e6.png)
5、将u-boot
文件改名为u-boot.elf
![](https://img.haomeiwen.com/i9120120/7dd2156ebaf7151a.png)
然后在SDK中打开
Xilinx Tools->Create Boot Image
,按顺序添加如下三个文件。
FSBL.elf
xxx.bit
u-boot.elf
然后点击Create Image,生产BOOT.bin。
参考:
uboot
https://blog.csdn.net/ryuuei_1984/article/details/52329142
device-tree
https://blog.csdn.net/ryuuei_1984/article/details/52367444
如果需要显示输出到屏幕上,需要在设备树中修改,以及在内核中勾选.
`bootargs = "console=ttyPS0,115200 console=tty0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0";`
![](https://img.haomeiwen.com/i9120120/337181b49dde31c6.png)
网友评论