From 2a2c78aeeaa16e8847907a68d21992e083c47fb7 Mon Sep 17 00:00:00 2001 From: Nicholas Chin Date: Sun, 23 Jun 2024 10:15:47 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83184 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Angel Pons --- util/autoport/azalia.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/autoport/azalia.go') diff --git a/util/autoport/azalia.go b/util/autoport/azalia.go index 6dd78b1e62..1540398281 100644 --- a/util/autoport/azalia.go +++ b/util/autoport/azalia.go @@ -12,7 +12,7 @@ func (i azalia) Scan(ctx Context, addr PCIDevData) { az := Create(ctx, "hda_verb.c") defer az.Close() - Add_gpl(az) + Add_SPDX(az, C, GPL2_only) az.WriteString( `#include -- cgit v1.2.3