blob: c17c22ef4bfb4ce52c107cdd25c0615a45ad71d3 [file] [log] [blame]
Summer Qinabf66982021-04-06 17:22:15 +08001Contributing Process
2====================
Gyorgy Szingdb9783c2019-04-17 21:08:48 +02003
Ashutosh Singh429ceec2019-05-01 16:14:10 +01004Contributions to the TF-M project need to follow the process below.
Gyorgy Szingdb9783c2019-04-17 21:08:48 +02005
Ashutosh Singh429ceec2019-05-01 16:14:10 +01006.. Note::
Gyorgy Szingdb9783c2019-04-17 21:08:48 +02007
Matthew Dalzell988bbd62025-06-05 15:49:26 +01008 Please contact TF-M mailing list
9 `tf-m@lists.trustedfirmware.org <mailing_list_>`_ for any question.
Ashutosh Singh429ceec2019-05-01 16:14:10 +010010
Matthew Dalzell988bbd62025-06-05 15:49:26 +010011- It is recommended to subscribe to TF-M mailing list
David Hue0dbac02022-06-09 16:00:18 +080012 via `this page <https://lists.trustedfirmware.org/mailman3/lists/tf-m.lists.trustedfirmware.org>`_.
Matthew Dalzell988bbd62025-06-05 15:49:26 +010013- Refer to the :doc:`/roadmap` or send a mail to the TF-M mailing list `tf-m@lists.trustedfirmware.org <mailing_list_>`_
Anton Komlevbd4582c2024-04-04 15:37:43 +010014 to get the latest status and plan of TF-M.
David Hue0dbac02022-06-09 16:00:18 +080015- Follow :doc:`Design Proposal Guideline </contributing/tfm_design_proposal_guideline>`
16 to propose your design.
17- Follow guidelines below to prepare the patch:
Ashutosh Singh429ceec2019-05-01 16:14:10 +010018
19 - Clone the TF-M code on your own machine from `TF-M git repository
Minos Galanakis0f39fa52020-06-08 16:53:53 +010020 <https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git>`_.
Anton Komlev3356ba32022-03-31 22:02:11 +010021 - Follow the :doc:`TF-M getting started </getting_started/tfm_getting_started>`,
Matthew Dalzell988bbd62025-06-05 15:49:26 +010022 :doc:`Build Instructions </building/tfm_build_instruction>` and
Anton Komlev3356ba32022-03-31 22:02:11 +010023 :doc:`Coding Guide </contributing/coding_guide>` for the TF-M project.
Ashutosh Singh429ceec2019-05-01 16:14:10 +010024 - Make your changes in logical chunks to help reviewers. Each commit should
25 be a separate review and either work properly or be squashed after the
26 review and before merging.
David Hue0dbac02022-06-09 16:00:18 +080027 - Follow :doc:`Documentation Contribution Guidelines </contributing/doc_guidelines>`
28 to update documentation in ``docs`` folder if needed.
Ashutosh Singh429ceec2019-05-01 16:14:10 +010029 - Test your changes and add details to the commit description.
David Hue0dbac02022-06-09 16:00:18 +080030 - The code is accepted under :doc:`Developer Certificate of Origin (DCO) </contributing/dco>`.
31 Use ``git commit -s`` to add a ``Signed-off-by`` trailer at the end of the
32 commit log message.
33 See `git-commit <https://git-scm.com/docs/git-commit>`_ for details.
Anton Komleva36614c2023-02-27 12:18:19 +000034 - Ensure that each changed file has the correct copyright and license
35 information. Files that entirely consist of contributions to this project
36 should have a copyright notice and BSD-3-Clause SPDX license identifier of
Anton Komlev228deca2024-10-07 13:25:26 +010037 the form
Anton Komleva36614c2023-02-27 12:18:19 +000038
39 ::
40
Anton Komlev228deca2024-10-07 13:25:26 +010041 SPDX-License-Identifier: BSD-3-Clause
42 SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
43
44 to reflect the community ownership of the project. Individual copyrights
45 can be traced back through the corresponding commits. For more details please refer
46 to `Linux Foundation guidelines on copyright notices`_ for OSS projects.
47 Patches that contain changes to imported Third Party IP files should retain
48 their original copyright and license notices. If changes are made to the imported
49 files, then add an additional ``SPDX-FileCopyrightText`` tag line as shown above.
50
51 The original form of the project copyright note as
52
Anton Komleva36614c2023-02-27 12:18:19 +000053 Copyright (c) XXXX[-YYYY], <OWNER>. All rights reserved.
54
Anton Komlev228deca2024-10-07 13:25:26 +010055 is still appropriate but shall be avoided in the new files.
Anton Komleva36614c2023-02-27 12:18:19 +000056
David Hue0dbac02022-06-09 16:00:18 +080057 - Add a `Change-Id <https://review.trustedfirmware.org/Documentation/user-changeid.html>`_
58 to the commit message, which can be generated any way you like (e.g. from
59 the SHA of the commit).
60 It is suggested to clone repositories with commit-msg hook. The commit-msg
61 hook attaches Change-Id automatically.
62 Take `trusted-firmware-m <https://review.trustedfirmware.org/admin/repos/TF-M/trusted-firmware-m>`_
63 as an example.
Ashutosh Singh429ceec2019-05-01 16:14:10 +010064
David Hue0dbac02022-06-09 16:00:18 +080065- Submit your patch for review.
66 Refer to `Uploading Changes <https://review.trustedfirmware.org/Documentation/user-upload.html>`_
67 for details of uploading patch.
68- Add relevant :doc:`code owner(s) </contributing/maintainers>` for reviewing
Galanakis, Minos0c1ad782019-11-08 11:28:40 +000069 the patch.
Ashutosh Singh429ceec2019-05-01 16:14:10 +010070- You may be asked to provide further details or make additional changes.
David Hue0dbac02022-06-09 16:00:18 +080071- You can discuss further with code owner(s) and maintainer(s) directly via
Matthew Dalzell988bbd62025-06-05 15:49:26 +010072 TF-M mailing list `tf-m@lists.trustedfirmware.org <mailing_list_>`_ if necessary.
Anton Komlevf6da3292023-05-17 17:42:40 +010073- If multiple patches are linked in a chain then code owners and maintainers
74 should review and merge individual patches when they are ready, rather than
75 waiting for the entire chain to be reviewed. If multiple patches are intended
76 to be merged together then authors shall use topics or explicitly mention
77 that in the commit message.
David Hue0dbac02022-06-09 16:00:18 +080078- Click ``Allow-CI +1`` button on Gerrit page to run CI to validate your patch.
79 Your patch shall pass CI successfully before being merged. Code owner(s) and
80 maintainer(s) may ask for additional test.
81- Once the change is approved by code owners, the patch will be merged by the
Ashutosh Singh429ceec2019-05-01 16:14:10 +010082 maintainer.
David Hue0dbac02022-06-09 16:00:18 +080083
Gyorgy Szingdb9783c2019-04-17 21:08:48 +020084--------------
85
Anton Komlev228deca2024-10-07 13:25:26 +010086.. _mailing_list: tf-m@lists.trustedfirmware.org
87.. _Linux Foundation guidelines on copyright notices: https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects
88
David Hu633f1f22022-01-30 22:16:23 +080089*Copyright (c) 2017-2022, Arm Limited. All rights reserved.*