Tom Rini | d405dae | 2018-05-08 11:34:36 -0400 | [diff] [blame] | 1 | SPDX-License-Identifier: GPL-2.0 |
| 2 | |
Wolfgang Denk | eca3aeb | 2013-06-21 10:22:36 +0200 | [diff] [blame] | 3 | U-Boot is Free Software. It is copyrighted by Wolfgang Denk and |
| 4 | many others who contributed code (see the actual source code and the |
| 5 | git commit messages for details). You can redistribute U-Boot and/or |
| 6 | modify it under the terms of version 2 of the GNU General Public |
| 7 | License as published by the Free Software Foundation. Most of it can |
| 8 | also be distributed, at your option, under any later version of the |
| 9 | GNU General Public License -- see individual files for exceptions. |
| 10 | |
| 11 | NOTE! This license does *not* cover the so-called "standalone" |
| 12 | applications that use U-Boot services by means of the jump table |
| 13 | provided by U-Boot exactly for this purpose - this is merely |
| 14 | considered normal use of U-Boot, and does *not* fall under the |
| 15 | heading of "derived work" -- see file Licenses/Exceptions for |
| 16 | details. |
| 17 | |
| 18 | Also note that the GPL and the other licenses are copyrighted by |
| 19 | the Free Software Foundation and other organizations, but the |
| 20 | instance of code that they refer to (the U-Boot source code) is |
| 21 | copyrighted by me and others who actually wrote it. |
| 22 | -- Wolfgang Denk |
| 23 | |
| 24 | |
| 25 | Like many other projects, U-Boot has a tradition of including big |
| 26 | blocks of License headers in all files. This not only blows up the |
| 27 | source code with mostly redundant information, but also makes it very |
| 28 | difficult to generate License Clearing Reports. An additional problem |
| 29 | is that even the same licenses are referred to by a number of |
| 30 | slightly varying text blocks (full, abbreviated, different |
| 31 | indentation, line wrapping and/or white space, with obsolete address |
| 32 | information, ...) which makes automatic processing a nightmare. |
| 33 | |
| 34 | To make this easier, such license headers in the source files will be |
| 35 | replaced with a single line reference to Unique License Identifiers |
Tom Rini | d405dae | 2018-05-08 11:34:36 -0400 | [diff] [blame] | 36 | as defined by the Linux Foundation's SPDX project [1]. |
Wolfgang Denk | 17fd36c | 2013-10-08 21:53:45 +0200 | [diff] [blame] | 37 | |
| 38 | If a "SPDX-License-Identifier:" line references more than one Unique |
| 39 | License Identifier, then this means that the respective file can be |
| 40 | used under the terms of either of these licenses, i. e. with |
| 41 | |
Tom Rini | d405dae | 2018-05-08 11:34:36 -0400 | [diff] [blame] | 42 | SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
Wolfgang Denk | 17fd36c | 2013-10-08 21:53:45 +0200 | [diff] [blame] | 43 | |
Masahiro Yamada | 4dcd9a6 | 2015-04-17 10:20:43 +0900 | [diff] [blame] | 44 | you can choose between GPL-2.0+ and BSD-3-Clause licensing. |
Wolfgang Denk | 17fd36c | 2013-10-08 21:53:45 +0200 | [diff] [blame] | 45 | |
Wolfgang Denk | eca3aeb | 2013-06-21 10:22:36 +0200 | [diff] [blame] | 46 | We use the SPDX Unique License Identifiers here; these are available |
| 47 | at [2]. |
| 48 | |
Tom Rini | d405dae | 2018-05-08 11:34:36 -0400 | [diff] [blame] | 49 | License identifier syntax |
| 50 | ------------------------- |
| 51 | |
| 52 | 1. 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 | |
| 62 | 2. 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 | |
| 84 | 3. 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 | |
Wolfgang Denk | eca3aeb | 2013-06-21 10:22:36 +0200 | [diff] [blame] | 137 | [1] http://spdx.org/ |
| 138 | [2] http://spdx.org/licenses/ |
| 139 | |
Roger Meier | 3508476 | 2013-07-27 01:12:38 +0200 | [diff] [blame] | 140 | Full name SPDX Identifier OSI Approved File name URI |
Wolfgang Denk | eca3aeb | 2013-06-21 10:22:36 +0200 | [diff] [blame] | 141 | ======================================================================================================================================= |
Roger Meier | 3508476 | 2013-07-27 01:12:38 +0200 | [diff] [blame] | 142 | GNU General Public License v2.0 only GPL-2.0 Y gpl-2.0.txt http://www.gnu.org/licenses/gpl-2.0.txt |
| 143 | GNU General Public License v2.0 or later GPL-2.0+ Y gpl-2.0.txt http://www.gnu.org/licenses/gpl-2.0.txt |
| 144 | GNU 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 |
| 145 | GNU 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 |
| 146 | eCos license version 2.0 eCos-2.0 eCos-2.0.txt http://www.gnu.org/licenses/ecos-license.html |
Wolfgang Denk | cb3761e | 2013-07-28 22:12:47 +0200 | [diff] [blame] | 147 | BSD 2-Clause License BSD-2-Clause Y bsd-2-clause.txt http://spdx.org/licenses/BSD-2-Clause |
| 148 | BSD 3-clause "New" or "Revised" License BSD-3-Clause Y bsd-3-clause.txt http://spdx.org/licenses/BSD-3-Clause#licenseText |
Wolfgang Denk | 1b387ef | 2013-09-17 11:24:06 +0200 | [diff] [blame] | 149 | IBM PIBS (PowerPC Initialization and IBM-pibs ibm-pibs.txt |
Wolfgang Denk | 46263f2 | 2013-07-28 22:12:45 +0200 | [diff] [blame] | 150 | Boot Software) license |
Masahiro Yamada | c25a178 | 2014-09-01 19:57:36 +0900 | [diff] [blame] | 151 | ISC License ISC Y isc.txt https://spdx.org/licenses/ISC |
Simon Glass | 0f4d2f8 | 2016-01-14 18:10:47 -0700 | [diff] [blame] | 152 | SIL OPEN FONT LICENSE (OFL-1.1) OFL-1.1 Y OFL.txt https://spdx.org/licenses/OFL-1.1.html |
Masahiro Yamada | 40a39e8 | 2015-04-21 13:39:27 +0900 | [diff] [blame] | 153 | X11 License X11 x11.txt https://spdx.org/licenses/X11.html |