1*d405dae3STom RiniSPDX-License-Identifier: GPL-2.0 2*d405dae3STom Rini 3eca3aeb3SWolfgang Denk U-Boot is Free Software. It is copyrighted by Wolfgang Denk and 4eca3aeb3SWolfgang Denkmany others who contributed code (see the actual source code and the 5eca3aeb3SWolfgang Denkgit commit messages for details). You can redistribute U-Boot and/or 6eca3aeb3SWolfgang Denkmodify it under the terms of version 2 of the GNU General Public 7eca3aeb3SWolfgang DenkLicense as published by the Free Software Foundation. Most of it can 8eca3aeb3SWolfgang Denkalso be distributed, at your option, under any later version of the 9eca3aeb3SWolfgang DenkGNU General Public License -- see individual files for exceptions. 10eca3aeb3SWolfgang Denk 11eca3aeb3SWolfgang Denk NOTE! This license does *not* cover the so-called "standalone" 12eca3aeb3SWolfgang Denkapplications that use U-Boot services by means of the jump table 13eca3aeb3SWolfgang Denkprovided by U-Boot exactly for this purpose - this is merely 14eca3aeb3SWolfgang Denkconsidered normal use of U-Boot, and does *not* fall under the 15eca3aeb3SWolfgang Denkheading of "derived work" -- see file Licenses/Exceptions for 16eca3aeb3SWolfgang Denkdetails. 17eca3aeb3SWolfgang Denk 18eca3aeb3SWolfgang Denk Also note that the GPL and the other licenses are copyrighted by 19eca3aeb3SWolfgang Denkthe Free Software Foundation and other organizations, but the 20eca3aeb3SWolfgang Denkinstance of code that they refer to (the U-Boot source code) is 21eca3aeb3SWolfgang Denkcopyrighted by me and others who actually wrote it. 22eca3aeb3SWolfgang Denk-- Wolfgang Denk 23eca3aeb3SWolfgang Denk 24eca3aeb3SWolfgang Denk 25eca3aeb3SWolfgang DenkLike many other projects, U-Boot has a tradition of including big 26eca3aeb3SWolfgang Denkblocks of License headers in all files. This not only blows up the 27eca3aeb3SWolfgang Denksource code with mostly redundant information, but also makes it very 28eca3aeb3SWolfgang Denkdifficult to generate License Clearing Reports. An additional problem 29eca3aeb3SWolfgang Denkis that even the same licenses are referred to by a number of 30eca3aeb3SWolfgang Denkslightly varying text blocks (full, abbreviated, different 31eca3aeb3SWolfgang Denkindentation, line wrapping and/or white space, with obsolete address 32eca3aeb3SWolfgang Denkinformation, ...) which makes automatic processing a nightmare. 33eca3aeb3SWolfgang Denk 34eca3aeb3SWolfgang DenkTo make this easier, such license headers in the source files will be 35eca3aeb3SWolfgang Denkreplaced with a single line reference to Unique License Identifiers 36*d405dae3STom Rinias defined by the Linux Foundation's SPDX project [1]. 3717fd36c1SWolfgang Denk 3817fd36c1SWolfgang DenkIf a "SPDX-License-Identifier:" line references more than one Unique 3917fd36c1SWolfgang DenkLicense Identifier, then this means that the respective file can be 4017fd36c1SWolfgang Denkused under the terms of either of these licenses, i. e. with 4117fd36c1SWolfgang Denk 42*d405dae3STom Rini SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause 4317fd36c1SWolfgang Denk 444dcd9a65SMasahiro Yamadayou can choose between GPL-2.0+ and BSD-3-Clause licensing. 4517fd36c1SWolfgang Denk 46eca3aeb3SWolfgang DenkWe use the SPDX Unique License Identifiers here; these are available 47eca3aeb3SWolfgang Denkat [2]. 48eca3aeb3SWolfgang Denk 49*d405dae3STom RiniLicense identifier syntax 50*d405dae3STom Rini------------------------- 51*d405dae3STom Rini 52*d405dae3STom Rini1. Placement: 53*d405dae3STom Rini 54*d405dae3STom Rini The SPDX license identifier in U-Boot files shall be added at the first 55*d405dae3STom Rini possible line in a file which can contain a comment. For the majority 56*d405dae3STom Rini or files this is the first line, except for scripts which require the 57*d405dae3STom Rini '#!PATH_TO_INTERPRETER' in the first line. For those scripts the SPDX 58*d405dae3STom Rini identifier goes into the second line. 59*d405dae3STom Rini 60*d405dae3STom Rini| 61*d405dae3STom Rini 62*d405dae3STom Rini2. Style: 63*d405dae3STom Rini 64*d405dae3STom Rini The SPDX license identifier is added in form of a comment. The comment 65*d405dae3STom Rini style depends on the file type:: 66*d405dae3STom Rini 67*d405dae3STom Rini C source: // SPDX-License-Identifier: <SPDX License Expression> 68*d405dae3STom Rini C header: /* SPDX-License-Identifier: <SPDX License Expression> */ 69*d405dae3STom Rini ASM: /* SPDX-License-Identifier: <SPDX License Expression> */ 70*d405dae3STom Rini scripts: # SPDX-License-Identifier: <SPDX License Expression> 71*d405dae3STom Rini .rst: .. SPDX-License-Identifier: <SPDX License Expression> 72*d405dae3STom Rini .dts{i}: // SPDX-License-Identifier: <SPDX License Expression> 73*d405dae3STom Rini 74*d405dae3STom Rini If a specific tool cannot handle the standard comment style, then the 75*d405dae3STom Rini appropriate comment mechanism which the tool accepts shall be used. This 76*d405dae3STom Rini is the reason for having the "/\* \*/" style comment in C header 77*d405dae3STom Rini files. There was build breakage observed with generated .lds files where 78*d405dae3STom Rini 'ld' failed to parse the C++ comment. This has been fixed by now, but 79*d405dae3STom Rini there are still older assembler tools which cannot handle C++ style 80*d405dae3STom Rini comments. 81*d405dae3STom Rini 82*d405dae3STom Rini| 83*d405dae3STom Rini 84*d405dae3STom Rini3. Syntax: 85*d405dae3STom Rini 86*d405dae3STom Rini A <SPDX License Expression> is either an SPDX short form license 87*d405dae3STom Rini identifier found on the SPDX License List, or the combination of two 88*d405dae3STom Rini SPDX short form license identifiers separated by "WITH" when a license 89*d405dae3STom Rini exception applies. When multiple licenses apply, an expression consists 90*d405dae3STom Rini of keywords "AND", "OR" separating sub-expressions and surrounded by 91*d405dae3STom Rini "(", ")" . 92*d405dae3STom Rini 93*d405dae3STom Rini License identifiers for licenses like [L]GPL with the 'or later' option 94*d405dae3STom Rini are constructed by using a "+" for indicating the 'or later' option.:: 95*d405dae3STom Rini 96*d405dae3STom Rini // SPDX-License-Identifier: GPL-2.0+ 97*d405dae3STom Rini // SPDX-License-Identifier: LGPL-2.1+ 98*d405dae3STom Rini 99*d405dae3STom Rini WITH should be used when there is a modifier to a license needed. 100*d405dae3STom Rini For example, the linux kernel UAPI files use the expression:: 101*d405dae3STom Rini 102*d405dae3STom Rini // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 103*d405dae3STom Rini // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note 104*d405dae3STom Rini 105*d405dae3STom Rini Other examples using WITH exceptions found in the linux kernel are:: 106*d405dae3STom Rini 107*d405dae3STom Rini // SPDX-License-Identifier: GPL-2.0 WITH mif-exception 108*d405dae3STom Rini // SPDX-License-Identifier: GPL-2.0+ WITH GCC-exception-2.0 109*d405dae3STom Rini 110*d405dae3STom Rini Exceptions can only be used with particular License identifiers. The 111*d405dae3STom Rini valid License identifiers are listed in the tags of the exception text 112*d405dae3STom Rini file. 113*d405dae3STom Rini 114*d405dae3STom Rini OR should be used if the file is dual licensed and only one license is 115*d405dae3STom Rini to be selected. For example, some dtsi files are available under dual 116*d405dae3STom Rini licenses:: 117*d405dae3STom Rini 118*d405dae3STom Rini // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 119*d405dae3STom Rini 120*d405dae3STom Rini Examples from U-Boot for license expressions in dual licensed files:: 121*d405dae3STom Rini 122*d405dae3STom Rini // SPDX-License-Identifier: GPL-2.0 OR MIT 123*d405dae3STom Rini // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause 124*d405dae3STom Rini 125*d405dae3STom Rini AND should be used if the file has multiple licenses whose terms all 126*d405dae3STom Rini apply to use the file. For example, if code is inherited from another 127*d405dae3STom Rini project and permission has been given to put it in U-Boot, but the 128*d405dae3STom Rini original license terms need to remain in effect:: 129*d405dae3STom Rini 130*d405dae3STom Rini // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) AND MIT 131*d405dae3STom Rini 132*d405dae3STom Rini Another other example where both sets of license terms need to be 133*d405dae3STom Rini adhered to is:: 134*d405dae3STom Rini 135*d405dae3STom Rini // SPDX-License-Identifier: GPL-1.0+ AND LGPL-2.1+ 136*d405dae3STom Rini 137eca3aeb3SWolfgang Denk[1] http://spdx.org/ 138eca3aeb3SWolfgang Denk[2] http://spdx.org/licenses/ 139eca3aeb3SWolfgang Denk 140eca3aeb3SWolfgang DenkFull name SPDX Identifier OSI Approved File name URI 141eca3aeb3SWolfgang Denk======================================================================================================================================= 142eca3aeb3SWolfgang DenkGNU General Public License v2.0 only GPL-2.0 Y gpl-2.0.txt http://www.gnu.org/licenses/gpl-2.0.txt 143eca3aeb3SWolfgang DenkGNU General Public License v2.0 or later GPL-2.0+ Y gpl-2.0.txt http://www.gnu.org/licenses/gpl-2.0.txt 144a53002f4SWolfgang DenkGNU Library General Public License v2 or later LGPL-2.0+ Y lgpl-2.0.txt http://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt 145eee479cfSWolfgang DenkGNU Lesser General Public License v2.1 or later LGPL-2.1+ Y lgpl-2.1.txt http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt 146e85427fdSWolfgang DenkeCos license version 2.0 eCos-2.0 eCos-2.0.txt http://www.gnu.org/licenses/ecos-license.html 147cb3761eaSWolfgang DenkBSD 2-Clause License BSD-2-Clause Y bsd-2-clause.txt http://spdx.org/licenses/BSD-2-Clause 148cb3761eaSWolfgang DenkBSD 3-clause "New" or "Revised" License BSD-3-Clause Y bsd-3-clause.txt http://spdx.org/licenses/BSD-3-Clause#licenseText 1491b387ef5SWolfgang DenkIBM PIBS (PowerPC Initialization and IBM-pibs ibm-pibs.txt 15046263f2dSWolfgang Denk Boot Software) license 151c25a1784SMasahiro YamadaISC License ISC Y isc.txt https://spdx.org/licenses/ISC 1520f4d2f8eSSimon GlassSIL OPEN FONT LICENSE (OFL-1.1) OFL-1.1 Y OFL.txt https://spdx.org/licenses/OFL-1.1.html 15340a39e87SMasahiro YamadaX11 License X11 x11.txt https://spdx.org/licenses/X11.html 154