Main Page | Report this Page
Linux Forum Index  »  Linux Development - System  »  Linux kernel driver development: SYSFS access and the...
Page 1 of 1    

Linux kernel driver development: SYSFS access and the...

Author Message
KdawgUD...
Posted: Tue Jul 21, 2009 6:18 am
Guest
I am currently maintaining a proprietary PCI linux driver. Right now,
I use a mknod script to create the device special files after the
driver has been started. I would like to switch over to have the
driver do this by itself using class_create, device_create, (and
others), but these functions only seem to be available to GPL
drivers. For non-technical reasons, a GPL release may not be
possible. Are there alternate functions that accomplish the same
thing that can be used from a non-GPL driver? Does anyone know why
these functions are specifically GPL protected? Why not just make all
drivers use the GPL?

Thanks!
Kyle
 
KdawgUD...
Posted: Tue Jul 21, 2009 10:14 am
Guest
On Jul 21, 3:03 pm, Juergen Beisert <jbeis... at (no spam) netscape.net> wrote:
Quote:
KdawgUD wrote:
I am currently maintaining a proprietary PCI linux driver.  Right now,
[...]
Why not just make all drivers use the GPL?

You answer you own question?

For non-technical reasons, a GPL release may not be possible.

So, keep your driver away from the kernel. Use uio instead.

jbe

So is the answer to my first question "No"?

Looks like UIO can't use DMA operations, which are a must. I may go
down the path of trying to convince the necessary parties to allow use
of GPL dual licensing.

Thanks for the help.
 
Juergen Beisert...
Posted: Tue Jul 21, 2009 1:03 pm
Guest
KdawgUD wrote:
Quote:
I am currently maintaining a proprietary PCI linux driver. Right now,
[...]

Why not just make all drivers use the GPL?
You answer you own question?
For non-technical reasons, a GPL release may not be possible.

So, keep your driver away from the kernel. Use uio instead.

jbe
 
André Gillibert...
Posted: Thu Aug 13, 2009 5:04 pm
Guest
KdawgUD <kyle.leber at (no spam) gmail.com> écrivit:
Quote:
I am currently maintaining a proprietary PCI linux driver. Right now,
I use a mknod script to create the device special files after the
driver has been started. I would like to switch over to have the
driver do this by itself using class_create, device_create, (and
others), but these functions only seem to be available to GPL
drivers. For non-technical reasons, a GPL release may not be
possible. Are there alternate functions that accomplish the same
thing that can be used from a non-GPL driver? Does anyone know why
these functions are specifically GPL protected? Why not just make all
drivers use the GPL?

AFAIK the whole Linux kernel is GPLv2 (see /usr/src/linux/COPYING), making it impossible to directly interface non-GPL code with the kernel. In short, I don't think you can write a non-GPL kernel-mode driver at all. class_create and device_create aren't special.
User-space programs can be non-GPL, which make it possible to write proprietary drivers with a thin kernel-mode GPL interface to non-GPL user-space code.
I'm not sure this doesn't qualify as "derived work", but that has been done by graphics hardware manufacturers.

Quote:
Does anyone know why these functions are specifically GPL protected?
Any kernel mode function is GPL protected.


Quote:
Why not just make all drivers use the GPL?
That's what Linus Torvalds and other kernel developers wished when GPL'ing the Linux kernel.


--
André Gillibert
 
Tim Roberts...
Posted: Thu Aug 13, 2009 10:04 pm
Guest
André Gillibert <MetaEntropy.removeThis at (no spam) gmail.com> wrote:
Quote:

AFAIK the whole Linux kernel is GPLv2 (see /usr/src/linux/COPYING),
making it impossible to directly interface non-GPL code with the
kernel. In short, I don't think you can write a non-GPL kernel-mode
driver at all.

That's not true. I can't redistribute my own copy of Linux that includes a
non-GPL driver, but I can certainly write a driver of my own, and I can
offer it for download by others.
--
Tim Roberts, timr at (no spam) probo.com
Providenza & Boekelheide, Inc.
 
André Gillibert...
Posted: Fri Aug 14, 2009 1:55 am
Guest
Tim Roberts wrote:
Quote:
André Gillibert <MetaEntropy.removeThis at (no spam) gmail.com> wrote:

AFAIK the whole Linux kernel is GPLv2 (see /usr/src/linux/COPYING),
making it impossible to directly interface non-GPL code with the
kernel. In short, I don't think you can write a non-GPL kernel-mode
driver at all.

That's not true. I can't redistribute my own copy of Linux that includes a
non-GPL driver, but I can certainly write a driver of my own, and I can
offer it for download by others.

That's not Linus Torvalds' opinion.
<http://lkml.indiana.edu/hypermail/linux/kernel/0312.0/0670.html>
Admittedly GPLv2 is unclear about what "derived work" means.

--
André Gillibert
 
Rainer Weikusat...
Posted: Fri Aug 14, 2009 7:00 am
Guest
André Gillibert <MetaEntropy.removeThis at (no spam) gmail.com> writes:
Quote:
Tim Roberts wrote:
André Gillibert <MetaEntropy.removeThis at (no spam) gmail.com> wrote:

AFAIK the whole Linux kernel is GPLv2 (see /usr/src/linux/COPYING),
making it impossible to directly interface non-GPL code with the
kernel. In short, I don't think you can write a non-GPL kernel-mode
driver at all.

That's not true. I can't redistribute my own copy of Linux that includes a
non-GPL driver, but I can certainly write a driver of my own, and I can
offer it for download by others.

That's not Linus Torvalds' opinion.
http://lkml.indiana.edu/hypermail/linux/kernel/0312.0/0670.html
Admittedly GPLv2 is unclear about what "derived work" means.

Not the least. The usual idiot's workaround (sorry for the harsh word
but I am tired of rereading this unchanged for years) is to claim that
the runtime linker somehow wouldn't be linker because it is not
executed until ... runtime.

This is technically wrong and the issue has been discussed to death
for years. Publish your derived work. Wait for the copyright owners to
sue. Discover that you are less clever than you believed. Good luck.
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sat Mar 20, 2010 10:16 am