Date: Thu, 09 Jan 1997 12:07:05 -0500 From: Brian McGovern <bmcgover@cisco.com> To: questions@freebsd.org Subject: Device driver help Message-ID: <199701091707.MAA03781@bmcgover-pc.cisco.com>
next in thread | raw e-mail | index | archive | help
I just browsed through the handbook, and couldn't find information about setting up a new device driver to be compiled and installed. I've been working with a device driver book written by George Pajari that is slanted towards (I belive) SCO for "installing the device driver". Based on what I see on my FreeBSD system, and what the book has, they're radically different. My goal will be eventually to write a "real" character or terminal device driver, building on this bogus one, to create a character device driver that will handle our (soon to be released) hex modem modules (6 modems on a SIMM on an ISA bus card). Anyhow, I've created a device-driver .c file in /usr/src/sys/addons/bogus called bogus.c. (its just a dummy device driver that returns a string, similar to /dev/zero). I also have a .h file with the function headers for boginit, and bogread. boginit is void boginit(void). bogread is void chr1read(dev_t dev). I've also created a device in /dev called bog0, using a major number of 20, and a minor of 0 (20 appeared in majors.i386 as "reserved for local use", so I thought this was good). What I need is a quick tutorial on what files I need to change (and how preferably), as well as how to add it to the kernel config file (I currently tried it with "device bog0"). Any help, as always, is appreciated. -Brian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701091707.MAA03781>