From owner-freebsd-questions Thu Jan 9 09:08:34 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id JAA10220 for questions-outgoing; Thu, 9 Jan 1997 09:08:34 -0800 (PST) Received: from bmcgover-pc.cisco.com (bmcgover-pc.cisco.com [171.69.104.147]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id JAA10215 for ; Thu, 9 Jan 1997 09:08:30 -0800 (PST) Received: from bmcgover-pc.cisco.com (bmcgover@localhost.cisco.com [127.0.0.1]) by bmcgover-pc.cisco.com (8.8.2/8.8.2) with ESMTP id MAA03781 for ; Thu, 9 Jan 1997 12:07:06 -0500 (EST) Message-Id: <199701091707.MAA03781@bmcgover-pc.cisco.com> To: questions@freebsd.org Reply-To: bmcgover@cisco.com Subject: Device driver help Date: Thu, 09 Jan 1997 12:07:05 -0500 From: Brian McGovern Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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