Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.
Code Block
themeMidnight
image : {
        [bootloader]fsbl.elf
        u-boot.elf
        [load=0x2a00000]devicetree.dtb
        [load=0x2000000]uramdisk.image.gz
        [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.
Code Block
themeMidnight
image : {
        [bootloader]fsbl.elf
        u-boot.elf
        [offset=<dt-offset>]devicetree.dtb
        [offset=<ramdisk_offset>]uramdisk.image.gz
        [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
Code Block
themeMidnight
bootgen -image boot.bif -o i boot.bin

Build Steps

Related Links