README 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. SPDX-License-Identifier: GPL-2.0
  2. U-Boot is Free Software. It is copyrighted by Wolfgang Denk and
  3. many others who contributed code (see the actual source code and the
  4. git commit messages for details). You can redistribute U-Boot and/or
  5. modify it under the terms of version 2 of the GNU General Public
  6. License as published by the Free Software Foundation. Most of it can
  7. also be distributed, at your option, under any later version of the
  8. GNU General Public License -- see individual files for exceptions.
  9. NOTE! This license does *not* cover the so-called "standalone"
  10. applications that use U-Boot services by means of the jump table
  11. provided by U-Boot exactly for this purpose - this is merely
  12. considered normal use of U-Boot, and does *not* fall under the
  13. heading of "derived work" -- see file Licenses/Exceptions for
  14. details.
  15. Also note that the GPL and the other licenses are copyrighted by
  16. the Free Software Foundation and other organizations, but the
  17. instance of code that they refer to (the U-Boot source code) is
  18. copyrighted by me and others who actually wrote it.
  19. -- Wolfgang Denk
  20. Like many other projects, U-Boot has a tradition of including big
  21. blocks of License headers in all files. This not only blows up the
  22. source code with mostly redundant information, but also makes it very
  23. difficult to generate License Clearing Reports. An additional problem
  24. is that even the same licenses are referred to by a number of
  25. slightly varying text blocks (full, abbreviated, different
  26. indentation, line wrapping and/or white space, with obsolete address
  27. information, ...) which makes automatic processing a nightmare.
  28. To make this easier, such license headers in the source files will be
  29. replaced with a single line reference to Unique License Identifiers
  30. as defined by the Linux Foundation's SPDX project [1].
  31. If a "SPDX-License-Identifier:" line references more than one Unique
  32. License Identifier, then this means that the respective file can be
  33. used under the terms of either of these licenses, i. e. with
  34. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
  35. you can choose between GPL-2.0+ and BSD-3-Clause licensing.
  36. We use the SPDX Unique License Identifiers here; these are available
  37. at [2].
  38. License identifier syntax
  39. -------------------------
  40. 1. Placement:
  41. The SPDX license identifier in U-Boot files shall be added at the first
  42. possible line in a file which can contain a comment. For the majority
  43. or files this is the first line, except for scripts which require the
  44. '#!PATH_TO_INTERPRETER' in the first line. For those scripts the SPDX
  45. identifier goes into the second line.
  46. |
  47. 2. Style:
  48. The SPDX license identifier is added in form of a comment. The comment
  49. style depends on the file type::
  50. C source: // SPDX-License-Identifier: <SPDX License Expression>
  51. C header: /* SPDX-License-Identifier: <SPDX License Expression> */
  52. ASM: /* SPDX-License-Identifier: <SPDX License Expression> */
  53. scripts: # SPDX-License-Identifier: <SPDX License Expression>
  54. .rst: .. SPDX-License-Identifier: <SPDX License Expression>
  55. .dts{i}: // SPDX-License-Identifier: <SPDX License Expression>
  56. If a specific tool cannot handle the standard comment style, then the
  57. appropriate comment mechanism which the tool accepts shall be used. This
  58. is the reason for having the "/\* \*/" style comment in C header
  59. files. There was build breakage observed with generated .lds files where
  60. 'ld' failed to parse the C++ comment. This has been fixed by now, but
  61. there are still older assembler tools which cannot handle C++ style
  62. comments.
  63. |
  64. 3. Syntax:
  65. A <SPDX License Expression> is either an SPDX short form license
  66. identifier found on the SPDX License List, or the combination of two
  67. SPDX short form license identifiers separated by "WITH" when a license
  68. exception applies. When multiple licenses apply, an expression consists
  69. of keywords "AND", "OR" separating sub-expressions and surrounded by
  70. "(", ")" .
  71. License identifiers for licenses like [L]GPL with the 'or later' option
  72. are constructed by using a "+" for indicating the 'or later' option.::
  73. // SPDX-License-Identifier: GPL-2.0+
  74. // SPDX-License-Identifier: LGPL-2.1+
  75. WITH should be used when there is a modifier to a license needed.
  76. For example, the linux kernel UAPI files use the expression::
  77. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  78. // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
  79. Other examples using WITH exceptions found in the linux kernel are::
  80. // SPDX-License-Identifier: GPL-2.0 WITH mif-exception
  81. // SPDX-License-Identifier: GPL-2.0+ WITH GCC-exception-2.0
  82. Exceptions can only be used with particular License identifiers. The
  83. valid License identifiers are listed in the tags of the exception text
  84. file.
  85. OR should be used if the file is dual licensed and only one license is
  86. to be selected. For example, some dtsi files are available under dual
  87. licenses::
  88. // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
  89. Examples from U-Boot for license expressions in dual licensed files::
  90. // SPDX-License-Identifier: GPL-2.0 OR MIT
  91. // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
  92. AND should be used if the file has multiple licenses whose terms all
  93. apply to use the file. For example, if code is inherited from another
  94. project and permission has been given to put it in U-Boot, but the
  95. original license terms need to remain in effect::
  96. // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) AND MIT
  97. Another other example where both sets of license terms need to be
  98. adhered to is::
  99. // SPDX-License-Identifier: GPL-1.0+ AND LGPL-2.1+
  100. [1] http://spdx.org/
  101. [2] http://spdx.org/licenses/
  102. Full name SPDX Identifier OSI Approved File name URI
  103. =======================================================================================================================================
  104. GNU General Public License v2.0 only GPL-2.0 Y gpl-2.0.txt http://www.gnu.org/licenses/gpl-2.0.txt
  105. 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
  106. 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
  107. 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
  108. eCos license version 2.0 eCos-2.0 eCos-2.0.txt http://www.gnu.org/licenses/ecos-license.html
  109. BSD 2-Clause License BSD-2-Clause Y bsd-2-clause.txt http://spdx.org/licenses/BSD-2-Clause
  110. BSD 3-clause "New" or "Revised" License BSD-3-Clause Y bsd-3-clause.txt http://spdx.org/licenses/BSD-3-Clause#licenseText
  111. IBM PIBS (PowerPC Initialization and IBM-pibs ibm-pibs.txt
  112. Boot Software) license
  113. ISC License ISC Y isc.txt https://spdx.org/licenses/ISC
  114. MIT License MIT Y mit.txt https://spdx.org/licenses/MIT.html
  115. SIL OPEN FONT LICENSE (OFL-1.1) OFL-1.1 Y OFL.txt https://spdx.org/licenses/OFL-1.1.html
  116. X11 License X11 x11.txt https://spdx.org/licenses/X11.html