Skip to content

Commit c6b373d

Browse files
doc: update documentation for mcuboot to document ram-load with revert
Add documentation and release notes entry for ram-load with revert support in mcuboot. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 1db8404 commit c6b373d

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

docs/design.md

+22-14
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ image. After a successful validation of the selected image the bootloader
339339
chain-loads it.
340340

341341
An additional "revert" mechanism is also supported. For more information, please
342-
read the [corresponding section](#direct-xip-revert).
342+
read the [corresponding section](#direct-xip-ram-load-revert).
343343
Handling the primary and secondary slots as equals has its drawbacks. Since the
344344
images are not moved between the slots, the on-the-fly image
345345
encryption/decryption can't be supported (it only applies to storing the image
@@ -394,6 +394,11 @@ happens as described above. If the image is encrypted, it is copied in RAM at
394394
the provided address and then decrypted. Finally, the decrypted image is
395395
authenticated in RAM and executed.
396396
397+
Similar to direct-xip, ram-load mode also supports a "revert" mechanism.
398+
This mechanism works in the same manner as the direct-xip revert mechanism does,
399+
so please see the [corresponding section](#direct-xip-ram-load-revert) for
400+
more details.
401+
397402
## [Boot swap types](#boot-swap-types)
398403
399404
When the device first boots under normal circumstances, there is an up-to-date
@@ -449,19 +454,22 @@ The "swap type" is a high-level representation of the outcome of the
449454
boot. Subsequent sections describe how MCUboot determines the swap type from
450455
the bit-level contents of flash.
451456
452-
### [Revert mechanism in direct-xip mode](#direct-xip-revert)
453-
454-
The direct-xip mode also supports a "revert" mechanism which is the equivalent
455-
of the swap mode's "revert" swap. When the direct-xip mode is selected it can be
456-
enabled with the MCUBOOT_DIRECT_XIP_REVERT config option and an image trailer
457-
must also be added to the signed images (the "--pad" option of the `imgtool`
458-
script must be used). For more information on this please read the
459-
[Image Trailer](#image-trailer) section and the [imgtool](imgtool.md)
460-
documentation. Making the images permanent (marking them as confirmed in
461-
advance) is also supported just like in swap mode. The individual steps of the
462-
direct-xip mode's "revert" mechanism are the following:
463-
464-
1. Select the slot which holds the newest potential image.
457+
### [Revert mechanism in direct-xip and ram-load mode](#direct-xip-ram-load-revert)
458+
459+
The direct-xip and ram-load modes also support a "revert" mechanism which is the
460+
equivalent of the swap mode's "revert" swap. When the direct-xip mode is
461+
selected it can be enabled with the `MCUBOOT_DIRECT_XIP_REVERT` config option.
462+
In ram-load mode, the feature is enabled with `MCUBOOT_RAM_LOAD_REVERT` config
463+
option. Note that an image trailer must also be added to the signed images (the
464+
"--pad" option of the `imgtool` script must be used). Otherwise, MCUboot will
465+
not recognize the image as valid and will attempt to revert it. For more
466+
information on this please read the [Image Trailer](#image-trailer) section and
467+
the [imgtool](imgtool.md) documentation. Making the images permanent (marking
468+
them as confirmed in advance) is also supported just like in swap mode. The
469+
individual steps of this "revert" mechanism are the following:
470+
471+
1. Select the slot which holds the newest potential image, based on the
472+
version number
465473
2. Was the image previously selected to run (during a previous boot)?
466474
+ Yes: Did the image mark itself "OK" (was the self-test successful)?
467475
+ Yes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Enabled support for ram-load revert mode, which functions using the same
2+
logic as direct-xip revert mode but loads the executable image to ram.

0 commit comments

Comments
 (0)