Skip to contentSkip to conversation

tools/file2include: create Linux style SPDX header

PATCH New Heinrich Schuchardt 3 participants 4 messages May 7, 2018 – May 11, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/file2include: create Linux style SPDX header

file2include is used to convert a binary file to a C include. With the patch the SPDX header is written to the first line as expected by scripts/checkpatch.pl.

Cf. https://www.kernel.org/doc/html/v4.16/process/license-rules.html

---
 tools/file2include.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/file2include.c +1 -2
index 7ca45c8339a..e602f937f15 100644
@@ -62,12 +62,11 @@ int main(int argc, char *argv[])
 	count = fread(buf, 1, count, file);
 
 	/* Generate output */
+	printf("/* SPDX-License-Identifier: GPL-2.0+ */\n");
 	printf("/*\n");
 	printf(" *  Non-zero %u byte strings of a disk image\n", BLOCK_SIZE);
 	printf(" *\n");
 	printf(" *  Generated with tools/file2include\n");
-	printf(" *\n");
-	printf(" *  SPDX-License-Identifier:	GPL-2.0+\n");
 	printf(" */\n\n");
 	printf("#define EFI_ST_DISK_IMG { 0x%08zx, { \\\n", count);
 
Signature · 1 line
2.17.0
#2 lore raw

PATCH 1/1 tools/file2include: create Linux style SPDX header

In reply to Heinrich Schuchardt
Quoted 7 lines · Heinrich Schuchardt

file2include is used to convert a binary file to a C include. With the patch the SPDX header is written to the first line as expected by scripts/checkpatch.pl.

Cf. https://www.kernel.org/doc/html/v4.16/process/license-rules.html

And I'll drop this hunk from my follow-up patch, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180507/2c4b00b7/attachment.sig>
#3 lore raw

PATCH 1/1 tools/file2include: create Linux style SPDX header

In reply to Heinrich Schuchardt
Quoted 9 lines · Heinrich Schuchardt

file2include is used to convert a binary file to a C include. With the patch the SPDX header is written to the first line as expected by scripts/checkpatch.pl.

Cf. https://www.kernel.org/doc/html/v4.16/process/license-rules.html

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180511/ec8dcbec/attachment.sig>