参考:https://medium.com/developments-and-implementations-on-zynq-7000-ap/install-ubuntu-16-04-lts-on-zynq-zc702-using-petalinux-2016-4-e1da902eaff7
创建一个空的Petalinux Zynq工程
petalinux-create --type project --template zynq --name test_01
把1中的XSA文件准备好,导入到Petalinux工程中
cd test_01
petalinux-config --get-hw-description ../design_1_wrapper.xsa
之后会打开配置界面,把kernel改到sd卡上:
Go to Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> boot image settings and set ‘image storage media’ option to ‘primary sd’
Go to Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> kernel image settings and set ‘image storage media’ option to ‘primary sd’
Go to Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> dtb image settings and set ‘image storage media’ option to ‘primary sd’
Go to Image Packaging Configurations and set ‘Root filesystem type’ option to ‘SD card’
然后编译
petalinux-build
完成以后生成BIN文件
petalinux-package --boot --u-boot --format BIN
安装磁盘分区软件gparted然后配置磁盘分区
sudo apt install gparted
sudo gparted