Re: protecting source code in 2.6

From: Giuliano Pochini
Date: Fri May 21 2004 - 17:53:53 EST




On Thu, 20 May 2004, Jinu M. wrote:

> We are developing a block device driver on linux-2.6.x kernel. We want
> to distribute our driver as sum of source code and librabry/object code.
>
> We have divided the source code into two parts. The os interface module
> and the device interface module. The os interface module (osint.c) has
> all the os interface functions (init, exit, open, close, ioctl, request
> queue handling etc). The device interface module (devint.c) on the other
> hand has all the device interface functions (initialize device, read,
> write etc), these don't use system calls or kernel APIs.
>
> The device interface module is proprietary source and we don't intend to
> distribute it with source code on GPL license.

Kernel-space software that is not open source is a problems source. There
are many example around.


> What we intend to do is, distribute the os interface module (osint.c) with
> source code and the device interface module as object code or library.
> The user will compile the os interface module on the target box and link it
> with the device interface module to generate the .ko (loadable module).
>
> We are not very sure of how to achieve this.

It's simple. Just create the devint.o object file for all the supported
architectures multiplied by two or three different gcc revisions
(because of ABI changes, which are arch-dependent). Then the Makefile
has to compile osint.c and link it to the .o . The only difference is
that the Makefile skips the compilation of devint.c .

Out of curiosity, why the driver code must be top secret ?


--
Giuliano.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/