See patch.
Uwe.
Uwe Hermann wrote:
Make console maximum/default log level a choice option.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de
Index: src/console/Kconfig
--- src/console/Kconfig (Revision 4756) +++ src/console/Kconfig (Arbeitskopie) @@ -78,18 +78,119 @@ help If not selected, the last adapter found will be used.
-# TODO: User-friendly "choice" selection. -# TODO: Add help text. +choice
prompt "Maximum console log level"
default MAXIMUM_CONSOLE_LOGLEVEL_8
What does this mean? Maybe a help text?
+config MAXIMUM_CONSOLE_LOGLEVEL_8
bool "8: BIOS_SPEW"
Please remove BIOS_ from all these strings. coreboot isn't a BIOS. Then it's
Acked-by: Peter Stuge peter@stuge.se
On Sun, Oct 11, 2009 at 05:07:04AM +0200, Peter Stuge wrote:
+choice
prompt "Maximum console log level"
default MAXIMUM_CONSOLE_LOGLEVEL_8
What does this mean? Maybe a help text?
This is how many of the loglevel messages are actually compiled into the coreboot image, where as "default console log level" says which loglevels are actually shown on seriali (or USB Debug).
"choice" help texts are not shown in menuconfig, AFAICS. Only the individual items can have help texts, it seems.
+config MAXIMUM_CONSOLE_LOGLEVEL_8
bool "8: BIOS_SPEW"
Please remove BIOS_ from all these strings. coreboot isn't a BIOS.
Done.
Acked-by: Peter Stuge peter@stuge.se
Thanks, r4758.
Uwe.
On Mon, Oct 12, 2009 at 02:09:03PM -0600, Myles Watson wrote:
+config MAXIMUM_CONSOLE_LOGLEVEL_8
- bool "8: BIOS_SPEW"
BIOS_SPEW is 9, not 8. Could you fix it?
Hm, nope, I think all Config.lb files are wrong here, they should use 8.
From src/include/console/loglevel.h:
#define BIOS_EMERG 0 /* system is unusable */ #define BIOS_ALERT 1 /* action must be taken immediately */ #define BIOS_CRIT 2 /* critical conditions */ #define BIOS_ERR 3 /* error conditions */ #define BIOS_WARNING 4 /* warning conditions */ #define BIOS_NOTICE 5 /* normal but significant condition */ #define BIOS_INFO 6 /* informational */ #define BIOS_DEBUG 7 /* debug-level messages */ #define BIOS_SPEW 8 /* Way too many details */
Using 9 has the same effect as using 8 I guess.
Uwe.
On Mon, Oct 12, 2009 at 4:17 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
Using 9 has the same effect as using 8 I guess.
I always turn it up to 11! ;)
Marc
On Mon, Oct 12, 2009 at 4:17 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Mon, Oct 12, 2009 at 02:09:03PM -0600, Myles Watson wrote:
+config MAXIMUM_CONSOLE_LOGLEVEL_8
- bool "8: BIOS_SPEW"
BIOS_SPEW is 9, not 8. Could you fix it?
Hm, nope, I think all Config.lb files are wrong here, they should use 8.
What a pain. That is where I was looking.
Thanks, Myles
On Mon, Oct 12, 2009 at 4:17 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Mon, Oct 12, 2009 at 02:09:03PM -0600, Myles Watson wrote:
+config MAXIMUM_CONSOLE_LOGLEVEL_8
- bool "8: BIOS_SPEW"
BIOS_SPEW is 9, not 8. Could you fix it?
Hm, nope, I think all Config.lb files are wrong here, they should use 8.
#define BIOS_DEBUG 7 /* debug-level messages */ #define BIOS_SPEW 8 /* Way too many details */
Using 9 has the same effect as using 8 I guess.
Nope. Spew messages don't show up anymore.
LOGLEVEL = 8:
coreboot-2.3" Tue Oct 13 07:40:07 MDT 2009 starting... Copying coreboot to RAM. Jumping to image.
Check fallback/coreboot_ram Stage: load fallback/coreboot_ram @ 1048576/106496 bytes, enter @ 100000 Stage: done loading. Jumping to image.
coreboot-2.3 Tue Oct 13 07:40:07 MDT 2009 booting...
LOGLEVEL = 9:
coreboot-2.3" Tue Oct 13 07:43:57 MDT 2009 starting... Copying coreboot to RAM. Jumping to image.
Check CBFS header at fffeffe0 magic is 4f524243 Found CBFS header at fffeffe0 Check fallback/coreboot_ram Stage: load fallback/coreboot_ram @ 1048576/106496 bytes, enter @ 100000 Stage: done loading. Jumping to image.
Attached patch fixes it.
There's a strange mix of comparisons, which makes it harder to tell what's going on. There are also lots of functions that do these checks. Hopefully I didn't miss any. I checked a few values with console_debug.diff.
While I was fooling with it, I made Kconfig ensure that MAXIMUM_CONSOLE_LOGLEVEL >= DEFAULT_CONSOLE_LOGLEVEL to minimize the number of test cases I needed.
Signed-off-by: Myles Watson mylesgw@gmail.com
Thanks, Myles
Myles Watson wrote:
On Mon, Oct 12, 2009 at 4:17 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Mon, Oct 12, 2009 at 02:09:03PM -0600, Myles Watson wrote:
+config MAXIMUM_CONSOLE_LOGLEVEL_8
bool "8: BIOS_SPEW"
BIOS_SPEW is 9, not 8. Could you fix it?
Hm, nope, I think all Config.lb files are wrong here, they should use 8.
#define BIOS_DEBUG 7 /* debug-level messages */ #define BIOS_SPEW 8 /* Way too many details */
Using 9 has the same effect as using 8 I guess.
Nope. Spew messages don't show up anymore.
Maybe EMERG should be one and OFF should be 0?
-----Original Message----- From: Stefan Reinauer [mailto:stepan@coresystems.de] Sent: Tuesday, October 13, 2009 10:31 AM To: Myles Watson Cc: Uwe Hermann; coreboot@coreboot.org Subject: Re: [coreboot] [PATCH] Maximum/default console log level for kconfig
Myles Watson wrote:
On Mon, Oct 12, 2009 at 4:17 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Mon, Oct 12, 2009 at 02:09:03PM -0600, Myles Watson wrote:
> +config MAXIMUM_CONSOLE_LOGLEVEL_8 > + bool "8: BIOS_SPEW" >
BIOS_SPEW is 9, not 8. Could you fix it?
Hm, nope, I think all Config.lb files are wrong here, they should use
#define BIOS_DEBUG 7 /* debug-level messages */ #define BIOS_SPEW 8 /* Way too many details */
Using 9 has the same effect as using 8 I guess.
Nope. Spew messages don't show up anymore.
Maybe EMERG should be one and OFF should be 0?
That's fine too. The actual values don't matter to me. In some of the comments in the code it says we don't allow anything lower than 1.
I just want SPEW to come out if I specify SPEW :)
Thanks, Myles
On Mon, Oct 12, 2009 at 4:17 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Mon, Oct 12, 2009 at 02:09:03PM -0600, Myles Watson wrote:
+config MAXIMUM_CONSOLE_LOGLEVEL_8
- bool "8: BIOS_SPEW"
BIOS_SPEW is 9, not 8. Could you fix it?
Hm, nope, I think all Config.lb files are wrong here, they should use 8.
#define BIOS_DEBUG 7 /* debug-level messages */ #define BIOS_SPEW 8 /* Way too many details */
Using 9 has the same effect as using 8 I guess.
Nope. Spew messages don't show up anymore.
...
While I was fooling with it, I made Kconfig ensure that MAXIMUM_CONSOLE_LOGLEVEL >= DEFAULT_CONSOLE_LOGLEVEL to minimize the number of test cases I needed.
Signed-off-by: Myles Watson mylesgw@gmail.com
Ping.
I'd like to be able to say "Try Kconfig with SPEW", but it doesnt work.
Thanks, Myles
On Oct 16, 2009, at 20:36, "Myles Watson" mylesgw@gmail.com wrote:
On Mon, Oct 12, 2009 at 4:17 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Mon, Oct 12, 2009 at 02:09:03PM -0600, Myles Watson wrote:
> +config MAXIMUM_CONSOLE_LOGLEVEL_8 > + bool "8: BIOS_SPEW"
BIOS_SPEW is 9, not 8. Could you fix it?
Hm, nope, I think all Config.lb files are wrong here, they should use 8.
#define BIOS_DEBUG 7 /* debug-level messages */ #define BIOS_SPEW 8 /* Way too many details */
Using 9 has the same effect as using 8 I guess.
Nope. Spew messages don't show up anymore.
...
While I was fooling with it, I made Kconfig ensure that MAXIMUM_CONSOLE_LOGLEVEL >= DEFAULT_CONSOLE_LOGLEVEL to minimize the number of test cases I needed.
Signed-off-by: Myles Watson mylesgw@gmail.com
Ping.
I'd like to be able to say "Try Kconfig with SPEW", but it doesn’t w ork.
Acked-by: Stefan Reinauer stepan@coresystems.de
Thanks, Myles
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Tue, Oct 13, 2009 at 08:51:30AM -0600, Myles Watson wrote:
While I was fooling with it, I made Kconfig ensure that MAXIMUM_CONSOLE_LOGLEVEL >= DEFAULT_CONSOLE_LOGLEVEL to minimize the number of test cases I needed.
Signed-off-by: Myles Watson mylesgw@gmail.com
Untested, but looks good.
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Index: svn/src/console/Kconfig
--- svn.orig/src/console/Kconfig +++ svn/src/console/Kconfig @@ -141,34 +141,54 @@ choice
config DEFAULT_CONSOLE_LOGLEVEL_8 bool "8: SPEW"
- depends on (MAXIMUM_CONSOLE_LOGLEVEL >= 8)
The indentation in this file looks strange as the items didn't use TABs so far, feel free to change them all to TABs in this or in an extra commit.
Having DEFAULT_CONSOLE_LOGLEVEL depend on the MAXIMUM_CONSOLE_LOGLEVEL is really nice!
Uwe.
On Fri, Oct 16, 2009 at 1:20 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Tue, Oct 13, 2009 at 08:51:30AM -0600, Myles Watson wrote:
While I was fooling with it, I made Kconfig ensure that MAXIMUM_CONSOLE_LOGLEVEL >= DEFAULT_CONSOLE_LOGLEVEL to minimize the number of test cases I needed.
Signed-off-by: Myles Watson mylesgw@gmail.com
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Acked-by: Stefan Reinauer stepan@coresystems.de
Rev 4794.
Index: svn/src/console/Kconfig
--- svn.orig/src/console/Kconfig +++ svn/src/console/Kconfig
The indentation in this file looks strange as the items didn't use TABs so far, feel free to change them all to TABs in this or in an extra commit.
Fixed.
Having DEFAULT_CONSOLE_LOGLEVEL depend on the MAXIMUM_CONSOLE_LOGLEVEL
is really nice!
Thanks. I wish I could have used >, but I couldn't make it work in the depends clause.
I'd love to know how to do depends on (MAXIMUM_CONSOLE_LOGLEVEL > 4).
Thanks, Myles