[PATCH] ARM: stm32: Add optional manufacturing environment to DH STM32MP15xx DHSOM
Marek Vasut
marex at denx.de
Wed Nov 6 20:04:14 CET 2024
Add manufacturing environment into STM32MP15xx DH electronics DHSOM
configuration. This environment is part of every board build, but only
takes effect on systems booted with the dh,stm32mp15xx-dhcor-testbench
device tree, i.e. systems populated with factory build of U-Boot.
Signed-off-by: Marek Vasut <marex at denx.de>
---
Cc: Patrice Chotard <patrice.chotard at foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
Cc: Sean Anderson <seanga2 at gmail.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at dh-electronics.com
Cc: u-boot at lists.denx.de
Cc: uboot-stm32 at st-md-mailman.stormreply.com
---
configs/stm32mp15_dhsom.config | 1 +
include/configs/stm32mp15_dh_dhsom.h | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/configs/stm32mp15_dhsom.config b/configs/stm32mp15_dhsom.config
index 4f8e98beec6..efc149577ea 100644
--- a/configs/stm32mp15_dhsom.config
+++ b/configs/stm32mp15_dhsom.config
@@ -64,6 +64,7 @@ CONFIG_SYSRESET_SYSCON=y
CONFIG_SYS_BOOTCOUNT_ADDR=0x5C00A14C
CONFIG_SYS_MALLOC_F_LEN=0x3000
CONFIG_SYS_PBSIZE=1050
+CONFIG_PREBOOT="run dh_preboot"
CONFIG_SYS_SPI_U_BOOT_OFFS=0x80000
CONFIG_TARGET_DH_STM32MP1_PDK2=y
CONFIG_USE_SERVERIP=y
diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h
index 2797fc61d17..c004a8cec82 100644
--- a/include/configs/stm32mp15_dh_dhsom.h
+++ b/include/configs/stm32mp15_dh_dhsom.h
@@ -18,6 +18,8 @@
#endif
#define STM32MP_BOARD_EXTRA_ENV \
+ "dh_preboot=" \
+ "run dh_testbench_backward_compat\0" \
"dh_update_sd_to_emmc=" /* Install U-Boot from SD to eMMC */ \
"setexpr loadaddr1 ${loadaddr} + 0x1000000 && " \
"load mmc 0:4 ${loadaddr1} boot/u-boot-spl.stm32 && " \
@@ -61,7 +63,20 @@
"stdout=serial\0" \
"stderr=serial\0" \
"update_sf=run dh_update_sd_to_sf\0" \
- "usb_pgood_delay=1000\0"
+ "usb_pgood_delay=1000\0" \
+ /* Old testbench-only backward compatibility environment */ \
+ "dh_testbench_backward_compat=" \
+ "test ${board_name} = \"dh,stm32mp15xx-dhcor-testbench\" && " \
+ "run load_bootenv importbootenv\0" \
+ "importbootenv=" \
+ "echo Importing environment from DHupdate.ini...;" \
+ "env import -t ${loadaddr} ${filesize}\0" \
+ "load_bootenv=" \
+ "usb reset && " \
+ "load usb ${usbdev}:${usbpart} ${loadaddr} DHupdate.ini && " \
+ "echo \"--> Update: found DHupdate.ini (${filesize} bytes)\"\0" \
+ "usbdev=0\0" \
+ "usbpart=1\0"
#include <configs/stm32mp15_common.h>
--
2.45.2
More information about the U-Boot
mailing list