Skip to content

drivers: change old license headers to SPDX format #21516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

N11cc00
Copy link
Contributor

@N11cc00 N11cc00 commented May 28, 2025

Contribution description

This draft attempts to convert all license headers for all files inside the drivers/ directory. Vendor specific files are left untouched as well as some files missing some copyright or license information.

At the moment, only *.c and *.h files are touched but other files like .Kconfig also posses copyright information. These need to be changed, too, before this PR can be merged.

The LICENSE file had to be moved to the LICENSE/ sub-directory and was renamed to the exact license name so that SPDX parsers can pick it up.

I have manually edited a handful of files but there are still some left to fix. See below.

Testing procedure

To check for correct license/copyright information in all c and h files that are not vendor provided, use this command:

reuse lint -l | grep "^drivers/" | grep -E '\.(c|h):' | grep -v "/vendor/"

this produces the following lines:

drivers/lis2dh12/include/lis2dh12_registers.h: bad license NONE
drivers/lis2dh12/include/lis2dh12_registers.h: missing license NONE
drivers/include/stm32_eth.h: no license identifier
drivers/mrf24j40/mrf24j40_radio_hal.c: no license identifier
drivers/kw41zrf/kw41zrf_xcvr.c: no license identifier
drivers/kw2xrf/include/overwrites.h: no license identifier
drivers/kw2xrf/include/kw2xrf_reg.h: no license identifier
drivers/sht2x/include/sht2x_params.h: no license identifier
drivers/include/stm32_eth.h: no copyright notice
drivers/mrf24j40/mrf24j40_radio_hal.c: no copyright notice

Some of these have either other licenses provided by companies or are simply missing some information.

  • lis2dh12_registers.h had no license, only copyright. I set the license to NONE for the time being.
  • stm32_eth.h and mrf24j40_radio_hal.c have no header at all.
  • overwrites.h has its own copyright information by Freescale Semiconductor, Inc.
  • kw41zrf_xcvr.c has a BSD license
  • kw2xrf_reg.h has a mixed license LGPL and Freescale Semiconductor, Inc.

Issues/PRs references

Tracking #21515

@github-actions github-actions bot added Area: doc Area: Documentation Area: drivers Area: Device drivers Area: LoRa Area: LoRa radio support Area: SAUL Area: Sensor/Actuator Uber Layer labels May 28, 2025
@N11cc00 N11cc00 changed the title drivers: change old licesene headers to SPDX format drivers: change old license headers to SPDX format May 28, 2025
@maribu maribu added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 28, 2025
@riot-ci
Copy link

riot-ci commented May 28, 2025

Murdock results

✔️ PASSED

5e7db27 drivers: manual fixes

Success Failures Total Runtime
10383 0 10383 13m:23s

Artifacts

@N11cc00 N11cc00 marked this pull request as draft May 28, 2025 13:43
@crasbe crasbe added the Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation Area: drivers Area: Device drivers Area: LoRa Area: LoRa radio support Area: SAUL Area: Sensor/Actuator Uber Layer CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants