Linux on G5 Xserve?

Olaf Hering olh at suse.de
Thu May 20 20:01:26 EST 2004


 On Wed, May 19, Greg Johnson wrote:

> On Wed, May 19, 2004 at 11:39:34PM +0200, Olaf Hering wrote:
> >  On Thu, May 13, Greg Johnson wrote:
> >
> > > DO-QUIESCE finishedreturning 0x0160000 from prom_init
> > >
> > >
> > > Then nothing.  This is all over the serial port as these machines don't
> > > have video cards.  Is it possible that the kernel is booting, but not
> > > initializing the serial console?  All the output I'm getting from the
> > > kernel comes through the prom.
> >
> > look at arch/ppc64/kernel/setup.c:set_preferred_console()
> > you must add the needed stuff for the pmac zilog console. Do you have a
> > device-tree somewhere, of can you figure it out?
>
> Hmm...  I hadn't looked there.  Passing console=ttyS0 seems to work, but
> I guess it should default to that anyway.  I think the following patch
> should work, but it's not tested yet.  I'm a little confused that
> set_preferred_console() is #ifdef CONFIG_PSERIES.  If it is being used
> also for powermac, shouldn't it have '|| CONFIG_PMAC' or something?  I
> realize that the config options are set together, but still?

CONFIG_PPC_PSERIES is also set for pmac. you cant disable it.

would that one work as well?

diff -p -purN linux-2.6.6/arch/ppc64/kernel/setup.c linux-2.6.6.autocons/arch/ppc64/kernel/setup.c
--- linux-2.6.6/arch/ppc64/kernel/setup.c       2004-05-10 04:32:29.000000000 +0200
+++ linux-2.6.6.autocons/arch/ppc64/kernel/setup.c      2004-05-20 11:58:14.000000000 +0200
@@ -476,6 +476,7 @@ static int __init set_preferred_console(
 {
        struct device_node *prom_stdout;
        char *name;
+       int offset;

        /* The user has requested a console so this is already set up. */
        if (strstr(saved_command_line, "console="))
@@ -493,7 +494,6 @@ static int __init set_preferred_console(
                int i;
                u32 *reg = (u32 *)get_property(prom_stdout, "reg", &i);
                if (i > 8) {
-                       int offset;
                        switch (reg[1]) {
                                case 0x3f8:
                                        offset = 0;
@@ -511,15 +511,19 @@ static int __init set_preferred_console(
                                        /* We dont recognise the serial port */
                                        return -ENODEV;
                        }
-
-                       return add_preferred_console("ttyS", offset, NULL);
                }
-       } else if (strcmp(name, "vty") == 0) {
+       } else if (strcmp(name, "vty") == 0)
                /* pSeries LPAR virtual console */
                return add_preferred_console("hvc", 0, NULL);
-       }
+       else if (strcmp(name, "ch-a") == 0)
+                       offset = 0;
+       else if (strcmp(name, "ch-b") == 0)
+                       offset = 1;
+       else
+               return -ENODEV;
+
+       return add_preferred_console("ttyS", offset, NULL);

-       return -ENODEV;
 }
 console_initcall(set_preferred_console);



--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list