Subject: writing a device driver
To: None <>
From: Gary Thorpe <>
List: tech-kern
Date: 04/15/2002 23:06:26

I have begun writing a new devie driver for the netbsd kernel. I am at a 
stage where I want to compile in the current code I have to see whether or 
not the probe and attach functions work before going further.

I added my files to the kernel source and modified the file 
/usr/src/MYTREE/conf/files, /usr/src/MYTREE/arch/i386/i386/conf.c, and 
/usr/src/MYTREE/dev/isa/files.isa to add lines for the machine independent 
code, added the device to the port-specific cdevsw table, and added lines 
for ISA bus attach code (MYTREE is a recursive copy of the kernel source 
tree, since I do not want to mess with the tree for working kernels for my 
machine). When I attempt to build a kernel, I get the following message:

ioconf.o: undefined reference for xxx_ca (where xxx is the name of the new 

What am I doing wrong/forgetting to do? I have followed the steps outlined 
in documentation found on as closely as possible.

Also, would anyone happen to know of where I could find documentaton on the 
formats/structures of the files I modified above? I would like to know what 
I am actually doing vs. looking at other drivers and blindly copying and 
hoping it will work...

Chat with friends online, try MSN Messenger: