erase unused flash pages so hashes matches#392
Merged
kaczmarczyck merged 5 commits intogoogle:developfrom Nov 1, 2021
Merged
Conversation
jmichelp
reviewed
Oct 25, 2021
ia0
reviewed
Oct 26, 2021
Collaborator
Author
|
Also added type hints to satisfy pylint. A follow-up PR will also reduce some complexity in |
ia0
reviewed
Oct 28, 2021
Member
ia0
left a comment
There was a problem hiding this comment.
Looks good from my side, but I skipped the type annotations and doc-strings. I just looked at the code.
| @@ -534,7 +612,8 @@ def pad_to(binary, length): | |||
|
|
|||
| kernel_size = board_props.app_address - board_props.kernel_address | |||
Member
There was a problem hiding this comment.
Unrelated to this PR, but here we assume there's no padding application between kernel and app, while in read_kernel we do. It's probably expected, but just mentioning in case.
jmichelp
previously approved these changes
Nov 1, 2021
jmichelp
approved these changes
Nov 1, 2021
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.
The bootloader failed when unused firmware page were not erased. This can happen when firmware images become smaller or spurious data is still on flash.
The PR generalizes the
clear_stoargefunction to take address and size, and uses that before writing kernel and app to make sure the setup is correct.