@@ -67,6 +67,7 @@ config TARGET_ST_STM32MP15x
imply DISABLE_CONSOLE
imply PRE_CONSOLE_BUFFER
imply SILENT_CONSOLE
+ imply VERSION_VARIABLE
help
target the STMicroelectronics board with SOC STM32MP15x
managed by board/st/stm32mp1:
@@ -222,9 +222,14 @@
"splashimage=0xc4300000\0" \
"ramdisk_addr_r=0xc4400000\0" \
"altbootcmd=run bootcmd\0" \
- "env_default=1\0" \
- "env_check=if test $env_default -eq 1;"\
- " then env set env_default 0;env save;fi\0" \
+ "env_check=" \
+ "env exists env_ver || env set env_ver ${ver};" \
+ "if env info -p -d -q; then env save; fi;" \
+ "if test \"$env_ver\" != \"$ver\"; then" \
+ " echo \"*** Warning: old environment ${env_ver}\";" \
+ " echo '* set default: env default -a; env save; reset';" \
+ " echo '* update current: env set env_ver ${ver}; env save';" \
+ "fi;\0" \
STM32MP_BOOTCMD \
STM32MP_MTDPARTS \
STM32MP_DFU_ALT_RAM \
Imply CONFIG_VERSION_VARIABLE for stm32mp1 target and test U-Boot version ($env_ver) when the environment was saved for the last time and to display warning trace. Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com> --- arch/arm/mach-stm32mp/Kconfig | 1 + include/configs/stm32mp1.h | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-)