Uh oh!
There was an error while loading. Please reload this page.
xtensa-build-zephyr: pass sof build version to rimage - #6276
Conversation
mwasko
commented
Sep 9, 2022
SOF CI |
ebb2c9e to
019b2abCompareThere was a problem hiding this comment.
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.
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 |
marc-hb
commented
Sep 12, 2022
Another problem caused by |
dnikodem
commented
Sep 12, 2022
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). |
dnikodem
commented
Sep 12, 2022
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 |
So is |
019b2ab to
bfc29a2Compare
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. |
There was a problem hiding this comment.
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!
marc-hb
commented
Sep 13, 2022
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
3371aadCompare
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
b56134cComparemarc-hb
commented
Sep 14, 2022
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