Skip to content

[FEATURE][Zephyr] Get rid of fix_elf_addrs.py step  #6741

Description

@kv2019i

Zephyr copy of this item: zephyrproject-rtos/zephyr#52861

Is your feature request related to a problem? Please describe.
Currently SOF 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 work/zephyr/soc/xtensa/intel_adsp/common/fix_elf_addrs.py

The reason for this script is that in old 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 importing 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

  • modify Zephyr linker script to map everything to cached -> does not work as Zephyr kernel code is assuming specific sections are accesible with coherent memory (and on these Intel platforms, this means a uncached alias)

Metadata

Metadata

Assignees

Labels

MTLApplies to Meteor Lake platformTGLApplies to Tiger LakeZephyrIssues only observed with Zephyr integratedenhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions