Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am not sure if I want to license my code under GPL. If I access a device such as a serial port, using the termios.h header(LGPL) I am not linking to the kernel am I ? Are all calls into the kernel carried out as system calls?
AFAIK system call is call to some kernel function. It is 0x80 interrupt number.
Here is a list of system calls for kernel version 2.2
I did not read this pdf yet but looks like it would be usefull.
For list of system calls on your system try
Headers include files are not copyrightable, they are only expressions of facts.
Linus has already declared that as long as you interface with the system through system calls, you are not bound by the GPL.
Run time libraries (libc and such for the most part) are LGPL, and are designed to separate your application code from the library. The "L" is for library. As long as you don't modify the library itself, you are again not bound by the LGPL.
The only time things get dicey with GPL is when you are writing a device driver. If your driver was originally developed for a different system (such as windows) you are not directly bound by the kernels GPL v2... AS LONG AS you don't use kernel symbols designated as GPLONLY.
I write terrible messages and tried to keep things short. I am going to risk boring people and go into a little more detail...
So I would like to control instrumentation with Linux via Ethernet, RS232 and GPIB. There is a GPIB Linux driver but it's not very good. I was thinking about reworking it, I am happy to keep it GPL. However I don't want my whole application to be GPL. I am wondering if I send data across these devices, am I doing so as a series of systems calls or will the use of GPL device drivers require the application to be GPL as well.
As long as the driver implements the standard functions, you would be using the system calls which insulate your application from the kernel.
Data doesn't come into it. That would be like claiming that writing data to a disk suddenly makes the program writing to it the property of the disk manufacturer that owns the copyrights to the formatter attached to the disk.
There would be a "bright line" between your device driver and any application (yours, or someone else's) that uses that driver. I'm sure the Linux community would welcome a better GPIB driver. Your program that uses your driver, as any and every other program would use the same driver, has nothing to do with the driver itself.
To carry the notion to an extreme: "the mere fact that a program runs on the Linux operating system does not make that program free."
As always, do not trust any legal information from the internet - always ask a lawyer, and preferably one that knows the GPL/LGPL and their interactions with other software. There are a number of snake oil lawyers that deliberately don't want to understand.
Install the kernel-source packages for whatever distro you are using. In them, you will find the source code to literally hundreds of working-and-tested device drivers. Among these, you are sure to find some that are quite similar to whatever you have in mind. Cabbage from these, mercilessly and unashamedly.
In the same manner, you will find working, tested source-code for /proc and /sys entries. The magician conceals the innermost workings of none of his tricks.
Books are quite valuable indeed. But keep the source-code close at hand. Use both resources. And remember that, when the time comes for you to embark upon your own particular project, you do not have to "start from scratch." No one actually does that anymore, I think; nor should they. "The hair-follicles that you save will be your own!"