Petalinux boot from QSPI flash
1 在u-boot build时要加上 串行flash命令,所以要在
/subsystems/linux/configs/u-boot/platform-top.h头文件中加上宏
define CONFIG_ZYNQ_QSPI
重新build u-boot.
2 配置QSPI启动方式
petalinux-config
To set the boot image location as QSPI:
a. In the configuration GUI select:
i. Subsystem AUTO Hardware Settings
ii. Advanced bootable images storage Settings
iii. boot image settings
iv. Image storage media
b. Change the device selection to primary flash.
3 Select:
a. Kernel image settings
b. Image storage media (primary sd)
Change the device selection to primary flash.
petalinux-build
有2种方法 可以烧写 boot.bin 和 image.ub, 一个是xilinx sdk里的program flash 命令,另一个就是我喜欢的 串行flash的命令。
把生成的新的boot.bin 重新起个名字 BOOT_qspi.BIN,然后考到sd卡里,利用sd卡启动方式 启动板卡
mount /dev/mmcblk0p1 /mnt
flashcp /mnt/BOOT_QSPI.BIN /dev/mtd0
很快 10多秒就考完了,
flashcp /mnt/image.ub /dev/mtd2
umount /mnt
搞定。开心。。
串行 flash的命令: