0.petalinux-config
如果想在FSBL里面加载bitstream的话,必须关闭FPGA Manager!
GPIO操作,MIO从0-53,EMIO从54开始
1.配置NFS


2. Petalinux编译FSBL,U-BOOT并打包成为BOOT.BIN
petalinux-build -c fsbl
petalinux-build -c u-boot
petalinux-package --boot --u-boot --format BIN
petalinux-package --boot --u-boot --fpga ../Z2_Petalinux_Test/base_wrapper.bit --format BIN --force
然后把BOOT.BIN写入到SD卡中即可启动U-Boot
3. U-Boot配置网络
这里就使用网线直连的方式来启动,也可以使用dhcp命令来自动获取ip

记得saveenv,然后ping一下之前的NFS服务器ip,就可以使用了
4. 查看DRAM大小和起始地址
bdinfo查看到DRAM bank

5. 准备kernel和dtb
petalinux-build -c device-tree
petalinux-build -c kernel
6. U-Boot通过NFS启动Kernel
nfs 800000 192.168.123.196:/home/imcort/Documents/nfs/zImage
nfs 0 192.168.123.196:/home/imcort/Documents/nfs/system.dtb
bootz 800000 - 0
u-boot只需要保留最基本的设备驱动即可
setenv bootcmd 'dhcp; nfs 800000 192.168.123.196:/home/imcort/Documents/nfs/zImage; nfs 0 192.168.123.196:/home/imcort/Documents/nfs/system.dtb; bootz 800000 - 0'
saveenv
网友评论