Subject: Re: MacOS-less Boot Lead
To: Bob Nestor <rnestor@augustmail.com>
From: Michael R. Zucca <mrz5149@acm.org>
List: port-mac68k
Date: 09/14/1999 21:50:18
At 9:14 PM -0400 9/14/99, Bob Nestor wrote:
>This appears to be based on BootX.  Last time I looked it only worked on
>PCI based machines and I thought it relied on a lot of configuration
>knowledge provided by OpenFirmware.  I may be wrong, but I think we're
>still getting a lot of this kind of information about the 68k Mac
>hardware configuration from the setups left by MacOS.  Its always been my
>understanding that this is where the real problem lies with booting the
>68k Mac directly into NetBSD.  The mechanics of getting the disk
>formatted with a Driver partition that the ROM Boot code can handle is
>fairly well documented in the Apple Inside mac volumes.  The real trick
>is in trying to find out things about the Mac hardware, like the video.
>Is that easy?
>
>So I'm kind of confused about how this helps the 68k Mac efforts.

The way the Mac boots is a wonderful thing. The ROMs contain a "nanokernel"
which basically initializes the hardware and a whole *bunch* of basic
services. By the time the System loads it really doesn't have very much to
do. All devices have done primary init, including video devices, disks,
etc. It's almost as though the System is an application which provides a
few extra services above and beyond those provided by the ROMs. The later
you get in the Mac series, the more stuff they pack in the ROM. Ever looked
at an AV's ROM? There's *Quicktime* code in there. :-)

So a "System" program already has access to things like the Slot Manager
and much of the data you need to boot NetBSD. Gettting video info is as
simple as making a few Toolbox calls.

Apparently the first stage of the System is 68k code, even on the
PowerMacs. It looks like you make a little asm routine called __Startup__
and pack it into the 'boot' code resource.

We could do a driver-based implementation but this is so simple. It can
probably be done very quickly and using very large chunks of the existing
booter code.

A driver implementation is probably the "right" course but this is still
quite a breakthrough for the moment. You can basically download a dd image
of a boot disk with this System file and make a disk to boot a Mac into
NetBSD from "nothing".

_______________________________________________________________________
 Michael Zucca - mrz5149@acm.org - http://www.mdc.net/~mrz5149/
 "I will choose a path that's clear. I will choose Freewill. "
  --Rush, Freewill
_______________________________________________________________________