Skip to contentSkip to conversation

env: Remove all dependencies for SYS_REDUNDAND_ENVIRONMENT

PATCH New Michal Simek 3 participants 3 messages Jan 18, 2021 – Jan 20, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 env: Remove all dependencies for SYS_REDUNDAND_ENVIRONMENT

CONFIG_SYS_REDUNDAND_ENVIRONMENT is changing in env_internal.h how u-boot works with variables. struct environment_s has one byte flags property which also affects ENV_SIZE macro.

I have reached the case where CONFIG_ENV_IS_NOWHERE is default setup but custom scripts can be designed in a way that u-boot is asked to import/export variables from/to file which can be in certain format. That's why also for this configuration make sense to enable CONFIG_SYS_REDUNDAND_ENVIRONMENT because it depends on environment file format.

The patch is removing dependency on this configuration to support selecting environment file format without any specific dependency where variables are stored.

---

Changes in v2:
- Extend Kconfig help message to cover binary environment handling

 env/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
env/Kconfig +3 -2
index 67ce93061b7d..b473d7cfe1e9 100644
@@ -411,13 +411,14 @@ config ENV_IS_IN_UBI
 
 config SYS_REDUNDAND_ENVIRONMENT
 	bool "Enable redundant environment support"
-	depends on ENV_IS_IN_EEPROM || ENV_IS_IN_FLASH || ENV_IS_IN_MMC || \
-		ENV_IS_IN_NAND || ENV_IS_IN_SPI_FLASH || ENV_IS_IN_UBI
 	help
 	  Normally, the environemt is stored in a single location.  By
 	  selecting this option, you can then define where to hold a redundant
 	  copy of the environment data, so that there is a valid backup copy in
 	  case there is a power failure during a "saveenv" operation.
+	  Also this config changes the binary environment structure handling
+	  which is used by env import/export commands which are independent of
+	  storing variables to redundant location on a non volatile device.
 
 config ENV_FAT_INTERFACE
 	string "Name of the block device for the environment"
Signature · 1 line
2.30.0
#1 lore raw

PATCH v2 1/1 env: Remove all dependencies for SYS_REDUNDAND_ENVIRONMENT

Quoted 11 lines · Michal Simek

CONFIG_SYS_REDUNDAND_ENVIRONMENT is changing in env_internal.h how u-boot works with variables. struct environment_s has one byte flags property which also affects ENV_SIZE macro.

I have reached the case where CONFIG_ENV_IS_NOWHERE is default setup but custom scripts can be designed in a way that u-boot is asked to import/export variables from/to file which can be in certain format. That's why also for this configuration make sense to enable CONFIG_SYS_REDUNDAND_ENVIRONMENT because it depends on environment file format.

Quoted 5 lines

The patch is removing dependency on this configuration to support selecting environment file format without any specific dependency where variables are stored.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210119/9debd0f7/attachment.sig>
Applied
#2 lore raw

PATCH v2 1/1 env: Remove all dependencies for SYS_REDUNDAND_ENVIRONMENT

In reply to Michal Simek

po 18. 1. 2021 v 9:11 odes?latel Michal Simek <[email protected]> napsal:

Quoted 47 lines

CONFIG_SYS_REDUNDAND_ENVIRONMENT is changing in env_internal.h how u-boot works with variables. struct environment_s has one byte flags property which also affects ENV_SIZE macro.

I have reached the case where CONFIG_ENV_IS_NOWHERE is default setup but custom scripts can be designed in a way that u-boot is asked to import/export variables from/to file which can be in certain format. That's why also for this configuration make sense to enable CONFIG_SYS_REDUNDAND_ENVIRONMENT because it depends on environment file format.

The patch is removing dependency on this configuration to support selecting environment file format without any specific dependency where variables are stored.

---

Changes in v2:
- Extend Kconfig help message to cover binary environment handling

 env/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
env/Kconfig +3 -3
index 67ce93061b7d..b473d7cfe1e9 100644
@@ -411,13 +411,14 @@ config ENV_IS_IN_UBI
 
 config SYS_REDUNDAND_ENVIRONMENT
        bool "Enable redundant environment support"
-       depends on ENV_IS_IN_EEPROM || ENV_IS_IN_FLASH || ENV_IS_IN_MMC || \
-               ENV_IS_IN_NAND || ENV_IS_IN_SPI_FLASH || ENV_IS_IN_UBI
        help
          Normally, the environemt is stored in a single location.  By
          selecting this option, you can then define where to hold a redundant
          copy of the environment data, so that there is a valid backup copy in
          case there is a power failure during a "saveenv" operation.
+         Also this config changes the binary environment structure handling
+         which is used by env import/export commands which are independent of
+         storing variables to redundant location on a non volatile device.
 
 config ENV_FAT_INTERFACE
        string "Name of the block device for the environment"
--
Quoted 2 lines

2.30.0

Applied.
M

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs