Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
| 3 | U-Boot Development Process |
| 4 | ========================== |
| 5 | |
| 6 | Management Summary |
| 7 | ------------------ |
| 8 | |
| 9 | * Development happens in Release Cycles of 3 months. |
| 10 | |
Tom Rini | bab5e4d | 2022-07-12 17:34:15 -0400 | [diff] [blame] | 11 | * The first 3 weeks of the cycle are referred to as the Merge Window, which is |
| 12 | followed by a Stabilization Period. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 13 | |
| 14 | * Patches with new code get only accepted while the Merge Window is open. |
| 15 | |
| 16 | * A patch that is generally in good shape and that was submitted while the |
| 17 | Merge Window was open is eligible to go into the upcoming release, even if |
| 18 | changes and resubmits are needed. |
| 19 | |
| 20 | * During the Stabilization Period, only patches that contain bug fixes get |
| 21 | applied. |
| 22 | |
| 23 | Phases of the Development Process |
| 24 | --------------------------------- |
| 25 | |
Tom Rini | 0249127 | 2024-08-26 10:49:54 -0600 | [diff] [blame^] | 26 | U-Boot development takes place in a :doc:`release_cycle`. A Release Cycle |
| 27 | lasts normally for three months. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 28 | |
Tom Rini | bab5e4d | 2022-07-12 17:34:15 -0400 | [diff] [blame] | 29 | The first three weeks of each Release Cycle are called *Merge Window*. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 30 | |
| 31 | It is followed by a *Stabilization Period*. |
| 32 | |
| 33 | The end of a Release Cycle is marked by the release of a new U-Boot version. |
| 34 | |
| 35 | Merge Window |
Tom Rini | 295eb30 | 2024-05-17 11:49:29 -0600 | [diff] [blame] | 36 | ^^^^^^^^^^^^ |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 37 | |
Tom Rini | bab5e4d | 2022-07-12 17:34:15 -0400 | [diff] [blame] | 38 | The Merge Window is the period when new patches get submitted (and hopefully |
| 39 | accepted) for inclusion into U-Boot mainline. This period lasts for 21 days (3 |
| 40 | weeks) and ends with the release of ``"-rc1"``. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 41 | |
| 42 | This is the only time when new code (like support for new processors or new |
| 43 | boards, or other new features or reorganization of code) is accepted. |
| 44 | |
| 45 | Twilight Time |
Tom Rini | 295eb30 | 2024-05-17 11:49:29 -0600 | [diff] [blame] | 46 | ^^^^^^^^^^^^^ |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 47 | |
| 48 | Usually patches do not get accepted as they are - the peer review that takes |
Tom Rini | 4eed72a | 2022-07-14 08:07:45 -0400 | [diff] [blame] | 49 | place will usually require changes and resubmissions of the patches before they |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 50 | are considered to be ripe for inclusion into mainline. |
| 51 | |
Tom Rini | 4eed72a | 2022-07-14 08:07:45 -0400 | [diff] [blame] | 52 | Also the review often happens not immediately after a patch was submitted, |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 53 | but only when somebody (usually the responsible custodian) finds time to do |
| 54 | this. |
| 55 | |
Tom Rini | 4eed72a | 2022-07-14 08:07:45 -0400 | [diff] [blame] | 56 | The result is that the final version of such patches gets submitted after the |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 57 | merge window has been closed. |
| 58 | |
| 59 | It is current practice in U-Boot that such patches are eligible to go into the |
| 60 | upcoming release. |
| 61 | |
Tom Rini | 4eed72a | 2022-07-14 08:07:45 -0400 | [diff] [blame] | 62 | The result is that the release of the ``"-rc1"`` version and formal closing of |
| 63 | the Merge Window does not preclude patches that were already posted from being |
| 64 | merged for the upcoming release. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 65 | |
| 66 | Stabilization Period |
Tom Rini | 295eb30 | 2024-05-17 11:49:29 -0600 | [diff] [blame] | 67 | ^^^^^^^^^^^^^^^^^^^^ |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 68 | |
| 69 | During the Stabilization Period only patches containing bug fixes get |
| 70 | applied. |
| 71 | |
| 72 | Corner Cases |
Tom Rini | 295eb30 | 2024-05-17 11:49:29 -0600 | [diff] [blame] | 73 | ^^^^^^^^^^^^ |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 74 | |
| 75 | Sometimes it is not clear if a patch contains a bug fix or not. |
| 76 | For example, changes that remove dead code, unused macros etc. or |
| 77 | that contain Coding Style fixes are not strict bug fixes. |
| 78 | |
Tom Rini | 4eed72a | 2022-07-14 08:07:45 -0400 | [diff] [blame] | 79 | In such situations it is up to the responsible custodian to decide if they |
| 80 | apply such patches even when the Merge Window is closed. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 81 | |
| 82 | Exception: at the end of the Stabilization Period only strict bug |
| 83 | fixes my be applied. |
| 84 | |
Tom Rini | 4eed72a | 2022-07-14 08:07:45 -0400 | [diff] [blame] | 85 | Sometimes patches miss the Merge Window slightly - say by a few |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 86 | hours or even a day. Patch acceptance is not as critical as a |
| 87 | financial transaction, or such. So if there is such a slight delay, |
| 88 | the custodian is free to turn a blind eye and accept it anyway. The |
| 89 | idea of the development process is to make it foreseeable, |
| 90 | but not to slow down development. |
| 91 | |
| 92 | It makes more sense if an engineer spends another day on testing and |
| 93 | cleanup and submits the patch a couple of hours late, instead of |
| 94 | submitting a green patch which will waste efforts from several people |
| 95 | during several rounds of review and reposts. |
| 96 | |
| 97 | Differences to the Linux Development Process |
| 98 | -------------------------------------------- |
| 99 | |
| 100 | * In Linux, top-level maintainers will collect patches in their trees and send |
| 101 | pull requests to Linus as soon as the merge window opens. |
| 102 | So far, most U-Boot custodians do not work like that; they send pull requests |
| 103 | only at (or even after) the end of the merge window. |
| 104 | |
| 105 | * In Linux, the closing of the merge window is marked by the release of the |
| 106 | next ``"-rc1"`` |
| 107 | In U-Boot, ``"-rc1"`` will only be released after all (or at least most of |
| 108 | the) patches that were submitted during the merge window have been applied. |
| 109 | |
Tom Rini | 916f738 | 2024-05-17 11:49:30 -0600 | [diff] [blame] | 110 | Resyncing of the device tree subtree |
| 111 | ------------------------------------ |
| 112 | |
| 113 | As explained in :doc:`devicetree/control` some platforms make use of device tree |
| 114 | files which come from a git subtree that mirrors the Linux Kernel sources |
| 115 | itself. For our purposes, we only track releases and not release candidates for |
| 116 | merging in our tree. These merges follow the normal merge window rules. |
| 117 | |
| 118 | In the case of specific changes, such as bug fixes or new platform support, |
| 119 | these can be "cherry-picked" and are subject to the normal merge rules. For |
| 120 | example, a bug fix can come in later in the window but a full re-sync only |
| 121 | happens within the merge window itself. |
| 122 | |
Tom Rini | 62a2e1d | 2022-08-29 12:59:33 -0400 | [diff] [blame] | 123 | .. _custodians: |
| 124 | |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 125 | Custodians |
| 126 | ---------- |
| 127 | |
| 128 | The Custodians take responsibility for some area of the U-Boot code. The |
Tom Rini | 4eed72a | 2022-07-14 08:07:45 -0400 | [diff] [blame] | 129 | in-tree ``MAINTAINERS`` files list who is responsible for which areas. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 130 | |
| 131 | It is their responsibility to pick up patches from the mailing list |
| 132 | that fall into their responsibility, and to process these. |
| 133 | |
| 134 | A very important responsibility of each custodian is to provide |
| 135 | feedback to the submitter of a patch about what is going on: if the |
| 136 | patch was accepted, or if it was rejected (which exact list of |
| 137 | reasons), if it needs to be reworked (with respective review |
| 138 | comments). Even a "I have no time now, will look into it later" |
| 139 | message is better than nothing. Also, if there are remarks to a |
| 140 | patch, these should leave no doubt if they were just comments and the |
| 141 | patch will be accepted anyway, or if the patch should be |
| 142 | reworked/resubmitted, or if it was rejected. |
| 143 | |
Tom Rini | 0b1f013 | 2022-08-29 12:59:34 -0400 | [diff] [blame] | 144 | Review Process, Git Tags |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 145 | ------------------------ |
| 146 | |
Tom Rini | 0b1f013 | 2022-08-29 12:59:34 -0400 | [diff] [blame] | 147 | There are a number of *git tags* that are used to document the origin and the |
| 148 | processing of patches on their way into the mainline U-Boot code. The following |
| 149 | is an attempt to document how these are usually handled in the U-Boot project. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 150 | |
Tom Rini | 0b1f013 | 2022-08-29 12:59:34 -0400 | [diff] [blame] | 151 | In general, we try to follow the established procedures from other projects, |
| 152 | especially the Linux kernel, but there may be smaller differences. For |
| 153 | reference, see the Linux kernel's `Submitting patches |
| 154 | <https://www.kernel.org/doc/html/latest/process/submitting-patches.html>`_ |
| 155 | document. |
| 156 | |
| 157 | .. _dco: |
| 158 | |
| 159 | * Signed-off-by: the *Signed-off-by:* is a line at the end of the commit |
| 160 | message by which the signer certifies that they were involved in the development |
| 161 | of the patch and that they accept the `Developer Certificate of Origin |
| 162 | <https://developercertificate.org/>`_. Following this and adding a |
| 163 | ``Signed-off-by:`` line that contains the developer's name and email address |
| 164 | is required. |
| 165 | |
| 166 | * Please note that in U-Boot, we do not add a ``Signed-off-by`` tag if we |
| 167 | just pass on a patch without any changes. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 168 | |
Tom Rini | 34b44d9 | 2022-08-01 14:57:01 -0400 | [diff] [blame] | 169 | * Please note that when importing code from other projects you must say |
| 170 | where it comes from, and what revision you are importing. You must not |
| 171 | however copy ``Signed-off-by`` or other tags. |
| 172 | |
Tom Rini | 0b1f013 | 2022-08-29 12:59:34 -0400 | [diff] [blame] | 173 | * Everybody who can is invited to review and test the changes. Typically, we |
| 174 | follow the same guidelines as the Linux kernel for `Acked-by |
| 175 | <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by>`_ |
| 176 | as well as `Reviewed-by |
| 177 | <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>`_ |
| 178 | and similar additional tags. |
| 179 | |
Maxim Cournoyer | 4322898 | 2022-12-16 21:09:40 -0500 | [diff] [blame] | 180 | * Reviewed-by: The patch has been reviewed and found acceptable according to |
| 181 | the `Reviewer's statement of oversight |
Tom Rini | 0b1f013 | 2022-08-29 12:59:34 -0400 | [diff] [blame] | 182 | <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#reviewer-s-statement-of-oversight>`_. |
| 183 | A *Reviewed-by:* tag is a statement of opinion that the patch is an |
| 184 | appropriate modification of the code without any remaining serious technical |
| 185 | issues. Any interested reviewer (who has done the work) can offer a |
| 186 | *Reviewed-by:* tag for a patch. |
| 187 | |
| 188 | * Acked-by: If a person was not directly involved in the preparation or |
| 189 | handling of a patch but wishes to signify and record their approval of it |
| 190 | then they can arrange to have an *Acked-by:* line added to the patch's |
| 191 | changelog. |
| 192 | |
| 193 | * Tested-by: A *Tested-by:* tag indicates that the patch has been successfully |
| 194 | tested (in some environment) by the person named. Andrew Morton: "I think |
| 195 | it's very useful information to have. For a start, it tells you who has the |
| 196 | hardware and knows how to build a kernel. So if you're making a change to a |
| 197 | driver and want it tested, you can troll the file's changelog looking for |
| 198 | people who might be able to help." |
| 199 | |
| 200 | * Reported-by: If this patch fixes a problem reported by somebody else, |
| 201 | consider adding a *Reported-by:* tag to credit the reporter for their |
| 202 | contribution. Please note that this tag should not be added without the |
| 203 | reporter's permission, especially if the problem was not reported in a public |
| 204 | forum. |
| 205 | |
| 206 | * Cc: If a person should have the opportunity to comment on a patch, you may |
| 207 | optionally add a *Cc:* tag to the patch. Git tools (git send-email) will then |
Maxim Cournoyer | 4322898 | 2022-12-16 21:09:40 -0500 | [diff] [blame] | 208 | automatically arrange that they receives a copy of the patch when you submit |
| 209 | it to the mailing list. This is the only tag which might be added without an |
Tom Rini | 0b1f013 | 2022-08-29 12:59:34 -0400 | [diff] [blame] | 210 | explicit action by the person it names. This tag documents that potentially |
| 211 | interested parties have been included in the discussion. |
| 212 | For example, when your change affects a specific board or driver, then makes |
| 213 | a lot of sense to put the respective maintainer of this code on Cc: |
| 214 | |
| 215 | Work flow of a Custodian |
| 216 | ------------------------ |
| 217 | |
| 218 | The normal flow of work in the U-Boot development process will look |
| 219 | like this: |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 220 | |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 221 | #. The responsible custodian inspects this patch, especially for: |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 222 | |
Tom Rini | 0b1f013 | 2022-08-29 12:59:34 -0400 | [diff] [blame] | 223 | #. The commit message is useful, descriptive and makes correct and |
Maxim Cournoyer | 4322898 | 2022-12-16 21:09:40 -0500 | [diff] [blame] | 224 | appropriate usage of required *git tags*. |
Tom Rini | 0b1f013 | 2022-08-29 12:59:34 -0400 | [diff] [blame] | 225 | |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 226 | #. :doc:`codingstyle` |
| 227 | |
| 228 | #. Basic logic: |
| 229 | |
| 230 | * The patch fixes a real problem. |
| 231 | |
| 232 | * The patch does not introduce new problems, especially it does not break |
| 233 | other boards or architectures |
| 234 | |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 235 | #. U-Boot Philosophy, as documented in :doc:`designprinciples`. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 236 | |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 237 | #. Applies cleanly to the source tree. The custodian is expected to put in |
| 238 | a "best effort" if a patch does not apply cleanly, but can be made to apply |
| 239 | still. It is up to the custodian to decide how recent of a commit the |
| 240 | patch must be against. It is acceptable to request patches against the |
| 241 | last officially released version of U-Boot or newer. Of course a |
| 242 | custodian can also accept patches against older code. It can be |
| 243 | difficult to find the correct balance between putting too much work on |
| 244 | the custodian or too much work on an individual submitting a patch when |
| 245 | something does not apply cleanly. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 246 | |
Tom Rini | 4eed72a | 2022-07-14 08:07:45 -0400 | [diff] [blame] | 247 | #. Passes :doc:`ci_testing` as this checks for new warnings and other issues. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 248 | |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 249 | #. Note that in some cases more than one custodian may feel responsible for a |
| 250 | particular change. To avoid duplicated efforts, the custodian who starts |
| 251 | processing the patch should follow up to the email saying they intend to |
| 252 | pick it up. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 253 | |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 254 | #. Commits must show original author in the ``author`` field and include all of |
| 255 | the ``Signed-off-by``, ``Reviewed-by``, etc, tags that have been submitted. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 256 | |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 257 | #. The final decision to accept or reject a patch comes down to the custodian |
| 258 | in question. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 259 | |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 260 | #. If accepted, the custodian adds the patch to their public git repository. |
| 261 | Ideally, they will also follow up on the mailing list with some notification |
| 262 | that it has been applied. This is not always easy given different custodian |
| 263 | workflows and environments however. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 264 | |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 265 | #. Although a custodian is supposed to perform their own tests it is a |
Maxim Cournoyer | 4322898 | 2022-12-16 21:09:40 -0500 | [diff] [blame] | 266 | well-known and accepted fact that they need help from other developers who |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 267 | - for example - have access to the required hardware or other relevant |
| 268 | environments. Custodians are expected to ask for assistance with testing |
| 269 | when required. |
Tom Rini | 4476965 | 2022-07-14 08:07:43 -0400 | [diff] [blame] | 270 | |
Tom Rini | 1974a56 | 2022-07-14 08:07:46 -0400 | [diff] [blame] | 271 | #. Custodians are expected to submit a timely pull request of their git |
| 272 | repository to the main repository. It is strongly encouraged that a CI run |
| 273 | has been completed prior to submission, but not required. |