[26/33] configs: stm32mp25: move FWU A/B boot environment to common settings
Commit Message
The distro boot environment booting from the bootfs partition of the
bank selected by the TF-A only depends on the FWU multi-bank support, so
it is not specific to the STMicroelectronics boards.
Move it to the STM32MP25 common settings, so that other vendor boards
can use it too.
No functional change intended.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
include/configs/stm32mp25_common.h | 20 ++++++++++++++++++++
include/configs/stm32mp25_st_common.h | 15 ---------------
2 files changed, 20 insertions(+), 15 deletions(-)
--
2.43.0
@@ -86,6 +86,25 @@
#define STM32MP_BOARD_EXTRA_ENV
#endif
+/*
+ * With FWU multi-bank update, boot from the bootfs partition of the bank
+ * selected by the TF-A ("boot_partuuid" set from the FWU metadata),
+ * falling back to the bootable partitions if it is not available.
+ */
+#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 STM32MP_FWU_ENV \
+ "altbootcmd=${bootcmd}\0"
+#else
+#define STM32MP_FWU_ENV
+#endif
+
#define STM32MP_EXTRA \
"env_check=if env info -p -d -q; then env save; fi\0" \
"boot_net_usb_start=true\0"
@@ -119,6 +138,7 @@
STM32MP_BOOTCMD \
BOOTENV \
STM32MP_EXTRA \
+ STM32MP_FWU_ENV \
STM32MP_BOARD_EXTRA_ENV
#endif
@@ -8,22 +8,7 @@
#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"