DOKK Library

License compliance for embedded Linux devices with Buildroot

Authors Luca Ceresoli

License CC-BY-SA-3.0

Plaintext
License compliance for embedded Linux
devices with Buildroot


Luca Ceresoli — AIM Sportline
luca@lucaceresoli.net
https://lucaceresoli.net
FOSDEM 2020
About me


           • Embedded Linux engineer
             at AIM Sportline
             www.aim-sportline.com
               • Develop products on
                 custom hardware
               • Kernel, drivers,
                 bootloader, FPGA
               • Integration, build system
           • Open source enthusiast
               • Contributor to the Linux
                 kernel, U-Boot, Buildroot
                 and others


                                             1
Buildroot
Build system




      Compiler
        Linker                Bootloader
     Debugger                              Embedded
                                Kernel
    Bootloader                              Device
         Kernel                Root FS
      Libraries   Buildroot
   Applications               Host tools

          Tools

                                           End user




                                                      2
    Demo:
Buildroot basics




                   2
Open-source licensing
Typical license families




          Permissive                    Copyleft
       (BSD, MIT, X11…)           (GPL, LGPL, AGPL…)

                                          
     Use, modify, redistribute   Use, modify, redistribute

                                           
       Provide license text        Provide license text
                                   Provide source code



                                                             3
Caveats




    • There are many variations
    • License incompatibility
    • Info on websites etc might be inaccurate
   → Check the license in the source code




                                                 4
So, what do I have to do?




    • Provide license text
    • Store source code archives (provide them on request)
        • Including the “scripts used to control compilation and
          installation”
             • I.e. the entire buildsystem




                                                                   5
Compliance tools in Buildroot
Compliance tools in Buildroot


      Compiler
        Linker                  Bootloader
     Debugger                                  Embedded
                                  Kernel
    Bootloader                                  Device
         Kernel                   Root FS
      Libraries   Buildroot
   Applications                  Host tools

          Tools
                                 Legal info

                                License text

                                Source code    End user

                                     ...




                                                          6
    Demo:
make legal-info




                  6
Implementing legal-info
in Buildroot packages
Add license info to a package




   package/vlc/vlc.mk

   VLC_LICENSE = GPL-2.0+, LGPL-2.1+
   VLC_LICENSE_FILES = COPYING COPYING.LIB


   package/vlc/vlc.hash

   sha256 8177f975...1b880643   COPYING
   sha256 dc626520...032fe551   COPYING.LIB




                                              7
Your own closed source program




  package/myapp/myapp.mk

   MYAPP_LICENSE = Proprietary
   MYAPP_REDISTRIBUTE = NO




                                 8
Source from unusual locations




    • Source code is not saved when using
        • <PKG>_OVERRIDE_SRCDIR
        • <PKG>_SITE_METHOD = local
        → Avoid them when releasing




                                            9
ACTUAL_SOURCES




    • For some special packages:
        • <PKG>_SOURCE contains binaries
        • <PKG>_ACTUAL_SOURCE points to the tarball with the actual
          sources
        • Only used for pre-built external toolchains




                                                                      10
Conclusions
References




    • The Buildroot user manual
      (https://buildroot.org/docs.html)
         § 12. Legal notice and licensing 
         § 17.5. Infrastructure for packages with specific build systems   

    • License Compliance in Embedded Linux with the Yocto
      Project, Paul Barker, ELCE 2019 ( slides  , video  )
        • Mostly buildsystem-agnostic




                                                                               11
             Thank you for your attention!


                           Luca Ceresoli
Questions?           luca@lucaceresoli.net
                 https://lucaceresoli.net
                          © Copyright 2020, Luca Ceresoli
                               Slides released under
               Creative Commons Attribution - Share Alike 3.0 License
               https://creativecommons.org/licenses/by-sa/3.0/




                                                                        12
Extra slides
Typical license families



                  in
              oma



                              e
                         issiv
        lic d




                                      L
                           m

                                  LGP

                                          GPL
       Pub


                       Per



       ✓               ✓          ✓       ✓     Can use, modify
       ✓               ✓          ✓       ✓     Can redistribute
                                             Must provide license text
                                              Must provide source code
                                               Derived work becomes GPL