Newbie Question to Device driver writing

Intron is my alias on the Internet mag at intron.ac
Fri Aug 18 00:47:00 UTC 2006


Jonathan Herriott wrote:

> Intron-
> 
> Unfortunately, I have nothing specific in mind as all my hardware
> works on FreeBSD.  I've almost come to the point where I'm going to go
> to Fry's and buy a bunch of stuff and make a simple USB device which
> may turn on or off a light (actually hook it up to a light in my home)
> just to get some experience with writing drivers.
> 
> Overall, I'd really love to do an opengl driver for a graphics card,
> but I figured before I get into something that complex, I might try
> something simpler.  Any suggestion would be great.
> 
> I'll look into -hackers@ as I would really like to learn the actual
> internals of FreeBSD.
> 
> Jon
> 

If you want to know how to write a simple USB driver, you may have a
look at /usr/src/sys/dev/usb/uscanner.c and /usr/src/sys/dev/usb/ulpt.c.
They are both almost as simple as transfering data between hardware
device and userland application.

To write a graphics card driver that well supports OpenGL is difficult:
1. Current GPUs produced by NVIDIA or ATI (AMD) are complicated.
2. Some vendors wouldn't publicize programming data sheets of GPUs.
You may have a look at http://dri.freedesktop.org/.

Some days ago, I would create a C++ driver fundamental structure for
FreeBSD, but discussants on -hackers@ threw doubts upon me.

These days, I think, if FreeBSD can make use of drivers for Microsoft
Windows, FreeBSD will become more powerful.

Now FreeBSD and Linux both can use network card driver for Windows, with
ndis(4) for FreeBSD and NDISWrapper for Linux (http://ndiswrapper.sf.net).
But NDIS driver is one of the simplest drivers in WDM. The idea of WDM
(Windows Device Model) simulator is quite challenging. But once WDMulator
is realized, it will help FreeBSD deeply.

------------------------------------------------------------------------
                                                From Beijing, China



More information about the freebsd-hardware mailing list