18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci.. include:: ../disclaimer-zh_CN.rst 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci:Original: :ref:`Documentation/process/license-rules.rst <kernel_licensing>` 68c2ecf20Sopenharmony_ci:Translator: Alex Shi <alex.shi@linux.alibaba.com> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci.. _cn_kernel_licensing: 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciLinux内核许可规则 118c2ecf20Sopenharmony_ci================= 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciLinux内核根据LICENSES/preferred/GPL-2.0中提供的GNU通用公共许可证版本2 148c2ecf20Sopenharmony_ci(GPL-2.0)的条款提供,并在LICENSES/exceptions/Linux-syscall-note中显式 158c2ecf20Sopenharmony_ci描述了例外的系统调用,如COPYING文件中所述。 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci此文档文件提供了如何对每个源文件进行注释以使其许可证清晰明确的说明。 188c2ecf20Sopenharmony_ci它不会取代内核的许可证。 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci内核源代码作为一个整体适用于COPYING文件中描述的许可证,但是单个源文件可以 218c2ecf20Sopenharmony_ci具有不同的与GPL-20兼容的许可证:: 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci GPL-1.0+ : GNU通用公共许可证v1.0或更高版本 248c2ecf20Sopenharmony_ci GPL-2.0+ : GNU通用公共许可证v2.0或更高版本 258c2ecf20Sopenharmony_ci LGPL-2.0 : 仅限GNU库通用公共许可证v2 268c2ecf20Sopenharmony_ci LGPL-2.0+: GNU 库通用公共许可证v2或更高版本 278c2ecf20Sopenharmony_ci LGPL-2.1 : 仅限GNU宽通用公共许可证v2.1 288c2ecf20Sopenharmony_ci LGPL-2.1+: GNU宽通用公共许可证v2.1或更高版本 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci除此之外,个人文件可以在双重许可下提供,例如一个兼容的GPL变体,或者BSD, 318c2ecf20Sopenharmony_ciMIT等许可。 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci用户空间API(UAPI)头文件描述了用户空间程序与内核的接口,这是一种特殊情况。 348c2ecf20Sopenharmony_ci根据内核COPYING文件中的注释,syscall接口是一个明确的边界,它不会将GPL要求 358c2ecf20Sopenharmony_ci扩展到任何使用它与内核通信的软件。由于UAPI头文件必须包含在创建在Linux内核 368c2ecf20Sopenharmony_ci上运行的可执行文件的任何源文件中,因此此例外必须记录在特别的许可证表述中。 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci表达源文件许可证的常用方法是将匹配的样板文本添加到文件的顶部注释中。由于 398c2ecf20Sopenharmony_ci格式,拼写错误等,这些“样板”很难通过那些在上下文中使用的验证许可证合规性 408c2ecf20Sopenharmony_ci的工具。 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci样板文本的替代方法是在每个源文件中使用软件包数据交换(SPDX)许可证标识符。 438c2ecf20Sopenharmony_ciSPDX许可证标识符是机器可解析的,并且是用于提供文件内容的许可证的精确缩写。 448c2ecf20Sopenharmony_ciSPDX许可证标识符由Linux 基金会的SPDX 工作组管理,并得到了整个行业,工具 458c2ecf20Sopenharmony_ci供应商和法律团队的合作伙伴的一致同意。有关详细信息,请参阅 468c2ecf20Sopenharmony_cihttps://spdx.org/ 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ciLinux内核需要所有源文件中的精确SPDX标识符。内核中使用的有效标识符在 498c2ecf20Sopenharmony_ci`许可标识符`_ 一节中进行了解释,并且已可以在 508c2ecf20Sopenharmony_cihttps://spdx.org/licenses/ 上的官方SPDX许可证列表中检索,并附带许可证 518c2ecf20Sopenharmony_ci文本。 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci许可标识符语法 548c2ecf20Sopenharmony_ci-------------- 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci1.安置: 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci 内核文件中的SPDX许可证标识符应添加到可包含注释的文件中的第一行。对于大多 598c2ecf20Sopenharmony_ci 数文件,这是第一行,除了那些在第一行中需要'#!PATH_TO_INTERPRETER'的脚本。 608c2ecf20Sopenharmony_ci 对于这些脚本,SPDX标识符进入第二行。 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci| 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci2. 风格: 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci SPDX许可证标识符以注释的形式添加。注释样式取决于文件类型:: 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci C source: // SPDX-License-Identifier: <SPDX License Expression> 698c2ecf20Sopenharmony_ci C header: /* SPDX-License-Identifier: <SPDX License Expression> */ 708c2ecf20Sopenharmony_ci ASM: /* SPDX-License-Identifier: <SPDX License Expression> */ 718c2ecf20Sopenharmony_ci scripts: # SPDX-License-Identifier: <SPDX License Expression> 728c2ecf20Sopenharmony_ci .rst: .. SPDX-License-Identifier: <SPDX License Expression> 738c2ecf20Sopenharmony_ci .dts{i}: // SPDX-License-Identifier: <SPDX License Expression> 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci 如果特定工具无法处理标准注释样式,则应使用工具接受的相应注释机制。这是在 768c2ecf20Sopenharmony_ci C 头文件中使用“/\*\*/”样式注释的原因。过去在使用生成的.lds文件中观察到 778c2ecf20Sopenharmony_ci 构建被破坏,其中'ld'无法解析C++注释。现在已经解决了这个问题,但仍然有较 788c2ecf20Sopenharmony_ci 旧的汇编程序工具无法处理C++样式的注释。 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci| 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci3. 句法: 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci <SPDX许可证表达式>是SPDX许可证列表中的SPDX短格式许可证标识符,或者在许可 858c2ecf20Sopenharmony_ci 证例外适用时由“WITH”分隔的两个SPDX短格式许可证标识符的组合。当应用多个许 868c2ecf20Sopenharmony_ci 可证时,表达式由分隔子表达式的关键字“AND”,“OR”组成,并由“(”,“)”包围。 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci 带有“或更高”选项的[L]GPL等许可证的许可证标识符通过使用“+”来表示“或更高” 898c2ecf20Sopenharmony_ci 选项来构建。:: 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0+ 928c2ecf20Sopenharmony_ci // SPDX-License-Identifier: LGPL-2.1+ 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci 当需要修正的许可证时,应使用WITH。 例如,linux内核UAPI文件使用表达式:: 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 978c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci 其它在内核中使用WITH例外的事例如下:: 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0 WITH mif-exception 1028c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0+ WITH GCC-exception-2.0 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci 例外只能与特定的许可证标识符一起使用。有效的许可证标识符列在异常文本文件 1058c2ecf20Sopenharmony_ci 的标记中。有关详细信息,请参阅 `许可标识符`_ 一章中的 `例外`_ 。 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci 如果文件是双重许可且只选择一个许可证,则应使用OR。例如,一些dtsi文件在双 1088c2ecf20Sopenharmony_ci 许可下可用:: 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci 内核中双许可文件中许可表达式的示例:: 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0 OR MIT 1158c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 1168c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0 OR Apache-2.0 1178c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-2.0 OR MPL-1.1 1188c2ecf20Sopenharmony_ci // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT 1198c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-1.0+ OR BSD-3-Clause OR OpenSSL 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ci 如果文件具有多个许可证,其条款全部适用于使用该文件,则应使用AND。例如, 1228c2ecf20Sopenharmony_ci 如果代码是从另一个项目继承的,并且已经授予了将其放入内核的权限,但原始 1238c2ecf20Sopenharmony_ci 许可条款需要保持有效:: 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) AND MIT 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ci 另一个需要遵守两套许可条款的例子是:: 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci // SPDX-License-Identifier: GPL-1.0+ AND LGPL-2.1+ 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci许可标识符 1328c2ecf20Sopenharmony_ci---------- 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci当前使用的许可证以及添加到内核的代码许可证可以分解为: 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci1. _`优先许可`: 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci 应尽可能使用这些许可证,因为它们已知完全兼容并广泛使用。这些许可证在内核 1398c2ecf20Sopenharmony_ci 目录:: 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci LICENSES/preferred/ 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci 此目录中的文件包含完整的许可证文本和 `元标记`_ 。文件名与SPDX许可证标识 1448c2ecf20Sopenharmony_ci 符相同,后者应用于源文件中的许可证。 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci 例如:: 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci LICENSES/preferred/GPL-2.0 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci 包含GPLv2许可证文本和所需的元标签:: 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci LICENSES/preferred/MIT 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_ci 包含MIT许可证文本和所需的元标记 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci _`元标记`: 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci 许可证文件中必须包含以下元标记: 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci - Valid-License-Identifier: 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ci 一行或多行, 声明那些许可标识符在项目内有效, 以引用此特定许可的文本。通 1638c2ecf20Sopenharmony_ci 常这是一个有效的标识符,但是例如对于带有'或更高'选项的许可证,两个标识 1648c2ecf20Sopenharmony_ci 符都有效。 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci - SPDX-URL: 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci SPDX页面的URL,其中包含与许可证相关的其他信息. 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci - Usage-Guidance: 1718c2ecf20Sopenharmony_ci 1728c2ecf20Sopenharmony_ci 使用建议的自由格式文本。该文本必须包含SPDX许可证标识符的正确示例,因为 1738c2ecf20Sopenharmony_ci 它们应根据 `许可标识符语法`_ 指南放入源文件中。 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci - License-Text: 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ci 此标记之后的所有文本都被视为原始许可文本 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci 文件格式示例:: 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_ci Valid-License-Identifier: GPL-2.0 1828c2ecf20Sopenharmony_ci Valid-License-Identifier: GPL-2.0+ 1838c2ecf20Sopenharmony_ci SPDX-URL: https://spdx.org/licenses/GPL-2.0.html 1848c2ecf20Sopenharmony_ci Usage-Guide: 1858c2ecf20Sopenharmony_ci To use this license in source code, put one of the following SPDX 1868c2ecf20Sopenharmony_ci tag/value pairs into a comment according to the placement 1878c2ecf20Sopenharmony_ci guidelines in the licensing rules documentation. 1888c2ecf20Sopenharmony_ci For 'GNU General Public License (GPL) version 2 only' use: 1898c2ecf20Sopenharmony_ci SPDX-License-Identifier: GPL-2.0 1908c2ecf20Sopenharmony_ci For 'GNU General Public License (GPL) version 2 or any later version' use: 1918c2ecf20Sopenharmony_ci SPDX-License-Identifier: GPL-2.0+ 1928c2ecf20Sopenharmony_ci License-Text: 1938c2ecf20Sopenharmony_ci Full license text 1948c2ecf20Sopenharmony_ci 1958c2ecf20Sopenharmony_ci :: 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci SPDX-License-Identifier: MIT 1988c2ecf20Sopenharmony_ci SPDX-URL: https://spdx.org/licenses/MIT.html 1998c2ecf20Sopenharmony_ci Usage-Guide: 2008c2ecf20Sopenharmony_ci To use this license in source code, put the following SPDX 2018c2ecf20Sopenharmony_ci tag/value pair into a comment according to the placement 2028c2ecf20Sopenharmony_ci guidelines in the licensing rules documentation. 2038c2ecf20Sopenharmony_ci SPDX-License-Identifier: MIT 2048c2ecf20Sopenharmony_ci License-Text: 2058c2ecf20Sopenharmony_ci Full license text 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ci| 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ci2. 不推荐的许可证: 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci 这些许可证只应用于现有代码或从其他项目导入代码。这些许可证在内核目录:: 2128c2ecf20Sopenharmony_ci 2138c2ecf20Sopenharmony_ci LICENSES/other/ 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_ci 此目录中的文件包含完整的许可证文本和 `元标记`_ 。文件名与SPDX许可证标识 2168c2ecf20Sopenharmony_ci 符相同,后者应用于源文件中的许可证。 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci 例如:: 2198c2ecf20Sopenharmony_ci 2208c2ecf20Sopenharmony_ci LICENSES/other/ISC 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci 包含国际系统联合许可文本和所需的元标签:: 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci LICENSES/other/ZLib 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ci 包含ZLIB许可文本和所需的元标签. 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ci 元标签: 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci “其他”许可证的元标签要求与 `优先许可`_ 的要求相同。 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci 文件格式示例:: 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ci Valid-License-Identifier: ISC 2358c2ecf20Sopenharmony_ci SPDX-URL: https://spdx.org/licenses/ISC.html 2368c2ecf20Sopenharmony_ci Usage-Guide: 2378c2ecf20Sopenharmony_ci Usage of this license in the kernel for new code is discouraged 2388c2ecf20Sopenharmony_ci and it should solely be used for importing code from an already 2398c2ecf20Sopenharmony_ci existing project. 2408c2ecf20Sopenharmony_ci To use this license in source code, put the following SPDX 2418c2ecf20Sopenharmony_ci tag/value pair into a comment according to the placement 2428c2ecf20Sopenharmony_ci guidelines in the licensing rules documentation. 2438c2ecf20Sopenharmony_ci SPDX-License-Identifier: ISC 2448c2ecf20Sopenharmony_ci License-Text: 2458c2ecf20Sopenharmony_ci Full license text 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci| 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ci3. _`例外`: 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_ci 某些许可证可以修改,并允许原始许可证不具有的某些例外权利。这些例外在 2528c2ecf20Sopenharmony_ci 内核目录:: 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci LICENSES/exceptions/ 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ci 此目录中的文件包含完整的例外文本和所需的 `例外元标记`_ 。 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci 例如:: 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci LICENSES/exceptions/Linux-syscall-note 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci 包含Linux内核的COPYING文件中记录的Linux系统调用例外,该文件用于UAPI 2638c2ecf20Sopenharmony_ci 头文件。例如:: 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci LICENSES/exceptions/GCC-exception-2.0 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci 包含GCC'链接例外',它允许独立于其许可证的任何二进制文件与标记有此例外的 2688c2ecf20Sopenharmony_ci 文件的编译版本链接。这是从GPL不兼容源代码创建可运行的可执行文件所必需的。 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_ci _`例外元标记`: 2718c2ecf20Sopenharmony_ci 2728c2ecf20Sopenharmony_ci 以下元标记必须在例外文件中可用: 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_ci - SPDX-Exception-Identifier: 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_ci 一个可与SPDX许可证标识符一起使用的例外标识符。 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ci - SPDX-URL: 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ci SPDX页面的URL,其中包含与例外相关的其他信息。 2818c2ecf20Sopenharmony_ci 2828c2ecf20Sopenharmony_ci - SPDX-Licenses: 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_ci 以逗号分隔的例外可用的SPDX许可证标识符列表。 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci - Usage-Guidance: 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_ci 使用建议的自由格式文本。必须在文本后面加上SPDX许可证标识符的正确示例, 2898c2ecf20Sopenharmony_ci 因为它们应根据 `许可标识符语法`_ 指南放入源文件中。 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ci - Exception-Text: 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_ci 此标记之后的所有文本都被视为原始异常文本 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci 文件格式示例:: 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_ci SPDX-Exception-Identifier: Linux-syscall-note 2988c2ecf20Sopenharmony_ci SPDX-URL: https://spdx.org/licenses/Linux-syscall-note.html 2998c2ecf20Sopenharmony_ci SPDX-Licenses: GPL-2.0, GPL-2.0+, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+ 3008c2ecf20Sopenharmony_ci Usage-Guidance: 3018c2ecf20Sopenharmony_ci This exception is used together with one of the above SPDX-Licenses 3028c2ecf20Sopenharmony_ci to mark user-space API (uapi) header files so they can be included 3038c2ecf20Sopenharmony_ci into non GPL compliant user-space application code. 3048c2ecf20Sopenharmony_ci To use this exception add it with the keyword WITH to one of the 3058c2ecf20Sopenharmony_ci identifiers in the SPDX-Licenses tag: 3068c2ecf20Sopenharmony_ci SPDX-License-Identifier: <SPDX-License> WITH Linux-syscall-note 3078c2ecf20Sopenharmony_ci Exception-Text: 3088c2ecf20Sopenharmony_ci Full exception text 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_ci :: 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_ci SPDX-Exception-Identifier: GCC-exception-2.0 3138c2ecf20Sopenharmony_ci SPDX-URL: https://spdx.org/licenses/GCC-exception-2.0.html 3148c2ecf20Sopenharmony_ci SPDX-Licenses: GPL-2.0, GPL-2.0+ 3158c2ecf20Sopenharmony_ci Usage-Guidance: 3168c2ecf20Sopenharmony_ci The "GCC Runtime Library exception 2.0" is used together with one 3178c2ecf20Sopenharmony_ci of the above SPDX-Licenses for code imported from the GCC runtime 3188c2ecf20Sopenharmony_ci library. 3198c2ecf20Sopenharmony_ci To use this exception add it with the keyword WITH to one of the 3208c2ecf20Sopenharmony_ci identifiers in the SPDX-Licenses tag: 3218c2ecf20Sopenharmony_ci SPDX-License-Identifier: <SPDX-License> WITH GCC-exception-2.0 3228c2ecf20Sopenharmony_ci Exception-Text: 3238c2ecf20Sopenharmony_ci Full exception text 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_ci所有SPDX许可证标识符和例外都必须在LICENSES子目录中具有相应的文件。这是允许 3278c2ecf20Sopenharmony_ci工具验证(例如checkpatch.pl)以及准备好从源读取和提取许可证所必需的, 这是 3288c2ecf20Sopenharmony_ci各种FOSS组织推荐的,例如 `FSFE REUSE initiative <https://reuse.software/>`_. 3298c2ecf20Sopenharmony_ci 3308c2ecf20Sopenharmony_ci_`模块许可` 3318c2ecf20Sopenharmony_ci----------------- 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci 可加载内核模块还需要MODULE_LICENSE()标记。此标记既不替代正确的源代码 3348c2ecf20Sopenharmony_ci 许可证信息(SPDX-License-Identifier),也不以任何方式表示或确定提供模块 3358c2ecf20Sopenharmony_ci 源代码的确切许可证。 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci 此标记的唯一目的是提供足够的信息,该模块是否是自由软件或者是内核模块加 3388c2ecf20Sopenharmony_ci 载器和用户空间工具的专有模块。 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci MODULE_LICENSE()的有效许可证字符串是: 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci ============================= ============================================= 3438c2ecf20Sopenharmony_ci "GPL" 模块是根据GPL版本2许可的。这并不表示仅限于 3448c2ecf20Sopenharmony_ci GPL-2.0或GPL-2.0或更高版本之间的任何区别。 3458c2ecf20Sopenharmony_ci 最正确许可证信息只能通过相应源文件中的许可证 3468c2ecf20Sopenharmony_ci 信息来确定 3478c2ecf20Sopenharmony_ci 3488c2ecf20Sopenharmony_ci "GPL v2" 和"GPL"相同,它的存在是因为历史原因。 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_ci "GPL and additional rights" 表示模块源在GPL v2变体和MIT许可下双重许可的 3518c2ecf20Sopenharmony_ci 历史变体。请不要在新代码中使用。 3528c2ecf20Sopenharmony_ci 3538c2ecf20Sopenharmony_ci "Dual MIT/GPL" 表达该模块在GPL v2变体或MIT许可证选择下双重 3548c2ecf20Sopenharmony_ci 许可的正确方式。 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ci "Dual BSD/GPL" 该模块根据GPL v2变体或BSD许可证选择进行双重 3578c2ecf20Sopenharmony_ci 许可。 BSD许可证的确切变体只能通过相应源文件 3588c2ecf20Sopenharmony_ci 中的许可证信息来确定。 3598c2ecf20Sopenharmony_ci 3608c2ecf20Sopenharmony_ci "Dual MPL/GPL" 该模块根据GPL v2变体或Mozilla Public License 3618c2ecf20Sopenharmony_ci (MPL)选项进行双重许可。 MPL许可证的确切变体 3628c2ecf20Sopenharmony_ci 只能通过相应的源文件中的许可证信息来确定。 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_ci "Proprietary" 该模块属于专有许可。此字符串仅用于专有的第三 3658c2ecf20Sopenharmony_ci 方模块,不能用于在内核树中具有源代码的模块。 3668c2ecf20Sopenharmony_ci 以这种方式标记的模块在加载时会使用'P'标记污 3678c2ecf20Sopenharmony_ci 染内核,并且内核模块加载器拒绝将这些模块链接 3688c2ecf20Sopenharmony_ci 到使用EXPORT_SYMBOL_GPL()导出的符号。 3698c2ecf20Sopenharmony_ci ============================= ============================================= 3708c2ecf20Sopenharmony_ci 371