Skip to content
Kaspar Schleiser edited this page Jan 7, 2017 · 6 revisions

(DRAFT)

Introduction

This page is supposed to help you complying with RIOT's license (LPGLv2.1).

General remarks

The RIOT OS is licensed under the terms of the GNU Lesser General Public license version 2.1 (LGPLv2.1).

See the FAQ for reasons.

The license requires you to release all changes made to RIOT's codebase to be released under the same license. It does not require you to release your application code under LGPL.

Mixing licenses

LGPLv2.1 makes it, contrary to the GPL, possible to create combined works consisting of LGPLv2.1 code and code licensed under different licenses. It is very well possible, and one of the reasons why we chose LGPLv2.1, to create proprietary applications on top of RIOT, under the condition that all non-LGPL'ed code is published in a form that allows re-linking.

The license text says you must:

"6a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)"

The important aspect is whether you change RIOT files, and/or add code which get's linked in.

Any changes to RIOT's files must be published under LGPLv2.1. That includes headers that are included by RIOT files when building your application.

Any additional code must be published in a way that allows re-linking. Source code is perfect, compiled object code is sufficient.

Common questions

Do I have to release my application code under LGPL?

No, but if you don't, you'll have to publish the compiled object files. See "Creating compiled object files" on how to create them.

I have a driver whose source code cannot be released.

The license doesn't make a difference between application or driver code. See above.

We have added support for a custom board, do we need to publish this work?

While possible, it is probably impractical to add support for a platform without changing how RIOT's code get's compiled, unless you rewrite most of the support. A lot of RIOT hardware abstraction code needs include files that are board specific. If any RIOT file includes any header created by you, those headers need to be released under LGPLv2.1.

Creating compiled object files

If you adhere to RIOT's usual way of using "modules", it is fairly easy to provide these object files, as every module ends up as archive (.a) in the build directory, which contains exactly these compiled object files. In the final build step, all *.a get linked together to form the binary that gets flashed on a device, but the intermediate *.a files are not deleted. Those can be made available publicly. As they are compiled code, releasing them is equivalent (in terms of source code disclosure) to releasing a firmware binary. Your code stays private.

Clone this wiki locally