Message ID | 20120523023513.GA22235@lizard |
---|---|
State | New |
Headers | show |
On Tue, May 22, 2012 at 7:35 PM, Anton Vorontsov <anton.vorontsov@linaro.org> wrote: > @@ -749,6 +749,9 @@ asmlinkage int printk(const char *fmt, ...) > va_list args; > int r; > > + /* Make sure linux_banner is kernel's first message. */ > + printk_once(KERN_NOTICE "%s", linux_banner); > + Ugh. No. That is too disgusting for words. Linus
From: Anton Vorontsov <anton.vorontsov@linaro.org> Date: Tue, 22 May 2012 19:35:16 -0700 > For scripting it is important to have a consistent header that tells > where the kernel log starts. At least to me it always seemed that > linux_banner served this purpose. Your change will not achieve this goal, many architectures print things long before control passes to init/main.c
On Tue, May 22, 2012 at 10:55:12PM -0400, David Miller wrote: > From: Anton Vorontsov <anton.vorontsov@linaro.org> > Date: Tue, 22 May 2012 19:35:16 -0700 > > > For scripting it is important to have a consistent header that tells > > where the kernel log starts. At least to me it always seemed that > > linux_banner served this purpose. > > Your change will not achieve this goal, many architectures > print things long before control passes to init/main.c If they use printk, we'll catch these messages, no? It is true that if they just write to the HW directly, the messages are lost for us, and there's nothing we can do about it (and we don't see these messages from the kernel anyway, neither in dmesg, nor in pstore). So, for serial (or arch-specific) console it is still cumbersome to make proper parsing of all messages, but for pstore/ramconsole it is OK. So, I dunno. I guess I'll have to add a custom header to pstore, heh. Thanks,
diff --git a/init/main.c b/init/main.c index 44b2433..df3711d 100644 --- a/init/main.c +++ b/init/main.c @@ -492,7 +492,6 @@ asmlinkage void __init start_kernel(void) tick_init(); boot_cpu_init(); page_address_init(); - printk(KERN_NOTICE "%s", linux_banner); setup_arch(&command_line); mm_init_owner(&init_mm, &init_task); mm_init_cpumask(&init_mm); diff --git a/kernel/printk.c b/kernel/printk.c index b663c2c..1e1461b 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -749,6 +749,9 @@ asmlinkage int printk(const char *fmt, ...) va_list args; int r; + /* Make sure linux_banner is kernel's first message. */ + printk_once(KERN_NOTICE "%s", linux_banner); + #ifdef CONFIG_KGDB_KDB if (unlikely(kdb_trap_printk)) { va_start(args, fmt);