Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "xtensa: remove ELF section address rewriting" #56099

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

nashif
Copy link
Member

@nashif nashif commented Mar 22, 2023

This reverts commit 7a85983 / #55554

This commit was merged prematurely and is causing issues on multiple
platforms.

Signed-off-by: Anas Nashif anas.nashif@intel.com

carlescufi
carlescufi previously approved these changes Mar 22, 2023
kv2019i
kv2019i previously approved these changes Mar 22, 2023
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. FYI to @lyakh

I think the accurate dependency is that this requires a newer rimage (thesofproject/rimage@63eb6ff or newer) to build flashable images (for platforms requiring rimage-created binaries).

@nashif
Copy link
Member Author

nashif commented Mar 22, 2023

Ack. FYI to @lyakh

I think the accurate dependency is that this requires a newer rimage (thesofproject/rimage@63eb6ff or newer) to build flashable images (for platforms requiring rimage-created binaries).

yes, we will look into adding rimage dependency in zephyr CI. The blocker is that we have to build rimage which is not straightforward in upstream CI right now.

tmleman
tmleman previously approved these changes Mar 22, 2023
@PerMac
Copy link
Member

PerMac commented Mar 22, 2023

@nashif I think you added by accident the revert on top of modification of retry error functionality in twister. Shouldn't the revert be an independent commit?

This reverts commit 7a85983.

This commit was merged prematurely and is causing issues on multiple
platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
@nashif nashif merged commit 0f2a352 into zephyrproject-rtos:main Mar 22, 2023
@nashif nashif deleted the revert_elf_rewrite branch March 22, 2023 12:35
@marc-hb
Copy link
Collaborator

marc-hb commented Mar 22, 2023

For the record and backlink, similar rimage dependency issues blocked my #54700 - except I now found and tested backwards compatibility solutions in the last version.

marc-hb added a commit to marc-hb/rimage that referenced this pull request Apr 18, 2023
The deleted "install" target copied only the rimage executable and
left the config files behind. This gave the wrong impression that the
executable is useful without config files.

"Installing" also gave the wrong impression that rimage versions are
somewhat stable and relatively independent of SOF versions: they're
not. In fact there is no such thing as an rimage "version": everyone
should always use the exact rimage _git commit_ from the west manifest
or git submodule. There are no rimage "releases" and no semantic
versioning or anything like it, rimage is effectively part of the SOF
source and build and run directly from its build directory by
practically every SOF developer and SOF CI thanks to

  sof/src/arch/xtensa/CMakeLists.txt#ExternalProject_Add(rimage_ep ...
  sof/scripts/xtensa-build-zephyr.py#def build_rimage()
  sof/zephyr/CMakeLists.txt#set(RIMAGE_CONFIG_PATH ...

etc.

Providing an "install" target greatly increases the chances of
different people and CIs using different rimage versions which is the
last thing we want considering the many significant rimage changes
happening right now, examples:

- zephyrproject-rtos/zephyr#56099
- zephyrproject-rtos/zephyr#54700
- thesofproject/sof#7270
- thesofproject/sof#7304
- thesofproject/sof#7320
- thesofproject#155

While it's useful for multiple files (e.g.: config files), a CMake
target was always overkill to copy a single file. Someone or some
script who really wants to copy the rimage binary to some other place
that the build directory for some (discouraged) reason _can still do
so_ with a much more basic, simpler and more transparent file copy
command.

Finally, the default "bin" DESTINATION required root access which
is otherwise totally unncessary to build SOF.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
marc-hb added a commit to marc-hb/rimage that referenced this pull request Apr 18, 2023
The deleted "install" target copied only the rimage executable and
left the config files behind. This gave the wrong impression that the
executable is useful without config files.

"Installing" also gave the wrong impression that rimage versions are
somewhat stable and relatively independent of SOF versions: they're
not. In fact there is no such thing as an rimage "version": everyone
should always use the exact rimage _git commit_ from the west manifest
or git submodule. There are no rimage "releases" and no semantic
versioning or anything like it, rimage is effectively part of the SOF
source and build and run directly from its build directory by
practically every SOF developer and SOF CI thanks to

  sof/src/arch/xtensa/CMakeLists.txt#ExternalProject_Add(rimage_ep ...
  sof/scripts/xtensa-build-zephyr.py#def build_rimage()
  sof/zephyr/CMakeLists.txt#set(RIMAGE_CONFIG_PATH ...

etc.

Providing an "install" target greatly increases the chances of
different people and CIs using different rimage versions which is the
last thing we want considering the many significant rimage changes
happening right now, examples:

- zephyrproject-rtos/zephyr#56099
- zephyrproject-rtos/zephyr#54700
- thesofproject/sof#7270
- thesofproject/sof#7304
- thesofproject/sof#7320
- thesofproject#155

While it's useful for multiple files (e.g.: config files), a CMake
target was always overkill to copy a single file. Someone or some
script who really wants to copy the rimage binary to some other place
that the build directory for some (discouraged) reason _can still do
so_ with a much more basic, simpler and more transparent file copy
command.

Finally, the default "bin" DESTINATION required root access which
is otherwise totally unncessary to build SOF.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
kv2019i pushed a commit to thesofproject/rimage that referenced this pull request Apr 26, 2023
The deleted "install" target copied only the rimage executable and
left the config files behind. This gave the wrong impression that the
executable is useful without config files.

"Installing" also gave the wrong impression that rimage versions are
somewhat stable and relatively independent of SOF versions: they're
not. In fact there is no such thing as an rimage "version": everyone
should always use the exact rimage _git commit_ from the west manifest
or git submodule. There are no rimage "releases" and no semantic
versioning or anything like it, rimage is effectively part of the SOF
source and build and run directly from its build directory by
practically every SOF developer and SOF CI thanks to

  sof/src/arch/xtensa/CMakeLists.txt#ExternalProject_Add(rimage_ep ...
  sof/scripts/xtensa-build-zephyr.py#def build_rimage()
  sof/zephyr/CMakeLists.txt#set(RIMAGE_CONFIG_PATH ...

etc.

Providing an "install" target greatly increases the chances of
different people and CIs using different rimage versions which is the
last thing we want considering the many significant rimage changes
happening right now, examples:

- zephyrproject-rtos/zephyr#56099
- zephyrproject-rtos/zephyr#54700
- thesofproject/sof#7270
- thesofproject/sof#7304
- thesofproject/sof#7320
- #155

While it's useful for multiple files (e.g.: config files), a CMake
target was always overkill to copy a single file. Someone or some
script who really wants to copy the rimage binary to some other place
that the build directory for some (discouraged) reason _can still do
so_ with a much more basic, simpler and more transparent file copy
command.

Finally, the default "bin" DESTINATION required root access which
is otherwise totally unncessary to build SOF.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb
Copy link
Collaborator

marc-hb commented May 3, 2023

Looking at this since it's going to be re-submitted eventually. When you do so please don't leave comments like this in place:

# Remap uncached section addresses so they appear contiguous

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants