riotboot: use epoch as APP_VER default#11180
Merged
bergzand merged 1 commit intoRIOT-OS:masterfrom Mar 14, 2019
Merged
Conversation
Contributor
|
I found about this while reviewing #11181 This changed is an API change without setting the label and without updating the documentation https://github.com/RIOT-OS/RIOT/blob/master/bootloaders/riotboot/README.md The APP_VER changed from being an application version to be the build date. This should have been the result of a proper justification why changing the semantic. It was set to a fixed value by default because it is a version and should be handled as such. Also the commit message does not justify or explain any of the consequence of this 09a40fb It changed from being an application version to being the build date, so not even a SOURCE_DATE_EPOCH or something. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
Previously, a compiled image version would default to "0".
It would make an image that was simply compiled by "make riotboot" without specifying a version unbootable by default, as the existing version in slot 0 is always at least 0, too.
This PR makes the current time (in unix epoch format) the default version number. As time is increasing monotonically, that makes an image which was compiled after another bootable with high probability.
Testing procedure
In order to test that the epoch is used, use
BOARD=foo make -Ctests/riotboot riotboot/flash.On master, after flashing, the printed version number should be zero.
With this PR, it should increase everytime the flashing is repeated.
Issues/PRs references
none