cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nrubeli
Observer
Observer
983 Views
Registered: ‎10-24-2019

Load .elf file with u-boot

Jump to solution

I'm currently trying to load my own elf file (a simple hello world) with u-boot on a zynq7000 zc702 board.

Firstly I downloaded the PetaLinux tools, builded PetaLinux, created an image (FSBL, bitstream, uboot and uimage) and booted it. Everything worked fine. Now instead of loading petalinux I want uboot to load my helloworld.elf file. I tried to create a bootimage like I did for petalinux and added the FSBL,bitstream,uboot and the helloworld.elf file. When I try to load this it throws following error:

INVALID_LOAD_ADDRESS_FAIL

FSBL STATUS = 0xA00F

Is there a way to change the load address for uboot without building u-boot independently? I was hoping to beeing able to use the one I built using the petalinux tools. And how do I know what the start address of the elf file is going to be?

Or am I completly of track? ^^

Thanks in advance!

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
stephenm
Xilinx Employee
Xilinx Employee
974 Views
Registered: ‎09-12-2007

you will need to set the EL to 2 for your hello world.elf. You can do this in the BSP settings (set hypervisor)

See the forum post here

https://forums.xilinx.com/t5/ACAP-and-SoC-Boot-and/run-elf-from-U-boot/td-p/837934

View solution in original post

3 Replies
stephenm
Xilinx Employee
Xilinx Employee
975 Views
Registered: ‎09-12-2007

you will need to set the EL to 2 for your hello world.elf. You can do this in the BSP settings (set hypervisor)

See the forum post here

https://forums.xilinx.com/t5/ACAP-and-SoC-Boot-and/run-elf-from-U-boot/td-p/837934

View solution in original post

nrubeli
Observer
Observer
919 Views
Registered: ‎10-24-2019

I did enable the hypervisor -> still the same error

So I tried to generate a linker script to define where the elf file gets stored. I wasn't able to generate a linker script for an application project with the OS Platform set to Linux so I changed it to standalone. After that I was able to generate a linker script. I placed it at 0x60000000 (because I thought that's where uboot would jump to).

MEMORY
{
axi_bram_ctrl_0_Mem0 : ORIGIN = 0x60000000, LENGTH = 0x10000
ps7_ddr_0 : ORIGIN = 0x100000, LENGTH = 0x3FF00000
ps7_qspi_linear_0 : ORIGIN = 0xFC000000, LENGTH = 0x1000000
ps7_ram_0 : ORIGIN = 0x0, LENGTH = 0x30000
ps7_ram_1 : ORIGIN = 0xFFFF0000, LENGTH = 0xFE00
}

It still wasn't able to execute the elf file and instead was looking for the uimage file (petalinux). After the failure to find uimage I ended up at the zynq prompt. So I tried to execute the elf file from there (bootelf 0x60000000) -> see attached picture. But still not possible.

elfFail.PNG

Do you know how I can make this work?

Thanks guys...

0 Kudos
stephenm
Xilinx Employee
Xilinx Employee
903 Views
Registered: ‎09-12-2007

Is your PL configured here? Are you able to read and write to the AXI BRAM (0x60000000)?

 

Yes, I got this working. My steps where in the thread I linked

0 Kudos