
Use LGPL for Device Drivers
LGPL for device drivers gives engineers a clear path to mix open libraries with closed program code while keeping practical release options.
The Free Software Foundation created a weak copyleft model that lets a linked library stay open without forcing an entire program into the GPL. This matters when you need to ship software that combines proprietary code and shared libraries.
We cover what the license allows, when dynamic linking is the safer route, and which steps you must take if you choose static linking—like sharing the corresponding source and rebuild information. Expect plain-language checks and real-world examples to help users make compliant choices.
Key Takeaways
- The license is weak copyleft: it protects libraries while allowing linked proprietary program code.
- Dynamic linking usually avoids full GPL obligations; static linking needs extra source and rebuild materials.
- Versions v2.1 and v3 differ in name and patent clauses—know which terms apply.
- Document modifications and provide clear information to users to stay compliant.
- Kernel and symbol rules (MODULE_LICENSE, SPDX) affect access—plan integration early.
Why engineers explore LGPL for device drivers today
We see engineering teams choose a linking-friendly license to combine open libraries with proprietary program parts while keeping release flexibility. This approach lets teams ship commercial software without converting all code to a strong copyleft model.
Dynamic linking is the usual path. It lowers upgrade risk and lets you update a library independently of the surrounding program. Static linking happens too—when it does, teams package rebuild information and object files so users can relink with modified source.
Leaders value clear terms: the license requires sharing library source and modifications but lets other program code remain under different licenses. That clarity helps security and compliance teams audit requirements quickly.
| Aspect | Dynamic linking | Static linking |
|---|---|---|
| Compliance effort | Lower — provide library source and notices | Higher — provide rebuild info and object files |
| Update model | Independent library updates | Tied to program rebuilds |
| Practical benefit | Simpler audits and upgrades | Strong control, more paperwork |
- v2.1 and v3 remain common; v3 adds installation information and a patent grant that eases IP risk.
- Teams choose this path to balance innovation with obligations to the general public.
Understanding the GNU Lesser General Public License (LGPL)
A practical weak-copyleft license draws a clear boundary around shared libraries while letting other program parts remain closed.
The license began as the GNU Library General Public License in 1991 and was renamed in v2.1 to clarify scope and use. That change made it easier for teams to combine open libraries with proprietary program code without triggering full GPL obligations.
Weak copyleft vs strong copyleft and permissive licenses
Weak copyleft protects the library and its source. You must share modifications to the library and keep notices intact. But your separate program can stay under its own license when linked properly.
Strong copyleft—like the gpl—extends obligations to the entire combined program. Permissive licenses (MIT, BSD) impose fewer terms and do not require reciprocal source sharing for library edits.
| Aspect | Weak copyleft | Strong copyleft |
|---|---|---|
| Scope | Library boundary; modifications must be shared | Combined program becomes subject to the license |
| Effect on proprietary code | Proprietary program can remain closed when linked properly | Proprietary code must comply or be open-sourced |
| Typical use | Shared libraries and reusable components | Complete works where reciprocal sharing is required |
How the license evolved
The Free Software Foundation updated the text in v2.1 (1999) and again in v3 (2007). v3 aligns with gplv3, adds installation information, and includes a patent grant that reduces IP risk.
- v2.1 clarified library use with mixed program structures.
- v3 brings clearer terms that affect consumer installations and patents.
- Both versions require including the full license text and original copyright notices when distributing modified library source.
LGPL for device drivers
Where drivers interact with libraries and user space
A typical driver stack separates a kernel module, a user-space helper program, and shared library components. This clear division helps you place a weak-copyleft library where it makes the most sense.
When a user-space program talks to kernel code via syscalls or UAPI headers, the library layer can carry the copyleft obligations without pulling the entire software stack into a stronger license. That keeps proprietary program logic outside the sharing requirement.
On Windows and other platforms, vendors often ship user-mode libraries that expose APIs. Choosing a shared library there preserves flexibility for closed parts of the work while letting you contribute fixes upstream.
- Map the stack: kernel module — user-space program — library.
- Keep ABI, versioning, and packaging stable so users can swap an updated library without rebuilding unrelated code.
- Document the license text and include clear attribution and source links for library changes.
| Integration point | Effect | What to provide |
|---|---|---|
| Dynamic linking | Library obligations limited | Library source and notices |
| Static linking | Broader rebuild requirements | Object files and relinking info |
| Syscall boundary | Kernel remains under gpl | Keep headers and UAPI clean |
Design the architecture so your distribution satisfies the license while keeping operational burden low. With a sound structure, you maintain performance and give users the freedoms the general public expects.
Dynamic linking vs static linking: different requirements that matter
How a program links a library changes what you must deliver to users. Shared libraries create a clear boundary. That boundary usually meets the license intent and cuts compliance work.
The safe harbor for dynamically linked libraries
Dynamic linking is the default strategy. It lets users swap a library at runtime. That ability satisfies the safe harbor concept and reduces obligations on your program.
Compliance implications when statically linked into a program
Static linking is an exception. If you include a library into a single binary, you must provide not only the library source but also the materials to relink the program.
This typically means object files, linker scripts, or complete corresponding source that lets users rebuild with a modified library.
Languages and build systems without static linking equivalents
Many modern languages and toolchains do not produce static artifacts. In those ecosystems, dynamic approaches align naturally with the license and user freedom.
- Document build steps, flags, and versions to make relinking reproducible.
- Ship license text, clear modification notices, and easy access to source.
- Prefer ABI stability and semantic versioning so replacement is reliable for users.
| Linking model | Typical obligation | What to include |
|---|---|---|
| Dynamic linking | Lower | Library source, notices, and access instructions |
| Static linking | Higher | Object files, relinking info, and complete corresponding source |
| No static artifacts | Inherent alignment | Document build system and provide source links |
LGPL v2.1 and v3: versions, terms, and practical differences
Two common releases—v2.1 and v3—look similar on paper but change what you must provide to users and contributors.
v2.1 remains popular because it blends weak copyleft with pragmatic relicensing to older gpl versions. It lets teams relicense library derivatives to compatible v2.1+/gplv2+ terms.
v3 aligns with gplv3 and adds explicit installation information requirements for consumer equipment. That means if your program runs on a closed appliance, you must supply clear steps so users can install modified library software onto the unit.
Patent rights and contributor protection
v3 also includes a patent rights grant. Contributors give users and downstream projects a license to related patent claims. This reduces the chance of patent assertions that block users or other contributors from using or improving the code.
Relicensing and derivative works
Rules differ: v2.1 permits certain upgrades to v2.1+/gplv2+ paths, while v3 allows relicensing to v3/gplv3+ but not back to older v2-only terms. That affects how you combine library code with other open stacks.
- Document which version applies in NOTICE files and headers.
- Plan installation materials early if you ship consumer products.
- Review contributor agreements to confirm the patent posture before adopting v3.
| Aspect | v2.1 | v3 |
|---|---|---|
| Installation information | Not required | Required for consumer products |
| Patent grant | Implicit, limited | Explicit contributor patent license |
| Relicensing | v2.1+/gplv2+ allowed | v3/gplv3+ allowed; v2-only not allowed |
Choose the version that matches your distribution model, then align compliance steps—source access, installation instructions, and contributor terms—to that text. Clear labels and simple documentation keep users informed and reduce retrofit work later.
What counts as a derivative work or modification to an LGPL library
Deciding when code becomes a derivative hinges on how tightly it integrates with a shared library. Edit the library’s source, add files that compile into the library, or backport patches—those actions are modifications and trigger source obligations when you distribute the software.
Thin wrappers or adapters that get compiled into the same library unit are usually treated as part of the library. Keep those under the same license to satisfy the terms and avoid surprise obligations.
By contrast, a program that merely links to the library—especially via dynamic linking—remains your program. That use does not extend the gpl-style obligations to the entire program, so your code can keep its chosen licenses.
- Copying significant portions of library code into application sources creates a derivative and must be released under the library license.
- Practical test: if removing the library breaks the program but the program stays replaceable and separately licensed, you are likely within safe boundaries.
- Static linking raises tougher questions—provide relinkable objects and clear rebuild steps when distributing.
| Action | Result | What to provide |
|---|---|---|
| Edit library source | Modification / derivative | Corresponding source and notices |
| Thin wrapper in library | Derivative | License-aligned headers and attribution |
| Dynamic linking | Program stays separate | Library source and access instructions |
Mark changes in commits and headers. When in doubt, separate repositories, clear APIs, and dynamic linking reduce ambiguity and help users exercise their rights without forcing wider relicensing.
Source code, corresponding source code, and access requirements
When you distribute software that links to a shared library, clear access to source must be part of your release plan.
Include the full license text and a copy of original copyright notices in a LICENSE or NOTICE file that ships with your program. Doing this up front keeps compliance simple and visible.
If you modify the library and distribute it, provide the source code for your changes and the unmodified portions as a complete, buildable package. That complete corresponding source lets users inspect and rebuild the work you shipped.
Rebuild materials and access
For static linkage, include object files or equivalent relink materials so users can recompile the program with their modified library. Add build scripts, dependency versions, and config files to make rebuilds reproducible.
- Host a stable URL to the corresponding source and include that link in docs and installer prompts.
- Keep a changelog and tag releases so users match code to shipped binaries.
- When bundling multiple licenses, include each license text and mark which components they cover.
| Requirement | What to provide | Why it matters |
|---|---|---|
| License text & notices | LICENSE/NOTICE file with copy of original text | Shows legal terms and attribution |
| Corresponding source | Complete source package or stable URL | Enables inspection and rebuild |
| Relink materials | Object files, scripts, configs | Required for static-linked program rebuilds |
Validate releases with a checklist: license text, notices, corresponding source, and relink materials when needed. Train support staff to respond to source requests and point users to the right access channel. These steps protect users and simplify audits.
Navigating the Linux kernel reality: GPL-2.0, exceptions, and drivers
Linux uses GPL-2.0-only for in-tree code. That rule means files must carry compatible license identifiers. At the same time, the kernel documents a narrow exception for syscall interfaces.

Syscall boundary and the Linux-syscall-note exception
The Linux-syscall-note clarifies that UAPI headers do not extend GPL obligations to user-space programs. UAPI headers commonly embed “GPL-2.0 WITH Linux-syscall-note” as an SPDX tag. This lets non-GPL software include those headers without making the whole program subject to kernel terms.
When kernel code can use LGPL identifiers
Individual kernel files may declare specific SPDX tags like LGPL-2.1 or LGPL-2.1+. Use precise identifiers where components are intended to be weaker-copyleft. That practice helps compliance tools and users read license intent at a glance.
- Keep kernel modules separate from user-space libraries to avoid mixed obligations.
- Document SPDX tags in each file and ship matching license texts with distributions.
- Remember: GPL-only exported symbols require compatible MODULE_LICENSE strings for access.
| Area | Typical tag | Effect on user code |
|---|---|---|
| UAPI headers | GPL-2.0 WITH Linux-syscall-note | Permits inclusion in non-GPL user programs |
| Kernel core files | GPL-2.0-only | Requires GPL-compatible code in-tree |
| Reusable user libraries | LGPL-2.1 / LGPL-2.1+ | Allows linking from proprietary programs if separated |
Design the stack so syscalls form the stable interface. Place weaker-copyleft libraries in user space and keep kernel modules under compatible tags. That approach protects your program and gives users clear source and license information.
SPDX license identifiers: precise labeling for driver and library code
Use clear, machine-readable labels at the top of each source file to make license terms unambiguous. This practice helps tools, auditors, and downstream users identify the applicable license quickly.
Placement and syntax: AND, OR, and WITH expressions
Place an SPDX-License-Identifier on the first commentable line of every file. Tools expect it there and CI can reject missing tags.
Use WITH for exceptions like “GPL-2.0 WITH Linux-syscall-note” on UAPI headers. Use OR when recipients may choose a license, e.g., “GPL-2.0 OR MIT.” Use AND only when both license texts apply simultaneously.
Dual licensing scenarios relevant to driver stacks
Dual licensing is common for shared code. Examples include “GPL-2.0 OR BSD-2-Clause” for dtsi or common modules that must remain flexible across projects.
- Match SPDX identifiers to the license text stored in LICENSES/.
- Label LGPL libraries consistently (e.g., “LGPL-2.1” or “LGPL-2.1+”).
- Document patterns in your contributor guide and enforce with CI checks.
| Use case | Typical SPDX | What to ship |
|---|---|---|
| UAPI headers | GPL-2.0 WITH Linux-syscall-note | Header + license text |
| Shared code | GPL-2.0 OR MIT | Both license texts in repo |
| Library sources | LGPL-2.1 / LGPL-2.1+ | Corresponding source and notices |
MODULE_LICENSE in loadable kernel modules: signals and limits
MODULE_LICENSE() informs the kernel loader and admin tools whether a module is treated as free software or proprietary. This signal affects runtime behavior, tooling, and access to exported symbols.
Common valid strings include “GPL”, “GPL v2”, “Dual MIT/GPL”, “Dual BSD/GPL”, “Dual MPL/GPL”, and “Proprietary”. Choose the tag that reflects your source and how you expect users to interact with the code.
| MODULE_LICENSE value | Effect at load | Symbol access |
|---|---|---|
| GPL / GPL v2 | Marked GPL-compatible | Can access EXPORT_SYMBOL_GPL() |
| Dual MIT/GPL | Permissive + GPL option | Depends on declared compatibility |
| Proprietary | Kernel tainted on load | Cannot use EXPORT_SYMBOL_GPL() |
Remember: MODULE_LICENSE does not replace SPDX headers. SPDX identifiers in each source file define the actual legal license terms. MODULE_LICENSE only signals the kernel’s runtime policy.
- Add MODULE_LICENSE() to every kernel module so the loader and tools get clear information.
- Proprietary modules taint the kernel and are blocked from GPL-only symbols—plan around that limit in your program.
- Document links between kernel-space code and any user-space shared library to simplify audits and support.
- Keep license texts that match SPDX tags in your repo and distribution to avoid confusion for users and reviewers.
Train engineers to update SPDX headers and MODULE_LICENSE together during refactors. That discipline prevents runtime surprises and keeps your software and source aligned with expected terms.
Distribution scenarios: proprietary products using LGPL’d libraries
Selling a closed-source product that links to a shared library is allowed—you do not need to relicense your whole program to monetize it. The weak-copyleft public license lets commercial teams ship proprietary work while protecting the library’s source and changes.
When you distribute, include the full license text and a copy of original notices. Provide the source for any modifications you made to the library so users can inspect and rebuild that component.
Commercial use without sublicensing the library code
You may sell software that links to the library without sublicensing the library itself. Keep your proprietary code separate and document the boundary between components.
Combining proprietary program code with shared libraries
Prefer dynamic linking so users can replace the library without needing your program’s source. If you choose static linking, ship relinkable objects or equivalent rebuild materials so users can relink with modified code.
- Disclose the library version and where to access its source.
- Include license files and source links in packages and app-store metadata.
- Keep a per-release compliance checklist to meet distribution requirements.
| Scenario | Must provide | Why it matters |
|---|---|---|
| Dynamic linking | License text, source link | Users can replace the library without your source |
| Static linking | Relinkable objects, build info | Enables users to rebuild the program with changed library |
| Marketplace distribution | License files in package, accessible source links | Makes compliance visible to users and reviewers |
Support customers by explaining how library updates are delivered and how they can apply changes. This approach respects the public license while preserving your ability to commercialize your program.
Case-in-point: libusbK GNU LGPL in Windows driver distribution
The libusbK package offers a clear example of shipping shared library code inside a signed Windows installer.
The Android package (version 3.0.5.17, 2013-06-17) ships as an installer that requires administrative rights and UAC acceptance. It is digitally signed by libusbK GNU LGPL, is 229.40 KB, and carries a 4.6/5 rating from 73,579 votes. Release notes recommend a restart after installation. Tools like DriverMax can automate installation and updates.
Key packaging and compliance actions are straightforward and practical. Include the full license text inside the installer and link to the exact source and any modified code. If any library parts are statically linked into the program, supply relinkable objects or rebuild instructions so users can reproduce the binary.
| Aspect | What to include | Why it matters |
|---|---|---|
| Installer | License text, source links, restart note | Shows compliance and reduces support calls |
| Signature | Publisher digital signature | Builds trust and eases enterprise rollouts |
| OS support | Windows 2000 → 11 (64-bit) | Maintains compatibility across fleets |
- Document how users can update the library independently and where to find installation information.
- Archive exact source versions alongside shipped binaries to aid audits and support.
Compliance workflow and checklists for using LGPL in drivers
Start a compliance workflow by choosing clear boundaries between your closed program and any shared libraries. A short, repeatable checklist saves time and keeps audits straightforward. Use automation where possible and make source access visible to users.
Dynamic linking as default strategy
Dynamic linking is the simplest path. It keeps a clean line between proprietary program code and the shared library. That separation lowers compliance work and lets users replace library binaries without needing your program source.
Documenting modifications and making updates available
When you modify library code, publish the corresponding source code and a changelog. Tag releases and host the complete corresponding source at a stable URL. Include relinkable objects and rebuild steps if you ever statically combine the library with the program.
Handling installation information for consumer devices
Under v3, provide clear installation information so users can reinstall modified software safely. Ship keys, scripts, or procedures as needed and mirror them to ensure long-term access for users and auditors.
| Item | Typical action | Why it matters |
|---|---|---|
| License & notices | Include LICENSE and copyright copies | Shows legal terms |
| Source access | Host complete corresponding source | Enables inspection |
| Rebuild materials | Provide object files & scripts | Required for static relinks |
LGPL vs MPL, EPL, and CDDL: weak copyleft options compared
When choosing a public license, teams often weigh file-level reciprocity against link-based safe harbors. The choice affects how your program and libraries must be shared when you ship software.
File-based copyleft vs linking-oriented safe harbors
MPL, EPL, and CDDL apply obligations at the file level. Modify a file and that file’s source must stay open under the same terms.
By contrast, the LGPL-style approach protects a library boundary and lets proprietary program parts remain separate when linked dynamically.
- File-based models suit projects that expect per-file patches and aggregation.
- Link-focused models favor broad library reuse without relicensing entire programs.
- Dual licensing can ease mixing these models in a single stack.
Patent grants across weak copyleft families
MPL, EPL, CDDL and LGPL v3 include explicit patent language that lowers IP risk for users and companies. That grant matters in commercial and device markets.
Note: EPL also has contributor defense clauses that change corporate risk calculations compared to linking-focused licenses.
| Aspect | MPL / EPL / CDDL | LGPL v3 |
|---|---|---|
| Scope | File-based reciprocity | Linking boundary; dynamic safe harbor |
| Patent grant | Explicit in each | Explicit in v3 |
| Contributor obligations | EPL may include defense duties | No contributor defense clause |
| Best fit | Per-file modification workflows | Library reuse and commercial linking |
Community, governance, and the Free Software Foundation’s guidance
Practical guidance from the Free Software Foundation helps teams translate legal text into repeatable compliance steps.
The Free Software Foundation maintains authoritative texts and explanations within the GNU Project. Their materials recommend using current license versions and explain obligations such as source access and installation information.
Following FSF guidance aligns your program’s compliance with community expectations. That makes audits easier and helps users understand their rights when they receive software that links to shared libraries.
Engage with upstream projects early. Coordinate changes to code and document terms so contributors can submit patches with fewer delays.
- Include full license texts and precise SPDX identifiers in repos.
- Publish corresponding source and clear relink instructions when needed.
- Use FSF educational materials to interpret patent and installation clauses.
| FSF action | Benefit to your work | What users get |
|---|---|---|
| Authoritative license text | Consistent compliance | Clear legal terms |
| Guidance & educational docs | Faster audits | Practical information |
| Community norms | Smoother contributions | Reliable source access |
Risks, enforcement signals, and how to avoid compliance pitfalls
Small signals matter: ambiguous headers, wrong module tags, or missing relink materials can trigger enforcement actions that start with a simple request for source access. Fixing these early keeps audits short and disputes rare.
Static linking traps and rebuild requirements
Static linking without shipping relinkable objects blocks users from exercising their rights. You must provide object files, build scripts, or equivalent instructions so someone can rebuild the program with modified code.
Keep a reproducible build log that records exact source commits, toolchain versions, and linker flags. That information speeds responses to user requests and lowers enforcement risk.
Ambiguous licensing headers without SPDX tags
Missing or boilerplate headers confuse automated scanners and reviewers. Add precise SPDX identifiers to each file and include full license text and original copyright copies in your release.
MODULE_LICENSE must match actual license terms. If it does not, kernel modules can lose access to GPL-only symbols or taint the running kernel—both are avoidable with accurate tags.
- Do not ship static binaries without relink materials and rebuild steps.
- Include LICENSE and a copy of original notices in packages.
- Use clear SPDX tags and validate them with CI checks.
- Map dependencies to avoid incompatible licenses that break symbol access.
- Train teams to respond quickly to source access requests.
| Risk | Signal | Required action | Why it matters |
|---|---|---|---|
| Static linking | No relink objects | Provide object files and build steps | Enables users to rebuild the program |
| Ambiguous headers | Missing SPDX | Add SPDX identifiers and full license text | Tools and auditors can validate licenses |
| Module mismatch | Wrong MODULE_LICENSE | Sync module tag with source license | Preserves symbol access and avoids taint |
Looking ahead: the role of LGPL as permissive licenses gain ground
The trend toward permissive licensing raises practical questions about how weak copyleft fits modern distribution models.
Weak copyleft keeps library work open while letting separate program code stay under other terms. That balance helps teams ship commercial products and still give users access to source and modification rights.
v3 brought installation info and an explicit patent grant that protects contributors and downstream users. Document patent scope and confirm the grant suits your risk profile.
Make dynamic linking the default. When static linking occurs, publish relinkable objects, build steps, and clear installation notes so users can rebuild and verify changes.
