diff mbox

[U-Boot,1/4] common/env_common: Add CONFIG_SILENT_CONSOLE_AT_BOOT env option

Message ID 1307042852-10385-1-git-send-email-y
State Rejected
Headers show

Commit Message

y@right.am.freescale.net June 2, 2011, 7:27 p.m. UTC
From: Matthew McClintock <msm@freescale.com>

Just setting CONFIG_SILENT_CONSOLE does not make the CONSOLE
silent without the silent env variable set. This adds a new
define to add this to the default environment easily

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 README              |    4 ++++
 common/env_common.c |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

Comments

Mike Frysinger June 3, 2011, 4:48 a.m. UTC | #1
On Thursday, June 02, 2011 15:27:29 y@right.am.freescale.net wrote:
> Just setting CONFIG_SILENT_CONSOLE does not make the CONSOLE
> silent without the silent env variable set. This adds a new
> define to add this to the default environment easily

any reason you couldnt add silent=0 to CONFIG_EXTRA_ENV_SETTINGS ?
-mike
McClintock Matthew-B29882 June 3, 2011, 6:34 p.m. UTC | #2
On Thu, Jun 2, 2011 at 11:48 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> any reason you couldnt add silent=0 to CONFIG_EXTRA_ENV_SETTINGS ?

I was just perturbed that setting CONFIG_SILENT_CONSOLE did not
actually make the console silent - I thought it would be cleaner to
have a define available for this. This is an optional patch though in
that sense

-M
Mike Frysinger June 3, 2011, 7:16 p.m. UTC | #3
On Friday, June 03, 2011 14:34:27 McClintock Matthew-B29882 wrote:
> On Thu, Jun 2, 2011 at 11:48 PM, Mike Frysinger wrote:
> > any reason you couldnt add silent=0 to CONFIG_EXTRA_ENV_SETTINGS ?
> 
> I was just perturbed that setting CONFIG_SILENT_CONSOLE did not
> actually make the console silent - I thought it would be cleaner to
> have a define available for this.

i know people are surprised by this from time to time, but i think the README 
is pretty clear about it.  is there clarification there that you'd like ?

since CONFIG_EXTRA_ENV_SETTINGS is board-specific, i'm not sure adding another 
board-specific define for a single default env var gains us anything.
-mike
McClintock Matthew-B29882 June 3, 2011, 8:14 p.m. UTC | #4
On Fri, Jun 3, 2011 at 2:16 PM, Mike Frysinger <vapier@gentoo.org> wrote:
>> On Thu, Jun 2, 2011 at 11:48 PM, Mike Frysinger wrote:
>> > any reason you couldnt add silent=0 to CONFIG_EXTRA_ENV_SETTINGS ?
>>
>> I was just perturbed that setting CONFIG_SILENT_CONSOLE did not
>> actually make the console silent - I thought it would be cleaner to
>> have a define available for this.
>
> i know people are surprised by this from time to time, but i think the README
> is pretty clear about it.  is there clarification there that you'd like ?
>
> since CONFIG_EXTRA_ENV_SETTINGS is board-specific, i'm not sure adding another
> board-specific define for a single default env var gains us anything.

Not really too concerned either way here.

Some of our boards have some really long CONFIG_EXTRA_ENV_SETTINGS and
it's nice to try to keep that shorter by moving stuff into
CONFIG_NFSBOOTCOMMAND, CONFIG_RAMBOOTCOMMAD,
CONFIG_SILENT_CONSOLE_AT_BOOT, etc. but beyond that we can just add to
our CONFIG_EXTRA_ENV_SETTINGS as well.
Mike Frysinger June 3, 2011, 8:38 p.m. UTC | #5
On Friday, June 03, 2011 16:14:29 McClintock Matthew-B29882 wrote:
> On Fri, Jun 3, 2011 at 2:16 PM, Mike Frysinger wrote:
> >> On Thu, Jun 2, 2011 at 11:48 PM, Mike Frysinger wrote:
> >> > any reason you couldnt add silent=0 to CONFIG_EXTRA_ENV_SETTINGS ?
> >> 
> >> I was just perturbed that setting CONFIG_SILENT_CONSOLE did not
> >> actually make the console silent - I thought it would be cleaner to
> >> have a define available for this.
> > 
> > i know people are surprised by this from time to time, but i think the
> > README is pretty clear about it.  is there clarification there that
> > you'd like ?
> > 
> > since CONFIG_EXTRA_ENV_SETTINGS is board-specific, i'm not sure adding
> > another board-specific define for a single default env var gains us
> > anything.
> 
> Not really too concerned either way here.
> 
> Some of our boards have some really long CONFIG_EXTRA_ENV_SETTINGS and
> it's nice to try to keep that shorter by moving stuff into
> CONFIG_NFSBOOTCOMMAND, CONFIG_RAMBOOTCOMMAD,
> CONFIG_SILENT_CONSOLE_AT_BOOT, etc. but beyond that we can just add to
> our CONFIG_EXTRA_ENV_SETTINGS as well.

we had a similar thing with Blackfin boards, but we just made it our own set 
of defines that eventually culminated in a single CONFIG_EXTRA_ENV_SETTINGS

*shrug*
-mike
Wolfgang Denk June 3, 2011, 9:28 p.m. UTC | #6
Dear y@right.am.freescale.net,

In message <1307042852-10385-1-git-send-email-y> you wrote:
> From: Matthew McClintock <msm@freescale.com>
> 
> Just setting CONFIG_SILENT_CONSOLE does not make the CONSOLE
> silent without the silent env variable set. This adds a new
> define to add this to the default environment easily

Mike has explained why: I NAK this, too.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/README b/README
index ed73981..8779544 100644
--- a/README
+++ b/README
@@ -546,6 +546,10 @@  The following options need to be configured:
 		the "silent" environment variable. See
 		doc/README.silent for more information.
 
+		When CONFIG_SILENT_CONSOLE_AT_BOOT is set u-boot
+		will be built with silent defined in the default
+		environment for a completly silent console at boot
+
 - Console Baudrate:
 		CONFIG_BAUDRATE - in bps
 		Select one of the baudrates listed in
diff --git a/common/env_common.c b/common/env_common.c
index c3e6388..3b09373 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -123,6 +123,9 @@  uchar default_environment[] = {
 #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
 	"pcidelay="	MK_STR(CONFIG_PCI_BOOTDELAY)	"\0"
 #endif
+#ifdef CONFIG_SILENT_CONSOLE_AT_BOOT
+	"silent=1\0"
+#endif
 #ifdef  CONFIG_EXTRA_ENV_SETTINGS
 	CONFIG_EXTRA_ENV_SETTINGS
 #endif