diff mbox series

[u-boot,v2019.04-aspeed-openbmc] add kconfig for secondary env partition

Message ID 20211123174446.26011-1-a.kartashev@yadro.com
State New
Headers show
Series [u-boot,v2019.04-aspeed-openbmc] add kconfig for secondary env partition | expand

Commit Message

Andrei Kartashev Nov. 23, 2021, 5:44 p.m. UTC
Backport SYS_REDUNDAND_ENVIRONMENT and ENV_OFFSET_REDUND options from
upstream.
Fix indent for ENV_OFFSET and ENV_SIZE

Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
---
 env/Kconfig | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/env/Kconfig b/env/Kconfig
index c41478e362..07e161194a 100755
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -656,15 +656,28 @@  config TPL_ENV_IS_IN_FLASH
 endif
 
 config ENV_OFFSET
-        hex "Environment offset"
-        depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
-                    ENV_IS_IN_SPI_FLASH
-        help
-          Offset from the start of the device (or partition)
+	hex "Environment offset"
+	depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || ENV_IS_IN_SPI_FLASH
+	help
+	  Offset from the start of the device (or partition)
 
 config ENV_SIZE
-        hex "Environment Size"
-        help
-          Size of the environment storage area
+	hex "Environment Size"
+	help
+	  Size of the environment storage area
+
+config SYS_REDUNDAND_ENVIRONMENT
+	bool "Use secondary environment partition"
+	depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || ENV_IS_IN_SPI_FLASH
+	help
+	  Used to hold a redundant copy of the environment data. This
+	  provides a valid backup copy in case the other copy is corrupted,
+	  e.g. due to a power failure during a "saveenv" operation.
+
+config ENV_OFFSET_REDUND
+	hex "Secondary environment offset"
+	depends on SYS_REDUNDAND_ENVIRONMENT
+	help
+	  Size of the environment storage area
 
 endmenu