Skip to content

Commit 2931f9d

Browse files
committed
booutil: swap_scratch: Do not check sectors with compression
When compression is used, it allows for the secondary slot to be smaller than the primary slot, therefore do not ensure that the number of sectors in each slot are the same Signed-off-by: Jamie McCrae <[email protected]>
1 parent feb9265 commit 2931f9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

boot/bootutil/src/swap_scratch.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,14 @@ boot_slots_compatible(struct boot_loader_state *state)
218218
#endif
219219
}
220220

221+
#ifndef MCUBOOT_DECOMPRESS_IMAGES
221222
if ((i != num_sectors_primary) ||
222223
(j != num_sectors_secondary) ||
223224
(primary_slot_sz != secondary_slot_sz)) {
224225
BOOT_LOG_WRN("Cannot upgrade: slots are not compatible");
225226
return 0;
226227
}
228+
#endif
227229

228230
return 1;
229231
}

0 commit comments

Comments
 (0)