[PATCH 02/14] imx: kontron-sl-mx8mm: Add redundant environment

Frieder Schrempf frieder at fris.de
Wed Jul 13 11:52:13 CEST 2022


From: Frieder Schrempf <frieder.schrempf at kontron.de>

Enable the redundant environment feature to allow falling
back in case of storage corruption.

Signed-off-by: Frieder Schrempf <frieder.schrempf at kontron.de>
---
 configs/kontron-sl-mx8mm_defconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configs/kontron-sl-mx8mm_defconfig b/configs/kontron-sl-mx8mm_defconfig
index 7d65b5c2edc..064f7d0caf6 100644
--- a/configs/kontron-sl-mx8mm_defconfig
+++ b/configs/kontron-sl-mx8mm_defconfig
@@ -6,7 +6,7 @@ CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_ENV_SIZE=0x10000
-CONFIG_ENV_OFFSET=0x1f0000
+CONFIG_ENV_OFFSET=0x150000
 CONFIG_ENV_SECT_SIZE=0x10000
 CONFIG_IMX_CONFIG="board/kontron/sl-mx8mm/imximage.cfg"
 CONFIG_DM_GPIO=y
@@ -19,6 +19,7 @@ CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SPL=y
+CONFIG_ENV_OFFSET_REDUND=0x160000
 CONFIG_SYS_LOAD_ADDR=0x42000000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
@@ -65,9 +66,11 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT4_WRITE=y
+CONFIG_MTDPARTS_DEFAULT="mtdparts=spi0.0:320k(spl),1024k(u-boot),64k(env),64k(env_redundant)"
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
-- 
2.37.0



More information about the U-Boot mailing list