-
Notifications
You must be signed in to change notification settings - Fork 349
xtensa-build-zephyr: pass sof build version to rimage #6276
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
Conversation
|
SOF CI |
ebb2c9e to
019b2ab
Compare
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.
This solution is generally bad - we have a version variables in CMake, we write them to header file and then we parse the header file to get variables back to CMake with regexes...
I do not like this at all and looking for better solutions to passing version to rimage.
I've tried using configure_file to create a sof_versions.h.in file replacing existing sof_check_version_h function but failed as Xtensa compilers (both commercial and from Zephyr SDK) do not have extensions to actually replace #cmakedefine preprocessor (but that was just a refactor attempt). Maybe we can try something better with west sign command overload in sof?
@dnikodem where did you find informations about west sign -b flag? Can't get it anywhere...
marc-hb
left a comment
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.
95% copy/paste/diverge of the function immediately above for no obvious reason.
Yes this is a bit of a hack but it's been working fine and hasn't caused any problem for months. We all have more urgent things to do but if you have time: the real problem is I think we could not sign directly from CMake in the past because SOF was not a real Zephyr application, SOF used to hijack
I'm afraid a |
Another problem caused by |
|
About "west sign -b" - according to west sign help, the west allows us to pass any parameter to the rimage tool directly after the "--" character (we are passing in the same way fw version with '-f' flag). |
I agree with you Marc - this is a copy/paste of the above function. I did not combine them into a single function due to the fact that rimage uses the fw version and the build version separately. I can merge them into one function, and separate the fw version and the build version when submitting the command. Thanks |
lgirdwood
left a comment
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.
So is |
019b2ab to
bfc29a2
Compare
Well, that would be actually the easiest solution. Just use add_custom_target that DEPENDS on rimage_ep target (this target is defined in |
I think only Intel and AMD sign FW currently. We should migrate to west though, and is the |
No, nothing is stoping us. I'm not blocking anything just trying to provide better quality solutions because this one is not very good. As far as I spoke with @dnikodem this PR is not super urgent one or anything thus I'm trying to take a step in right direction. I'm not sure whether I understood correctly your question. |
scripts/xtensa-build-zephyr.py
Outdated
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.
I'm fairly confident you don't need these global declarations. Otherwise looks good to me.
EDIT: just realized the first global was already there. Still, please take the opportunity to fix this while you're changing this code (or prove me wrong).
EDIT2: wrong!
This has been already solved with some CMake conditionals in the XTOS build, we could do more or less the same thing in the Zephyr application build.
I think we're on the same page for most or all topics. Good brainstorming for the longer term, in the mean time let's get this small and quick change merged. |
bfc29a2 to
3371aad
Compare
I was wrong, apologies. the In your current commit 3371aad526b8c you made the variables local and removed the caching feature. I wasn't asking you to remove caching, I just thought the keyword was not needed to achieve caching. But the I find https://python-course.eu/python-tutorial/global-local-variables-namespaces.php You can also (mis?)use PS: |
Rimage expects to receive fw_ver_build to prepare the manifest. Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
3371aad to
b56134c
Compare
|
Unrelated suspend/resume failure in https://sof-ci.01.org/sofpr/PR6276/build1560/devicetest/ |
|
SOFCI TEST EDIT: everything green now including https://sof-ci.01.org/sofpr/PR6276/build1565/devicetest and https://sof-ci.01.org/sofpr/PR6276/build1565/build |

Rimage expects to receive fw_ver_build to prepare the manifest.
Signed-off-by: Damian Nikodem damian.nikodem@intel.com