mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/5] console: cleanup Kconfig
Date: Sun,  7 Oct 2012 13:39:50 +0200	[thread overview]
Message-ID: <1349609991-26567-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1349609991-26567-1-git-send-email-s.hauer@pengutronix.de>

Use a choice for the CONSOLE_ACTIVATE_* variables, which is the natural
way of specifying mutually exclusive variabled in Kconfig. Also update
the help texts a bit.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/Kconfig |   35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/common/Kconfig b/common/Kconfig
index 9210739..107774c 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -468,17 +468,19 @@ config CONSOLE_FULL
 	prompt "Enable full console support"
 	help
 	  This option enables full console support capable of
-	  handling multiple consoles.
+	  handling multiple consoles. Also the full console support
+	  is able to store the output which comes before a console
+	  is registered in a circular buffer which will be printed
+	  once the first console is registered. Recommended for most
+	  usecases.
 
-config CONSOLE_SIMPLE
-	bool
-	default y
-	depends on !CONSOLE_FULL
+choice
+	prompt "Console activation strategy"
+	depends on CONSOLE_FULL
+	default CONSOLE_ACTIVATE_FIRST
 
 config CONSOLE_ACTIVATE_FIRST
-	depends on CONSOLE_FULL
 	bool
-	default y
 	prompt "activate first console on startup"
 	help
 	  Normally on startup all consoles are disabled, so you won't
@@ -486,13 +488,28 @@ config CONSOLE_ACTIVATE_FIRST
 	  enables the first console.
 
 config CONSOLE_ACTIVATE_ALL
-	depends on CONSOLE_FULL
-	depends on !CONSOLE_ACTIVATE_FIRST
 	bool
 	prompt "activate all consoles on startup"
 	help
 	  Enabling this options activates all consoles on startup, so
 	  you will get output and a prompt on all consoles simultaneously.
+	  Only the first registered console will have the full startup
+	  log though.
+
+config CONSOLE_ACTIVATE_NONE
+	prompt "leave all consoles disabled"
+	bool
+	help
+	  Leave all consoles disabled on startup. Board code or environment
+	  is responsible for enabling a console. Otherwise you'll get a working
+	  barebox, you just won't see anything.
+
+endchoice
+
+config CONSOLE_SIMPLE
+	bool
+	default y
+	depends on !CONSOLE_FULL
 
 config PARTITION
 	bool
-- 
1.7.10.4


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

  parent reply	other threads:[~2012-10-07 11:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 11:39 [PATCH] misc improvements Sascha Hauer
2012-10-07 11:39 ` [PATCH 1/5] driver: print error message when probe fails Sascha Hauer
2012-10-07 11:39 ` [PATCH 2/5] resource: statically initialize iomem resource Sascha Hauer
2012-10-07 11:39 ` [PATCH 3/5] console: Cleanup console activation Sascha Hauer
2012-10-07 11:39 ` Sascha Hauer [this message]
2012-10-07 11:39 ` [PATCH 5/5] startup: Print error message when initcall fails 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=1349609991-26567-5-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