Subject: bootloader ideas

From: David Monro <[email-masked]>
Date: Mon, 06 Mar 2000 06:52:37 +0000

Hi,

(I originally only posted this to -workstation)

I've been thinking about bootloaders. Particularly with respect to PReP
machines.

The current method of making the kernel a binary loaded by the firmware
is a bit of a kluge. It means we have to jump through hoops to change
kernel parameters etc. It seems to me there are two or three obvious
approaches, but first I need some information.

1) What if any services does the PReP firmware provide once it loads an
image? I'm guessing that it isn't a lot, just the residual data to tell
us what hardware we have. I could be wrong here though - can anybody
tell me where to find softcopy PReP documentation?

2) What does the ARC bootloader goop for NT provide in the way of
services? I'm guessing rather more. In particular I suspect we have a
way or reading files, by name, from a FAT16-formatted partition, and
possibly passing them arguments, maybe stored in nvram. This is the way
some Alpha systems do it; you set up an ARC boot entry to run a little
executable (ldmilo.exe) which loads a file called 'milo' from the same
directory and executes it. Milo then takes over and loads the kernel.

Do all the PReP machines have ARC available for them? I would guess most
do, but I could be wrong.

IMHO milo itself is overkill; it actually contains an awful lot of the
kernel code (basically the SCSI drivers etc) so that once loaded it can
load the kernel from any device that linux knows about, even if the
machine firmware and ARC don't know about it. The current PReP boot code
covers that eventuality even if it is a bit of a kluge - as long as the
kernel can be loaded by the firmware (even from floppy) it will work.
Assuming that more PReP machines have ARC images available, I'd be
interested in creating a bootloader which, once loaded from ARC, would
be able to load a kernel image from a device ARC could read, using ARC
services. Anybody got any documentation?

Oh, we could also have the bootloader do a lot of fixing up of things
like the PCI spaces and interrupts - I note that NT and Linux on the
IBM 850 have different ideas of where things are and what interrupts
they use. Seems to work though.

Ideally we would get to the point where all the platform-specific fixup
code etc was moved into the bootloaders, and then do away with the
CHRP/PReP/whatever compile option.

Any comments?

Cheers,

        David

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/