Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Dec 2004 00:04:27 -0800
From:      "Loren M. Lang" <lorenl@alzatex.com>
To:        FreeBSD Mailing list <freebsd-questions@freebsd.org>
Subject:   Compatibility layer for device drivers
Message-ID:  <20041210080426.GE32126@alzatex.com>

next in thread | raw e-mail | index | archive | help
I have some hardware that is neither supported by linux nor freebsd, but
I'd like to take up the challenge and try to get it working.  My first
problem though is choosing with os to develop it for since both have
completely different apis.  Now it seems to me that I should be able to
write a compatibility layer for certain subsystems that are probably
similar between the two kernels.  For example, I'd expect the usb and pci
subsystems both have very similar apis since they are both based on the
same low-level specifications.  In some cases, simple macros may be all
that are needed so there will be no slow-down, and most other cases
probably won't need very much code and might be just inline functions.
I'd like to do this in a way that many device drivers can use this api
to help make them more portable between kernels.  Now some parts may
require very drastic code differences and need to be written for each
architecture, but if this can be minimized it can help keep devices
supported to the same degree.  I'd be intrested in any thoughts on this.
Has anyone does anything similar to this before or are there any device
drivers in freebsd that share a common code base with linux drivers?
I'm thinking that that might be the case with the maestro driver since
it's GPLed.

-- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD  835A FAF3 7A46 E4A3 280C
 



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