Paul Beesley | fc9ee36 | 2019-03-07 15:47:15 +0000 | [diff] [blame] | 1 | Contributor's Guide |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 2 | ******************* |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 3 | |
| 4 | Getting Started |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 5 | =============== |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 6 | |
Sandrine Bailleux | d314734 | 2020-05-12 10:36:05 +0200 | [diff] [blame] | 7 | - Make sure you have a Github account and you are logged on both |
| 8 | `developer.trustedfirmware.org`_ and `review.trustedfirmware.org`_. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 9 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 10 | Also make sure that you have registered your full name and email address in |
| 11 | your `review.trustedfirmware.org`_ profile. Otherwise, the Gerrit server |
| 12 | might reject patches you attempt to post for review. |
| 13 | |
Sandrine Bailleux | 6ef77ce | 2020-08-03 10:27:19 +0200 | [diff] [blame] | 14 | - If you plan to contribute a major piece of work, it is usually a good idea to |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 15 | start a discussion around it on the `TF-A mailing list`_. This gives everyone |
Sandrine Bailleux | 6ef77ce | 2020-08-03 10:27:19 +0200 | [diff] [blame] | 16 | visibility of what is coming up, you might learn that somebody else is |
| 17 | already working on something similar or the community might be able to |
| 18 | provide some early input to help shaping the design of the feature. |
| 19 | |
| 20 | If you intend to include Third Party IP in your contribution, please mention |
| 21 | it explicitly in the email thread and ensure that the changes that include |
| 22 | Third Party IP are made in a separate patch (or patch series). |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 23 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 24 | - Clone the Trusted Firmware-A source code on your own machine as described in |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 25 | :ref:`prerequisites_get_source`. |
Sandrine Bailleux | 75804e5 | 2020-08-12 11:29:46 +0200 | [diff] [blame] | 26 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 27 | - Create a local topic branch based on the Trusted Firmware-A ``master`` |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 28 | branch. |
| 29 | |
| 30 | Making Changes |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 31 | ============== |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 32 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 33 | - Ensure commits adhere to the project's :ref:`Commit Style`. |
Chris Kay | 1b706e6 | 2021-11-15 10:50:30 +0000 | [diff] [blame] | 34 | |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 35 | - Make commits of logical units. See these general `Git guidelines`_ for |
| 36 | contributing to a project. |
Sandrine Bailleux | 75804e5 | 2020-08-12 11:29:46 +0200 | [diff] [blame] | 37 | |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 38 | - Keep the commits on topic. If you need to fix another bug or make another |
Sandrine Bailleux | 6ef77ce | 2020-08-03 10:27:19 +0200 | [diff] [blame] | 39 | enhancement, please address it on a separate topic branch. |
Sandrine Bailleux | 75804e5 | 2020-08-12 11:29:46 +0200 | [diff] [blame] | 40 | |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 41 | - Split the patch in manageable units. Small patches are usually easier to |
| 42 | review so this will speed up the review process. |
| 43 | |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 44 | - Avoid long commit series. If you do have a long series, consider whether |
| 45 | some commits should be squashed together or addressed in a separate topic. |
Sandrine Bailleux | 75804e5 | 2020-08-12 11:29:46 +0200 | [diff] [blame] | 46 | |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 47 | - Follow the :ref:`Coding Style` and :ref:`Coding Guidelines`. |
| 48 | |
| 49 | - Use the checkpatch.pl script provided with the Linux source tree. A |
| 50 | Makefile target is provided for convenience, see :ref:`this |
| 51 | section<automatic-compliance-checking>` for more details. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 52 | |
Sandrine Bailleux | 75804e5 | 2020-08-12 11:29:46 +0200 | [diff] [blame] | 53 | - Where appropriate, please update the documentation. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 54 | |
Sandrine Bailleux | 75804e5 | 2020-08-12 11:29:46 +0200 | [diff] [blame] | 55 | - Consider whether the :ref:`Porting Guide`, :ref:`Firmware Design` document |
| 56 | or other in-source documentation needs updating. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 57 | |
Sandrine Bailleux | d314734 | 2020-05-12 10:36:05 +0200 | [diff] [blame] | 58 | - If you are submitting new files that you intend to be the code owner for |
| 59 | (for example, a new platform port), then also update the |
| 60 | :ref:`code owners` file. |
Sandrine Bailleux | 75804e5 | 2020-08-12 11:29:46 +0200 | [diff] [blame] | 61 | |
| 62 | - For topics with multiple commits, you should make all documentation changes |
| 63 | (and nothing else) in the last commit of the series. Otherwise, include |
| 64 | the documentation changes within the single commit. |
| 65 | |
Sandrine Bailleux | 398b188 | 2020-08-17 08:52:33 +0200 | [diff] [blame] | 66 | .. _copyright-license-guidance: |
| 67 | |
Sandrine Bailleux | 75804e5 | 2020-08-12 11:29:46 +0200 | [diff] [blame] | 68 | - Ensure that each changed file has the correct copyright and license |
| 69 | information. Files that entirely consist of contributions to this project |
| 70 | should have a copyright notice and BSD-3-Clause SPDX license identifier of |
| 71 | the form as shown in :ref:`license`. Files that contain changes to imported |
| 72 | Third Party IP files should retain their original copyright and license |
| 73 | notices. |
| 74 | |
| 75 | For significant contributions you may add your own copyright notice in the |
| 76 | following format: |
| 77 | |
| 78 | :: |
| 79 | |
| 80 | Portions copyright (c) [XXXX-]YYYY, <OWNER>. All rights reserved. |
| 81 | |
| 82 | where XXXX is the year of first contribution (if different to YYYY) and YYYY |
| 83 | is the year of most recent contribution. <OWNER> is your name or your company |
| 84 | name. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 85 | |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 86 | - Ensure that each patch in the patch series compiles in all supported |
| 87 | configurations. Patches which do not compile will not be merged. |
| 88 | |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 89 | - Please test your changes. As a minimum, ensure that Linux boots on the |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 90 | Foundation FVP. See :ref:`Arm Fixed Virtual Platforms (FVP)` for more |
| 91 | information. For more extensive testing, consider running the `TF-A Tests`_ |
| 92 | against your patches. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 93 | |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 94 | - Ensure that all CI automated tests pass. Failures should be fixed. They might |
| 95 | block a patch, depending on how critical they are. |
| 96 | |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 97 | Submitting Changes |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 98 | ================== |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 99 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 100 | .. note:: |
| 101 | Please follow the `How to Contribute Code`_ section of the OpenCI |
| 102 | documentation for general instructions on setting up Gerrit and posting |
| 103 | patches there. The rest of this section provides details about patch |
| 104 | submission rules specifically for the TF-A project. |
| 105 | |
| 106 | - Submit your changes for review using the ``git review`` command. |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 107 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 108 | This will automatically rebase them onto the upstream ``integration`` branch, |
| 109 | as required by TF-A's patch submission process. |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 110 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 111 | - From the Gerrit web UI, add reviewers for your patch: |
| 112 | |
| 113 | - At least one code owner for each module modified by the patch. See the |
| 114 | list of modules and their :ref:`code owners`. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 115 | |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 116 | - At least one maintainer. See the list of :ref:`maintainers`. |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 117 | |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 118 | - If some module has no code owner, try to identify a suitable (non-code |
| 119 | owner) reviewer. Running ``git blame`` on the module's source code can |
| 120 | help, as it shows who has been working the most recently on this area of |
| 121 | the code. |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 122 | |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 123 | Alternatively, if it is impractical to identify such a reviewer, you might |
| 124 | send an email to the `TF-A mailing list`_ to broadcast your review request |
| 125 | to the community. |
| 126 | |
| 127 | Note that self-reviewing a patch is prohibited, even if the patch author is |
| 128 | the only code owner of a module modified by the patch. Getting a second pair |
| 129 | of eyes on the code is essential to keep up with the quality standards the |
| 130 | project aspires to. |
| 131 | |
| 132 | - The changes will then undergo further review by the designated people. Any |
| 133 | review comments will be made directly on your patch. This may require you to |
| 134 | do some rework. For controversial changes, the discussion might be moved to |
| 135 | the `TF-A mailing list`_ to involve more of the community. |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 136 | |
| 137 | Refer to the `Gerrit Uploading Changes documentation`_ for more details. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 138 | |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 139 | - The patch submission rules are the following. For a patch to be approved |
| 140 | and merged in the tree, it must get: |
| 141 | |
| 142 | - One ``Code-Owner-Review+1`` for each of the modules modified by the patch. |
| 143 | - A ``Maintainer-Review+1``. |
| 144 | |
| 145 | In the case where a code owner could not be found for a given module, |
| 146 | ``Code-Owner-Review+1`` is substituted by ``Code-Review+1``. |
| 147 | |
| 148 | In addition to these various code review labels, the patch must also get a |
| 149 | ``Verified+1``. This is usually set by the Continuous Integration (CI) bot |
| 150 | when all automated tests passed on the patch. Sometimes, some of these |
| 151 | automated tests may fail for reasons unrelated to the patch. In this case, |
| 152 | the maintainers might (after analysis of the failures) override the CI bot |
| 153 | score to certify that the patch has been correctly tested. |
| 154 | |
| 155 | In the event where the CI system lacks proper tests for a patch, the patch |
| 156 | author or a reviewer might agree to perform additional manual tests |
| 157 | in their review and the reviewer incorporates the review of the additional |
| 158 | testing in the ``Code-Review+1`` or ``Code-Owner-Review+1`` as applicable to |
| 159 | attest that the patch works as expected. Where possible additional tests should |
| 160 | be added to the CI system as a follow up task. For example, for a |
| 161 | platform-dependent patch where the said platform is not available in the CI |
| 162 | system's board farm. |
| 163 | |
Paul Beesley | f864067 | 2019-04-12 14:19:42 +0100 | [diff] [blame] | 164 | - When the changes are accepted, the :ref:`maintainers` will integrate them. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 165 | |
Paul Beesley | f864067 | 2019-04-12 14:19:42 +0100 | [diff] [blame] | 166 | - Typically, the :ref:`maintainers` will merge the changes into the |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 167 | ``integration`` branch. |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 168 | |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 169 | - If the changes are not based on a sufficiently-recent commit, or if they |
Paul Beesley | f864067 | 2019-04-12 14:19:42 +0100 | [diff] [blame] | 170 | cannot be automatically rebased, then the :ref:`maintainers` may rebase it |
Sandrine Bailleux | d314734 | 2020-05-12 10:36:05 +0200 | [diff] [blame] | 171 | on the ``integration`` branch or ask you to do so. |
Sandrine Bailleux | e0cb189 | 2020-08-14 15:58:50 +0200 | [diff] [blame] | 172 | |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 173 | - After final integration testing, the changes will make their way into the |
Sandrine Bailleux | d314734 | 2020-05-12 10:36:05 +0200 | [diff] [blame] | 174 | ``master`` branch. If a problem is found during integration, the |
| 175 | :ref:`maintainers` will request your help to solve the issue. They may |
| 176 | revert your patches and ask you to resubmit a reworked version of them or |
| 177 | they may ask you to provide a fix-up patch. |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 178 | |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 179 | Add CI Configurations |
| 180 | ===================== |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 181 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 182 | TF-A uses Jenkins for Continuous Integration and testing activities. Various CI |
| 183 | jobs are deployed to run tests on every patch before being merged. Each of your |
| 184 | patches go through a series of checks before they get merged on to the master |
| 185 | branch. Kindly ensure that every time you add new files under your platform, |
| 186 | they are covered by the following two sections. |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 187 | |
| 188 | Coverity Scan |
| 189 | ------------- |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 190 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 191 | The TF-A project makes use of `Coverity Scan` for static analysis, a service |
| 192 | offered by Synopsys for open-source projects. This tool is able to find defects |
| 193 | and vulnerabilities in a code base, such as dereferences of NULL pointers, use |
| 194 | of uninitialized data, control flow issues and many other things. |
| 195 | |
| 196 | The TF-A source code is submitted daily to this service for analysis. Results of |
| 197 | the latest and previous scans, as well as the complete list of defects it |
| 198 | detected, are accessible online from |
| 199 | https://scan.coverity.com/projects/arm-software-arm-trusted-firmware. |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 200 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 201 | The `tf-a-ci-scripts repository`_ contains scripts to run the Coverity Scan |
| 202 | tools on the integration branch of the TF-A code base and make them available on |
| 203 | https://scan.coverity.com. These scripts get executed daily by the |
| 204 | `tf-a-coverity Jenkins job`_. |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 205 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 206 | In order to maintain a high level of coverage, including on newly introduced |
| 207 | code, it is important to maintain the appropriate TF-A CI scripts. Details of |
| 208 | when to update these scripts and how to do so follow. |
| 209 | |
| 210 | We maintain a build script - ``tf-cov-make`` - which contains the build |
| 211 | configurations of various platforms in order to cover the entire source code |
| 212 | being analysed by Coverity. |
| 213 | |
| 214 | When you submit your patches for review, and if they contain new source files, |
| 215 | `TF-A CI static checks job`_ might report that these files are not covered. In |
| 216 | this case, the job's console output will show the following error message:: |
| 217 | |
| 218 | ****** Newly added files detection check for Coverity Scan analysis on patch(es) ****** |
| 219 | |
| 220 | Result : FAILURE |
| 221 | |
| 222 | New source files have been identified in your patch.. |
| 223 | some/dir/file.c |
| 224 | |
| 225 | please ensure to include them for the ``Coverity Scan analysis`` by adding |
| 226 | the respective build configurations in the ``tf-cov-make`` build script. |
| 227 | |
| 228 | In this section you find the details on how to append your new build |
| 229 | configurations for Coverity scan analysis illustrated with examples: |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 230 | |
| 231 | #. We maintain a separate repository named `tf-a-ci-scripts repository`_ |
| 232 | for placing all the test scripts which will be executed by the CI Jobs. |
| 233 | |
| 234 | #. In this repository, ``tf-cov-make`` script is located at |
| 235 | ``tf-a-ci-scripts/script/tf-coverity/tf-cov-make`` |
| 236 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 237 | #. Edit the `tf-cov-make`_ script by appending all the possible build |
| 238 | configurations with the specific build flags relevant to your platform, so |
| 239 | that newly added source files get built and analysed by Coverity. |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 240 | |
| 241 | #. For better understanding follow the below specified examples listed in the |
| 242 | ``tf-cov-make`` script. |
| 243 | |
Jayanth Dodderi Chidanand | ef7d6f3 | 2021-09-09 14:23:10 +0100 | [diff] [blame] | 244 | .. code:: shell |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 245 | |
| 246 | Example 1: |
| 247 | #Intel |
| 248 | make PLAT=stratix10 $(common_flags) all |
| 249 | make PLAT=agilex $(common_flags) all |
| 250 | |
| 251 | - In the above example there are two different SoCs ``stratix`` and ``agilex`` |
| 252 | under the Intel platform and the build configurations has been added suitably |
| 253 | to include most of their source files. |
| 254 | |
Jayanth Dodderi Chidanand | ef7d6f3 | 2021-09-09 14:23:10 +0100 | [diff] [blame] | 255 | .. code:: shell |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 256 | |
| 257 | Example 2: |
| 258 | #Hikey |
| 259 | make PLAT=hikey $(common_flags) ${TBB_OPTIONS} ENABLE_PMF=1 all |
| 260 | make PLAT=hikey960 $(common_flags) ${TBB_OPTIONS} all |
| 261 | make PLAT=poplar $(common_flags) all |
| 262 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 263 | - In this case for ``Hikey`` boards additional build flags have been included |
| 264 | along with the ``common_flags`` to cover most of the files relevant to it. |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 265 | |
| 266 | - Similar to this you can still find many other different build configurations |
| 267 | of various other platforms listed in the ``tf-cov-make`` script. Kindly refer |
| 268 | them and append your build configurations respectively. |
| 269 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 270 | Test Build Configurations |
| 271 | ------------------------- |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 272 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 273 | We have CI jobs which run a set of test configurations on every TF-A patch |
| 274 | before they get merged upstream. |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 275 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 276 | At the bare minimum, TF-A code should build without any errors for every |
| 277 | supported platform - and every feature of this platform. To make sure this is |
| 278 | the case, we maintain a set of build tests. ``tf-l1-build-plat`` is the test |
| 279 | group which holds all build tests for all platforms. So be kind enough to |
| 280 | verify that your newly added files are covered by such a build test. |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 281 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 282 | If this is not the case, please follow the instructions below to add the |
| 283 | appropriate files. We will illustrate this with an example for the ``Hikey`` |
| 284 | platform. |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 285 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 286 | - In the `tf-a-ci-scripts repository`_ we need to add a build configuration file |
| 287 | ``hikey-default`` under ``tf_config/`` folder. ``tf_config/hikey-default`` |
| 288 | must list all the build parameters relevant to it. |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 289 | |
| 290 | .. code:: shell |
| 291 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 292 | # Hikey Build Parameters |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 293 | CROSS_COMPILE=aarch64-none-elf- |
| 294 | PLAT=hikey |
| 295 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 296 | - Further another file, ``hikey-default:nil``, needs to be added under |
| 297 | ``group/tf-l1-build-plat/`` folder to allow the platform to be built as part |
| 298 | of this test group. ``group/tf-l1-build-plat/hikey-default:nil`` file just |
| 299 | needs to exist but does not contain anything meaningful, apart from a |
| 300 | mandatory copyright notice: |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 301 | |
| 302 | .. code:: shell |
| 303 | |
| 304 | # |
| 305 | # Copyright (c) 2019-2022 Arm Limited. All rights reserved. |
| 306 | # |
| 307 | # SPDX-License-Identifier: BSD-3-Clause |
| 308 | # |
| 309 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 310 | - As illustrated above, you need to add similar files supporting your platform. |
| 311 | |
| 312 | For a more elaborate explanation of the TF-A CI scripts internals, including how |
| 313 | to add more complex tests beyond a simple build test, please refer to the `TF-A |
| 314 | CI scripts overview`_ section of the OpenCI documentation. |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 315 | |
Julius Werner | cece91a | 2019-04-18 16:47:46 -0700 | [diff] [blame] | 316 | Binary Components |
Jayanth Dodderi Chidanand | f69f198 | 2022-02-08 14:18:24 +0000 | [diff] [blame] | 317 | ================= |
Julius Werner | cece91a | 2019-04-18 16:47:46 -0700 | [diff] [blame] | 318 | |
| 319 | - Platforms may depend on binary components submitted to the `Trusted Firmware |
| 320 | binary repository`_ if they require code that the contributor is unable or |
| 321 | unwilling to open-source. This should be used as a rare exception. |
| 322 | - All binary components must follow the contribution guidelines (in particular |
| 323 | licensing rules) outlined in the `readme.rst <tf-binaries-readme_>`_ file of |
| 324 | the binary repository. |
| 325 | - Binary components must be restricted to only the specific functionality that |
| 326 | cannot be open-sourced and must be linked into a larger open-source platform |
| 327 | port. The majority of the platform port must still be implemented in open |
| 328 | source. Platform ports that are merely a thin wrapper around a binary |
| 329 | component that contains all the actual code will not be accepted. |
| 330 | - Only platform port code (i.e. in the ``plat/<vendor>`` directory) may rely on |
| 331 | binary components. Generic code must always be fully open-source. |
| 332 | |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 333 | -------------- |
| 334 | |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 335 | *Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved.* |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 336 | |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 337 | .. _developer.trustedfirmware.org: https://developer.trustedfirmware.org |
Sandrine Bailleux | d314734 | 2020-05-12 10:36:05 +0200 | [diff] [blame] | 338 | .. _review.trustedfirmware.org: https://review.trustedfirmware.org |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 339 | .. _Git guidelines: http://git-scm.com/book/ch5-2.html |
Louis Mayencourt | 72ef3d4 | 2019-03-22 11:47:22 +0000 | [diff] [blame] | 340 | .. _Gerrit Uploading Changes documentation: https://review.trustedfirmware.org/Documentation/user-upload.html |
Sandrine Bailleux | d314734 | 2020-05-12 10:36:05 +0200 | [diff] [blame] | 341 | .. _TF-A Tests: https://trustedfirmware-a-tests.readthedocs.io |
Julius Werner | cece91a | 2019-04-18 16:47:46 -0700 | [diff] [blame] | 342 | .. _Trusted Firmware binary repository: https://review.trustedfirmware.org/admin/repos/tf-binaries |
| 343 | .. _tf-binaries-readme: https://git.trustedfirmware.org/tf-binaries.git/tree/readme.rst |
Sandrine Bailleux | 1a4efb1 | 2022-04-21 10:17:22 +0200 | [diff] [blame] | 344 | .. _TF-A mailing list: https://lists.trustedfirmware.org/mailman3/lists/tf-a.lists.trustedfirmware.org/ |
Jayanth Dodderi Chidanand | 32e5fa0 | 2021-08-31 12:27:48 +0100 | [diff] [blame] | 345 | .. _tf-a-ci-scripts repository: https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git/ |
| 346 | .. _tf-cov-make: https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git/tree/script/tf-coverity/tf-cov-make |
Sandrine Bailleux | 9c2db48 | 2024-01-26 11:48:32 +0100 | [diff] [blame] | 347 | .. _How to Contribute Code: https://tf-ci-users-guide.readthedocs.io/en/latest/#how-to-contribute-code |
| 348 | .. _TF-A CI scripts overview: https://tf-ci-users-guide.readthedocs.io/en/latest/#tf-a-ci-scripts-overview |
| 349 | .. _tf-a-coverity Jenkins job: https://ci.trustedfirmware.org/job/tf-a-coverity/ |
| 350 | .. _TF-A CI static checks job: https://ci.trustedfirmware.org/job/tf-a-static-checks/ |