Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Linux kernel driver development: SYSFS access and the GPL

495 views
Skip to first unread message

KdawgUD

unread,
Jul 21, 2009, 12:18:57 PM7/21/09
to
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

Juergen Beisert

unread,
Jul 21, 2009, 3:03:22 PM7/21/09
to
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

KdawgUD

unread,
Jul 21, 2009, 4:14:41 PM7/21/09
to

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.

André Gillibert

unread,
Aug 13, 2009, 7:04:01 PM8/13/09
to
KdawgUD <kyle....@gmail.com> écrivit:

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.

> Does anyone know why these functions are specifically GPL protected?

Any kernel mode function is GPL protected.

> 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

unread,
Aug 14, 2009, 12:04:40 AM8/14/09
to
Andr� Gillibert <MetaEntropy...@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.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

André Gillibert

unread,
Aug 14, 2009, 3:55:03 AM8/14/09
to
Tim Roberts wrote:

> André Gillibert <MetaEntropy...@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

unread,
Aug 14, 2009, 9:00:06 AM8/14/09
to
Andr� Gillibert <MetaEntropy...@gmail.com> writes:
> Tim Roberts wrote:

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.

0 new messages