Skip to content

Determining most recent swap type #2644

@ChapterSevenSeeds

Description

@ChapterSevenSeeds

Hey folks, does mcuboot contain the necessary functionality to determine what the most recent swap type was? In particular, is it possible to ask MCUBoot if the type of the previous swap was REVERT or something?

Here is a scenario.

  1. My microcontroller is booted from firmware image A in the primary slot.
  2. Firmware image B is downloaded into the secondary slot.
  3. MCUBoot swaps A and B.
  4. Firmware image B is now in the primary slot but fails to boot.
  5. MCUBoot reverts the swap.
  6. Firmware image A is now in the primary slot and boots just fine (as before).
  7. Firmware image A is able to query MCUBoot and then goes, "oh, MCUBoot needed to revert, I'm going to report an OTA failure."

Does MCUBoot contain the necessary functionality to enable step 7? Is this something that would need to be implemented at the OS layer?

My question here largely stems from this comment.

Can anybody offer some insight?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions