blob: 534da4a2a704f00e54fab8ef806acbdb56f93469 [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
49place will usually require changes and resubmits of the patches before they
50are considered to be ripe for inclusion into mainline.
51
52Also, the review often happens not immediately after a patch was submitted,
53but only when somebody (usually the responsible custodian) finds time to do
54this.
55
56In the result, the final version of such patches gets submitted after the
57merge window has been closed.
58
59It is current practice in U-Boot that such patches are eligible to go into the
60upcoming release.
61
62In the result, the release of the ``"-rc1"`` version does not immediately follow
63the closing of the Merge Window.
64
65Stabilization Period
66--------------------
67
68During the Stabilization Period only patches containing bug fixes get
69applied.
70
71Corner Cases
72------------
73
74Sometimes it is not clear if a patch contains a bug fix or not.
75For example, changes that remove dead code, unused macros etc. or
76that contain Coding Style fixes are not strict bug fixes.
77
78In such situations it is up to the responsible custodian to decide if he
79applies such patches even when the Merge Window is closed.
80
81Exception: at the end of the Stabilization Period only strict bug
82fixes my be applied.
83
84Sometimes patches miss the the Merge Window slightly - say by few
85hours or even a day. Patch acceptance is not as critical as a
86financial transaction, or such. So if there is such a slight delay,
87the custodian is free to turn a blind eye and accept it anyway. The
88idea of the development process is to make it foreseeable,
89but not to slow down development.
90
91It makes more sense if an engineer spends another day on testing and
92cleanup and submits the patch a couple of hours late, instead of
93submitting a green patch which will waste efforts from several people
94during several rounds of review and reposts.
95
96Differences to the Linux Development Process
97--------------------------------------------
98
99* In Linux, top-level maintainers will collect patches in their trees and send
100 pull requests to Linus as soon as the merge window opens.
101 So far, most U-Boot custodians do not work like that; they send pull requests
102 only at (or even after) the end of the merge window.
103
104* In Linux, the closing of the merge window is marked by the release of the
105 next ``"-rc1"``
106 In U-Boot, ``"-rc1"`` will only be released after all (or at least most of
107 the) patches that were submitted during the merge window have been applied.
108
109Custodians
110----------
111
112The Custodians take responsibility for some area of the U-Boot code. The
113in-tree ``MAINTAINERS`` files list who is reponsible for which areas.
114
115It is their responsibility to pick up patches from the mailing list
116that fall into their responsibility, and to process these.
117
118A very important responsibility of each custodian is to provide
119feedback to the submitter of a patch about what is going on: if the
120patch was accepted, or if it was rejected (which exact list of
121reasons), if it needs to be reworked (with respective review
122comments). Even a "I have no time now, will look into it later"
123message is better than nothing. Also, if there are remarks to a
124patch, these should leave no doubt if they were just comments and the
125patch will be accepted anyway, or if the patch should be
126reworked/resubmitted, or if it was rejected.
127
128Work flow of a Custodian
129------------------------
130
131The normal flow of work in the U-Boot development process will look
132like this:
133
134#. A developer submits a patch via e-mail to the u-boot-users mailing list.
135 U-Boot has adopted the `Linux kernel signoff policy <https://groups.google.com/g/fa.linux.kernel/c/TLJIJVA-I6o?pli=1>`_, so the submitter must
136 include a ``Signed-off-by:`` line.
137
138#. Everybody who can is invited to review and test the changes. Reviews should
139 reply on the mailing list with ``Acked-by`` lines.
140
141#. The responsible custodian
142
143 #. inspects this patch, especially for:
144
145 #. :doc:`codingstyle`
146
147 #. Basic logic:
148
149 * The patch fixes a real problem.
150
151 * The patch does not introduce new problems, especially it does not break
152 other boards or architectures
153
154 #. U-Boot Philosophy
155
156 #. Applies cleanly to the source tree
157
158 #. passes a ``MAKEALL`` compile test without creating new warnings
159
160#. Notes:
161
162 #. In some cases more than one custodian may be affected or feel responsible.
163 To avoid duplicated efforts, the custodian who starts processing the
164 patch should send a short ACK to the mailing list.
165
166 #. We should create some tool to automatically do this.
167
168 #. This is well documented in :doc:`designprinciples`.
169
170 #. The custodian decides himself how recent the code must be. It is
171 acceptable to request patches against the last officially released
172 version of U-Boot or newer. Of course a custodian can also accept
173 patches against older code.
174
175 #. Commits should show original author in the ``author`` field and include all
176 sign off/ack lines.
177
178#. The custodian decides to accept or to reject the patch.
179
180#. If accepted, the custodian adds the patch to his public git repository and
181 notifies the mailing list. This note should include:
182
183 * a short description of the changes
184
185 * the list of the affected boards / architectures etc.
186
187 * suggested tests
188
189 Although the custodian is supposed to perform his own tests
190 it is a well-known and accepted fact that he needs help from
191 other developers who - for example - have access to the required
192 hardware or tool chains.
193 The custodian request help for tests and feedback from
194 specific maintainers and U-Boot users.
195
196#. Once tests are passed, some agreed time limit expires, the custodian
197 requests that the changes in his public git repository be merged into the
198 main tree. If necessary, the custodian may have to adapt his changes to
199 allow for a clean merge.
200 Todo: define a reasonable time limit. 3 weeks?