mcuboot: Remove public dependency on bootutil

BOOT_MAGIC_SZ and BOOT_MAX_ALIGN were used in the header without
including bootutil/bootutil_public.h. This change remove the need of
the inclusion by making the dependency private.
Fixes #52095

Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
This commit is contained in:
Guillaume Lager 2022-12-08 12:35:50 +01:00 committed by Carles Cufí
commit e67e6d5af6
4 changed files with 50 additions and 5 deletions

View file

@ -54,9 +54,11 @@ int flash_img_buffered_write(struct flash_img_context *ctx, const uint8_t *data,
}
#ifdef CONFIG_IMG_ERASE_PROGRESSIVELY
ssize_t status_offset = boot_get_trailer_status_offset(
ctx->flash_area->fa_size);
rc = stream_flash_erase_page(&ctx->stream,
ctx->flash_area->fa_off +
BOOT_TRAILER_IMG_STATUS_OFFS(ctx->flash_area));
status_offset);
if (rc) {
return rc;
}