In this example, you will make a Linux boot image for QSPI Flash, write it into Flash, and let it boot.
QSPI Flash on a board normally has less capacity than an SD card or eMMC because of its relatively high price. It layout should be planned carefully. The Linux kernel image and rootfs can be stored in the same QSPI as this example, or stored in another non-volatile form of storage such as an SD card, NAND Flash, or eMMC. The only difference is the BOOT.BIN packaging contents.
In this example, you will not only package normal boot components, such as FSBL, bitstream, and U-Boot into BOOT.BIN, but also the following:
The boot.scr file (read by U-Boot)
The flat image image.ub which contains the Linux kernel
The device tree (read by the Linux kernel)
rootfs
The normal boot components can be packaged continuously. After the bootROM loads FSBL, FSBL can load bitstream and U-Boot properly and give control to U-Boot.
U-Boot reads boot.scr from Flash offset 0x00FC0000 by default. Assign boot.scr to this address during packaging.
By default, it is programmed in boot.scr that if the boot mode is QSPI, image.ub should be read from Flash offset 0x01000000 (16 MB). However, because ZC702 has only 16 MB QSPI Flash, boot.scr needs to be modified to load it from around the 5 MB area. Because the petalinux-package command uses 0x00520000 by default, you can keep using this address.
The following table shows the memory address layout you will create in this example.
Partition |
Flash Offset Address |
Size |
DDR Loading Address |
---|---|---|---|
FSBL |
0x0 |
Very Small |
Address info embedded in ELF |
Bitstream |
Continuous with previous |
3.9 MB |
FSBL loads it as data |
u-boot |
Continuous with previous partition |
Very Small |
Address info embedded in ELF |
image.ub |
U-Boot loads it from 0x00520000 |
11 MB |
U-Boot loads it to 0x10000000 |
boot.scr |
U-Boot reads it from Flash offset 0x00FC0000 |
2 KB |
U-Boot loads it to 0x03000000 |