blob: 9ff93185c46f42adb72a2ba4d1004f6ac3fe7c3b [file] [log] [blame]
Imre Kis124f0e32021-02-12 18:03:24 +01001Contributing
2============
3
4
5Getting Started
6---------------
7
8- Make sure you have a GitHub account and you are logged on `developer.trustedfirmware.org`_.
9- Send an email to the |TS_MAIL_LIST| about your work. This gives everyone visibility of whether others are working on something
10 similar.
11- Clone the |C_PICKER_REPO| on your own machine.
12- Create a local topic branch based on ``main`` branch of the |C_PICKER_REPO|.
13
14Making Changes
15--------------
16
17- Make commits of logical units. See these general `Git guidelines`_ for contributing to a project.
18- Follow the :ref:`Coding Style & Guidelines`.
19- Keep the commits on topic. If you need to fix another bug or make another enhancement, please create a separate change.
20- Avoid long commit series. If you do have a long series, consider whether some commits should be squashed together or
21 addressed in a separate topic.
22- Make sure your commit messages are in the proper format. Please keel the 50/72 rule (for details see `Tim Popes blog entry`_.)
23- Where appropriate, please update the documentation.
24
25 - Consider whether the this document or other in-source documentation needs updating.
26
27 - Ensure that each changed file has the correct copyright and license information. Files that entirely consist of
28 contributions to this project should have a copyright notice and BSD-3-Clause SPDX license identifier of the form as shown
29 in :ref:`license`. Files that contain changes to imported Third Party IP files should retain their original copyright and
30 license notices. For significant contributions you may add your own copyright notice in following format::
31
32 Portions copyright (c) [XXXX-]YYYY, <OWNER>. All rights reserved.
33
34 where XXXX is the year of first contribution (if different to YYYY) and YYYY is the year of most recent contribution.
35 *<OWNER>* is your name or your company name.
36 - If you are submitting new files that you intend to be the technical sub-maintainer for (for example, a new platform port),
37 then also update the :ref:`maintainers` file.
38 - For topics with multiple commits, you should make all documentation changes (and nothing else) in the last commit of the
39 series. Otherwise, include the documentation changes within the single commit.
40
41- Please test your changes.
42
43Submitting Changes
44------------------
45
46- Ensure that each commit in the series has at least one ``Signed-off-by:``line, using your real name and email address. The
47 names in the ``Signed-off-by:`` and ``Author:`` lines must match. If anyone else contributes to the commit, they must also add
48 their own ``Signed-off-by:`` line. By adding this line the contributor certifies the contribution is made under the terms of
49 the :download:`Developer Certificate of Origin <../../dco.txt>`.
50
51 More details may be found in the `Gerrit Signed-off-by Lines guidelines`_.
52
53- Ensure that each commit also has a unique ``Change-Id:`` line. If you have cloned the repository with the
54 "`Clone with commit-msg hook`" clone method, this should already be the case.
55
56 More details may be found in the `Gerrit Change-Ids documentation`_.
57
58- Submit your changes for review at https://review.trustedfirmware.org targeting the ``main`` branch.
59
60- The changes will then undergo further review and testing by the :ref:`maintainers`. Any review comments will be made
61 directly on your patch. This may require you to do some rework.
62
63 Refer to the `Gerrit Uploading Changes documentation`_ for more details.
64
65- When the changes are accepted, the :ref:`maintainers` will integrate them.
66
67 - Typically, the :ref:`maintainers` will merge the changes into the ``main`` branch.
68 - If the changes are not based on a sufficiently-recent commit, or if they cannot be automatically rebased, then the
69 :ref:`maintainers` may rebase it on the ``main`` branch or ask you to do so.
70
71--------------
72
73.. _developer.trustedfirmware.org: https://developer.trustedfirmware.org
74.. _Git guidelines: http://git-scm.com/book/ch5-2.html
75.. _Gerrit Uploading Changes documentation: https://review.trustedfirmware.org/Documentation/user-upload.html
76.. _Gerrit Signed-off-by Lines guidelines: https://review.trustedfirmware.org/Documentation/user-signedoffby.html
77.. _Gerrit Change-Ids documentation: https://review.trustedfirmware.org/Documentation/user-changeid.html
78.. _`Tim Popes blog entry`: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
79
80
81*Copyright (c) 2019-2021, Arm Limited and Contributors. All rights reserved.*
82
83SPDX-License-Identifier: BSD-3-Clause