Skip to content

riotboot: use epoch as APP_VER default#11180

Merged
bergzand merged 1 commit intoRIOT-OS:masterfrom
kaspar030:riotboot_use_epoch_as_default_version
Mar 14, 2019
Merged

riotboot: use epoch as APP_VER default#11180
bergzand merged 1 commit intoRIOT-OS:masterfrom
kaspar030:riotboot_use_epoch_as_default_version

Conversation

@kaspar030
Copy link
Copy Markdown
Contributor

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

@kaspar030 kaspar030 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 14, 2019
@kaspar030 kaspar030 requested a review from bergzand March 14, 2019 11:10
Copy link
Copy Markdown
Member

@bergzand bergzand left a comment

Choose a reason for hiding this comment

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

Ack, works as advertised

@bergzand bergzand merged commit bee2f0b into RIOT-OS:master Mar 14, 2019
@cladmi
Copy link
Copy Markdown
Contributor

cladmi commented Mar 19, 2019

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.

@kaspar030 kaspar030 deleted the riotboot_use_epoch_as_default_version branch March 19, 2019 14:14
@danpetry danpetry added this to the Release 2019.04 milestone Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants