-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
soc: xtensa: nxp: invoke west sign only for SOF #59603
soc: xtensa: nxp: invoke west sign only for SOF #59603
Conversation
west sign is used only for Sound Open Firmware (SOF) sample. So, add this only if CONFIG_SOF is enabled. Otherwise, when compiling other samples they're not building because of the rimage dependency. Fixes: 5ae7bd8 ("soc: xtensa: nxp: invoke west sign at west build time") Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
479f9e0
to
aa67501
Compare
Why not but I don't understand what problem this solves because I implemented
That should not happen. Or did you mean: |
This comment was marked as off-topic.
This comment was marked as off-topic.
It fails, while building other samples, because it cannot find zephyr.elf, needed by zephyr.ri.
TBH is weird to me too, because, I don't get any error when building synchronization or hello_world samples. |
@marc-hb or it might be because for |
No that's not done in parallel, it would be really bad!
My first impression is that some examples simply produce no |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's first make sure this fixes a real issue that can be reproduced in a clean tree.
The openamp_rsc_table sample has an elf but is called openamp_rsc_table.elf - see https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/subsys/ipc/openamp_rsc_table/prj.conf#L1, not zephyr.elf, as the other samples |
With a clean tree, the openamp_rsc_table sample is not compiling since there is no support for nxp_adsp_imx8m. I'm currently working on adding support for nxp_adsp_imx8m. Actually, I'm have all fixed, I'm at the part of code clean-up to put everything, for review, in upstream. The first problem when compiling openamp_rsc_table sample for nxp_adsp_imx8m is the PLATFORM_SPECIFIC_INIT config, which is ARM specific (see here) and we are compiling the sample for Xtensa HiFi4. I'll send everything for review, soon. |
As mentioned here, the openamp_rsc_table will not compile on a clean tree, for nxp_adsp_imx8m. The fix proposed here, IMO is valid, since the west sign (or any other rimage commands) we want to use only for SOF. |
Thanks! Now I can reproduce with west build -p always -b nxp_adsp_imx8m samples/hello_world/ -- \
-DCONFIG_KERNEL_BIN_NAME='"fubar"' So you can forget about the more complex openamp_rsc_table example in this PR. Unfortunately
I understand you don't always want to run Also, it would be good to keep the divergence with |
I don't know that well
I agree! |
I recently updated the rimage documentation in commit dd09b04 |
This fixes the build error below reported in zephyrproject-rtos#59603 when CONFIG_KERNEL_BIN_NAME is used. ``` zephyr/zephyr.elf', needed by 'zephyr/zephyr.ri', missing and no known rule to make it ``` Note `rimage` is _still_ optional. As before, to avoid using rimage: - make sure it's not in your PATH - west config -d rimage.path Signed-off-by: Marc Herbert <marc.herbert@intel.com>
CONFIG_KERNEL_BIN_NAME fix submitted:
You later found that the root cause is CONFIG_KERNEL_BIN_NAME and that's unrelated to CONFIG_SOF.
This PR would also make CONFIG_KERNEL_BIN_NAME incompatible with CONFIG_SOF:
Not like I want to use CONFIG_KERNEL_BIN_NAME (I think it's a bad idea) but this example demonstrates that this PR is not aimed at the root cause. So a totally different alternative would be: if(CONFIG_KERNEL_BIN_NAME STREQUAL "zephyr")
add_custom_command(
west sign --if-tool-available ... In other words: invoke west sign only for the CONFIG_urations it supports currently. How about it? |
@marc-hb I've tested #59721 on my samples for nxp_adsp_imx8m and is working perfectly. |
Closing this since a better fix is in review #59721 |
sign.py, sof/scripts/xtensa-build-zephyr.py and other SOF infrastructure do not support the (rarely used) CONFIG_KERNEL_BIN_NAME so stop pretending they do. This fixes the build error below reported in zephyrproject-rtos#59603 when CONFIG_KERNEL_BIN_NAME is used: ``` zephyr/zephyr.elf', needed by 'zephyr/zephyr.ri', missing and no known rule to make it ``` Note `rimage` is _still_ optional, even when CONFIG_KERNEL_BIN_NAME is not used. As before, to avoid using rimage: - make sure it's not in your PATH - west config -d rimage.path Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Submitted in: |
west sign is used only for Sound Open Firmware (SOF) sample.
So, add this only if CONFIG_SOF is enabled.
Otherwise, when compiling other samples they're not building because of the rimage dependency.
Fixes: 5ae7bd8 ("soc: xtensa: nxp: invoke west sign at west build time")