Subject: Re: Sorry, and kernel source
To: Grant Stockly <gussie@alaska.net>
From: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 03/19/1999 14:45:46
On Fri, 19 Mar 1999, Grant Stockly wrote:

> Sorry for the x question I had afew days ago.  :)  I've printed out the faq
> now.
> 
> I may be looking in the wrong place, or server but I can't find the source
> code to the Mac68k NetBSD / OpenBSD kernels.

ftp://ftp.netbsd.org/pub/NetBSD-current/

tar_files are the tar'd up source (tarred every weekend, note the ftp
server'll be down this weekend). src is the source tree, updated from the
CVS server every few hours.

> I want the source code so I can add a driver for the NUBUS IDE / 64bit I/O
> card I just built.  Hopefully I can get drivers for the kernel and the Mac
> installation programs running.  Then we will all be able to use cheap IBM
> PC hard drives...
> 
> (The kernel driver I want to add will in the end emulate a SCSI device.  I
> could also emulate the SCSI device at the fpga level.)

That sounds like a bad driver design. I think there's a cleaner and easier
way to do this. Grab the source, and check out sys/dev/scsipi, sys/dev/pci
(especially the pciide stuff), and sys/arch/mac68k/nubus.

It sounds like what you want to do is add a nubus card (to
sys/arch/mac68k/nubus) which provides a wdc attachment. So you're
attaching a standard IDE controller. Then the whole rest of the kernel
just treats it like any other IDE controller. If you hook up an atapi
CD-ROm, the right things happen. The wd driver will attach IDE disks.

Trying to emulate a scsi drive would be a whole lot of extra work, and a
lot more things to go wrong.

Take care,

Bill