Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Aug 2006 08:46:57 +0800
From:      "Intron is my alias on the Internet" <mag@intron.ac>
To:        "Jonathan Herriott" <herriojr@gmail.com>
Cc:        freebsd-drivers@freebsd.org, freebsd-hardware@freebsd.org
Subject:   Re: Newbie Question to Device driver writing
Message-ID:  <courier.44E50E01.0001841C@intron.ac>
In-Reply-To: <6a56d69c0608171030o4c37ec37k54de2b99b5071c72@mail.gmail.com>
References:  <6a56d69c0608162129h9e3e085i4ad1f4034833724f@mail.gmail.com> <courier.44E44B09.00015C21@intron.ac> <6a56d69c0608171030o4c37ec37k54de2b99b5071c72@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?courier.44E50E01.0001841C>