Summer Qin | abf6698 | 2021-04-06 17:22:15 +0800 | [diff] [blame] | 1 | Contributing Process |
| 2 | ==================== |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 3 | |
Ashutosh Singh | 429ceec | 2019-05-01 16:14:10 +0100 | [diff] [blame] | 4 | Contributions to the TF-M project need to follow the process below. |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 5 | |
Ashutosh Singh | 429ceec | 2019-05-01 16:14:10 +0100 | [diff] [blame] | 6 | .. Note:: |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 7 | |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 8 | Please contact `TF-M mailing list <mailing_list_>`_ for any question. |
Ashutosh Singh | 429ceec | 2019-05-01 16:14:10 +0100 | [diff] [blame] | 9 | |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 10 | - It is recommended to subscribe to `TF-M mailing list <mailing_list_>`_ |
| 11 | via `this page <https://lists.trustedfirmware.org/mailman3/lists/tf-m.lists.trustedfirmware.org>`_. |
Anton Komlev | bd4582c | 2024-04-04 15:37:43 +0100 | [diff] [blame] | 12 | - Refer to the :doc:`/roadmap` or send a mail to the `TF-M mailing list <mailing_list_>`_ |
| 13 | to get the latest status and plan of TF-M. |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 14 | - Follow :doc:`Design Proposal Guideline </contributing/tfm_design_proposal_guideline>` |
| 15 | to propose your design. |
| 16 | - Follow guidelines below to prepare the patch: |
Ashutosh Singh | 429ceec | 2019-05-01 16:14:10 +0100 | [diff] [blame] | 17 | |
| 18 | - Clone the TF-M code on your own machine from `TF-M git repository |
Minos Galanakis | 0f39fa5 | 2020-06-08 16:53:53 +0100 | [diff] [blame] | 19 | <https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git>`_. |
Anton Komlev | 3356ba3 | 2022-03-31 22:02:11 +0100 | [diff] [blame] | 20 | - Follow the :doc:`TF-M getting started </getting_started/tfm_getting_started>`, |
Anton Komlev | 0dbe8f1 | 2022-06-17 16:48:12 +0100 | [diff] [blame] | 21 | :doc:`Build Instructions </building/tfm_build_instruction>` |
Anton Komlev | 3356ba3 | 2022-03-31 22:02:11 +0100 | [diff] [blame] | 22 | :doc:`Coding Guide </contributing/coding_guide>` for the TF-M project. |
Ashutosh Singh | 429ceec | 2019-05-01 16:14:10 +0100 | [diff] [blame] | 23 | - Make your changes in logical chunks to help reviewers. Each commit should |
| 24 | be a separate review and either work properly or be squashed after the |
| 25 | review and before merging. |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 26 | - Follow :doc:`Documentation Contribution Guidelines </contributing/doc_guidelines>` |
| 27 | to update documentation in ``docs`` folder if needed. |
Ashutosh Singh | 429ceec | 2019-05-01 16:14:10 +0100 | [diff] [blame] | 28 | - Test your changes and add details to the commit description. |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 29 | - The code is accepted under :doc:`Developer Certificate of Origin (DCO) </contributing/dco>`. |
| 30 | Use ``git commit -s`` to add a ``Signed-off-by`` trailer at the end of the |
| 31 | commit log message. |
| 32 | See `git-commit <https://git-scm.com/docs/git-commit>`_ for details. |
Anton Komlev | a36614c | 2023-02-27 12:18:19 +0000 | [diff] [blame] | 33 | - Ensure that each changed file has the correct copyright and license |
| 34 | information. Files that entirely consist of contributions to this project |
| 35 | should have a copyright notice and BSD-3-Clause SPDX license identifier of |
Anton Komlev | 228deca | 2024-10-07 13:25:26 +0100 | [diff] [blame] | 36 | the form |
Anton Komlev | a36614c | 2023-02-27 12:18:19 +0000 | [diff] [blame] | 37 | |
| 38 | :: |
| 39 | |
Anton Komlev | 228deca | 2024-10-07 13:25:26 +0100 | [diff] [blame] | 40 | SPDX-License-Identifier: BSD-3-Clause |
| 41 | SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors |
| 42 | |
| 43 | to reflect the community ownership of the project. Individual copyrights |
| 44 | can be traced back through the corresponding commits. For more details please refer |
| 45 | to `Linux Foundation guidelines on copyright notices`_ for OSS projects. |
| 46 | Patches that contain changes to imported Third Party IP files should retain |
| 47 | their original copyright and license notices. If changes are made to the imported |
| 48 | files, then add an additional ``SPDX-FileCopyrightText`` tag line as shown above. |
| 49 | |
| 50 | The original form of the project copyright note as |
| 51 | |
Anton Komlev | a36614c | 2023-02-27 12:18:19 +0000 | [diff] [blame] | 52 | Copyright (c) XXXX[-YYYY], <OWNER>. All rights reserved. |
| 53 | |
Anton Komlev | 228deca | 2024-10-07 13:25:26 +0100 | [diff] [blame] | 54 | is still appropriate but shall be avoided in the new files. |
Anton Komlev | a36614c | 2023-02-27 12:18:19 +0000 | [diff] [blame] | 55 | |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 56 | - Add a `Change-Id <https://review.trustedfirmware.org/Documentation/user-changeid.html>`_ |
| 57 | to the commit message, which can be generated any way you like (e.g. from |
| 58 | the SHA of the commit). |
| 59 | It is suggested to clone repositories with commit-msg hook. The commit-msg |
| 60 | hook attaches Change-Id automatically. |
| 61 | Take `trusted-firmware-m <https://review.trustedfirmware.org/admin/repos/TF-M/trusted-firmware-m>`_ |
| 62 | as an example. |
Ashutosh Singh | 429ceec | 2019-05-01 16:14:10 +0100 | [diff] [blame] | 63 | |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 64 | - Submit your patch for review. |
| 65 | Refer to `Uploading Changes <https://review.trustedfirmware.org/Documentation/user-upload.html>`_ |
| 66 | for details of uploading patch. |
| 67 | - Add relevant :doc:`code owner(s) </contributing/maintainers>` for reviewing |
Galanakis, Minos | 0c1ad78 | 2019-11-08 11:28:40 +0000 | [diff] [blame] | 68 | the patch. |
Ashutosh Singh | 429ceec | 2019-05-01 16:14:10 +0100 | [diff] [blame] | 69 | - You may be asked to provide further details or make additional changes. |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 70 | - You can discuss further with code owner(s) and maintainer(s) directly via |
| 71 | `TF-M mailing list <mailing_list_>`_ if necessary. |
Anton Komlev | f6da329 | 2023-05-17 17:42:40 +0100 | [diff] [blame] | 72 | - If multiple patches are linked in a chain then code owners and maintainers |
| 73 | should review and merge individual patches when they are ready, rather than |
| 74 | waiting for the entire chain to be reviewed. If multiple patches are intended |
| 75 | to be merged together then authors shall use topics or explicitly mention |
| 76 | that in the commit message. |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 77 | - Click ``Allow-CI +1`` button on Gerrit page to run CI to validate your patch. |
| 78 | Your patch shall pass CI successfully before being merged. Code owner(s) and |
| 79 | maintainer(s) may ask for additional test. |
| 80 | - Once the change is approved by code owners, the patch will be merged by the |
Ashutosh Singh | 429ceec | 2019-05-01 16:14:10 +0100 | [diff] [blame] | 81 | maintainer. |
David Hu | e0dbac0 | 2022-06-09 16:00:18 +0800 | [diff] [blame] | 82 | |
Gyorgy Szing | db9783c | 2019-04-17 21:08:48 +0200 | [diff] [blame] | 83 | -------------- |
| 84 | |
Anton Komlev | 228deca | 2024-10-07 13:25:26 +0100 | [diff] [blame] | 85 | .. _mailing_list: tf-m@lists.trustedfirmware.org |
| 86 | .. _Linux Foundation guidelines on copyright notices: https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects |
| 87 | |
David Hu | 633f1f2 | 2022-01-30 22:16:23 +0800 | [diff] [blame] | 88 | *Copyright (c) 2017-2022, Arm Limited. All rights reserved.* |