[PATCH v2 7/7] board: st: stm32mp25: support dynamic A/B bank bootup

Simon Glass sjg at chromium.org
Sat Apr 11 01:04:56 CEST 2026


Hi Dario,

On 2026-04-04T15:23:27, Dario Binacchi
<dario.binacchi at amarulasolutions.com> wrote:
> board: st: stm32mp25: support dynamic A/B bank bootup
>
> Enable automatic detection of the active A/B bank by retrieving
> partition GUIDs from FWU metadata.
>
> This ensures the system correctly identifies the bootable partitions
> even in multi-bank scenarios, falling back to a standard bootable flag
> scan if the UUIDs are missing.
>
> To enable A/B bank bootup on stm32mp25 boards, add the following Kconfig
> options to the stm32mp25_defconfig:
>
>  CONFIG_FWU_MULTI_BANK_UPDATE=y
>  CONFIG_FWU_MDATA=y
>  CONFIG_FWU_NUM_BANKS=2
>  CONFIG_FWU_NUM_IMAGES_PER_BANK=3
>  CONFIG_CMD_FWU_METADATA=y
>  CONFIG_FWU_MDATA_V2=y
>
> Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
>
> board/st/stm32mp2/stm32mp2.c          | 25 +++++++++++++++++++++++++
>  include/configs/stm32mp25_st_common.h | 15 +++++++++++++++
>  2 files changed, 40 insertions(+)

> diff --git a/board/st/stm32mp2/stm32mp2.c b/board/st/stm32mp2/stm32mp2.c
> @@ -208,4 +208,29 @@ void fwu_plat_get_bootidx(uint *boot_idx)
> +     if (!fwu_mdata_get_image_guid(&boot_uuid, &boot_type_guid,
> +                                   boot_idx) &&
> +         !fwu_mdata_get_image_guid(&root_uuid, &root_type_guid,
> +                                   boot_idx)) {

Just to check - if fwu_mdata_get_image_guid() fails for boot_type_guid
but would have succeeded for root_type_guid, there is no log message
and the function silently succeeds with no environment variables set.
Is this the intended fallback behaviour? A log_debug() might help when
debugging boot issues.

Reviewed-by: Simon Glass <sjg at chromium.org>

Regards,
Simon


More information about the U-Boot mailing list