cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
387 Views
Registered: ‎04-30-2019

booting .elf at certain address

Hi,

I am working with ZCU102 and I was able to program .mcs (contains FSBL.elf, wrapper.bit, and Hello.elf) to flash.

I have Hello2.elf located in memory at address say 0x1000. How (what functions etc) can I modify the codes in Hello.c such that it can boot Hello2.elf at 0x1000? My goal is that I can just modify the codes in Hello2.elf and overwrite it instead of going through the re-making image and re-programing flash process.

Thanks

0 Kudos
6 Replies
Highlighted
Moderator
Moderator
340 Views
Registered: ‎10-30-2017

Re: booting .elf at certain address

Hi @kysontan ,

 

You can check with the multiboot for the same. Create different images and program them on flash and perfrom the multiboot when you want.

Please check the multiboot on ZynqMPSoC here:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842403/Zynq+Ultrascale+MPSoC+Multiboot+and+Fallback

 

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

0 Kudos
Highlighted
Observer
Observer
327 Views
Registered: ‎04-30-2019

Re: booting .elf at certain address

but i dont want to put all the .elf files into an image which gets programmed to flash

i want to be able to only program Hello.elf to flash only once, but have Hello.elf to boot whatever .elf at address 0x1000. This way i can modify the .elf at 0x1000 however i want without modifying Hello.elf and/or the image that contains it

0 Kudos
Highlighted
Moderator
Moderator
307 Views
Registered: ‎10-30-2017

Re: booting .elf at certain address

Hi @kysontan ,

If your first elf is at address 0x1000 and if you want to over write this elf with other new one, it may not work. Because the bootloader have the elf size and check sum. if anything is not matching with original one when you change the elf at address 0x1000 then bootloader fails to load elf. the new elf may have different size and checksum.

 

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

0 Kudos
Highlighted
Observer
Observer
295 Views
Registered: ‎04-30-2019

Re: booting .elf at certain address

so my image has FSBL and 1.elf, my question was if there is a way of me coding 1.elf so that it can boot 2.elf at 0x1000

and later i can overwrite 2.elf with 3.elf without modifying the image (contains FSBL and 1.elf)

0 Kudos
Highlighted
Moderator
Moderator
282 Views
Registered: ‎09-12-2007

Re: booting .elf at certain address

You need to do this in the linker script. 

0 Kudos
Highlighted
Observer
Observer
270 Views
Registered: ‎04-30-2019

Re: booting .elf at certain address

Capture1.PNGcan you give me more details what i need to do for achieving it? or documents that i can read about this?

here is what i see after i created a linker script for HelloWorld.elf. How do i know which name is for what? And the meanings of the section names?

thanks

 

Capture1.PNG
0 Kudos