Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Installing and booting and OF3 machine from a single empty internaldisk, not working



> > Probably we have to add #ifdef ${MACHINE} or something similar
> > in the device_register() function to handle machine dependent quirks.
> 
> So my big idea about re-writing docs so that we can get a standalone
> install to work on a OF3 ppc Mac was probably misguided if I really
> only have machine specific problems.

> It's funny that I now have 2 ppc Macs (B&W G3, eMac G4) that have boot
> problems with NetBSD though.

Both problems are simple. Since we are NetBSD we would always
like to have a *reasonable* solution but it could be complicated
especially on weird quirk problems.

The ugly patch like the following one might work around the problem,
but I'm afread many NetBSD guys don't like such BandAid fix..

---
Index: sys/arch/powerpc/oea/ofw_autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/oea/ofw_autoconf.c,v
retrieving revision 1.8
diff -u -r1.8 ofw_autoconf.c
--- sys/arch/powerpc/oea/ofw_autoconf.c 25 Sep 2008 14:44:51 -0000      1.8
+++ sys/arch/powerpc/oea/ofw_autoconf.c 15 Dec 2009 15:33:45 -0000
@@ -304,6 +304,7 @@
                if (addr != ca->ca_reg[0])
                        return;
        } else if (device_is_a(device_parent(dev), "pci")) {
+               /* XXX pegasos specific? */
                struct pci_attach_args *pa = aux;
 
                if (addr != pa->pa_device ||
@@ -321,15 +322,37 @@
                /* periph_target is target for scsi, drive # for atapi */
                if (addr != sa->sa_periph->periph_target)
                        return;
-       } else if (device_is_a(device_parent(device_parent(dev)), "pciide") ||
-                  device_is_a(device_parent(device_parent(dev)), "viaide") ||
-                  device_is_a(device_parent(device_parent(dev)), "slide")) {
+       } else
+#ifdef ofppc
+       if (device_is_a(device_parent(device_parent(dev)), "pciide") ||
+           device_is_a(device_parent(device_parent(dev)), "slide") ||
+           device_is_a(device_parent(device_parent(dev)), "viaide")) {
+               /* XXX pegasos specific? */
                struct ata_device *adev = aux;
 
                if (addr != adev->adev_channel ||
                    addr2 != adev->adev_drv_data->drive)
                        return;
-       } else if (device_is_a(device_parent(device_parent(dev)), "wdc")) {
+       } else
+#endif
+#ifdef macppc
+       if (device_is_a(device_parent(device_parent(dev)), "pciide") ||
+           device_is_a(device_parent(device_parent(dev)), "cmdide")) {
+               /* XXX assume only one atabus */
+               struct ata_device *adev = aux;
+               if (addr != adev->adev_drv_data->drive)
+                       return;
+       } else
+       if (device_is_a(device_parent(device_parent(dev)), "acardide")) {
+               /* XXX Is this right? */
+               struct ata_device *adev = aux;
+               if (addr != adev->adev_drv_data->drive ||
+                   strstr("ACARD", cbootpath) == NULL)
+                       return;
+       } else
+#endif
+       if (device_is_a(device_parent(device_parent(dev)), "wdc")) {
+               /* XXX won't work if booted from wdc1 or wdc2 */
                struct ata_device *adev = aux;
 
                if (addr != adev->adev_drv_data->drive)

---

> On my B&W G3, OpenBSD booted fine from their standalone CD installer.

I guess they will fail on booting from second wdc or pciide.

> My G4 eMac seems to just be a problem, at least with netbooting.

I guess this looks OF's bug..

> I'm still going to try installing from the
> CD, but it only as it's single internal disk so it's a bit tough if
> you want to keep OSX (I do).

Well, it's your envronment problem..

> I think it would be worth adding a note
> to the supported machines that the 1.25ghz eMacs have netboot
> problems.

Well, PR with complete diffs against proper docs might be appreciated.

> These things are frustrating. Why can't they just be simple like an
> old Sparc box or a Cobalt Qube2? :)

Because cobalt has only two variants 2700 and 2800,
but 2700 and Raq1 had problems before 3.0 or 4.0, didn't it?

sparc has more variants, but Sun put less quirks than Apple..
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index