zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.5k stars 6.43k forks source link

[FEATURE][Intel ADSP] Get rid of fix_elf_addrs.py step #52861

Open kv2019i opened 1 year ago

kv2019i commented 1 year ago

Is your feature request related to a problem? Please describe. Currently intel_adsp Zephyr build requires an extra step between linker and running the rimage tool on Intel ADSP platforms.

The process is currently:

linker -> fix_elf_adds.py -> rimage -> bootable .ri image

The script is maintained in zephyr/soc/xtensa/intel_adsp/common/fix_elf_addrs.py

The reason for this script is that in old SOF XTOS linker scripts, all sections are mapped to cached alises, but in Zephyr, linker scripts are already used to assign sections to uncached/cached aliases. rimage does not support this and will emit errors if given a raw Zephyr elf file. To fix this, fix_elf_addrs.py is run on the intermediate elf binary.

This step however has led to hard-to-debug errors when linker script changes are made. This is especially problematic when important generic linker scripts from Zephyr.

Describe the solution you'd like Modify rimage to support the Zephyr linker script output directly.

Describe alternatives you've considered

kv2019i commented 1 year ago

FYI @lgirdwood @nashif @mwasko

mwasko commented 1 year ago

@marcinszkudlinski, @mmaka1, @dabekjakub fyi

zephyrbot commented 7 months ago

Hi @marcinszkudlinski, @ceolin, @juimonen,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. Please confirm the issue is correctly assigned and re-assign it otherwise.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

@kv2019i you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.

Thanks!