Work around console initialization ordering problem

Work around console initialization ordering problem

Post by Andi Klee » Mon, 10 Mar 2003 18:40:09



Works around the console ordering problem in 2.5.64-bk3. Following
the similar fix I did for x86-64.

-Andi

--- linux-2.5.64-work/arch/i386/kernel/setup.c-o        2003-03-05 10:40:08.000000000 +0100

        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';
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Work around console initialization ordering problem

Post by Andrew Morto » Mon, 10 Mar 2003 23:50:19



> Works around the console ordering problem in 2.5.64-bk3. Following
> the similar fix I did for x86-64.
> ...
> +  if (!strstr(saved_command_line, "console="))
> +       strcat(saved_command_line, " console=tty0");
> +

We can do it by shuffling the link order:

diff -puN drivers/Makefile~console-ordering-fix drivers/Makefile
--- 25/drivers/Makefile~console-ordering-fix    2003-03-09 02:48:33.000000000 -0800

 # 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/

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Work around console initialization ordering problem

Post by Andi Klee » Tue, 11 Mar 2003 01:40:07




> > Works around the console ordering problem in 2.5.64-bk3. Following
> > the similar fix I did for x86-64.
> > ...
> > +     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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Work around console initialization ordering problem

Post by Andries Brouwe » Tue, 11 Mar 2003 02:00:15





> > > Works around the console ordering problem in 2.5.64-bk3. Following
> > > the similar fix I did for x86-64.
> > > ...
> > > +        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.

But what about COMMAND_LINE_SIZE?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Work around console initialization ordering problem

Post by Andi Klee » Tue, 11 Mar 2003 02:30:14



> But what about COMMAND_LINE_SIZE?

It's normally 2k. Is that likely to be reached?

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Work around console initialization ordering problem

Post by Johannes Erdfel » Tue, 11 Mar 2003 02:50:09





> > > Works around the console ordering problem in 2.5.64-bk3. Following
> > > the similar fix I did for x86-64.
> > > ...
> > > +        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.

Wouldn't a well placed comment solve that?

JE

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/