Subject: Re: Porting a modem driver from Linux to NetBSD
To: Vincent <10.50@free.fr>
From: Bruce J.A. Nourish <bjan+tech-kern@bjan.net>
List: tech-kern
Date: 09/16/2003 21:04:42
On Tue, Sep 16, 2003 at 04:55:17PM +0200, Vincent wrote:
> Hi !
> 
> Thanks for answering my desperate call for help ! :)
> 
> I have only made preliminary observations : the .O for the DSP part are
> readable, they reference only "middleware" code, in that all symbols are
> prefixed by Cnx_ or something, which lets quite a lot of freedom for
> rewriting the corresponding underlying code.

I've looked at it, and here's what I can tell you:

* Porting this software to NetBSD would be a lot of work. It would
  require a significant knowledge of the internals of character device 
  drivers. If you were to successfully complete this port, you would be 
  considered a successful kernel hacker. It is a somewhat beyond my 
  ability at least.

* There is also a legal issue. The README file states that all the 
  code is either licensed under the GPL or "terms similar to the
  BSD license." This is flat out wrong. A few (Linux-derived) files 
  are licensed under the GPL. For the rest, the LICENSE file states: 

  [...]  Permitted use. Redistribution and use in source and binary forms,
  without modification, are permitted under the terms set forth herein.

  This means you could not modify any of their code. You would have to
  start from scratch. As a matter of law, [Note: IANAL] I belive it would 
  be legal to use _facts_ that you deduced from reading their software to
  write your own; nevertheless, they could make your life very hard
  (read: sue you and make you go to court) if they wanted to.  

The only good news is in the FAQ:

    At this time, we only distribute Linux drivers and there
    are currently no plans to support other operating systems.

    However, people interested in porting the drivers to other operating
    systems should contact us.

You might try contacting them and asking them if they would support a
porting effort to NetBSD. You might also ask them if anyone from 
another BSD project has contacted them. 

In short, the situation is not too good. Writing device drivers that 
use proprietary object code that will only ever run on one platform is
not a high priority for NetBSD kernel people. (If you are willing to
pay for this, you might get something done. You would be looking at a
a bounty of at least $500 or equivalent). 

What usually happens with consumer devices like this (for example, the 
Lucent winmodem driver that I'm working (slowly) on, and the Atheros
driver that David Young and myself are working on) is that someone makes
a FreeBSD/i386 port, and then someone from NetBSD hacks what they've
done to make it work on NetBSD. You might want to ask on the FreeBSD
mailing lists, although that isn't a very satisfactory answer :-(. 

Hope I've answered your question :-).
-- 
Bruce J.A. Nourish <bjan+public@bjan.net> http://bjan.net