Subject: Re: driver development
To: Andrew Kilpatrick <andrew@andrewkilpatrick.org>
From: Tyrel Beede <tb90@mail.csuchico.edu>
List: tech-kern
Date: 03/30/2001 12:55:12
> - how much information about the actual device is required to make the
> driver go?

The more information you have about the device the better off you are.
Perhaps you will not need to know everything about a specific device in
order to just get it working at some basic level but if you want to
incorporate specific or non-standard features having the documentation
available is just about required.  If the device information is available
getting your hands on it usually isn't the problem - just drop by the
hardware manufacture's site.  If it isn't available you'll have a hard
time getting things working.

> - what resources, other than the "The Design and Implementation of the
> 4.4 BSD Operating System" and sources are available to assist people
> like myself that are new to kernel development? (it seems like quite a
> steep learning curve)

There are a lot of resources out there and most can be grouped into one
of three categories:

1.    Understanding operating system concepts - learning the basics, like
VM, scheduling, synchronization, interrupts, etc...

                - Operating System Concepts by Silberschatz and Galvin
provides good background material

2.    Understanding operating system specifics - learning how the basics
are implemented in a specific kernel

                - The Design and Implementation of the 4.4 BSD Operating
System
                - Understanding The Linux Kernel by Bovet and Cesati -
good examples which are linux specific but seeing the concepts applied
really helps
                - Linux Device Drivers by Rubini - Lots of good
information about device drivers under linux... this isn't NetBSD
specific information but it can give you an idea about how this sort of
stuff is done.
                - TCP/IP Illustrated, Volume 2 by Stevens - Lots and lots
of information and code on the TCP/IP network stack... personally I think
this is the bet book I have ever owned... it has information about every
level of the 4.4BSD-lite networking stack from devices up.
                - The Design and Implementation of the UVM by Charles D.
Cranor - This is his dissertation and it is 270 pages of everything you
wanted to know about exactly what is going on with your VM system.  Also
it is free - http://www.netbsd.org/Documentation/kernel/uvm.html

3.    Specific, short papers many of which are easy to find for free on
the net - these tend to be OS/release specific

                - The NetBSD Kernel Programming FAQ -
http://www.netbsd.org/Documentation/kernel/programming.html has several
such articles about NetBSD stuff
                - Writing ISA drivers for FreeBSD -
http://www.daemonnews.org/200008/isa.html
                - Writing FreeBSD drivers with newbus -
http://www.daemonnews.org/200007/newbus-intro.html

                - and much more...

Hopefully this helps...

Tyrel