Date: Sun, 16 Jan 2000 19:31:06 +0100 From: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl> To: Joachim Jdckel <Joachim.Jaeckel@d.kamp.net> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: How to write a device-driver? Message-ID: <20000116193106.C283@daemon.ninth-circle.org> In-Reply-To: <3877F409.49088485@d.kamp.net>; from Joachim.Jaeckel@d.kamp.net on Sun, Jan 09, 2000 at 03:35:53AM %2B0100 References: <3877F409.49088485@d.kamp.net>
next in thread | previous in thread | raw e-mail | index | archive | help
-On [20000109 04:01], Joachim Jdckel (Joachim.Jaeckel@d.kamp.net) wrote: >Hello. Hi, >This is the first time that I try to do a hardware related programming, >(if I ever will start and finish it...) >I'm currently have no knowledge of that kind of programming, but I'd >like to learn! Welcome to the club. =P >If I'd like to write a device driver for a given card, could you tell >me, where I could read something about it (how to implement the >interface to the kernel, where to place and name the files and so on). I >read something about a device-driver tutorial under >www.freebsd.org/tutorials/ddwg, but it seems, that this page isn't there >anymore. The placement is a bit dependant upon the version of FreeBSD. Also, 4.0 uses a different architecture for drivers, commonly called newbus. Also, the old Device Driver guide has been removed due its obsoletion factor for 3.x and 4.0. I am currently writing the 4.x newbus documentation and trying to get a new DDWG up. Not an easy task, especially when one has to learn a lot himself still. You could best look at /usr/src/sys, since that's where all kernel related code goes. >And maybe you could give me a tip, whats the best point to start, a >linux-device-driver, something like a specification of the different >chips on the card (it seems, that there is no documentation of the card >from the manufacturer), or could I listen on the data, which is posted >between the system and the driver under windows? whatever... Linux drivers are fun as reference (not), mainly due to their weird use of jiffies(), inb() and outb() and the like. Most of the time the driver writers nag as long as possible at the vendor's door until we get documentation. Some of us are particulary hesitant about accepting NDA's. The best thing to do is take the card and write/type all the part numbers on the chips on a piece of paper/temporary file. And then you can go search for the datasheets of those parts at their respective vendor. Some datasheets are not needed, others are very much the essence. Sometimes Windows drivers' .inf files come in handy for some id's abut the vendor and the card. How about letting loose a little bit more info on this card? =) -- Jeroen Ruigrok van der Werven/Asmodai asmodai@[wxs.nl|bart.nl] Documentation nutter. *BSD: Technical excellence at its best... The BSD Programmer's Documentation Project <http://home.wxs.nl/~asmodai> We must all hang together, else we shall all hang separately... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000116193106.C283>