diff mbox series

[1/5] env: add SAVEENV as an alias of the CMD_SAVEENV symbol

Message ID 20200219094726.26798-2-rasmus.villemoes@prevas.dk
State Accepted
Delegated to: Tom Rini
Headers show
Series CMD_SAVEENV ifdef cleanup | expand

Commit Message

Rasmus Villemoes Feb. 19, 2020, 9:47 a.m. UTC
Currently, testing whether to compile in support for saving the
environment is a bit awkward when one needs to take SPL_SAVEENV into
account, and quite a few storage drivers currently do not honour
SPL_SAVEENV.

To make it a bit easier to decide whether environment saving should be
enabled, introduce SAVEENV as an alias for the CMD_SAVEENV
symbol. Then one can simply use

  CONFIG_IS_ENABLED(SAVEENV)

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 env/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

Comments

Tom Rini April 24, 2020, 5:08 p.m. UTC | #1
On Wed, Feb 19, 2020 at 09:47:39AM +0000, Rasmus Villemoes wrote:

> Currently, testing whether to compile in support for saving the
> environment is a bit awkward when one needs to take SPL_SAVEENV into
> account, and quite a few storage drivers currently do not honour
> SPL_SAVEENV.
> 
> To make it a bit easier to decide whether environment saving should be
> enabled, introduce SAVEENV as an alias for the CMD_SAVEENV
> symbol. Then one can simply use
> 
>   CONFIG_IS_ENABLED(SAVEENV)
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/env/Kconfig b/env/Kconfig
index 0d6f559b39..969308fe6c 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -3,6 +3,9 @@  menu "Environment"
 config ENV_SUPPORT
 	def_bool y
 
+config SAVEENV
+	def_bool y if CMD_SAVEENV
+
 config ENV_IS_NOWHERE
 	bool "Environment is not stored"
 	default y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \