+73
−108
Loading
The current "boot states" description doesn't make sense and shouldn't
be used.
For one thing, with three possible pending states, two possible
confirmed states, and two image slots each with a combined (pending,
confirmed) state, the total number of boot states is 36, but the
document says there are "four possible states".
For another, the actual bits on flash map to the "boot states" in a
way that is carefully designed to ensure that only those 4 are the
"outcome" of a boot.
The fact that this map does not cover the entire space of what is
being presented as the "logical" states of the device is a strong
indication that the pending/confirmed state space is a bad choice, not
connected with the actual operation of the bootloader.
A state space that is better for describing how the bootloader behaves
is given the by the enumeration of "swap types" which appear under
each of the tables in the "IMAGE TRAILERS" section, as well as the
bootloader code itself.
To help fix the description of the bootloader' operation, rewrite the
"boot states" portions of the design document, deleting the
pending/confirmed "states" and replacing them with swap types.
There is still more work to do here:
- There is still an "important caveat" to describing things in
terms of swap types, which means it's not quite right.
- It's strange to say that "none" is a swap type.
- This doesn't provide a clean explanation for how mcuboot handles an
interrupted swap.
But it's another step.
Signed-off-by:
Marti Bolivar <marti.bolivar@linaro.org>
CRA Git | Maintained and supported by SUSTech CRA and CCSE