Work around console initialization ordering problem
PATCH 1/1 Work around console initialization ordering problem
Works around the console ordering problem in 2.5.64-bk3. Following the similar fix I did for x86-64.
-Andi
arch/i386/kernel/setup.c renamed from arch/i386/kernel/setup.c-o +3 -0
@@ -516,6 +516,9 @@int len =0 ;int userdef =0 ; +if (!strstr (saved_command_line,"console=" )) +strcat (saved_command_line," console=tty0" ); +/* Save unparsed command line copy for /proc/cmdline */ memcpy (saved_command_line,COMMAND_LINE ,COMMAND_LINE_SIZE ); saved_command_line[COMMAND_LINE_SIZE -1 ] ='\0' ;
Review
Quoted 8 lines · Andi Kleen
Works around the console ordering problem in 2.5.64-bk3. Following the similar fix I did for x86-64.
...(quoted diff) +3
-0+ if (!strstr(saved_command_line, "console=")) + strcat(saved_command_line, " console=tty0"); +
We can do it by shuffling the link order:
drivers/Makefile renamed from drivers/Makefile~console-ordering-fix +2 -1
@@ -11,9 +11,10 @@ obj-$(CONFIG_ACPI) += acpi/ # PnP must come after ACPI since it will eventually need to check if acpi # was used and do nothing if so obj-$(CONFIG_PNP) += pnp/ +obj-y += char/ obj-y += serial/ obj-$(CONFIG_PARPORT) += parport/ -obj-y += base/ char/ block/ misc/ net/ media/ +obj-y += base/ block/ misc/ net/ media/ obj-$(CONFIG_NUBUS) += nubus/ obj-$(CONFIG_ATM) += atm/ obj-$(CONFIG_IDE) += ide/
_
Quoted 11 lines · Andrew Morton
Review
Quoted 8 lines · Andi Kleen
Works around the console ordering problem in 2.5.64-bk3. Following the similar fix I did for x86-64.
...(quoted diff) +3
-0+ if (!strstr(saved_command_line, "console=")) + strcat(saved_command_line, " console=tty0"); +We can do it by shuffling the link order:
Yes, but someone will surely break it again. I feel my low tech solution is less fragile.
-Andi
Quoted 13 lines · Andi Kleen
Quoted 11 lines · Andrew Morton
Review
Quoted 8 lines · Andi Kleen
Works around the console ordering problem in 2.5.64-bk3. Following the similar fix I did for x86-64.
...(quoted diff) +3
-0+ if (!strstr(saved_command_line, "console=")) + strcat(saved_command_line, " console=tty0"); +We can do it by shuffling the link order:
Quoted 2 lines
Yes, but someone will surely break it again. I feel my low tech solution is less fragile.
But what about COMMAND_LINE_SIZE?
Quoted 1 line · Andries Brouwer
But what about
COMMAND_LINE_SIZE?
It's normally 2k. Is that likely to be reached?
-Andi
Quoted 13 lines · Andi Kleen
Quoted 11 lines · Andrew Morton
Review
Quoted 8 lines · Andi Kleen
Works around the console ordering problem in 2.5.64-bk3. Following the similar fix I did for x86-64.
...(quoted diff) +3
-0+ if (!strstr(saved_command_line, "console=")) + strcat(saved_command_line, " console=tty0"); +We can do it by shuffling the link order:
Quoted 2 lines
Yes, but someone will surely break it again. I feel my low tech solution is less fragile.
Wouldn't a well placed comment solve that?
JE