summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDario Binacchi <[email protected]>2026-04-30 10:06:09 +0200
committerPatrice Chotard <[email protected]>2026-05-12 15:52:01 +0200
commit4300f9f4c5d709c86297c8a8702b92af604ed7c3 (patch)
treef9a603207ec9465d7bcbfd4ef4bcab191a8e0d91 /include
parent63fc73ff31c47df8dd3cb708dc34053972d5f4a0 (diff)
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/configs/stm32mp25_st_common.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/configs/stm32mp25_st_common.h b/include/configs/stm32mp25_st_common.h
index cb679eb1be2..0b0267ae99b 100644
--- a/include/configs/stm32mp25_st_common.h
+++ b/include/configs/stm32mp25_st_common.h
@@ -8,7 +8,22 @@
#ifndef __CONFIG_STM32MP25_ST_COMMON_H__
#define __CONFIG_STM32MP25_ST_COMMON_H__
+#ifdef CONFIG_FWU_MULTI_BANK_UPDATE
+#define SCAN_DEV_FOR_BOOT_PARTS \
+ "setenv devplist; " \
+ "env exists boot_partuuid && " \
+ "part number ${devtype} ${devnum} ${boot_partuuid} devplist; " \
+ "env exists devplist || " \
+ "part list ${devtype} ${devnum} -bootable devplist; "
+
+#define ST_STM32MP25_FWU_ENV \
+ "altbootcmd=${bootcmd}\0"
+#else
+#define ST_STM32MP25_FWU_ENV
+#endif
+
#define STM32MP_BOARD_EXTRA_ENV \
+ ST_STM32MP25_FWU_ENV \
"usb_pgood_delay=2000\0" \
"console=ttySTM0\0"