Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Oct 2005 21:07:22 -0700 (PDT)
From:      "Bruce R. Montague" <brucem@mail.cruzio.com>
To:        freebsd-hackers@freebsd.org
Cc:        TheManifestShadow@gmail.com
Subject:   Re: Driver Development Books?
Message-ID:  <200510130407.j9D47MsY000285@mail.cruzio.com>

next in thread | raw e-mail | index | archive | help

 Hi, re:

 > 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.
 

Someone mentioned X drivers; current X drivers are
dynamically loaded into the X server, which runs
in user-space, not in the FreeBSD kernel. The X
server has its own ELF loader to load modules and 
drivers. This approach allows X drivers to be 
independent of OS.
 
There is some documentation on writing X drivers at:
 
 http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/doc/DESIGN
 
 (Click on the "(download)" link at the top of the page)
 
 For a walk through writing a driver, see Section 20 at the end,
"Some notes about writing a driver".
 
 
 Alternatively, access
 
   http://cvs.freedesktop.org/xorg/xc/programs/Xserver/hw/xfree86/doc/
 
 and select "DESIGN", etc..
 
 
FreeBSD currently uses x.org (cvs.freedesktop.org), 
but the DESIGN doc is probably similar.

The design doc has a lot of good background and conceptual
material, enough to enable reading of "real" X drivers,
which are the real definition of how things work. Although
the mechanics of writting (or modifying) an X driver are
very easy (almost trivial), if you have never worked with
C or drivers before, expect a steep learing curve... 
probably starting by rebuilding X from source would be
a good "first" step.


 - bruce



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