Re: how to increase kernel debug level from 4 to 10 at the boot time ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Om <omanakuttan@xxxxxxx> wrote:
Alex wrote:
> Hi,
> 
> static int __init debug_kernel(char *str)
> {
>         if (*str)
>                 return 0;
>         console_loglevel = 10;
>         return 1;
> }
> 
> static int __init quiet_kernel(char *str)
> {
>         if (*str)
>                 return 0;
>         console_loglevel = 4;
>         return 1;
> }
> 
> __setup("debug", debug_kernel);
> __setup("quiet", quiet_kernel);
These are handlers for kernel parameters.
to invoke these functions, pass "debug" and "quiet" respectively from 
the boot loader as kernel command line.
If you pass both, I think the latter will take precedence. Please 
correct me if I am wrong.

HTH,
om.
***************
From: Jim Bauer <jfbauer@xxxxxxx> 
Date: Fri, 28 Jan 2005 22:13:45 -0500 

Those 2 routines are called at boot time if you specify the 
corresponding "debug" or "quiet" arguments to the kernel from the boot 
loader.
******************************************
OK - Thanks ... but, as i previously specified in my another posting "booting kernel with init_console( ) commented out - is it theoreticall y possible ?" - I am using "custom" bootloader (I have no code for), which doesn't allow for "command line arguments" ...
Is "quiet" used as default ?
So it appears I could specify "debug" instead in .config as:
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="console=ttyCPM0 panic=3 root=/dev/ram debug"

?

I presume usage of "debug" in command line will "kick-in" printing of additional debugging output (comparing with "quiet") so will 
CONFIG_LOG_BUF_SHIFT=14 be "automatically increased to 16 to accommodate the need for larger size of "log buffer" ?
(or is it "user" responsibility ?).
Actually (in 2.6) I tried to change from 14 to 16 in above but it gets
reset back to 14 during the build - anyone else tried and noticed that ? 












___________________________________________________________________
Speed up your surfing with Juno SpeedBand.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.juno.com/surf to sign up today!


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux