Stages of the Zynq Linux boot process

Stages of the Zynq Linux boot process

  • Stage-0 : On power-on reset, system reset or software reset, a hard-coded boot ROM is execute on the primary processor.
  • Stage-1 : Typically this is the FSBL(First Stage Boot Loader). It can, however, be any user controlled code.
  • Stage-2 : Typically this is the user design that will run on the processing system. It could also be the second-stage bootloader(SSBL), and is completely within user control.

Files required to Boot Linux on Zynq-7000

  1. BIN
  2. zImage
  3. dtb
  4. image.gz
BOOT.BIN

BOOT.BIN is the zynq boot image file. It is actually the combination of 2 compulsory files,

  • FSBL executable in linkable format( .elf)
  • SSBL executable in linkable format(.elf)

and an optional bitstream(.bit) file.

The FSBL and SSBL files contain the final stages of the bootloader which is used to load Linux on the device. The bitstream is the file that is used to configure the PL of the Zynq-7000 AP device.

The ordering of the files that are combined together to form the boot image is important. If the bitstream is required it must be placed after the FSBL file and before the SSBL file.

Figure 1 Required files for Zynq Linux boot medium

The “.BIN” boot image can be put into Flash or copied directly to the first FAT partition of an SD card.

Additionally, it may also contain the image.ub FIT image.

zImage

The zImage file contains the compressed Linux kernel. It will decompress itself once loaded into memory by the SSBL.

devicetree file(.dtb)

Information of the hardware that Linux is to booted on is contained in the device tree blob(.dts) file. The device tree is defined in human-readable text file, called the device tree source file, and is then compiled into the binary form by the compiler to form the device tree blob which can be understood by U-boot.

ramdisk8M.image.gz

This is a RAM disk image that, when loaded into memory, will allow a portion of RAM to be used as if it were a disk drive. This creates a temporary disk drive in the RAM which the Linux system can use as a file system to mount the root directory.

Follow the steps below to generate the boot image an “.BIN” format.

$petalinux-package --boot --format BIN --fsbl <FSBL image> --fpga <FPGA bitstream> --u-boot