Wiki

This version is outdated by a newer approved version.DiffThis version (22 Feb 2023 01:42) was approved by ALEXIS CZEZAR TORRENO.The Previously approved version (31 Jan 2023 07:06) is available.Diff

This is an old revision of the document!


How to build the ZynqMP boot image BOOT.BIN

The boot image BOOT.BIN is build using the bootgen tool which requires several input files.

Instructions on how to build the Hardware Description File (HDF) handover file can be found here:

All further steps are lengthy explained on the Xilinx Wiki Page

Use script to build BOOT.BIN

For ease of use we provide a bash shell script which allows building BOOT.BIN from system_top.hdf, u-boot.elf and either bl31.elf or a path to the Arm Trusted Firmware repository

Download

The script can be downloaded from here:

NOTE: After downloading the script you need to make it executable

$ chmod +x build_zynqmp_boot_bin.sh

Usage

usage: build_zynqmp_boot_bin.sh system_top.xsa u-boot.elf (download | bl31.elf | <path-to-arm-trusted-firmware-source>) [output-archive]
  • Make sure that Vivado and Vitis is included in the path and a cross compiler for arm64 exist before running the script. For more information about cross compilers, see zynqmp.
  • Path to system_top.xsa and u-boot.elf are required parameters.
    • To find system_top.xsa, see Building HDL. After building a project in the HDL repository, it can be found inside a <project>_<board>.sdk folder.
    • See the note at the bottom of the page regarding u-boot.elf.
  • The 3rd argument must either be download (which will git clone the ATF repository), bl31.elf or the file system path to the Arm Trusted Firmware source code repository
    • See the note at the bottom of the page regarding bl31.elf.
  • An optionally 4th name parameter can be given to tar.gz the output directory. (name.tar.gz)
  • BOOT.BIN and other build output files are located at the newly created local directory named: output_boot_bin.
  • This script requires Xilinx Vitis and bootgen in the PATH.
    • A simple way is to source vivado settings[32|64].sh for Linux:
$ source /opt/Xilinx/Vivado/202x.x/settings64.sh
  • When using cygwin, you can add the following in the ~/.bashrc configuration file:
export PATH=$PATH:/cygdrive/c/Xilinx/Vivado/202x.x/bin
export PATH=$PATH:/cygdrive/c/Xilinx/Vitis/202x.x/bin
export PATH=$PATH:/cygdrive/c/Xilinx/Vitis/202x.x/gnu/microblaze/nt/bin

NOTE: u-boot.elf and bl31.elf
For those who don't want to build u-boot or bl31 themselves.
Both u-boot.elf and bl31.elf can be extracted from the project folder on the SD Card image, bootgen_sysfiles.tgz.

u-boot.elf may have a different name, rename that .elf file to u-boot.elf before using.

resources/tools-software/linux-software/build-the-zynqmp-boot-image.1675663610.txt.gz · Last modified: 06 Feb 2023 07:06 by ALEXIS CZEZAR TORRENO