OP-TEE copyright and license headers
====================================

This document defines the format of the copyright and license headers in OP-TEE
source files. Such headers shall comply with the rules described here, which
are compatible with the rules adopted by the Linux kernel community.

New source files
----------------

- (Rule 1.1) Shall contain exactly one SPDX license identifier, which can
  express a single or multiple licenses (refer to SPDX_ for syntax details)
- (Rule 1.2) The SPDX license identifier shall be added as a comment line. It
  shall be the first possible line in the file which can contain a comment.
  The comment style shall depend on the file type:
- (Rule 1.2.1) C source: // SPDX-License-Identifier: <expression>
- (Rule 1.2.2) C header: /* SPDX-License-Identifier: <expression> */
- (Rule 1.2.3) Assembly: /* SPDX-License-Identifier: <expression> */
- (Rule 1.2.4) Python, shell: # SPDX-License-Identifier: <expression>
- (Rule 1.3) Shall contain at least one copyright line
- (Rule 1.4) Shall not contain the mention 'All rights reserved'

Note that files imported from external projects are not new files. The rules
for pre-existing files (below) apply.

Pre-existing or imported files
------------------------------

- (Rule 2.1) SPDX license identifiers shall be added according to the license
  notice(s) in the file and the rules above (1.1 and 1.2*)
- (Rule 2.2) It is recommended that license notices be removed once the
  corresponding identifier has been added. Note however that this may only be
  done by the copyright holder(s) of the file.
- (Rule 2.3) Similar to 2.2, and subject to the same conditions, the text:
  "All rights reserved" shall be removed also.

.. _SPDX: https://spdx.org/licenses/

Document copyright and license header rules
Document copyright and license header rules

Add a file to explain how the copyright and license information should
be described in source files. We are essentially following the Linux
kernel guidelines which are currently being discussed [1].

[1] https://patchwork.kernel.org/patch/10091607/

Signed-off-by: Jerome Forissier <ced78d268b4c9a0a20a59a9feeebd2ad90da03d3@linaro.org>
Acked-by: Joakim Bech <741f90e2a7f4d9afbad8bd50be20560f4cf38962@linaro.org>
