summaryrefslogtreecommitdiff
path: root/include/configs/stm32mp1.h
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2019-07-05 17:20:21 +0200
committerPatrick Delaunay <patrick.delaunay@st.com>2019-07-12 11:18:53 +0200
commit22bed7ee4988aadfaef0c0da9746bf8541549ed4 (patch)
tree168a415229b37d14ab4a68a6a482a60ec683ef07 /include/configs/stm32mp1.h
parent03cc423d8ad65a8268e9143129d76b341a383a88 (diff)
stm32mp1: add check for presence of environment in boot device
For boot from flash, check presence of default environment to force save env. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Diffstat (limited to 'include/configs/stm32mp1.h')
-rw-r--r--include/configs/stm32mp1.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
index 637f9bf5b0..ed01d4d9c2 100644
--- a/include/configs/stm32mp1.h
+++ b/include/configs/stm32mp1.h
@@ -103,6 +103,7 @@
"if test ${boot_device} = serial || test ${boot_device} = usb;" \
"then stm32prog ${boot_device} ${boot_instance}; " \
"else " \
+ "run env_check;" \
"if test ${boot_device} = mmc;" \
"then env set boot_targets \"mmc${boot_instance}\"; fi;" \
"if test ${boot_device} = nand;" \
@@ -134,6 +135,9 @@
"ramdisk_addr_r=0xc4400000\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
+ "env_default=1\0" \
+ "env_check=if test $env_default -eq 1;"\
+ " then env set env_default 0;env save;fi\0" \
STM32MP_BOOTCMD \
STM32MP_MTDPARTS \
BOOTENV