Re: How the kernel printk works before do console_setup.

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

 



Johnny Hung <johnny.hacking <at> gmail.com> writes:

> 
> Hi All:
>     I have a powerpc arch platform. The default console is ttyS1 not
> ttyS0 in the platform. My question is how the kernel print debug
> message
> like DBG before parse kernel command line and do console_setup
> function. The command line passed to kernel about console info is
> console=ttyS1.
> So kernel can not print anything before parse cmd line and initial
> console but the result is against. Anyone point me or give me a clue
> is appreciate.
> 
> BR, H. Johnny
> 

Don't worry, printk uses a ring buffer so it allows the kernel to print some, 
hopefully enough, out before console is registered/initialized. This is from 
printk.c

197 /*
198  * The console driver calls this routine during kernel initialization
199  * to register the console printing procedure with printk() and to
200  * print any messages that were printed by the kernel before the
201  * console driver was initialized.
202  */
203 void register_console(void (*proc)(const char *))

Freeman

--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux