Purpose:
Lower the risk of releasing FW binaries which are built and signed before SOF release tag is applied.
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 version of each *.ri by testing in Linux and checking version in dmesg of FW ready IPC on each supported platform.
Description:
Today rimage can only accept FW major and minor version by '-f firmware version = x.y' It needs to be extended to 'x.y.z'
And 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 (feature thesofproject/sof#5693).
Thus
$./sof_ri_info.py sof-xxx.ri
The output will show:
cavs0015 (ADSP Manifest) file offset 0x2300 name ADSPFW build ver x.y.z.build
More info about FW version:
SOF FW version can contain 2 or 3 fields:
- MAJOR.MINOR e.g. v1.9, v2.0
- MAJOR.MINOR.MICRO e.g. v1.9.3 and v2.1.1
The FW cmake script extracts the version numbers from latest Git tag, and assign them to parameters SOF_MAJOR, SOF_MINOR, SOF_MICRO:
https://github.com/thesofproject/sof/blob/main/scripts/cmake/version.cmake#L75
If there is no micro version in the latest Git tag, SOF_MICRO is ZERO.
It seems the version info defined in base FW and sof_ri_info.py are consist:
Base FW:
https://github.com/thesofproject/sof/blob/main/src/audio/base_fw.c#L40
https://github.com/thesofproject/sof/blob/main/src/audio/base_fw.c#L226
uint16_t fw_version[4] = {SOF_MAJOR, SOF_MINOR, SOF_MICRO, SOF_BUILD};
sof_ri_info.py:
https://github.com/thesofproject/sof/blob/main/tools/sof_ri_info/sof_ri_info.py#L1071
class Aversion(Attribute):
def __init__(self, name, major, minor, hotfix, build):
self.name = name
self.val = '{:d}.{:d}.{:d}.{:d}'.format(major, minor, hotfix, build)
(We may change hotfix to minor)
So I think we needn't change sof_ri_info.py. We only need to revise rimage and SOF FW src/arch/xtensa/CMakeLists.txt
Purpose:
Lower the risk of releasing FW binaries which are built and signed before SOF release tag is applied.
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 version of each *.ri by testing in Linux and checking version in dmesg of FW ready IPC on each supported platform.
Description:
Today rimage can only accept FW major and minor version by '-f firmware version = x.y' It needs to be extended to 'x.y.z'
And 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 (feature thesofproject/sof#5693).
Thus
$./sof_ri_info.py sof-xxx.ri
The output will show:
cavs0015 (ADSP Manifest) file offset 0x2300 name ADSPFW build ver x.y.z.build
More info about FW version:
SOF FW version can contain 2 or 3 fields:
The FW cmake script extracts the version numbers from latest Git tag, and assign them to parameters SOF_MAJOR, SOF_MINOR, SOF_MICRO:
https://github.com/thesofproject/sof/blob/main/scripts/cmake/version.cmake#L75
If there is no micro version in the latest Git tag, SOF_MICRO is ZERO.
It seems the version info defined in base FW and sof_ri_info.py are consist:
Base FW:
https://github.com/thesofproject/sof/blob/main/src/audio/base_fw.c#L40
https://github.com/thesofproject/sof/blob/main/src/audio/base_fw.c#L226
uint16_t fw_version[4] = {SOF_MAJOR, SOF_MINOR, SOF_MICRO, SOF_BUILD};
So I think we needn't change sof_ri_info.py. We only need to revise rimage and SOF FW src/arch/xtensa/CMakeLists.txt