Make micro version optional for firmware file version string argument - #95
Make micro version optional for firmware file version string argument#95mengdonglin wants to merge 1 commit into
Conversation
eded379 to
6a5909f
Compare
|
I don't think we should make the version number flexible. If we want to use MAJOR.MINOR.HOTFIX, we should stick to it. It looks not good to me that sometimes MAJOR.MINOR.HOTFIX is used, but sometimes MAJOR.MINOR is used. For the place we use |
rimage can accept firmware file version string like major.minor or major.minor.micro. The 3rd field 'micro' is optional. For building with XOTS, SOF CMake always passes version string major.minor.micro to rimage. But for building with Zephyr, xtensa-build-zephyr.py will extract version string from latest git tag which can be either major.minor or major.minor.micro Signed-off-by: mengdonglin <mengdong.lin@intel.com>
@aiChaoSONG Thanks for your review. Both major.minor and major.minor.micro are widely used in software versioning. That's why I hope to keep some flexibility here. When major.minor is enough, we needn't use major.minor.0 |
In the underlining code, all three slots for these three numbers are in the C structure, even we don't pass them from command line, they get the default value 0.0.0. We have been using @lgirdwood If the hotfix(micro) number is zero, it is removed from the tag, we just simply use major.minor in the tag, which I think is not good. Since we use |
I don't understand why building with Zephyr can make any difference to the SOF version, I don't think it should. When building from the same SOF commit then the SOF version should always be the same whether we're building with or without Zephyr. There should be other differences but the SOF version should stay the same. |
Ack, if z is zero it is dropped from the version. Likewise if tag is not used we also append the commit ID. SOF uses exactly the same versioning scheme as Linux, our scripts need to do the same. @mengdonglin pls confirm if your PRs follow Linux versioning. |
You seem to be referring to something else, not sure what. What I'm saying is: |
|
@lgirdwood I think my PRs follow Linux versioning. |

This is a preparation to fix thesofproject/sof#5775. Another SOF PR thesofproject/sof#5846 is to update xtensa-build-zephyr.py
rimage can accept firmware file version string like major.minor
or major.minor.micro. The 3rd field 'micro' is optional.
For building with XOTS, SOF CMake always passes version string
major.minor.micro to rimage.
But for building with Zephyr, xtensa-build-zephyr.py will extract
version string from latest git tag which can be either major.minor
or major.minor.micro
Signed-off-by: mengdonglin mengdong.lin@intel.com