FS-Boot for MicroBlaze Platform Only - 2020.2 English

PetaLinux Tools Documentation Reference Guide (UG1144)

Document ID
UG1144
Release Date
2020-11-24
Version
2020.2 English

FS-Boot in PetaLinux is a first stage boot loader demo for MicroBlaze™ platform only. It is to demonstrate how to load images from flash to the memory and jump to it. If you want to try FS-Boot, you must have a minimum of 8 KB block RAM.

FS-Boot supports parallel flash and SPI flash in standard SPI mode and Quad SPI mode only.

In order for FS-Boot to know where in the flash should get the image, macro CONFIG_FS_BOOT_START needs to be defined. This is done by the PetaLinux tools. PetaLinux tools set this macro automatically from the boot partition settings in the menuconfig primary flash partition table settings. For parallel flash, it is the start address of boot partition. For SPI flash, it is the start offset of boot partition.

The image in the flash requires a wrapper header followed by a BIN file. FS-Boot gets the target memory location from wrapper. The wrapper needs to contain the following information:

Table 1. Wrapper Information
Offset Description Value
0×0 FS-Boot bootable image magic code ×0b8b40008
0×4 BIN image size User-defined
0×100 FS-Boot bootable image target memory address User-defined. The PetaLinux tool automatically calculates it from the U-Boot text base address offset from the Memory Settings from the menuconfig.
0×10c Where the BIN file start None

The FS-Boot ignores other fields in the wrapper header. The PetaLinux tool generates the wrapper header to wrap around the U-Boot BIN file.

The FS-Boot supports symmetric multi processing (SMP) from the 2020.1 release onwards. You can have multiple MicroBlaze processors in your design. A maximum of eight cores is supported.

The same FS-Boot which is built as part of the petalinux-build/petalinux-build -c fsboot works for all the cores. XSDB is needed to flash the FS-Boot on all the cores. The following is an example for four cores. xsdb > ta lists all the available cores. To boot your target with SMP support, follow these steps:

<plnx-tool>/tools/xsct/bin/xsdb
xsdb > connect -url <target-url>
xsdb > fpga -f <plnx-proj-root>/images/linux/system.bit
xsdb > ta 
xsdb > ta <core number>
xsdb > dow -f <plnx-proj-root>/images/linux/fs-boot.elf
the above two steps for all available cores.
xsdb > dow -f <plnx-proj-root>/images/linux/uboot.elf
xsdb > dow -f <plnx-proj-root>/images/linux/image.ub