arm: stm32mp: detect U-Boot version used to save environment

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@st.com>
Change-Id: I4735cdaa63f0d66a5ff23289c87782d8dfd5f1ba
This commit is contained in:
Patrick Delaunay
2020-03-11 17:17:27 +01:00
parent 8ba5f74174
commit 17f10c94b3
2 changed files with 9 additions and 1 deletions

View File

@ -70,6 +70,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:

View File

@ -165,7 +165,14 @@
"splashimage=0xc4300000\0" \
"ramdisk_addr_r=0xc4400000\0" \
"altbootcmd=run bootcmd\0" \
"env_check=if env info -p -d -q; then 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 \
BOOTENV \
"boot_net_usb_start=true\0"