Subject: Found: bug that keeps the kernel from finding boot device
To: None <port-macppc@netbsd.org>
From: Monroe Williams <monroe@criticalpath.com>
List: port-macppc
Date: 10/20/2001 00:36:59
Since the machine and kernel combination I'm working with was hanging when I
tried to enter the root device, I was forced to track down the reason the
"find-the-boot-device" code was broken.  I just _love_ debugging with
printf.  And installing 10 new kernels in one night by booting
netbsd.ram.gz.  Not.

It turns out that the culprit is in canonicalize_bootpath() in
sys/arch/macppc/macppc/autoconf.c.  This bit:

>        /* XXX Does this belong here, or device_register()? */
>       if ((p = strrchr(cbootpath, ',')) != NULL)
>               *p = 0;

truncates the boot path if any of the devices in the path have commas in
their names.  Since the naming convention for Open-Firmware-friendly PCI
cards is the manufacturer's stock ticker symbol, a comma, and the device
name, this hosed most Mac OS compatible PCI SCSI cards.  (In my case, the
card's "name" property is "ADPT,29160".)

In my local source, I just removed this bit of code and everything works
fine.  I suspect that it should actually be moved somewhere else as per the
comment.

I would also suggest removing the "ohci_intr: ignored interrupt while
polling" printf in sys/dev/usb/ohci.c.  It fires several times for each
keystroke when trying to enter the root device, which gets annoying pretty
quick.  I'm also not convinced that it provides any useful information.

Share and enjoy,
-- monroe
------------------------------------------------------------------------
Monroe Williams                                  monroe@criticalpath.com