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