cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,907 Views
Registered: ‎02-26-2018

run elf from U-boot

Jump to solution

Hello everyone.

Thanks in advance.

I have compiled the xuartps_hello_world_example application from XSDK and the elf file has been generated. Next, I have initialized the U-boot from the SD card and I have tried to execute the elf file from the Uboot to run the application and it does not get to execute correctly.

Attached the log.

A cordial greeting.
Thanks again.
Ivan.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
2,044 Views
Registered: ‎05-10-2017

Re: run elf from U-boot

Jump to solution

Ivan,

 

Currently this is not possible since bootelf command has no support for 64-bit elf loading in mainline.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

10 Replies
Highlighted
Moderator
Moderator
2,045 Views
Registered: ‎05-10-2017

Re: run elf from U-boot

Jump to solution

Ivan,

 

Currently this is not possible since bootelf command has no support for 64-bit elf loading in mainline.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

Highlighted
Observer
Observer
1,782 Views
Registered: ‎02-26-2018

Re: run elf from U-boot

Jump to solution

Hello jovitac,
Thank you very much for answering.

A greeting.

0 Kudos
Highlighted
Visitor
Visitor
1,272 Views
Registered: ‎04-09-2019

Re: run elf from U-boot

Jump to solution

 I built the officially supported freeRTOS demo based on zcu102 and run the 64bit elf via u-boot, oops, it does not support 64bit elf, is there a workaround?

0 Kudos
Highlighted
Moderator
Moderator
1,232 Views
Registered: ‎09-12-2007

Re: run elf from U-boot

Jump to solution

users can convert to a bin file, and use the go command in uboot.

 

So, for example, lets take a hello world application on zynq ultrascale.I created the hello world in SDK, and updated the linker script

to place this at 0x60000000:

right_click.png

linker.png

In the BSP settings we need to set the exception level (EL1).

So, here I just enable the hypervisor:

hypervisor.jpg

I converted the elf to binary (you can open the bash from SDK)

aarch64-none-elf-objcopy -O binary hello_world.elf hello_world.bin

I loaded the bin over TFTP to the location where this would be executed from in my case 0x60000000

uboot.png

Hope this helps

Highlighted
Visitor
Visitor
1,211 Views
Registered: ‎04-09-2019

Re: run elf from U-boot

Jump to solution

hi stephenm

thank you very much

I updated the linker script but when I want to update the BSP settingss, the SDK no respones after clicked the Board Support Package Settings

should I need to creat an Application Project then build it?  but when I click new->Application Project occur a new error as following, the SDK verison is 18.3, host OS is ubuntu 16.04 LTS , the java version is 9.0.4,could you give me some advise?

Screenshot from 2019-04-17 11-17-59.png

0 Kudos
Highlighted
Moderator
Moderator
1,201 Views
Registered: ‎09-12-2007

Re: run elf from U-boot

Jump to solution

Looks like an OS issue on your end. Do you see same issue with all SDK projects.

 

0 Kudos
Highlighted
Visitor
Visitor
1,180 Views
Registered: ‎04-09-2019

Re: run elf from U-boot

Jump to solution

thanks stephenm,

I startup it form INSTALL_PATH/xilinx/SDK/2018.3/bin/xsdk instead of INSYALL_PATH/xilinx/SDK/2018.3/eclipse/lnx64.o/eclipse, the issuse was fixed,

I created an empty Application, built, convert and execute success according to your suggestion.

then I try to create a FreeRTOS hello world project(os platform is freertos10_xilinx,hardware platform is ZCU102_hw_platform,with others default settings), but i could not set the exception level in the BSP, after converted the elf, load the bin via TFTP,  failed at the starting application 0x600000000, this cause by the expection level setting or others setting? could you tell me how to setting the expection level if i creat a FreeRTOS hello world project,

thank you very much!

0 Kudos
Highlighted
Moderator
Moderator
1,162 Views
Registered: ‎09-12-2007

Re: run elf from U-boot

Jump to solution

Not sure if you can do this for freertos in GUI. Can you check with standalone OS?

Might need to hack the freertos port to change exception level

 

0 Kudos
Visitor
Visitor
1,157 Views
Registered: ‎04-09-2019

Re: run elf from U-boot

Jump to solution

OK, thanks, i just want to boot up freertos based on zcu102, then develop application, Is there any relevant documents, if yes, could you share me one?

0 Kudos
Highlighted
Visitor
Visitor
245 Views
Registered: ‎08-06-2019

Re: run elf from U-boot

Jump to solution
0 Kudos