-
Notifications
You must be signed in to change notification settings - Fork 61
Write firmware file micro version to manifest for cAVS platforms #91
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,19 +115,21 @@ int main(int argc, char *argv[]) | |
| return -EINVAL; | ||
| } | ||
|
|
||
| /* firmware version and build id */ | ||
| /* firmware version that can be major.minor or major.minor.micro */ | ||
| if (image.fw_ver_string) { | ||
| ret = sscanf(image.fw_ver_string, "%hu.%hu", | ||
| ret = sscanf(image.fw_ver_string, "%hu.%hu.%hu", | ||
| &image.fw_ver_major, | ||
| &image.fw_ver_minor); | ||
| &image.fw_ver_minor, | ||
| &image.fw_ver_micro); | ||
|
|
||
| if (ret != 2) { | ||
| if (ret != 2 && ret != 3) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The return value of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aiChaoSONG Thanks for your comments. This is to be compatible with current SOF CMake that only passes 2 version arguments (major.minor) to rimage. If this rimage PR gets merged at first, SOF building will fail as CMake doesn't pass 3 version arguments (major.minor.micro) as rimage expects. If SOF CMake thesofproject/sof#5760 can also be merged, I can update rimage to only support 3 version arguments. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even the PR get merged, it will not be used, rimage is a submodule of SOF, unless rimage is upgraded on SOF side, new changes will never be used. so it's safe. You can check that SOF currently uses rimage@ee5c3e1, but the newest rimage commit is 05be213
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. Thanks! I Will update PR after Rander comments if this PR will impact Windows.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed this in new PR #92 @aiChaoSONG |
||
| fprintf(stderr, | ||
| "error: cannot parse firmware version\n"); | ||
| return -EINVAL; | ||
| } | ||
| } | ||
|
|
||
| /* firmware build id */ | ||
| if (image.fw_ver_build_string) { | ||
| ret = sscanf(image.fw_ver_build_string, "%hu", | ||
| &image.fw_ver_build); | ||
|
|
||
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.
Wont this break manifest parsing on Windows ? @RanderWang can you comment.
Uh oh!
There was an error while loading. Please reload this page.
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.
@lgirdwood Rander is on vacation this week. Let's wait for his comments next week. Hope I'm not breaking Windows. Thank you for raising this risk!
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.
Windows driver will take version_micro as num_module_entries we don't change header file used by windows, and this will result to error.
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 only applies to the extended manifest. So I think we can skip the micro version only for cavs extended manifest.
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.
To avoid breaking Windows, I wrote a new PR #92 that will not change manifest header definitions but write the micro version to the unused hotfix_version field of manifest header. Can you help review the new PR#92?