mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/3] Kconfig: Make ENV_HANDLING visible
Date: Wed, 27 Apr 2016 10:38:24 +0200	[thread overview]
Message-ID: <1461746305-31995-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1461746305-31995-1-git-send-email-s.hauer@pengutronix.de>

ENV_HANDLING is usable even without explicit loadenv/saveenv command
support. Instead of selecting this option from loadenv/saveenv, make
this option visible. loadenv/saveenv can then depend on ENV_HANDLING
rather than selecting it. This reduces Kconfig dependencies hassles.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/Kconfig |  4 ++--
 common/Kconfig   | 16 +++++++++++-----
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/commands/Kconfig b/commands/Kconfig
index 39a2df5..56b9542 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -761,7 +761,7 @@ config CMD_GLOBAL
 
 config CMD_LOADENV
 	tristate
-	select ENV_HANDLING
+	depends on ENV_HANDLING
 	prompt "loadenv"
 	help
 	  Load environment from ENVFS
@@ -805,7 +805,7 @@ config CMD_MAGICVAR_HELP
 
 config CMD_SAVEENV
 	tristate
-	select ENV_HANDLING
+	depends on ENV_HANDLING
 	prompt "saveenv"
 	help
 	  Save environment to persistent storage
diff --git a/common/Kconfig b/common/Kconfig
index 503f43a..12f6e84 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -21,10 +21,6 @@ config HAS_KALLSYMS
 config HAS_MODULES
 	bool
 
-config ENV_HANDLING
-	select CRC32
-	bool
-
 config HAS_CACHE
 	bool
 	help
@@ -646,10 +642,20 @@ config PARTITION
 
 source common/partitions/Kconfig
 
+config ENV_HANDLING
+	select CRC32
+	bool "Support environment files storage"
+	default y if !SHELL_NONE
+	help
+	  Enabling this option will give you environment files which can be stored
+	  over reboots. The "saveenv" command will store all files under /env/ to
+	  the persistent environment, the "loadenv" command (also executed during
+	  startup) will bring them back. If unsure, say yes.
+
 config DEFAULT_ENVIRONMENT
 	bool
 	default y
-	select ENV_HANDLING
+	depends on ENV_HANDLING
 	prompt "Compile in default environment"
 	help
 	  Enabling this option will give you a default environment when
-- 
2.8.0.rc3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-04-27  8:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27  8:38 [PATCH 1/3] Kconfig: Make GLOBALVAR visible Sascha Hauer
2016-04-27  8:38 ` Sascha Hauer [this message]
2016-04-27  8:38 ` [PATCH 3/3] Kconfig: Create Kconfig symbol for NVVAR Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461746305-31995-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox