Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 1996 10:34:26 +1030 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        hyan@vermeer.helios.nd.edu (Hong Yan)
Cc:        hackers@freebsd.org
Subject:   Re: write a device driver
Message-ID:  <199603250004.KAA26083@genesis.atrad.adelaide.edu.au>
In-Reply-To: <Pine.SUN.3.91.960324162838.402D-100000@vermeer.helios.nd.edu> from "Hong Yan" at Mar 24, 96 04:31:19 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Hong Yan stands accused of saying:
> 
> 	I am writing a device driver on FreeBSD, but I don't know how to 
> bind the device driver to the device, what's the entry point? And what 
> files I should modify in order to assign the major, minor numbers and let 
> kernel start the driver for this device. Any kind of direction is 
> appreciated. 

It depends on whether you're writing a driver for -current or an earlier 
version 8)

In both cases, you should look at the code for a similar driver, and copy
what it does.  One day I intend to write a template to go with Eric H's 
DDWG.

For non -current systems, you will want to modify /sys/i386/i386/conf.c to
add your driver to the appropriate devsw struct, and /sys/i386/conf/files.i386
to tell config(8) about your new files.

If this isn't enough information, feel free to mail me and I'll be happy
to walk you through the process.

> --Karen

-- 
]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
]] High-speed data acquisition and      (GSM mobile) 0411-222-496       [[
]] realtime instrument control          (ph/fax)  +61-8-267-3039        [[
]] Collector of old Unix hardware.      "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603250004.KAA26083>