Commit 296949e
committed
bootutil: fix swap-move brick with padded image0
When the image in the primary slot is padded, the boot source is
considered the primary slot; this results in skipping the typical
initialization of the trailer, which ends up bricking the device. As
it is fine to always initialize the trailer in the primary slot when
starting a new upgrade the extra check was removed.
Signed-off-by: Fabio Utzig <[email protected]>1 parent 2cbe5e2 commit 296949e
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 318 | + | |
| 319 | + | |
321 | 320 | | |
322 | | - | |
323 | | - | |
324 | | - | |
| 321 | + | |
| 322 | + | |
325 | 323 | | |
326 | 324 | | |
327 | 325 | | |
| |||
0 commit comments