logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

proprietary_libs.md (6951B)


  1. # Proprietary Vendor Libraries
  2. QMK Firmware cannot include support for any proprietary vendor libraries that impose additional restrictions beyond those in the GPL. This includes binary-only distributions, hardware-locked libraries, and code with redistribution limitations. This document explains why such libraries are incompatible with the GPL-based QMK Firmware and addresses commonly proposed workarounds.
  3. ## Architecture Constraints
  4. Firmware presents unique licensing challenges:
  5. - **Monolithic binary**: All code compiles into a single executable image
  6. - **No OS isolation**: No operating system provides process or memory separation
  7. - **Shared resources**: All code shares the same memory space, peripherals, and execution context
  8. - **Static linking**: Everything is statically linked at compile time
  9. This monolithic nature means any proprietary code becomes inseparable from GPL code, creating immediate license violations.
  10. ## Common Vendor Library Restrictions
  11. Proprietary vendor libraries typically impose restrictions incompatible with GPL freedoms:
  12. **Hardware Lock-in:**
  13. - Library only licensed for specific vendor's chips
  14. - Cannot port firmware to alternative hardware
  15. - Examples: Nordic's and ST's chip-only clauses in their respective licenses
  16. **No Source Distribution:**
  17. - Binary-only libraries without corresponding source
  18. - Precompiled static libraries (.a/.lib files)
  19. - No ability to modify or fix bugs
  20. - Examples: WCH CH582 precompiled libraries, Nordic SoftDevice
  21. **Redistribution Limitations:**
  22. - Restrictions on who can distribute
  23. - Limitations on commercial use
  24. - Required permissions or fees
  25. **Additional Legal Terms:**
  26. - Patent assertions beyond GPL's scope
  27. - Indemnification requirements
  28. - Jurisdiction restrictions
  29. - Explicit anti-GPL clauses
  30. ## Bluetooth Stack Licensing Examples
  31. Both Nordic and ST provide Bluetooth stacks under restrictive licenses:
  32. **Nordic SoftDevice (under Nordic 5-clause license):**
  33. - Binary-only Bluetooth/radio stack
  34. - License restricts to Nordic hardware
  35. - No source code available
  36. - Communicates via SVC interface (still not GPL-compatible)
  37. **ST's Bluetooth Stack (under SLA0044 license):**
  38. - Explicitly forbids being subject to "Open Source Terms", specifically mentioning incompatibility with the GPL
  39. - Restricted to ST microcontrollers only
  40. - Similar functional role to Nordic's SoftDevice
  41. Both represent the same fundamental problem: critical wireless functionality locked behind proprietary licenses.
  42. ## Why the System Library Exception Doesn't Apply
  43. The GPL's System Library exception **cannot** rescue proprietary vendor libraries.
  44. ### System Library Requirements
  45. The exception only covers libraries that:
  46. 1. Are part of the "normal form of packaging a Major Component"
  47. 2. The Major Component is an OS kernel, compiler, or similar system software
  48. 3. Are not distributed with the application
  49. 4. Are not part of the application itself
  50. ### Why Vendor Libraries Fail These Requirements
  51. 1. **No operating system**: Bare-metal firmware has no OS to provide system libraries
  52. 2. **Not Major Components**: Hardware drivers and HALs aren't kernels or compilers
  53. 3. **Distributed together**: Vendor code becomes part of the firmware binary
  54. 4. **Application-level code**: Peripheral drivers are application functionality
  55. The exception covers things like Windows system DLLs or Linux glibc, not microcontroller vendor libraries or Bluetooth stacks.
  56. ## Attempted Workarounds
  57. ### Architectural Separation Attempts
  58. **Supervisor Call (SVC) Interfaces:**
  59. Nordic's SoftDevice uses supervisor call based APIs instead of direct linking:
  60. - Fixed memory regions for proprietary code
  61. - Communication through CPU exception mechanisms
  62. - Claims of "no linking" between components
  63. **Why this fails:** The GPL considers functional integration, not just linking methods. In Bluetooth-capable boards, these would require the proprietary component to function, thus they form a single work regardless of the communication mechanism. This applies equally to Nordic's SoftDevice and any similar architecture ST provides.
  64. **Binary-Only Distributions:**
  65. Multiple vendors provide precompiled libraries:
  66. - WCH: Precompiled BLE stack
  67. - Nordic: Binary-only SoftDevice library
  68. - ST: Same solution as Nordic
  69. **Why this fails:** This is classic static linking of proprietary code into GPL code. The inability to modify these libraries violates GPL's fundamental requirements.
  70. ### Loader-Based Separation
  71. - Write a GPL bootloader/loader
  72. - Load proprietary firmware (such as Nordic/ST Bluetooth) from external storage
  73. - Claim they're separate works
  74. **Problems:**
  75. - If designed as a system, courts view as single work
  76. - Distribution patterns matter (shipped together?)
  77. - Functional interdependence suggests unity
  78. - Appears designed to circumvent GPL
  79. ## Real-World Examples
  80. ### Bluetooth/Wireless Stacks
  81. - **Nordic SoftDevice**: Binary-only, SVC-interface, hardware-locked
  82. - **ST Bluetooth**: Binary-only, license explicitly GPL-incompatible
  83. - **WCH CH582**: Precompiled Bluetooth libraries
  84. ### HAL and Driver Libraries
  85. - **ST HAL/LL drivers**: Source available but SLA0044 restricted
  86. - **Nordic SDK**: Source visible but 5-Clause restricted
  87. - **Various vendor HALs**: Platform-locked licenses
  88. ### Mixed Proprietary/Open
  89. - Open peripheral drivers with closed protocol stacks
  90. - Basic HAL with proprietary performance libraries
  91. - Partially documented systems requiring binary supplements
  92. ## Legal and Practical Consequences
  93. Including any proprietary vendor library means:
  94. 1. **License Violation**: Immediate GPL non-compliance
  95. 2. **Distribution Ban**: Users cannot legally share modified firmware
  96. 3. **Commercial Risk**: Products using the firmware face legal liability
  97. 4. **Contributor Tainting**: All GPL contributions become legally problematic
  98. 5. **Update Restrictions**: Cannot fix bugs in proprietary components
  99. ## Evaluation Criteria for Libraries
  100. Before including any library, QMK needs to verify:
  101. - Complete source code available
  102. - GPL-compatible license (GPL, LGPL, MIT, BSD, Apache)
  103. - No hardware restrictions
  104. - No redistribution limitations
  105. - No additional legal terms
  106. - No anti-GPL clauses
  107. ## Policy Implementation
  108. QMK Firmware maintains a strict policy:
  109. 1. **No proprietary libraries**: Regardless of technical workarounds
  110. 2. **No binary blobs**: All code must have source available
  111. 3. **No platform restrictions**: Must allow porting to any hardware
  112. 4. **No additional terms**: Only GPL restrictions permitted
  113. ## Summary
  114. There is no legally safe way to include proprietary vendor libraries in GPL firmware. This applies whether they're:
  115. - Bluetooth stacks (Nordic SoftDevice, ST Bluetooth)
  116. - Precompiled static libraries
  117. - Binary blobs with SVC interfaces
  118. - Source code with restrictive licenses
  119. - Mixed open/closed systems
  120. **Technical architectures cannot overcome license obligations.**
  121. QMK chooses GPL compliance, ensuring users receive all freedoms the GPL promises.