Executing application from u-boot on ZCU102

In this simple demo, we will show how to build, and run a Hello World application from U-BOOT on a ZCU102.

Table of Contents

Linux Image

For this demo the ZCU102 2019.1 BSP is used to create the linux project

petalinux project
petalinux-create -t project -s <path to bsp>.bsp

Create Application:

Here, I will use the SDK project in the hardware folder in the petalinux project created by the BSP. Users can create this as they want though.

In SDK, File → New → Application Project, I gave my project the name "Hello_World". Select Next, and choose the Hello World Template.

Set Exception Level (EL):

If users want to run this app on the uboot, then the exception level will need to be changed to EL=1. To do this, right click on the BSP in the Project Explorer view, and select

hypervisor_guest to true:

Change the Linker script:

I changed the linker script to place the executable at an offset. To do this right click on the Hello_Wold Application in Project Explorer view and select lscript, and open in a text editor.

Make the changes seen below:

Convert ELF to BIN:

Open the bash from SDK, and use objcopy to convert the elf to binary file:

Testing on Hardware:

To test, place the BOOT.BIN (this contains the fsbl, pmufw, atf, and uboot) on the SD card, and boot to u-boot console.

I used tftp to load the binary: