-
Notifications
You must be signed in to change notification settings - Fork 2k
LGPL compliancy guide
[DRAFT]
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.
-
compile everything, specifying a RIOT git version
# make clean all BOARD=<whatever> RIOT_VERSION=43ef437e
-
save your resulting binary
# cp bin/<whatever>/<your-application>.elf <someplace>
-
save your code's object archive someplace
# cp bin/<whatever>/<your-application>.a <somewhere-else>
-
write down the used CFLAGS/LINK_FLAGS/USEMODULE/* used in your build. Probably just saving the Makefile is best.
-
write down the exact tool versions (gcc, ld, binutils, ...) of the used toolchain.
-
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):
- get a toolchain using the exact versions you specified,
- get your Makefile or create one using your CFLAGS/LINK_FLAGS/USEMODULE/* and application name,
# make BOARD=<whatever> clean
- copy your previously saved .a into
bin/<your-board>
# make BOARD=<whatever> RIOT_VERSION=<your-riot-version> all
- 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)