views:

417

answers:

12

I would like to write my own OS, and would like to temporarily jump over the complicated task of writing the kernel and come back to it later by using the Linux kernel in the mean time. However, I would like to provide the OS as closed source for now. What license is the Linux kernel under and is it possible to use it for release with a closed source OS?

Edit: I am not interested in closing the source of the Linux kernel, I would still provide that as open sourced. I am wondering if I could use a closed source OS with an open source kernel.

Further edit: By OS, I mean the system that runs on top of the kernel and is used to launch other programs. I certainly did not mean to include the kernel in the closed source statement.

+4  A: 

The Linux kernel is released under the GPLv2 and you can use it as part of a closed-source OS but you have to keep the kernel and all modifications released GPLv2.

Edit: Btw, you may want to use something like OpenSolaris instead. It's much easier to work with, in my opinion (obviously very subjective), and you can keep modifications closed-source if you so choose, so long as you follow the terms of the CDDL.

Cody Brocious
+1  A: 

It's GPL version 2 and you may certainly not close its source.

Sklivvz
You cannot release /it/ closed-source, but there's nothing stopping you from using it as the base of an otherwise closed-source OS.
Cody Brocious
A: 

It is GPL. Short answer -- no.

Terminus
+2  A: 

Linux has the GPL (v2) as its licence, which means you have to open source any derivative works.

You may want to use BSD, its license is a lot les restrictive in what you can do with derived works

dsm
That seems like a reasonable alternative. Thanks for the idea.
Cristián Romo
No probs :) (but remember Open source is a Good Idea (tm))
dsm
Open source is a possible direction in the future, but I would like to the work to by my own so that I can learn how to do things myself.
Cristián Romo
+3  A: 

I think you're going to have to be more specific about what you mean by 'OS'. It's by no means a clear concept. Some would say that the kernel is all of the OS. Others would say that the shell and core utilities such as 'ls' are part of the OS. Others would go as far as to say that standard applications such as Notepad are part of the OS.

IANAL, but I don't believe there's anything to stop you from bundling the Linux kernel with a load of closed-source programs of your own. Take care not to use any GPL library code however (LGPL is OK).

I do question your motives.

slim
I would say the kernel is a central (if small) component, and that an OS stops where the desktop starts, but thats just my opinion
dsm
Indeed - everyone has opinions :)In the case of the phrase "OS", it's almost always a good idea to ask for clarification.
slim
A: 

You can always keep any extensions (modules) and/or applications you write closed source, but the kernel itself will need to remain open source.

There's a not-so-obvious aspect of the GPLv2 that you can exploit while testing the system: you only need to release source code to those who have access to the system. The GPLv2 states that you need to give full access to the source code to anyone with access to the binary/compiled distribution of the program. So, if you are only going to use the software inside of the company that is paying to develop it, you don't need to distribute the source code to the rest of the world, but just them.

dguaraglia
Modules are definitely a gray area -- many consider them to be clear derivatives of the kernel, not merely users of the kernel such as user space programs.
wnoise
So if I never distribute it until a home-grown kernel is written, there would be no licensing issues at all?
Cristián Romo
That is true. The license only limits your right to redistribute code. What you do with it in private is entirely up to you.
slim
+2  A: 

You must keep the source open, and any works derived from the code, however, if you use the Kernel, write your own application stack on top of that (pretty much ALL the GNU stuff) then you don't have to open that up.

The GPL says that "derived" works... so if you're writing new code, instead of expanind on, then that's fine. In fact, you could even, for example, use the GNU toolchain, the Linux Kernel, and then have your own system on top of that (or just a DE) that is closed source.

It's when you modify/derive from something that you have to keep it open!

Mez
A: 

Generally I would say that you're allowed to do such a thing, as long as you provide the source for the kernel, but there's one point where I'm unsure:

On a normal Linux system between the (GPL) kernel and a non-GPL compatible application, there is always the GNU libc, which is LGPL and thus allows derived works that are non-free. Now, if you have a non-free libc, that might be considered a derived work, since you are directly calling the kernel, and also using kernel headers.

As many others have said before, you might be better off using a *BSD.

Torsten Marek
libc is LGPL you can link against it and remain closed source (http://www.gnu.org/software/libc/manual/html_node/Copying.html#Copying)
dsm
That's what I said.
Torsten Marek
HAHA, misread, nevermind :)
dsm
The "out" you get is the same one that allows glibc to be LGPL instead of being GPL. The kernel's system call interface is considered a boundary, and userspace may use it without creating a derived work. This is explicitly stated in COPYING. You may *not* use kernel headers, code, or anything else.
puetzk
+9  A: 

You can of course write whatever closed-source OS over the Linux kernel that you like provided you are compatible with the licensing of components you link against.

Of course that's likely to include the gnu C library (or some other C library). You may also need some command line utilities which will probably be GPL to do things such as filesystem maintenance, network setup etc. But provided you leave those as their own standalone programs, it should not be a problem.

Anything that you link into the kernel itself (e.g. custom modules, patches) should be released as open source GPL to comply with the kernel's licence.

MarkR
+1  A: 

If the filesystem you use is to be linked into the kernel itself, and if you plan to distribute it to others, the GPL pretty unambiguously requires that the filesystem be GPL'ed as well.

That being said: one way to legally interface Linux with a GPL-incompatible filesystem is via FUSE (filesystem in userspace). This has been used, for example, to run the GPL-incompatible ZFS filesystem on top of Linux. Running a filesystem in userspace does, however, carry a performance penalty that may be significant.

Dan
A: 

If you're serious in developing a new operating system and want a working kernel to start with I suggest that you look into the FreeBSD kernel. It has a much more relaxed license than Linux, I think you might find it worthwhile.

Just my 2 cents...

Subtwo
A: 

I agree with MarkR but nobody has stated the obvious to you. If you are serious, you need to consult a lawyer with expertise in this area.

BobbyShaftoe