Skip to content

drivers: change old license headers to SPDX format#21516

Closed
N11cc00 wants to merge 1 commit intoRIOT-OS:masterfrom
N11cc00:spdx-drivers
Closed

drivers: change old license headers to SPDX format#21516
N11cc00 wants to merge 1 commit intoRIOT-OS:masterfrom
N11cc00:spdx-drivers

Conversation

@N11cc00
Copy link
Copy Markdown
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
Copy Markdown

riot-ci commented May 28, 2025

Murdock results

FAILED

5e12b9f drivers: bulk of files changed to SPDX format

Test failures (2)
Application Target Toolchain Runtime (s) Worker
tests/net/gnrc_ipv6_fwd_w_sub native32 llvm 0.00 mobi6
tests/sys/xtimer_usleep_short native64 gnu 0.00 mobi6

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
@github-actions github-actions bot added Area: Kconfig Area: Kconfig integration and removed Area: doc Area: Documentation labels Sep 5, 2025
@crasbe crasbe added the State: waiting for author State: Action by the author of the PR is required label Feb 24, 2026
@crasbe crasbe added the State: needs rebase State: The codebase was changed since the creation of the PR, making a rebase necessary label Feb 24, 2026
@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Feb 24, 2026

@N11cc00 ping 👀

@N11cc00
Copy link
Copy Markdown
Contributor Author

N11cc00 commented Mar 5, 2026

I am looking into this

@crasbe crasbe added CI: no fast fail don't abort PR build after first error and removed State: waiting for author State: Action by the author of the PR is required State: needs rebase State: The codebase was changed since the creation of the PR, making a rebase necessary labels Mar 5, 2026
@N11cc00
Copy link
Copy Markdown
Contributor Author

N11cc00 commented Mar 31, 2026

This PR is split up into multiple smaller ones to ease the burden on the reviewer. The first PR is #22162.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers Area: Kconfig Area: Kconfig integration Area: LoRa Area: LoRa radio support Area: SAUL Area: Sensor/Actuator Uber Layer CI: no fast fail don't abort PR build after first error 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