Repository: incubator-mynewt-core Updated Branches: refs/heads/develop 7dc1ba022 -> 5a1b88ab3
MYNEWT-518 Update comments and design doc. Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/5a1b88ab Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/5a1b88ab Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/5a1b88ab Branch: refs/heads/develop Commit: 5a1b88ab3b95fa429884f062f2001300c5148b50 Parents: 7dc1ba0 Author: Christopher Collins <[email protected]> Authored: Wed Dec 21 12:34:17 2016 -0800 Committer: Christopher Collins <[email protected]> Committed: Wed Dec 21 12:34:17 2016 -0800 ---------------------------------------------------------------------- boot/bootutil/design.txt | 13 +++++++++---- boot/bootutil/src/bootutil_misc.c | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5a1b88ab/boot/bootutil/design.txt ---------------------------------------------------------------------- diff --git a/boot/bootutil/design.txt b/boot/bootutil/design.txt index 47c4d28..eb5badb 100644 --- a/boot/bootutil/design.txt +++ b/boot/bootutil/design.txt @@ -203,13 +203,15 @@ purposes; they are not actually present in the boot vector. | slot-0 | slot-1 | -----------------+--------+--------| magic | Any | Good | - image-ok | Any | N/A | + image-ok | Any | [*] | -----------------+--------+--------' pending | | X | confirmed | X | | - -----------------+--------+--------' - swap: test | - -----------------------------------' + -----------------+--------+--------+----------------------------' + swap: test | + note: slot-1 image-ok val indicates whether swap is permanent; | + (0xff=temporary; 0x01=permanent) | + ----------------------------------------------------------------' State III @@ -289,6 +291,9 @@ prevent a device from becoming "bricked" by bad firmware. If the device crashes immediately upon booting the second image, the boot loader reverts to the working image, rather than repeatedly rebooting into the bad image. +Alternatively, if the user is confident that the alternate image is good, they +can set and confirm in a single action. + The following set of tables illustrate the three possible states that the device can be in: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5a1b88ab/boot/bootutil/src/bootutil_misc.c ---------------------------------------------------------------------- diff --git a/boot/bootutil/src/bootutil_misc.c b/boot/bootutil/src/bootutil_misc.c index 1119bc2..c85f454 100644 --- a/boot/bootutil/src/bootutil_misc.c +++ b/boot/bootutil/src/bootutil_misc.c @@ -73,7 +73,7 @@ static const struct boot_swap_table boot_swap_tables[] = { /* | slot-0 | slot-1 | *----------+------------+------------| * magic | Any | Good | - * image-ok | Any | N/A | + * image-ok | Any | [*] | * ---------+------------+------------+---------------------------' * swap: test | * note: slot-1 image-ok val indicates whether swap is permanent; |
