Generate Boot Image

Key Revocation Lab (XAPP1344)

Document ID
XAPP1344
Release Date
2022-03-14
Revision
v1.1 English

The next step is to create a boot image (BI) to boot the FBSL and lab application generated in previous sections via SD card boot mode.

A BI is generated using a Boot Image Format (BIF) file and the Bootgen tool (see UG1283).
Note: BI uses the FSBL and lab application ELF files generated in previous sections.
  1. Create a non_secured.bif file in C:\Xilinx\enhanced_key_revocation_lab_files with the following content:
    //arch = zynqmp; split = false; format = BIN
    the_ROM_image:
    {
     [bootloader, destination_cpu=a53-0] C:\Xilinx\Key_Revocation_Lab\Key_Revocation_Platform\export\Key_Revocation_Platform\sw\Key_Revocation_Platform\boot\fsbl.elf
     [destination_cpu=a53-0, exception_level=el-3] C:\Xilinx\Key_Revocation_Lab\key_revocation_lab\Debug\key_revocation_lab.elf
    }
    Note: If using Linux, the backslashes will need to be changed to forward slashes.
  2. Save the BIF file.
    Note: In this application note C:\Xilinx\Key_Revocation_Lab has been used as a Vitis workspace location. If any other workspace location is used, the BIF file contents need to be modified accordingly.
    Note: Linux users must modify this file using the "/".
  3. Generate a BI named BOOT.bin using the non_secured.bif file:
    1. Launch a Windows CMD prompt and change to the directory containing the BIF file, in this case: cd C:\Xilinx\enhanced_key_revocation_lab_files.
      Note: If using Linux, change directory to the location where the lab files were extracted.
    2. Run the bootgen command as bootgen -image non_secured.bif -r -o BOOT.bin -arch zynqmp -w on.
      Note: Refer to Bootgen User Guide (UG1283) for detailed information.
      Note: The Windows and/or Linux system PATH variable needs to point to the bootgen tool or xsct can be launched and used instead. See Xilinx Software Command-Line Tool (XSCT) Reference Guide (UG1208).
      Note: If running on windows, step a is a CD command to the directory, and step b can be run as is.

    A BOOT.bin file is created in C:\Xilinx\enhanced_key_revocation_lab_files. This is the BI that must be loaded onto the device.