Hi devs,

I started poking at libs/bootutil, and have two questions:

1.
https://github.com/apache/incubator-mynewt-core/blob/develop/libs/bootutil/src/bootutil_misc.c#L258

It looks like state and length are not saved atomically when using
sys/config. If power is lost in the middle of the very first
boot_write_status, after boot/status but before boot/len is written, would
that not corrupt the subsequent resume? I think writing boot/len before
boot/status should be enough to fix this one.

2.
https://github.com/apache/incubator-mynewt-core/commit/0678891276a4bc4b8900dd9321ada2c2afcbec09

What does this mean for the ability to resume, since when you resume from
an earlier saved state you may swap sectors that have already been swapped,
corrupting both image slots?

Cheers,
simon.

Reply via email to