process.rst 11 KB

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