blob: 4ba4bb2d657b6918515354bf1f7eb7876938b523 [file] [log] [blame]
Tom Rinidc1ad472022-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
11* The first 2 weeks are called Merge Window, which is followed by a
12 Stabilization Period.
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
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
30The first two weeks of each Release Cycle are called *Merge Window*.
31
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
37------------
38
39The Merge Window is the period when new patches get submitted
40(and hopefully accepted) for inclusion into U-Boot mainline.
41
42This is the only time when new code (like support for new processors or new
43boards, or other new features or reorganization of code) is accepted.
44
45Twilight Time
46-------------
47
48Usually patches do not get accepted as they are - the peer review that takes
Tom Rini50a7adc2022-07-14 08:07:45 -040049place will usually require changes and resubmissions of the patches before they
Tom Rinidc1ad472022-07-14 08:07:43 -040050are considered to be ripe for inclusion into mainline.
51
Tom Rini50a7adc2022-07-14 08:07:45 -040052Also the review often happens not immediately after a patch was submitted,
Tom Rinidc1ad472022-07-14 08:07:43 -040053but only when somebody (usually the responsible custodian) finds time to do
54this.
55
Tom Rini50a7adc2022-07-14 08:07:45 -040056The result is that the final version of such patches gets submitted after the
Tom Rinidc1ad472022-07-14 08:07:43 -040057merge window has been closed.
58
59It is current practice in U-Boot that such patches are eligible to go into the
60upcoming release.
61
Tom Rini50a7adc2022-07-14 08:07:45 -040062The result is that the release of the ``"-rc1"`` version and formal closing of
63the Merge Window does not preclude patches that were already posted from being
64merged for the upcoming release.
Tom Rinidc1ad472022-07-14 08:07:43 -040065
66Stabilization Period
67--------------------
68
69During the Stabilization Period only patches containing bug fixes get
70applied.
71
72Corner Cases
73------------
74
75Sometimes it is not clear if a patch contains a bug fix or not.
76For example, changes that remove dead code, unused macros etc. or
77that contain Coding Style fixes are not strict bug fixes.
78
Tom Rini50a7adc2022-07-14 08:07:45 -040079In such situations it is up to the responsible custodian to decide if they
80apply such patches even when the Merge Window is closed.
Tom Rinidc1ad472022-07-14 08:07:43 -040081
82Exception: at the end of the Stabilization Period only strict bug
83fixes my be applied.
84
Tom Rini50a7adc2022-07-14 08:07:45 -040085Sometimes patches miss the Merge Window slightly - say by a few
Tom Rinidc1ad472022-07-14 08:07:43 -040086hours or even a day. Patch acceptance is not as critical as a
87financial transaction, or such. So if there is such a slight delay,
88the custodian is free to turn a blind eye and accept it anyway. The
89idea of the development process is to make it foreseeable,
90but not to slow down development.
91
92It makes more sense if an engineer spends another day on testing and
93cleanup and submits the patch a couple of hours late, instead of
94submitting a green patch which will waste efforts from several people
95during several rounds of review and reposts.
96
97Differences 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
110Custodians
111----------
112
113The Custodians take responsibility for some area of the U-Boot code. The
Tom Rini50a7adc2022-07-14 08:07:45 -0400114in-tree ``MAINTAINERS`` files list who is responsible for which areas.
Tom Rinidc1ad472022-07-14 08:07:43 -0400115
116It is their responsibility to pick up patches from the mailing list
117that fall into their responsibility, and to process these.
118
119A very important responsibility of each custodian is to provide
120feedback to the submitter of a patch about what is going on: if the
121patch was accepted, or if it was rejected (which exact list of
122reasons), if it needs to be reworked (with respective review
123comments). Even a "I have no time now, will look into it later"
124message is better than nothing. Also, if there are remarks to a
125patch, these should leave no doubt if they were just comments and the
126patch will be accepted anyway, or if the patch should be
127reworked/resubmitted, or if it was rejected.
128
129Work flow of a Custodian
130------------------------
131
132The normal flow of work in the U-Boot development process will look
133like this:
134
Tom Rini61550732022-07-14 08:07:46 -0400135#. A developer submits a patch via e-mail to the u-boot mailing list. In
136 U-Boot, we make use of the `Developer Certificate of Origin
137 <https://developercertificate.org/>`_ that is common in other projects such
138 as the Linux kernel. Following this and adding a ``Signed-off-by:`` line
139 that contains the developer's name and email address is required.
Tom Rinidc1ad472022-07-14 08:07:43 -0400140
Tom Rini61550732022-07-14 08:07:46 -0400141#. Everybody who can is invited to review and test the changes. Typically, we
142 follow the same guidelines as the Linux kernel for `Acked-by
143 <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by>`_
144 as well as `Reviewed-by
145 <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>`_
146 and similar additional tags.
Tom Rinidc1ad472022-07-14 08:07:43 -0400147
Tom Rini61550732022-07-14 08:07:46 -0400148#. The responsible custodian inspects this patch, especially for:
Tom Rinidc1ad472022-07-14 08:07:43 -0400149
150 #. :doc:`codingstyle`
151
152 #. Basic logic:
153
154 * The patch fixes a real problem.
155
156 * The patch does not introduce new problems, especially it does not break
157 other boards or architectures
158
Tom Rini61550732022-07-14 08:07:46 -0400159 #. U-Boot Philosophy, as documented in :doc:`designprinciples`.
Tom Rinidc1ad472022-07-14 08:07:43 -0400160
Tom Rini61550732022-07-14 08:07:46 -0400161 #. Applies cleanly to the source tree. The custodian is expected to put in
162 a "best effort" if a patch does not apply cleanly, but can be made to apply
163 still. It is up to the custodian to decide how recent of a commit the
164 patch must be against. It is acceptable to request patches against the
165 last officially released version of U-Boot or newer. Of course a
166 custodian can also accept patches against older code. It can be
167 difficult to find the correct balance between putting too much work on
168 the custodian or too much work on an individual submitting a patch when
169 something does not apply cleanly.
Tom Rinidc1ad472022-07-14 08:07:43 -0400170
Tom Rini50a7adc2022-07-14 08:07:45 -0400171 #. Passes :doc:`ci_testing` as this checks for new warnings and other issues.
Tom Rinidc1ad472022-07-14 08:07:43 -0400172
Tom Rini61550732022-07-14 08:07:46 -0400173#. Note that in some cases more than one custodian may feel responsible for a
174 particular change. To avoid duplicated efforts, the custodian who starts
175 processing the patch should follow up to the email saying they intend to
176 pick it up.
Tom Rinidc1ad472022-07-14 08:07:43 -0400177
Tom Rini61550732022-07-14 08:07:46 -0400178#. Commits must show original author in the ``author`` field and include all of
179 the ``Signed-off-by``, ``Reviewed-by``, etc, tags that have been submitted.
Tom Rinidc1ad472022-07-14 08:07:43 -0400180
Tom Rini61550732022-07-14 08:07:46 -0400181#. The final decision to accept or reject a patch comes down to the custodian
182 in question.
Tom Rinidc1ad472022-07-14 08:07:43 -0400183
Tom Rini61550732022-07-14 08:07:46 -0400184#. If accepted, the custodian adds the patch to their public git repository.
185 Ideally, they will also follow up on the mailing list with some notification
186 that it has been applied. This is not always easy given different custodian
187 workflows and environments however.
Tom Rinidc1ad472022-07-14 08:07:43 -0400188
Tom Rini61550732022-07-14 08:07:46 -0400189#. Although a custodian is supposed to perform their own tests it is a
190 well-known and accepted fact that they needs help from other developers who
191 - for example - have access to the required hardware or other relevant
192 environments. Custodians are expected to ask for assistance with testing
193 when required.
Tom Rinidc1ad472022-07-14 08:07:43 -0400194
Tom Rini61550732022-07-14 08:07:46 -0400195#. Custodians are expected to submit a timely pull request of their git
196 repository to the main repository. It is strongly encouraged that a CI run
197 has been completed prior to submission, but not required.