diff options
author | Nicholas Chin <nic.c3.14@gmail.com> | 2024-06-23 10:15:47 -0600 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-09-13 14:18:48 +0000 |
commit | 2a2c78aeeaa16e8847907a68d21992e083c47fb7 (patch) | |
tree | 38cbe57495babe7c1346e525a2f87c336e1dd3db /util/autoport/ec_fixme.go | |
parent | c421ed6f819ac3140176a0c347d7fa6778465f9a (diff) |
util/autoport: Make printing of SPDX headers generic
Previously, Add_gpl() was only used with C and ASL source code files,
and was hard coded to use the C /* */ style comment, preventing it from
being used with files with other comment styles. Convert this into a
generic function for adding arbitrary SPDX license identifiers for
arbitrary filetypes. This replaces the hard coded GPL-2.0-or-later
string used in gma-mainboard.ads with a call to the new function.
This is also used to add SPDX headers to Kconfig and Makefile sources;
as previous commits added them to all such files in the tree.
Tested against logs from a Latitude E6430 (Ivy Bridge) and Precision
M6800 (Haswell) to check that license headers that were already being
generated did not change.
Change-Id: I24a1ccd0afb7045e878bf6eaae7a23f828a9240d
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83184
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'util/autoport/ec_fixme.go')
-rw-r--r-- | util/autoport/ec_fixme.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/autoport/ec_fixme.go b/util/autoport/ec_fixme.go index 54f78ab432..e0a6554016 100644 --- a/util/autoport/ec_fixme.go +++ b/util/autoport/ec_fixme.go @@ -19,7 +19,7 @@ func FIXMEEC(ctx Context) { SouthBridge.EnableGPE(SouthBridge.DecodeGPE(sbGPE)) } - Add_gpl(ap) + Add_SPDX(ap, ASL, GPL2_only) ap.WriteString( `Method(_WAK, 1) { @@ -65,7 +65,7 @@ Method(_PTS,1) defer si.Close() if hasKeyboard { - Add_gpl(si) + Add_SPDX(si, ASL, GPL2_only) si.WriteString("#include <drivers/pc80/pc/ps2_controller.asl>\n") MainboardInit += fmt.Sprintf("\tpc_keyboard_init(NO_AUX_DEVICE);\n") MainboardIncludes = append(MainboardIncludes, "pc80/keyboard.h") @@ -74,7 +74,7 @@ Method(_PTS,1) ec := Create(ctx, "acpi/ec.asl") defer ec.Close() - Add_gpl(ec) + Add_SPDX(ec, ASL, GPL2_only) ec.WriteString(`Device(EC) { Name (_HID, EISAID("PNP0C09")) |