summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrice Chotard <[email protected]>2025-04-01 18:08:44 +0200
committerPatrice Chotard <[email protected]>2025-04-25 16:00:22 +0200
commit17f3cdd253a9c615d146b2f9378cc6c14ad19c84 (patch)
tree265a2f7c668c57174350ef231d44e44c72d09bdc /include
parent331b4cecc2cf5a21ce8de687dddf7d52293be202 (diff)
configs: stm32mp25: add support of NAND and NOR boot
Add support of UBI boot and activate the needed configuration for U-Boot environment in UBI volume for NAND or in a MTD partition for NOR device, SPI Flash: ENV_OFFSET, ENV_OFFSET_REDUND, ENV_SECT_SIZE is aligned with the default MTD partition on NOR device of the STMicroelectronics boards. Signed-off-by: Patrick Delaunay <[email protected]> Signed-off-by: Patrice Chotard <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/configs/stm32mp25_common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/configs/stm32mp25_common.h b/include/configs/stm32mp25_common.h
index 542de8f068d..1c28ce1c1e9 100644
--- a/include/configs/stm32mp25_common.h
+++ b/include/configs/stm32mp25_common.h
@@ -35,8 +35,15 @@
#define BOOT_TARGET_MMC2(func)
#endif
+#ifdef CONFIG_CMD_UBIFS
+#define BOOT_TARGET_UBIFS(func) func(UBIFS, ubifs, 0, UBI, boot)
+#else
+#define BOOT_TARGET_UBIFS(func)
+#endif
+
#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_MMC1(func) \
+ BOOT_TARGET_UBIFS(func) \
BOOT_TARGET_MMC0(func) \
BOOT_TARGET_MMC2(func)
@@ -44,6 +51,7 @@
* default bootcmd for stm32mp25:
* for serial/usb: execute the stm32prog command
* for mmc boot (eMMC, SD card), distro boot on the same mmc device
+ * for NAND or SPI-NAND boot, distro boot with UBIFS on UBI partition
* for other boot, use the default distro order in ${boot_targets}
*/
#define STM32MP_BOOTCMD "bootcmd_stm32mp=" \
@@ -54,6 +62,9 @@
"run env_check;" \
"if test ${boot_device} = mmc;" \
"then env set boot_targets \"mmc${boot_instance}\"; fi;" \
+ "if test ${boot_device} = nand ||" \
+ " test ${boot_device} = spi-nand ;" \
+ "then env set boot_targets ubifs0; fi;" \
"run distro_bootcmd;" \
"fi;\0"