Commit 2931f9d7 authored by Jamie McCrae's avatar Jamie McCrae Committed by Jamie
Browse files

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: default avatarJamie McCrae <jamie.mccrae@nordicsemi.no>
parent feb9265f
Loading
Loading
Loading
Loading
+2 −0
Changes for boot/bootutil/src/swap_scratch.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -218,12 +218,14 @@ boot_slots_compatible(struct boot_loader_state *state)
#endif
    }

#ifndef MCUBOOT_DECOMPRESS_IMAGES
    if ((i != num_sectors_primary) ||
        (j != num_sectors_secondary) ||
        (primary_slot_sz != secondary_slot_sz)) {
        BOOT_LOG_WRN("Cannot upgrade: slots are not compatible");
        return 0;
    }
#endif

    return 1;
}