Skip to contentSkip to conversation

m68knommu: clean up uClinux boot log output

PATCH In review Greg Ungerer 3 participants 6 messages Sep 9, 2016 – Sep 10, 2016

Subsystems (2)
lore
Share & tools
lore

Greg Ungerer

author maintainer
#0 lore raw

PATCH 1/1 m68knommu: clean up uClinux boot log output

During the arch setup phase of kernel boot we print out in the boot banner that we are uClinux configured. The printk currently contains a bunch of useless newlines and carriage returns - producing wastefull empty lines. Remove these.

---
 arch/m68k/kernel/setup_no.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/kernel/setup_no.c +1 -1
index 72d272e..a160695 100644
@@ -106,7 +106,7 @@ void __init setup_arch(char **cmdline_p)
 	process_uboot_commandline(&command_line[0], sizeof(command_line));
 #endif /* CONFIG_UBOOT */
 
-	printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n");
+	printk(KERN_INFO "uClinux with CPU " CPU_NAME "\n");
 
 #ifdef CONFIG_UCDIMM
 	printk(KERN_INFO "uCdimm by Lineo, Inc. <www.lineo.com>\n");
Signature · 1 line
1.9.1
#1 lore raw

arch/m68k/kernel/setup_no.c void __init setup_arch(char **cmdline_p) · line 109

Quoted 8 lines · Greg Ungerer
arch/m68k/kernel/setup_no.c +1 -1
@@ -106,7 +106,7 @@ void __init setup_arch(char **cmdline_p)
        process_uboot_commandline(&command_line[0], sizeof(command_line));
 #endif /* CONFIG_UBOOT */
 
-       printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n");
+       printk(KERN_INFO "uClinux with CPU " CPU_NAME "\n");

pr_info() while you're at it?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author maintainer
#2 lore raw

Hi Geert,

Quoted 11 lines · Geert Uytterhoeven

arch/m68k/kernel/setup_no.c void __init setup_arch(char **cmdline_p) · line 109

Quoted 8 lines · Greg Ungerer
arch/m68k/kernel/setup_no.c +1 -1
@@ -106,7 +106,7 @@ void __init setup_arch(char **cmdline_p)
        process_uboot_commandline(&command_line[0], sizeof(command_line));
 #endif /* CONFIG_UBOOT */
 
-       printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n");
+       printk(KERN_INFO "uClinux with CPU " CPU_NAME "\n");

pr_info() while you're at it?

If I do that I think I need to do the 12 printk's that follow that as well :-)

Perhaps I should do that as a separate patch.

Thanks
Greg

#3 lore raw
In reply to Greg Ungerer

arch/m68k/kernel/setup_no.c void __init setup_arch(char **cmdline_p) · line 109

Quoted 9 lines · Greg Ungerer
arch/m68k/kernel/setup_no.c +0 -1
index 72d272e..a160695 100644
@@ -106,7 +106,7 @@ void __init setup_arch(char **cmdline_p)
 	process_uboot_commandline(&command_line[0], sizeof(command_line));
 #endif /* CONFIG_UBOOT */
 
-	printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n");

Do you have any idea what's the significance of ^O here?

Andreas.

Signature · 3 lines
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#4 lore raw

Hi Andreas,

Quoted 10 lines · Andreas Schwab
Quoted 8 lines · Greg Ungerer
arch/m68k/kernel/setup_no.c +0 -0
index 72d272e..a160695 100644
@@ -106,7 +106,7 @@ void __init setup_arch(char **cmdline_p)
      process_uboot_commandline(&command_line[0], sizeof(command_line));
 #endif /* CONFIG_UBOOT */
 
Quoted 3 lines

arch/m68k/kernel/setup_no.c void __init setup_arch(char **cmdline_p) · line 109

Quoted 1 line
arch/m68k/kernel/setup_no.c +0 -1
-     printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n");

Do you have any idea what's the significance of ^O here?

You raised my interest, too ;-)

http://mailman.uclinux.org/pipermail/uclinux-dev//2003-March/016122.html

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author maintainer
#5 lore raw

Hi Geert, Andreas,

Quoted 13 lines · Geert Uytterhoeven

Hi Andreas,

Quoted 10 lines · Andreas Schwab
Quoted 8 lines · Greg Ungerer
arch/m68k/kernel/setup_no.c +0 -0
index 72d272e..a160695 100644
@@ -106,7 +106,7 @@ void __init setup_arch(char **cmdline_p)
      process_uboot_commandline(&command_line[0], sizeof(command_line));
 #endif /* CONFIG_UBOOT */
 
Quoted 7 lines
Quoted 3 lines

arch/m68k/kernel/setup_no.c void __init setup_arch(char **cmdline_p) · line 109

Quoted 1 line
arch/m68k/kernel/setup_no.c +0 -1
-     printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n");

Do you have any idea what's the significance of ^O here?

You raised my interest, too ;-)

http://mailman.uclinux.org/pipermail/uclinux-dev//2003-March/016122.html

The problem with the reasoning there is that this is not the first string printed. This is what the boot console looks like now:

    Linux version 4.8.0-rc5-00014-g5594b01-dirty (gerg@goober) (gcc 

version 5.4.0 (GCC) ) #2 Sat Sep 10 14:44:55 AEST 2016

uClinux/COLDFIRE(m520x)
COLDFIRE port done by Greg Ungerer, [email protected] Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne Built 1 zonelists in Zone order, mobility grouping off. Total
pages: 4080
Kernel command line: root=/dev/mtdblock0
PID hash table entries: 128 (order: -4, 512 bytes) Dentry cache hash table entries: 4096 (order: 1, 16384 bytes)
....

So you end up with 2 blank lines for no good reason.

And then there is the question of whether CTRL-O is in any way useful here. I would argue that it is of pretty much no value these days - if it ever was:

https://en.wikipedia.org/wiki/Shift_Out_and_Shift_In_characters

Regards
Greg