Subject: Re: Which preboot-loader?
To: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
From: Kevin P. Neal <email@example.com>
Date: 04/20/1996 20:41:49
At 07:27 AM 4/20/96 -0400, der Mouse wrote:
>> NetBSD has a number of kernel loaders (the program that gets loaded
>> by the firmware and in turn will locate and load a kernel proper).
>> Of the choice available, any one care to make an informed decision on
>> which one best represents what the loader should look like?
>I'm not sure the question even makes sense, since in many cases the
>loader is constrained by port-specific issues. For example, in at
>least a couple of cases (mac68k and amiga, I think), you have to boot
>the native OS and then run the bootloader under that.
While your point is valid I am sure for perhaps the Mac, it is not valid
for the Amiga.
(Long winded explanation follows, skip if you like)
The AmigaOS is in ROM (what is referred to as "AmigaDOS" is actually the
disk resident portion of the OS package.)
On startup, the ROM probes the hardware, configures it, then goes looking for
a boot image. If it finds a partition that is configured to be a bootable
AmigaDOS partition, it boots from that. If it finds multiple ones, it picks
the one with the highest priority.
If it finds a partition that has some other os on it, and is configured with
a boot program, and has a higher priority than the other partitions, it will
boot off it THAT.
The ROM goes and makes a list of all bootable devices *BEFORE* booting off
of any of them. The list is a doubly-linked list. The call to the boot
program is not expected to return. I believe that if it does return the
ROM will try to boot off of the next item in the list.
This means that a NetBSD-Amiga machine can be configured to have a boot block
that boots without the aid of disk-resident AmigaDOS. It is therefore
possible to have an Amiga with no AmigaDOS, just NetBSD.
What about having the boot program know how to read the disk filesystem to
find the kernel? Each partition with a "custom" filesystem can have a filesys
program on it, in addition to the boot program. If this was done in an AmigaDOS
friendly way, bffs as a seperate program would be unnecessary. Just mount
the partition (should be automatic) and there you are, FFS under AmigaDOS
with no special standalone programs. The boot program could be made to mount
the ffs (or whatever) filesystem under control of the ROM (remember:
dos.library is rom resident, and should be in place by the time the boot
program gets called). Then read the kernel off the disk and start it.
In addition to having a NetBSD boot block and partition-resident filesystem
block, I bet most Amiga people would want to use some sort of partition that
they would boot from and it would present them with a menu of partitions to
boot from. The menu partition could frob the boot chain and then return,
thus allowing the user to choose from Amiga-native and NetBSD-native.
This is totally do-able. It will take some time, and somebody who wants to do
it. I'd like to, but I have this problem of having my machine down due to
a drive failure. I might have a job in about 2-3 weeks however, so I should
be back up soon. If anybody wants this, say the word.
Does anybody want this? I could feasibly have this going by the end of summer.
I think I have all of the tools nearby. Oh, but I would write it in SAS/C
because it blows gcc away in code quality. SAS/C 6.50 is even better than
that other compiler that they just got running on NetBSD recently (I
called a long-time Amiga dude at SAS. He said that).
If this was done, would it make it into the tree under the Amiga part?
Or would it end up in the "experimental" part of uni-regensburg and never
have anybody publicize it? (Wait, I think somebody already did that...
What's the status of that one? Do you need help?)
Sorry for the verbosity on my part, guys.
XCOMM Kevin P. Neal, Sophomore, Comp. Sci. \ firstname.lastname@example.org
XCOMM Frue, Secret Agent of Smerp (shh!) \ email@example.com
XCOMM Visit the House of RetroComputing at / Perm. Email:
XCOMM http://www4.ncsu.edu/~kpneal/www/ / firstname.lastname@example.org