[nflug] osx
Ken Smith
kensmith at cse.Buffalo.EDU
Wed Feb 8 09:09:33 EST 2006
On Wed, 2006-02-08 at 08:38 -0500, Eric Benoit wrote:
> If Mac OS X is OpenBSD how come GNU software writers couldn't create
> device drivers for linux from the device drivers of vendor software?
MacOS-X is actually Darwin (http://www.opendarwin.org/). Of the BSD
based systems it draws more from FreeBSD than OpenBSD (which is no
surprise given Jordan Hubbard went to work for Apple developing MacOS-X
when he decided to stop being as active a FreeBSD developer as he had
been).
[ If you want to see something scary take a peek at:
http://darwinsource.opendarwin.org/10.4.4.ppc/file_cmds-116.9/mv/mv.c
and look at the first several lines of the Copyright notice :-) ].
There is absolutely nothing stopping Linux device writer drivers from
looking over the Darwin code and using it as a rough guide. Ethics
might stop them from copying large chunks of the code verbatim because
the GNU based copyright is significantly different from the BSD based
copyrights and there has been a long history of very intense debates (to
the level of being something of a religious war) over the differences,
which is better, etc. And last but certainly not least the device
driver framework of Darwin is way different than Linux's. The device
driver is only a small chunk that needs to communicate with the rest of
the kernel and "respond to the device" (handle device interrupts) in a
way that's correct for the OS and the semantics of that are different
between the two systems.
Using a device driver from a different system as a reference while
writing your own is more difficult than it sounds. Much of a device
driver is writing certain bit patterns into device registers telling the
controller what to do and expecting it to respond in a certain way. But
the device driver writers don't typically provide good enough comments
in the code for you to figure out what they were doing without having
access to the documentation (from the vendor of the device) that
describes how to program the device itself.
--
Ken Smith
- From there to here, from here to | kensmith at cse.buffalo.edu
there, funny things are everywhere. |
- Theodore Geisel |
_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug
More information about the nflug
mailing list