boot: store write align as uint32_t
In overwrite-only mode, the write alignment is not used for much.
Making this a larger value will allow the alignment for a particular
device to be larger than a uint8_t. This will make the trailer size
very large for these devices (and prevent
!defined(MCUBOOT_OVERWRITE_ONLY) from being used), but at least allows
the overwrite only mode to be used on these devices.
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c
index 5e12891..43bc487 100644
--- a/boot/bootutil/src/loader.c
+++ b/boot/bootutil/src/loader.c
@@ -363,11 +363,11 @@
return 0;
}
-static uint8_t
+static uint32_t
boot_write_sz(struct boot_loader_state *state)
{
- uint8_t elem_sz;
- uint8_t align;
+ uint32_t elem_sz;
+ uint32_t align;
/* Figure out what size to write update status update as. The size depends
* on what the minimum write size is for scratch area, active image slot.