Compiling Windows device drivers

Richard W.M. Jones rjones at redhat.com
Mon Mar 16 22:09:27 UTC 2009


Just a note to say that I had a go at compiling some Windows device
drivers[1] at the weekend and it worked better than I expected.

MinGW has DDK headers, contributed by ReactOS.  They seemed to support
most APIs demanded by the drivers.  The only major problem was a
feature that according to MSDN had been added in W2K3.

The C code had quite a few Windows-isms (incompatibility with gcc
and/or ISO C) which had to be fixed.  Also it used Windows case
insensitive names and \ characters in #include paths.  Those had to be
fixed laboriously.

I wasn't able to create a final device driver, because I couldn't work
out the link line to use.  TBH I didn't try very hard.

This page was helpful:

http://strdup.livejournal.com/34596.html

Rich.

[1] These device drivers are currently closed source but we [Red Hat]
are in the process of open sourcing them.  So I'm limited in what I
can specifically say about them at the moment, but when they are open
sourced soon I hope we can routinely cross-compile them.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top



More information about the mingw mailing list