From e1ee957c919314e22d1ae87ffb117bca8849e68d Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Mon, 15 Sep 2025 14:06:57 +0200 Subject: [PATCH] boot: zephyr: config: Introduce MCUBOOT_BOOT_MAX_ALIGN Kconfig symbol Allow setting CONFIG_MCUBOOT_BOOT_MAX_ALIGN to apply a programmable block in flash. Move the chosen flash write block size logic to Kconfig. Signed-off-by: Pieter De Gendt --- boot/zephyr/include/mcuboot_config/mcuboot_config.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/boot/zephyr/include/mcuboot_config/mcuboot_config.h b/boot/zephyr/include/mcuboot_config/mcuboot_config.h index 8df98ede64..b35a11f97e 100644 --- a/boot/zephyr/include/mcuboot_config/mcuboot_config.h +++ b/boot/zephyr/include/mcuboot_config/mcuboot_config.h @@ -430,11 +430,8 @@ #endif /* Support 32-byte aligned flash sizes */ -#if DT_HAS_CHOSEN(zephyr_flash) - #if DT_PROP_OR(DT_CHOSEN(zephyr_flash), write_block_size, 0) > 8 - #define MCUBOOT_BOOT_MAX_ALIGN \ - DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size) - #endif +#if CONFIG_MCUBOOT_BOOT_MAX_ALIGN > 8 +#define MCUBOOT_BOOT_MAX_ALIGN CONFIG_MCUBOOT_BOOT_MAX_ALIGN #endif #ifdef CONFIG_MCUBOOT_BOOTUTIL_LIB_FOR_DIRECT_XIP