mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sanjeev Premi <premi@ti.com>
To: barebox@lists.infradead.org
Subject: [RFC 2/2] ARM omap: Add CONFIG_SILENT
Date: Wed, 11 Jan 2012 23:04:44 +0530	[thread overview]
Message-ID: <1326303284-14444-2-git-send-email-premi@ti.com> (raw)
In-Reply-To: <1326303284-14444-1-git-send-email-premi@ti.com>

Don't display any verbose message on the console.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---

 This config option is kept separate, as user may
 want console features, but avoid initial messages.

 Although I have marked the change to be specific to
 ARM+OMAP, it is generally applicable. Will change
 the subject in actual based on review comments to
 this RFC.

 common/Kconfig   |    4 ++++
 common/startup.c |    2 ++
 common/version.c |    3 ++-
 3 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/common/Kconfig b/common/Kconfig
index a664624..cf09034 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -369,6 +369,10 @@ config TIMESTAMP
 	  commands like bootm or iminfo. This option is
 	  automatically enabled when you select CFG_CMD_DATE .
 
+config SILENT
+	bool
+	prompt "Don't display any messages on console"
+
 config CONSOLE_FULL
 	bool
 	default y
diff --git a/common/startup.c b/common/startup.c
index 180fdc3..976c0d3 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -52,6 +52,7 @@ static void display_meminfo(void)
 
 	debug("barebox code: 0x%p -> 0x%p\n", _stext, _etext);
 	debug("bss segment:  0x%p -> 0x%p\n", __bss_start, __bss_stop);
+#ifndef CONFIG_SILENT
 	printf("Malloc space: 0x%08lx -> 0x%08lx (size %s)\n",
 		mstart, mend, size_human_readable(msize));
 #ifdef CONFIG_ARM
@@ -59,6 +60,7 @@ static void display_meminfo(void)
 		STACK_BASE, STACK_BASE + STACK_SIZE,
 		size_human_readable(STACK_SIZE));
 #endif
+#endif /* CONFIG_SILENT */
 }
 
 #ifdef CONFIG_DEFAULT_ENVIRONMENT
diff --git a/common/version.c b/common/version.c
index 0af8ec1..6d26ef8 100644
--- a/common/version.c
+++ b/common/version.c
@@ -6,7 +6,8 @@ const char version_string[] =
 
 void barebox_banner (void)
 {
+#ifndef CONFIG_SILENT
 	printf("\n\n%s\n\n", version_string);
 	printf("Board: " CONFIG_BOARDINFO "\n");
+#endif
 }
-
-- 
1.7.0.4


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

  reply	other threads:[~2012-01-11 17:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 17:34 [RFC 1/2] ARM omap: Add null console Sanjeev Premi
2012-01-11 17:34 ` Sanjeev Premi [this message]
2012-01-12  9:28   ` [RFC 2/2] ARM omap: Add CONFIG_SILENT Sascha Hauer
2012-01-12 10:54     ` Jean-Christophe PLAGNIOL-VILLARD
2012-01-12 12:26     ` Premi, Sanjeev
2012-01-12 15:51     ` Premi, Sanjeev
2012-01-13 11:43       ` Sascha Hauer
2012-01-12  9:13 ` [RFC 1/2] ARM omap: Add null console 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=1326303284-14444-2-git-send-email-premi@ti.com \
    --to=premi@ti.com \
    --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