ZCU102 Image creation in OSL flow

This article will discuss the steps needed to download and compile a Bootable (SD) Linux Image for the ZCU102 using the OSL flow.

Table of Contents


The recommended flow for building a Linux system is to use the Petalinux tools. However, this article offers an alternative for users that want full visibility into the Image.

This assumes that the users has downloaded Vitis (used to by the devcetree generator). I have structured this wiki in a way that users can copy this into their Makefile for ease of use. However, users will need to be careful of the makefile syntax while copy and pasting.
Some steps are duplicated. For example, the cross_compile steps. This is intentional to allow the users to build each image in isolation. However, users must use the same tag, as there are dependencies between pmufw and atf for example.

NOTE: If building on an Ubuntu (or derivative machine), ensure that the default shell has been changed from Dash to Bash.  Compiling in Dash may result in syntax errors within the Makefile that will prevent the code from compiling.

Makefile params:

Note: Make sure that the tools patch point to your relevant install on your machine

Getting Sources:

Build FSBL

Create, or append the proc below to your xsct_script.tcl

Note: if you have a development board such as the ZCU102, then you can pass this as a symbol to the compiler

Then call this from your Makefile:

Build PMU Firmware

Create, or append the proc below to your xsct_script.tcl

Then call this from your Makefile:

Build ATF

Note: If users want to debug (ie use the symbols) the ATF in Vitis, then set the DEBUG=1. This will place the ATF in DDR at 0x1000

Build u-boot

Note: If users want to debug (ie use the symbols) the u-boot in Vitis, then use the u-boot (renamed u-boot.elf) in the boot image.

Build Linux Image:

Build device-tree

  • Create a xsct_script.tcl file with the following contents:

If there is a valid board found, then it will added to dtsi files. Then we can call this from our Makefile:

Compile the devicetree (DTB)

Create SD image

Create the BIF file with the contents below:
Then in bootgen command from your Makefile

Downloading the RootFS:

There are released images for all Xilinx development boards. I will extract the rootfs from the image.ub here using dumpimage utility:

Creating the FIT image:

Use the command below to created the .ub file:

  • u-boot-xlnx/tools/mkimage -f fitimage.its image.ub

Load the BOOT.BIN and the image.ub and boot.scr on the SD card and boot.