Subject: Nee help configuring new device driver into conf.c for NetBSD 1.0
To: None <tech-kern@NetBSD.ORG>
From: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
List: tech-kern
Date: 04/10/1996 06:43:00
	Hello folks.  I'm in the midst of writing a device driver for a DecTalk PC
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"

In addition, I've added a line of the form:

arch/i386/isa/dt.c		optional dt device-driver requires isa
to the conf/files.i386 file in order to make config aware of the new device
driver.
The problem I'm having is that when I compile, I get:

cc  -c -O6 -I. -I../../../../arch -I../../../.. -I../../../../sys -DDEVNETBSD -DI586_CPU -DI486_CPU -DI386_CPU -DGENERIC -DMACHINE_NONCONTIG -DCOMPAT_09 -DCOMPAT_NOMID -DMATH_EMULATE -DSCSI -DKERNFS -DMSDOSFS -DUCONSOLE -DXSERVER -DTCP_COMPAT_42 -DCOMPAT_43 -DNFSSERVER -DNFSCLIENT -DCD9660 -DINET -DFFS -DDEVPAGER -DVNODEPAGER -DSWAPPAGER -DKERNEL -Di386  ../../../../arch/i386/i386/conf.c
../../../../arch/i386/i386/conf.c:408: `dtopen' undeclared here (not in a function)
../../../../arch/i386/i386/conf.c:408: `dtclose' undeclared here (not in a function)
../../../../arch/i386/i386/conf.c:408: `dtread' undeclared here (not in a function)
../../../../arch/i386/i386/conf.c:408: `dtwrite' undeclared here (not in a function)
../../../../arch/i386/i386/conf.c:408: `dtioctl' undeclared here (not in a function)
../../../../arch/i386/i386/conf.c:408: `dtstop' undeclared here (not in a function)
../../../../arch/i386/i386/conf.c:408: `dt_tty' undeclared here (not in a function)
*** Error code 1

	These functions are alive and well in the arch/i386/isa/dt.c file, but 
the compiler doesn't see them declared anywhere.  Thus, my question is:

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.
	Any suggestions, helpful tips, etc. would be extremely useful.
-thanks
-Brian