From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 12 12:31:23 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93F9416A422 for ; Wed, 12 Oct 2005 12:31:23 +0000 (GMT) (envelope-from joao.barros@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D8D343D46 for ; Wed, 12 Oct 2005 12:31:22 +0000 (GMT) (envelope-from joao.barros@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so63926wxc for ; Wed, 12 Oct 2005 05:31:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UUF+HcTSBlTsjN7GAar474/d5+wtNpVuM/X9cSNhn5mZa9Fga5e242X6n1j01UKkg7nuT0IEXeUMFRe98c/XGyy2ZLQdwDdyJCdVNrifdaDPVpdwGq56Z4P5ntBQdTUxVcmAvjzEAcKBD14r2wXsyGh4OeXSWi+06qoW1Mp/fLc= Received: by 10.70.16.16 with SMTP id 16mr139859wxp; Wed, 12 Oct 2005 05:31:22 -0700 (PDT) Received: by 10.70.10.5 with HTTP; Wed, 12 Oct 2005 05:31:22 -0700 (PDT) Message-ID: <70e8236f0510120531m33942c8dwb72c4729b83e264b@mail.gmail.com> Date: Wed, 12 Oct 2005 13:31:22 +0100 From: Joao Barros To: Pete In-Reply-To: <434BECA0.9050501@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <434BECA0.9050501@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Driver Development Books? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2005 12:31:23 -0000 On 10/11/05, Pete wrote: > Hello, > I have what may seem to be a silly question, but I cannot find any > other decent resources on the web. >.< The problem that I am having > right now is > that I have a fairly nice graphics card which, for the moment is only > supported on Windows Operating systems, and old 2.4 Linux kernels. So > far there has > not been much positive outlook in porting the drivers to *BSD or any of > the 2.6 kernels that I know of, let alone 64-bit drivers for non-Win OSes= . > > So I guess that makes my question fairly simple then; I know that driver > code is written in C (which I am learning currently) but thats about all > I know. I'm probably > not far off when I say that I need more to go on. Yet, from looking at > Amazon.com I have not been able to find any books on writing driver > code, which is really > frustrating. > > One of my security related books, Rootkits, tells me about how to write > drivers for a completely different reason so I know a bit more about how > they work but again > the code involved does not interface hardware to the OS, just injects a > custom application. The other tool that I will probably use is Jungo, > which is a nice-looking > application which automates a skeletal version of the driver you need, > but again, I would not know how to fill it out. > > Any help is appreciated. > > -Pete I started porting a pseudo driver from OpenBSD and had the same issues. You could find more info here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/index.html http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/newbus-api.h= tml http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/driverbasics= -char.html#AEN8703 And this come in very handy: FreeBSD Source Code Tour: http://snapshots.jp.freebsd.org/tour/ A nice website provided by Robert Watson (Thanks!!!): http://fxr.watson.org= / Looking at existing code is also good, like the simple led driver by phk@ There was also a thread where John Baldwin described the parts of a driver but I can't seem to find it. -- Joao Barros