Prepare boot image

This how-to describes the process of creating a boot image for Zynq. This page is only a quick start into this topic. For more information please refer to the Zynq Software Developer Guide.This is a part of the Xilinx design flow described in Xilinx Open Source Linux.

Table of Contents

Tools Required

Input Files Required

Output Files Produced

  • boot.bin

Bootimage Content Considerations

What components are part of the boot image and what not, can not be answered in a generic way. It heavily depends on the use-case and requirements. At a bare minimum, it must contain an FSBL. But that alone would not get you any further. Hence a common boot image consists of an FSBL and U-Boot. In cases the FSBL also takes over programming the PL, a bitstream would be added as well. Higher level OS components can be processed by U-Boot from various sources. U-Boot can load those images from flash, via Ethernet or assume they have been pre-loaded by other means (e.g. JTAG or the FSBL). The solution space for this question is virtually infinite and requirements for parameters like boot time, flash size, flexibility, etc. have to be taken into account when making this decision.

The boot.bif file describes the partition layout and content of the target boot.bin.

Example: FSBL pre-loads Linux images

This example contains - next to the obligatory boot loaders - images to boot Linux. In this case the FSBL loads those iamges to the address given by the load attribute in the .bif file. That way U-Boot would not have to load any images and would simply boot by directly issuing a matching bootm command.
image : {
        [load=0x3000000]uImage.bin   // currently bootgen requires a file extension. this is just a renamed uImage

Example: U-Boot loads Linux images

This example contains the same images as the one above, but this time instead of the load, the offset attribute is used. In this case the FSBL does not touch those images, but they are located at a known offset in the boot image. By matching these offsets with U-Boot, U-Boot can read the images from flash prior to booting them.
image : {
        [offset=<uimage_offset>]uImage.bin   // currently bootgen requires a file extension. this is just a renamed uImage

Generating the boot image

The bootgen utility uses the description from the boot.bif file to create the final boot.bin
bootgen -image boot.bif -o boot.bin

Build Steps

Related Links

© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy