常用命令
petalinux-create --type project --template zynqMP --name zynqMP_nvme ## 在当前目录下生成 zynqMP_nvme 项目
petalinux-config --get-hw-description [./] ## 包含 .hdf 或者是 .dsp的目录
petalinux-config -c kernel ## 生成内核
petalinux-build ## 构建u-boot
petalinux-package --boot --fsbl ./images/linux/zynq_fsbl.elf --fpga --u-boot --force ##(SD卡启动)
petalinux-package --boot --fsbl ./images/linux/zynq_fsbl.elf --fpga --u-boot --kernel --force ##(FLASH启动)
配置nvme
- 配置内核
petalinux-config -c kernel
Check: Bus options->PCI support should
Check: Bus options->PCI support->Message Signaled Interrupts (MSI and MSI-X)
Check: Bus options->PCI support->Enable PCI resource re-allocation detection
Check: Bus options->PCI support->PCI host controller drivers->Xilinx AXI PCIe host bridge support
Enable: Device Drivers->Block devices->NVM Express block device
- 配置根文件系统
petalinux-config -c rootfs
Filesystem Packages->console/utils->pciutils->pciutils
Filesystem Packages->base->util-linux->util-linux
Packages->base->util-linux->util-linux-blkid
Packages->base->util-linux->util-linux-fdisk
Packages->base->util-linux->util-linux-mkfs
Packages->base->util-linux->util-linux-mount
Packages->base->e2fsprogs->e2fsprogs
Packages->base->e2fsprogs->e2fsprogs-mke2fs
- 强制从image中启动系统
setenv ##设置环境变量
sf probe
sf read 0x1000000 0x02394a80 0x1600000
bootm 0x1000000
lsblk
fdisk /dev/nvme0n1