Skip to content

LGPL compliancy guide

Kaspar Schleiser edited this page Jan 27, 2015 · 3 revisions

[DRAFT]

Steps necessary to comply to LGPL

This guide assumes that all your proprietary code is in a folder containing your RIOT application makefile (which includes $(RIOTBASE)/Makefile.include). Check out the hello-world example.

  1. compile everything, specifying a RIOT git version # make clean all BOARD=<whatever> RIOT_VERSION=43ef437e

  2. save your resulting binary # cp bin/<whatever>/<your-application>.elf <someplace>

  3. save your code's object archive someplace # cp bin/<whatever>/<your-application>.a <somewhere-else>

  4. write down the used CFLAGS/LINK_FLAGS/USEMODULE/* used in your build. Probably just saving the Makefile is best.

  5. write down the exact tool versions (gcc, ld, binutils, ...) of the used toolchain.

  6. take md5 hash of your compiled binary: # md5sum bin/<whatever>/<your-application>.elf

Now, whenever you distribute the resulting .elf, make sure to also distribute the .a file (containing your compiled proprietary code), the used RIOT revision and the exact tool versions used to create the build.

In order to verify your .a has been build with that specific RIOT version, someone will do the following (meaning, you should do so just to be sure anyone can):

  1. get a toolchain using the exact versions you specified,
  2. get your Makefile or create one using your CFLAGS/LINK_FLAGS/USEMODULE/* and application name,
  3. # make BOARD=<whatever> clean
  4. copy your previously saved .a into bin/<your-board>
  5. # make BOARD=<whatever> RIOT_VERSION=<your-riot-version> all
  6. take md5 hash of your compiled binary: # md5sum bin/<whatever>/<your-application>.elf

The resulting bin/<your-board>/<your-application>.elf should be identical to the one saved before. (e.g., the resulting md5 hashes in both step 6. should match)

Clone this wiki locally