Skip to content

[FEATURE] CMake can pass FW micro version to rimage #5693

Closed

Description

@mengdonglin

Purpose
Lower the risk of releasing FW binaries which are built and signed before SOF release tag is applied.
CMake can pass FW micro version to rimage as well so that rimage can store major.minor.micro version in ADSP manifest. Today it only pass major and minor version to rimage.

This feature can help us check FW version of a FW binary *.ri using https://github.com/thesofproject/sof/blob/main/tools/sof_ri_info/sof_ri_info.py
Thus we needn't check FW macro, minor and micro version of each *.ri by testing in Linux and checking version in dmesg of FW ready IPC on each supported platform.

Describe the solution you'd like
https://github.com/thesofproject/sof/blob/main/src/arch/xtensa/CMakeLists.txt also need pass SOF_MAJOR, SOF_MINOR and SOF_MICRO in '-f x.y.z' to rimage

https://github.com/thesofproject/sof/blob/main/src/arch/xtensa/CMakeLists.txt#L460
https://github.com/thesofproject/sof/blob/main/src/arch/xtensa/CMakeLists.txt#L501

COMMAND ${PROJECT_BINARY_DIR}/rimage_ep/build/rimage
-o sof-${fw_name}.ri
-c "${PROJECT_SOURCE_DIR}/rimage/config/${fw_name}.toml"
-k ${RIMAGE_PRIVATE_KEY}
-i ${RIMAGE_IMR_TYPE}
-f ${SOF_MAJOR}.${SOF_MINOR}.${SOF_MICRO}

Additional Context
Please find additional context in in thesofproject/rimage#90

Activity

  1. added
    enhancement
    on Apr 17, 2022
  2. changed the title [-][FEATURE] CMake can pass all SOF_MAJOR, SOF_MINOR and SOF_MICRO to rimage[/-] [+][FEATURE] CMake can pass FW version major, micro and minor to rimage[/+] on Apr 17, 2022
  3. changed the title [-][FEATURE] CMake can pass FW version major, micro and minor to rimage[/-] [+][FEATURE] CMake can pass FW micro version to rimage[/+] on Apr 18, 2022
  4. lgirdwood commented on Apr 20, 2022

    @lgirdwood
    Member

    @marc-hb any comments ?

  5. self-assigned this
    on Apr 29, 2022
  6. aiChaoSONG commented on Apr 29, 2022

    @aiChaoSONG
    Collaborator

    @mengdonglin Here's the detailed steps for the feature

    We have already passed SOF_MAJOR and SOF_MINOR to rimage through cmake

    -f ${SOF_MAJOR}.${SOF_MINOR}

    • To add SOF_MICRO, just append it to Line 501 and Line 460.

    On rimage side:

  7. mengdonglin commented on Apr 30, 2022

    @mengdonglin
    CollaboratorAuthor

    @aiChaoSONG Thanks, you will find my PR is almost same as your comments :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions