diff --git a/boot/zephyr/firmware_loader.c b/boot/zephyr/firmware_loader.c index 38b121cd4..11b461c41 100644 --- a/boot/zephyr/firmware_loader.c +++ b/boot/zephyr/firmware_loader.c @@ -62,6 +62,7 @@ boot_image_validate(const struct flash_area *fa_p, } #endif /* MCUBOOT_VALIDATE_PRIMARY_SLOT || MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE*/ +#if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE) inline static fih_ret boot_image_validate_once(const struct flash_area *fa_p, struct image_header *hdr) @@ -92,6 +93,7 @@ boot_image_validate_once(const struct flash_area *fa_p, } FIH_RET(FIH_SUCCESS); } +#endif /** * Validates that an image in a slot is OK to boot. diff --git a/boot/zephyr/single_loader.c b/boot/zephyr/single_loader.c index 5d1e76fcf..75374d2db 100644 --- a/boot/zephyr/single_loader.c +++ b/boot/zephyr/single_loader.c @@ -58,6 +58,7 @@ boot_image_validate(const struct flash_area *fa_p, } #endif /* MCUBOOT_VALIDATE_PRIMARY_SLOT || MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE*/ +#if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE) inline static fih_ret boot_image_validate_once(const struct flash_area *fa_p, struct image_header *hdr) @@ -88,6 +89,7 @@ boot_image_validate_once(const struct flash_area *fa_p, } FIH_RET(FIH_SUCCESS); } +#endif /** * Gather information on image and prepare for booting.