You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bootutil: swap-move: Avoid rewriting the secondary trailer on revert
When using the swap-move strategy, at the very beginning of the revert
process, the secondary trailer was rewritten to make the revert look
like a permanent upgrade in case an unfortunate reset occurs when
rewriting the primary trailer. This was possible because the assumption
was that no sector contained both part of the firmware and part of the
trailer.
To relax this assumption, it is necessary to avoid having to rewrite the
secondary trailer at the start of the revert process, since that could
also erase firmware data. The solution chosen is to rewrite the
secondary trailer at the end of the upgrade process, just after that
trailer is erased and to take advantage of the unused 'copy_done' flag
in the secondary trailer to indicate that an upgrade has been performed
and that a revert has to be started or resumed if the primary image is
not confirmed.
Signed-off-by: Thomas Altenbach <thomas.altenbach@legrand.com>
0 commit comments