aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Rini2018-05-08 10:34:36 -0500
committerTom Rini2018-05-23 16:30:02 -0500
commitd405dae374d9d342fb9aa3fa231e2189ae025914 (patch)
tree8b0f47bce0eff674187c2921d6d083cb15883eb0 /Licenses
parent5a7b11e65a54ab9f82bb08bfc402aa4ca1aa3a78 (diff)
downloadu-boot-d405dae374d9d342fb9aa3fa231e2189ae025914.tar.gz
u-boot-d405dae374d9d342fb9aa3fa231e2189ae025914.tar.xz
u-boot-d405dae374d9d342fb9aa3fa231e2189ae025914.zip
Licenses/README: Update some style and add explicit license to the document
- Add an SPDX license tag to the file, saying it's GPL-2.0. - From the Linux Kernel v4.17-rc4, import the "License identifier syntax" section as-is from Documentation/process/license-rules.rst and then change it to be clearer about examples from the Linux Kernel vs examples found in U-Boot, and when we're talking about U-Boot. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'Licenses')
-rw-r--r--Licenses/README102
1 files changed, 92 insertions, 10 deletions
diff --git a/Licenses/README b/Licenses/README
index 5ad921ddfc..486e18d0d8 100644
--- a/Licenses/README
+++ b/Licenses/README
@@ -1,3 +1,5 @@
1SPDX-License-Identifier: GPL-2.0
2
1 U-Boot is Free Software. It is copyrighted by Wolfgang Denk and 3 U-Boot is Free Software. It is copyrighted by Wolfgang Denk and
2many others who contributed code (see the actual source code and the 4many others who contributed code (see the actual source code and the
3git commit messages for details). You can redistribute U-Boot and/or 5git commit messages for details). You can redistribute U-Boot and/or
@@ -31,27 +33,107 @@ information, ...) which makes automatic processing a nightmare.
31 33
32To make this easier, such license headers in the source files will be 34To make this easier, such license headers in the source files will be
33replaced with a single line reference to Unique License Identifiers 35replaced with a single line reference to Unique License Identifiers
34as defined by the Linux Foundation's SPDX project [1]. For example, 36as defined by the Linux Foundation's SPDX project [1].
35in a source file the full "GPL v2.0 or later" header text will be
36replaced by a single line:
37
38 SPDX-License-Identifier: GPL-2.0+
39
40Ideally, the license terms of all files in the source tree should be
41defined by such License Identifiers; in no case a file can contain
42more than one such License Identifier list.
43 37
44If a "SPDX-License-Identifier:" line references more than one Unique 38If a "SPDX-License-Identifier:" line references more than one Unique
45License Identifier, then this means that the respective file can be 39License Identifier, then this means that the respective file can be
46used under the terms of either of these licenses, i. e. with 40used under the terms of either of these licenses, i. e. with
47 41
48 SPDX-License-Identifier: GPL-2.0+ BSD-3-Clause 42 SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
49 43
50you can choose between GPL-2.0+ and BSD-3-Clause licensing. 44you can choose between GPL-2.0+ and BSD-3-Clause licensing.
51 45
52We use the SPDX Unique License Identifiers here; these are available 46We use the SPDX Unique License Identifiers here; these are available
53at [2]. 47at [2].
54 48
49License identifier syntax
50-------------------------
51
521. Placement:
53
54 The SPDX license identifier in U-Boot files shall be added at the first
55 possible line in a file which can contain a comment. For the majority
56 or files this is the first line, except for scripts which require the
57 '#!PATH_TO_INTERPRETER' in the first line. For those scripts the SPDX
58 identifier goes into the second line.
59
60|
61
622. Style:
63
64 The SPDX license identifier is added in form of a comment. The comment
65 style depends on the file type::
66
67 C source: // SPDX-License-Identifier: <SPDX License Expression>
68 C header: /* SPDX-License-Identifier: <SPDX License Expression> */
69 ASM: /* SPDX-License-Identifier: <SPDX License Expression> */
70 scripts: # SPDX-License-Identifier: <SPDX License Expression>
71 .rst: .. SPDX-License-Identifier: <SPDX License Expression>
72 .dts{i}: // SPDX-License-Identifier: <SPDX License Expression>
73
74 If a specific tool cannot handle the standard comment style, then the
75 appropriate comment mechanism which the tool accepts shall be used. This
76 is the reason for having the "/\* \*/" style comment in C header
77 files. There was build breakage observed with generated .lds files where
78 'ld' failed to parse the C++ comment. This has been fixed by now, but
79 there are still older assembler tools which cannot handle C++ style
80 comments.
81
82|
83
843. Syntax:
85
86 A <SPDX License Expression> is either an SPDX short form license
87 identifier found on the SPDX License List, or the combination of two
88 SPDX short form license identifiers separated by "WITH" when a license
89 exception applies. When multiple licenses apply, an expression consists
90 of keywords "AND", "OR" separating sub-expressions and surrounded by
91 "(", ")" .
92
93 License identifiers for licenses like [L]GPL with the 'or later' option
94 are constructed by using a "+" for indicating the 'or later' option.::
95
96 // SPDX-License-Identifier: GPL-2.0+
97 // SPDX-License-Identifier: LGPL-2.1+
98
99 WITH should be used when there is a modifier to a license needed.
100 For example, the linux kernel UAPI files use the expression::
101
102 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
103 // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
104
105 Other examples using WITH exceptions found in the linux kernel are::
106
107 // SPDX-License-Identifier: GPL-2.0 WITH mif-exception
108 // SPDX-License-Identifier: GPL-2.0+ WITH GCC-exception-2.0
109
110 Exceptions can only be used with particular License identifiers. The
111 valid License identifiers are listed in the tags of the exception text
112 file.
113
114 OR should be used if the file is dual licensed and only one license is
115 to be selected. For example, some dtsi files are available under dual
116 licenses::
117
118 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
119
120 Examples from U-Boot for license expressions in dual licensed files::
121
122 // SPDX-License-Identifier: GPL-2.0 OR MIT
123 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
124
125 AND should be used if the file has multiple licenses whose terms all
126 apply to use the file. For example, if code is inherited from another
127 project and permission has been given to put it in U-Boot, but the
128 original license terms need to remain in effect::
129
130 // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) AND MIT
131
132 Another other example where both sets of license terms need to be
133 adhered to is::
134
135 // SPDX-License-Identifier: GPL-1.0+ AND LGPL-2.1+
136
55[1] http://spdx.org/ 137[1] http://spdx.org/
56[2] http://spdx.org/licenses/ 138[2] http://spdx.org/licenses/
57 139