sys/riotboot/flashwrite: when invalidating erase checksum as well #15912
Merged
benpicco merged 2 commits intoRIOT-OS:masterfrom Feb 9, 2021
Merged
Conversation
benpicco
reviewed
Feb 2, 2021
bfac4aa to
0c632dc
Compare
benpicco
reviewed
Feb 4, 2021
Contributor
Author
|
Should I squash @benpicco? |
benpicco
reviewed
Feb 9, 2021
benpicco
reviewed
Feb 9, 2021
Contributor
|
Please squash! |
bc2ece0 to
7aa8217
Compare
Contributor
|
looks like some old commits have sneaked in |
Contributor
Author
|
I checked that the test is passing rebased on #15559 on
|
7aa8217 to
6baadad
Compare
benpicco
approved these changes
Feb 9, 2021
Contributor
Author
|
All green @benpicco |
Contributor
Author
|
thanks for the review @benpicco! |
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
This PR addresses two issues with
riotboot_flashwrite_invalidate:0XAAto invalidate will no always work, e.g. for stm32f1:Also
FLASHPAGE_WRITE_BLOCK_SIZEwas not taken into account, so writing toRIOTBOOT_MAGICmight not work.Discussing offline with @bergzand it was mentioned that the checksum should also be erased.
To be able to do this I added a
FLASHPAGE_ERASE_STATEdefinition for allCPUs supportingflashpage.Testing procedure
Use #15559 to test, with this PR these test passes, without it fails the invalidation check.
BOARD=iotlab-m3 make -C tests/riotboot_flashwrite/ flash test-with-config -j3