1# How to Contribute 2 3We'd love to accept your patches and contributions to this project. There are 4just a few small guidelines you need to follow. 5 6## Style guide 7 8Submissions should follow the Hafnium [style guide](docs/StyleGuide.md). 9 10## Code reviews 11 12All submissions, including submissions by project members, require review. We 13use [Gerrit](https://review.trustedfirmware.org/) for this purpose. 14 15To submit a change: 16 171. Create an account in the [Gerrit UI](https://review.trustedfirmware.org/). 182. Follow the [getting started](docs/GettingStarted.md) instructions to clone 19 the Hafnium repositories and set up the necessary commit hook. 203. Make your change. 214. Run our autoformatter with `make format`. 225. Commit as usual. If you make a change in a submodule you will also need to 23 commit a change in the main repository to update the submodule version. 246. Ensure that each commit in the series has at least one `Signed-off-by:` 25 line, using your real name and email address. The names in the 26 `Signed-off-by:` and `Author:` lines must match. If anyone else contributes 27 to the commit, they must also add their own `Signed-off-by:` line. By adding 28 this line the contributor certifies the contribution is made under the terms 29 of the [Developer Certificate of Origin](dco.txt). More details may be found 30 in the 31 [Gerrit Signed-off-by Lines guidelines](https://review.trustedfirmware.org/Documentation/user-signedoffby.html). 327. Run the [tests](docs/Testing.md) and other presubmit checks with 33 `kokoro/build.sh`, ensure they all pass. 348. Upload the change to Gerrit with `git push origin HEAD:refs/for/master`. If 35 you have changed submodules then you'll need to push them as well. 369. If you changed submodules, then add a matching 'topic' from the Gerrit UI 37 for all your changes (submodules and the main repository) so that they can 38 be reviewed and submitted together. 3910. Wait 20-30 minutes for the presubmit tests to run, and make sure a 'Verified 40 +1' comment shows up in Gerrit indicating that they have passed. If not, 41 follow the links to find the errors, fix them and try again. 4211. From the Gerrit UI add one or more reviewers. Looking at who has modified 43 the same files frequently recently is usually a good way to pick a reviewer. 44 Add a maintainer listed in the [maintainers](docs/Maintainers.md) page, who 45 will perform a final review and eventually approve the change. 46 47## Community Guidelines 48 49This project follows 50[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). 51