1虏劲、下載u-boot源碼
git clone git://github.com/Xilinx/u-boot-xlnx.git
git checkout -b xilinx-v2014.4
2跨算、設(shè)置環(huán)境變量 ARCH和CROSS_COMPILE
export ARCH=arm
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
3欲鹏、配置U_boot編譯設(shè)置
make zynq_mitx_defconfig
或者使用
make menuconfig
手動配置
4胳喷、編譯
make
5爷贫、將u-boot
文件改名為u-boot.elf
然后在SDK中打開
Xilinx Tools->Create Boot Image
,按順序添加如下三個文件舀射。
FSBL.elf
xxx.bit
u-boot.elf
然后點擊Create Image,生產(chǎn)BOOT.bin坐桩。
參考:
uboot
https://blog.csdn.net/ryuuei_1984/article/details/52329142
device-tree
https://blog.csdn.net/ryuuei_1984/article/details/52367444
如果需要顯示輸出到屏幕上砌溺,需要在設(shè)備樹中修改升薯,以及在內(nèi)核中勾選.
`bootargs = "console=ttyPS0,115200 console=tty0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0";`