Repository navigation
Conversation
Swap offset does not expect header in first sector/page of secondary slot, rather in secondary, and only attempts to swap an image that starts at second sector. This commit demotes condition when header is found in first page to just a warning and allows boot to proceed, as long as there is a header is second slot. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
nordicjm
left a comment
There was a problem hiding this comment.
this should delete it as it currently does because the what has been uploaded is invalid, no different than if you upload a corrupt image to a slot then mark it for upgrade
OK, but wouldn't it suffice to just remove the first page then? |
needs to clear first 2 sectors and trailer sector at least, in original implementation just used the existing clear image erase code that was already present in the file. Hmm do you mean like with #2199 ? |
So, in my case there was a sequence on the same board:
So why to clear two sectors? The header in the second sector is what I have expected
Yeah, maybe. But that had to be a lot of bad things happening for the magic to appear properly. But there is also a chance that some write started (can it?) during swap-offset, and there is already crap in the first sector, or something else managed to write there magic. |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Swap offset does not expect header in first sector/page of secondary slot, rather in secondary, and only attempts to swap an image that starts at second sector.
This commit demotes condition when header is found in first page to just a warning and allows boot to proceed, as long as there is a header is second slot.