Subject: Re: NetBSD-Mach?
To: None <davagatw@mars.utm.edu>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 12/09/1996 13:12:59
>
>
> I'm curious. I know somebody has a Lites-based server out there to run on
> top of the Mach3 Microkernel (of MkLinux fame), which brings a few
> questions to mind:
>
> 1. Is anyone working on/planning to work on a port of NetBSD to
> Mach3?
Not that I'm aware of, but the Lites server should be a start. I've
thought about this idea, but I don't have a PowerPC, so I can't play
with it.
> 2. Are the hardware-dependant sections of NetBSD's code essentially
> all in one section, or are there a number of #ifdefs scattered throughout
> the code?
All the stuff in /sys/arch is the M.D. stuff. Everything else is supposed
to be M.I.
> 3. What major sections would have to be replaced by Mach calls other
> than the video display code, ADB code, MMU code, and SCSI code? How bad
> would the MMU part be?
Quite possably not too bad at all as you're supposed to let the microkernel
deal with these things anyway! The hassle would be translating NetBSD stuff
to microkernel calls. Also, I don't know how the microkernel advertises
what devices it has (since if you do this right, it could run on the
microkernel on a PPC, ix86, and whatever else the microkernel supports).
> And yes, I'm looking at the NetBSD sources right now. I've kinda come to
> the conclusion that the biggest pains would be in finding a way to start
> it from mach, and in finding a way to beta test without a second booting
> MkLinux partition. That and pounding the Linux ext2fs code in for obvious
> reasons.
(FreeBSD has a port of the ext2fs fs now. It should make a nice lkm, or,
for development work, you could compile it in. You just couldn't
distribute that kernel)
I think all you'd have to do is have the tool chain make a binary
(elf?) of the type the microkernel expects. Also, I think you'd want to
include some of the processor-specific parts of /sys/arch, like the
PPC-specific part of the powerpc port (it probably needs to be broken into
chip-specific and platform-specific parts, but I don't really know).
It might be that you need to make a "ppcmach" port. Among other things
because I hope we eventually get a "direct" port too. But if things are
done right, user-land binaries won't be able to tell the difference. :-)
The part which would scare me the most (reflecting my lack of experience)
would be configuring the tool chain. If you can do that, you're set; you
can compile from anything.
I think it's a great idea, though. I'd love to help out, but there are
too many things in the queue first (like actually graduating!). :-(
Good luck!!!!!!
Take care,
Bill