Subject: Re: Nee help configuring new device driver into conf.c for NetBSD 1.0
To: Brian Buhrow <>
From: Ken Hornstein <>
List: tech-kern
Date: 04/10/1996 11:43:51
>speech synthesizer for NetBSD/FreeBSD.  I'm rcurrently working on a NetBSD
>1.0 i386 box, in the interests of time, and it was what was conveniently
>available to me, and I'm having a little trouble in the conf.c file.  I've
>configured the device driver as a character special device, and am using
>dev_tty_init to make conf.c aware of the device driver's existence.  I have
>a line of the form:
>	cdev_tty_init(NDT,dt),		/*43: Dectalk PC synthesizer*/
>in the conf.c file, and I have included 
>#include "dt.h"

You forgot something along the lines of:


Before the devsw[] array.  This is why you're getting undefined functions;
they aren't prototyped.

>What files do I need to change when I want to incorporate a new device
>driver into the kernel?  Are there any particular sources of documentation
>on how to do this?  Grepping through the entire source tree for instances
>of comopen(), the model I've been using, yielded nothing obvious about what
>was different about that driver that made it work.

Unfortunately, it's not very well documented.  You've got nearly all of it,
though - once you get those functions prototyped, things should compile.

>	Any suggestions, helpful tips, etc. would be extremely useful.

One tip - comopen() may not be the best model.  Since the com driver hooks
into the tty subsystem, it will do things that you would likely not be
interested in doing (ie - you probably aren't going to need a tty discipline
on a speech synthesizer).  You might want to try looking at the source for
the lpt driver, as it's much simpler.

Feel free to bug me privately if you have more questions.