NVRAM and OF drivers (or, the story of BootX) |
September, 03, 2002 12:14 PM |
cmliljes |
When I install Linux (well, attempt to install Linux) on my S900, the version of BootX that comes with the various PPC distributions (Mandrake, Yellow Dog, etc.), allows starting up from a RAM disk which loads drivers for all sorts of devices (well, at least one, a Maxtor/Promise Ultra ATA/133 PCI card that most certainly does not have a Macintosh-compatible boot ROM) into RAM, effectively creating a sort of "virtual" firmware. I actually have Mandrake (without XFree86 yet because of my Twin Turbo) up and running on a Maxtor drive attached to the card. (This is of course usable only in Linux because of the lack of the Mac boot ROM.) All of this got me thinking: Since Linux on OldWorld machines boots (actually, I think, BootX boots) by loading drivers for various devices from either the RAM disk file or a the Linux kernel file, and then booting Linux from the resulting OF-registered boot device, why couldn't XPostFacto do the samewith BootX, and therefore be free from the cramped digs it presently occupies in NVRAM-land? I realize this would require a sort of double-boot, just as BootX for Linux/PPC does, but so what? Can anyone say "Bootable FireWire"? |
. |
RE: NVRAM and OF drivers (or, the story of BootX) |
September, 07, 2002 4:51 PM |
OSXGuru |
. |
It's a very interesting observation, and I want to follow up on it. Here are a couple of comments. You probably realize this, but the LinuxPPC BootX and the Mac OS X BootX are not the same thing--they share a name, and a function, but they are entirely distinct pieces of code. At the moment, the Mac OS X BootX does not contain any drivers for disk devices. It relies on the Open Firmware interface to read from disks. So if a device lacks an Open Firmware driver, then it is not accessible by BootX. This is (partly) why Firewire devices are not bootable--the Firewire cards have no Open Firmware drivers in their firmware. In theory, it might be possible to embed a Firewire driver in BootX itself. This driver would need to know about the Open HCI interface to talk to the PCI card, and know about the SPB2 interface to talk to the device. The one complication would be that BootX itself would need to be installed on another device (since Open Firmware needs to load BootX). But once BootX was loaded, it might be able to load the kernel and kernel extensions from the Firewire drive. (The other possibility I have been thinking about is this: get XPostFacto to copy the kernel and kernel extensions from the Firewire device to a helper device, and then boot from the helper device, but specify the Firewire device as the root device. This would work--it is basically what XPostFacto does to set up an "Install". The problem is that one would have to make sure that the kernel and kernel extensions on the "helper" device remained in sync with the Firewire device. There may be solutions to that too, but getting BootX to just talk to the Firewire device directly would be more elegant. On the other hand, it would also be more code to write). The question, then, would be how to embed a Firewire driver into BootX. There are, of course, the IOKit drivers, but they depend on the whole IOKit infrastructure, which is not present in BootX. There is also the Firewire Reference Platform, which Apple has recently released source for. That looks like a reasonably promising candidate, because it requires much less infrastructure than IOKit does. However, it does require support for multitasking, and I'm not sure whether multitasking is possible in the Open Firmware environment. (My memory is that it is not, but I need to check). So there are some ideas worth checking into here. |
|
|