From: Peter Tyser <ptyser@xes-inc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] logbuff: Change default console loglevel to 8
Date: Fri, 07 May 2010 12:57:58 -0500 [thread overview]
Message-ID: <1273255078.22784.77.camel@localhost.localdomain> (raw)
In-Reply-To: <m2ocgsax88.fsf@ohwell.denx.de>
H Detlev,
> > Previously, a default of 3 was assigned to the console loglevel while
> > standard messages had a level of 4. This resulted in U-Boot's console
> > disappearing if a user enabled CONFIG_LOGBUFFER but didn't manually set
> > the 'loglevel' environment variable to a value greater than 4.
> >
> > Setting the default console loglevel to 8 causes all messages to be
> > printed to the console, which is standard U-Boot operation. Users can
> > then reduce the console loglevel if they want using the 'loglevel'
> > environment variable.
>
> I don't really like that patch as I think it will alter how U-Boot
> "looks" (i.e. what it outputs) on e.g. the lwmon5 board where the
> logbuffer is used primarily for logging POST results.
>
> Can you please explain to me again, why the messages are not output any
> more once CONFIG_LOGBUFFER is enabled? If 'stdout' is serial (and I
> don't see why this should not be the case) then is there already a
> problem?
I'll step through the process I used to try out CONFIG_LOGBUFFER:
1. Take an board that has a u-boot image on it without logbuff support,
without CONFIG_SYS_CONSOLE_IS_IN_ENV defined, or any of the logbuff
environment variables defined.
2. Build an image for the same board, this time with CONFIG_LOGBUFFER
enabled.
3. Program and boot the new logbuff-enabled image and you'll see
something like the following on the serial console:
...
FLASH: 128 MiB
L2: 512 KB already enabled
NAND: 512 MiB
PCI1: 64 bit PCI, >= 66 MHz, agent, external-arbiter
PCI1 on bus 00 - 00
<no more output past this point>
This is because most of U-Boot's output is printed with a message
loglevel of 4, but the default console loglevel was 3. When the message
loglevel is greater than or equal to the console loglevel, the serial
output is discarded (see line 317 in common/cmd_log.c).
So having a default console loglevel of 3 results in the vast majority
of U-Boot's output being discarded (only after the GD_FLG_DEVINIT is set
in gd->flags, prior to that all output is sent to the serial port).
Thus a user is never presented with a U-Boot prompt and can't interact
with the board. The board is in essence bricked until it can be
reprogrammed.
Setting the default console loglevel to 8 ensures that by default all
messages will be displayed on the console. This seems like a more sane
default and the user can decrease the loglevel via the 'loglevel'
environment variable if they need.
I'm not intimately familiar with the logging features, so let me know if
I'm missing something.
Best,
Peter
prev parent reply other threads:[~2010-05-07 17:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 23:48 [U-Boot] [PATCH] logbuff: Change default console loglevel to 8 Peter Tyser
2010-05-07 9:15 ` Detlev Zundel
2010-05-07 17:57 ` Peter Tyser [this message]
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=1273255078.22784.77.camel@localhost.localdomain \
--to=ptyser@xes-inc.com \
--cc=u-boot@lists.denx.de \
/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