Skip to content

[RFC] CMake: pass firmware file micro version to rimage - #5760

Merged
lgirdwood merged 1 commit into
thesofproject:mainfrom
mengdonglin:micro-version-v1
May 9, 2022
Merged

[RFC] CMake: pass firmware file micro version to rimage#5760
lgirdwood merged 1 commit into
thesofproject:mainfrom
mengdonglin:micro-version-v1

Conversation

@mengdonglin

Copy link
Copy Markdown
Collaborator

To fix #5693

This PR depends on thesofproject/rimage#91 . The rimage PR needs to be merged at first.

SOF CMake defines SOF_MAJOR, SOF_MINOR and SOF_MICRO for 3 fields of
firmware file version major.minor.micro. But CMake only passes the major
and minor version to rimage.

Now CMake will also pass the mirco version to rimage, so that rimage can
write it to different firmware manifest headers for cAVS platforms and
then sof_ri_info.py will be able to dump entire file version info from
the firmware binary.

SOF CMake defines SOF_MAJOR, SOF_MINOR and SOF_MICRO for 3 fields of
firmware file version major.minor.micro. But CMake only passes the major
and minor version to rimage.

Now CMake will also pass the mirco version to rimage, so that rimage can
write it to different firmware manifest headers for cAVS platforms and
then sof_ri_info.py will be able to dump entire file version info from
the firmware binary.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

any dependency PRs ?
@kv2019i how do we do this in Zephyr ?

@kv2019i

kv2019i commented May 4, 2022

Copy link
Copy Markdown
Collaborator

That's a good question. In SOF Zephyr builds, the "-f" option is not passed to rimage at all, so the version header is not set at all. UPDATE: yes, not set:
""
cavs0015 (ADSP Manifest) file offset 0x22e0 name ADSPFW build ver 0.0.0.0 feature mask 0xffff image flags 0x0
""

@mengdonglin

Copy link
Copy Markdown
Collaborator Author

The updated rimage PR thesofproject/rimage#92 is under review.
And this PR needs to update rimage commit for SOF @lgirdwood I'll fix it after rimage PR is done.

@lgirdwood

Copy link
Copy Markdown
Member

The updated rimage PR thesofproject/rimage#92 is under review. And this PR needs to update rimage commit for SOF @lgirdwood I'll fix it after rimage PR is done.

rimage now approved, but do we have a PR for Zephyr to use the -f option ?

@lgirdwood
lgirdwood merged commit 8ab452a into thesofproject:main May 9, 2022
@mengdonglin
mengdonglin deleted the micro-version-v1 branch June 6, 2022 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] CMake can pass FW micro version to rimage

4 participants