jwr@moscom.UUCP (02/12/87)
References: Hi. I would like to learn how to write device drivers (in C under Unix). I presently know very little of this subject. Can anyone offer advice, references, or sample programs ? Any kind of information would be very appreciated. Please reply by mail. Thanks much in advance. Jim Reid
dhb@rayssd.UUCP (02/16/87)
In article <907@moscom.UUCP> jwr@moscom.UUCP (Jim Reid) writes: >I would like to learn how to write device drivers (in C under Unix). >I presently know very little of this subject. >Can anyone offer advice, references, or sample programs ? I am posting this as a followup instead of using mail because I have seen several messages like this lately and most of the replies that I sent out were bounced back. If you (or your company) have access to a Sun workstation, get a copy of the manual "Writing Device Drivers for the Sun Workstation". The "part number" from Sun is 800-1304-xx (the last two digits are the rev). Some of the stuff in the manual is specific to the Sun but as a general rule it applies to any Berkeley based UNIX system. You should also read "The UNIX I/O System" by Dennis Ritchie. To quote the table of contents from the 4.3 manuals: "still helpful for those writing device drivers". After having read all of this you should follow the advice listed in one of the documents that comes with 4.xBSD, find a driver for a similar device and make minor modifications. If you have ever been confused by attempting to read a device driver you will be amazed at how much more understandable they are after reading these two manuals. Not completely understandable mind you, just more so than before. Complete understanding requires either years of experience or mind-altering drugs. If you are trying to write a driver for a non-Berkeley system, skip the first part and begin by reading the Ritchie paper. -- David H. Brierley Raytheon Submarine Signal Division; Portsmouth RI; (401)-847-8000 x4073 smart mailer or arpanet: dhb@rayssd.ray.com old dumb mailer or uucp: {cbosgd,gatech,ihnp4,linus!raybed2} !rayssd!dhb
rgc@edison.GE.COM (Rick Carl) (01/09/88)
Excuse me if this has been asked and answered previously...BUT I have been recently assigned the task of writing a device driver for one of our products that will reside in both the PC and the microVAX running unix and/or venix or (some 386-ix). We haven't decided which op sys we want to support on the PC version... the microVAX may run VAXELN or VMS or System V. My problem is that I am now just coming of age with the unix system and know virtually nothing of how to build a device driver for it...this will be my first major task using a unix op sys. I am looking for (1) help with generic driver information; (2) examples of device drivers; or (3) references in which building device drivers are outlined... Any and all information will be greatly appreciated. -- Rick Carl GE Fanuc - Charlottesville, VA 22901 rgc@edison.GE.COM old arpa: rgc%edison.GE.COM@seismo.CSS.GOV rgc@edison.UUCP old uucp: {seismo,decuac,houxm}!edison!rgc
mani@csun1.UUCP (Maninder Chawla) (05/07/89)
Hi Netters, I am having a problem writing a device driver for a at&t 3b2, running Unix 2.0. This is my first attempt to do write a driver. I get a "PANIC trap occurs" message every time I try to read a text file after opening in the READ entry point in the device driver. The error message points to a prblem in MMU (ie memory management unit ) You might think this setup is unusual because this is not a service provided by the kernel to the driver, but I need to do it. So my question is why this occurs and what is the way around it? i.e. how else can I read a file in my device driver. Thanx -mani mani@csun1.cs.uga.edu or mani%csun1.cs.uga.edu@gatech.edu