Subject: Re: Boot code of linuxppc v. netbsd
To: Dan Jacobowitz <youngdrow@geocities.com>
From: Stephen Ma <Stephen.Ma@jtec.com.au>
List: port-powerpc
Date: 01/10/1998 18:02:56
>>>>> "Dan" == Dan Jacobowitz <youngdrow@geocities.com> writes:

Dan> It uses OF_open, so it should (SHOULD) be able to boot from any
Dan> disk OF supports.  On the Mac as far as I know that means only
Dan> HFS.  I'll look at how linuxppc installs a boot loader into
Dan> sd@0,0 soon.  For some reason it claims the floppy drive is "not
Dan> configured" - go figure.

OF_{open,read}() in Locore.c access the open firmware client interface
services, which go to the "open-dev" and "read" methods of the named
device node. These methods provide raw access to the disk - in other
words, the device driver doesn't interpret the disk partitioning or
filesystem.

There may be partition and filesystem code under "/packages", but, as
far as I know, these packages only define the "load" method (and are
only called when the device driver's "load" method gets called), so
they can't be used for arbitrary file access.

Dan> Meanwhile, I am going to try appending the kernel to the OF
Dan> loader as coffboot does - I think I see how to do this... and
Dan> it's a good interim solution so I can get a system up.

This seems like a good idea.

Dan>   Pity we can't use the (highly gpled) zlib for compressed
Dan> kernels - it's SOOO much smaller and nicer on my poor modem and
Dan> floppy drive :)

zlib isn't GPLed - in fact, we already use it in the i386 boot
code. The library is there in /sys/lib/libz.