Skip to content

Commit 5a3c306

Browse files
committed
Pull request doc-202510-rc6 CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/27807 * Update coding style to recommend b4 for patch submission * pytest: Fix inline code and other formatting * develop: fix grammar and syntax
2 parents 72f72fa + a8d451a commit 5a3c306

3 files changed

Lines changed: 142 additions & 99 deletions

File tree

doc/develop/codingstyle.rst

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,55 @@ The following rules apply:
2323
<https://peps.python.org/pep-0008/>`_. Use `pylint
2424
<https://github.com/pylint-dev/pylint>`_ for checking the code.
2525

26-
* Use patman to send your patches (``tools/patman/patman -H`` for full
27-
instructions). With a few tags in your commits this will check your patches
28-
and take care of emailing them.
26+
* Use the `b4 <https://git.kernel.org/pub/scm/utils/b4/b4.git/>`_ tool to prepare and
27+
send your patches. b4 has become the preferred tool to sending patches for many
28+
Linux kernel contributors, and U-Boot ships with a ready-to-use ``.b4-config`` that
29+
targets ``[email protected]`` and integrates with ``scripts/get_maintainer.pl`` for
30+
recipient discovery.
2931

30-
* If you don't use patman, make sure to run ``scripts/checkpatch.pl``. For
31-
more information, read :doc:`checkpatch`. Note that this should be done
32-
*before* posting on the mailing list!
32+
Start a topical series with ``b4 prep`` and keep the commits organised with
33+
``git rebase -i``. ``b4 prep --edit-cover`` opens an editor for the cover
34+
letter, while ``b4 prep --auto-to-cc`` collects reviewers and maintainers from
35+
both the configuration file and ``scripts/get_maintainer.pl``.
36+
37+
.. code-block:: bash
38+
39+
b4 prep -n mmc-fixes
40+
git rebase -i origin/master
41+
b4 prep --edit-cover
42+
b4 prep --auto-to-cc
43+
44+
Run the style checks before sending. ``b4 prep --check`` wraps the existing
45+
tooling so you see the output from ``scripts/checkpatch.pl`` alongside b4's
46+
own validation. You can always invoke ``scripts/checkpatch.pl`` directly for
47+
additional runs.
48+
49+
.. code-block:: bash
50+
51+
b4 prep --check
52+
53+
When the series is ready, use ``b4 send``. Begin with ``--dry-run`` to review
54+
the generated emails and ``--reflect`` to copy yourself for records before
55+
dispatching to ``[email protected]``.
56+
57+
.. code-block:: bash
58+
59+
b4 send --dry-run
60+
b4 send --reflect
61+
b4 send
62+
63+
After reviews arrive, collect Acked-by/Tested-by tags with ``b4 trailers -u``
64+
and fold them into your commits before resending the updated series.
65+
66+
.. code-block:: bash
67+
68+
b4 trailers -u
69+
git rebase -i origin/master
70+
b4 send
71+
72+
* Run ``scripts/checkpatch.pl`` directly or via ``b4 prep --check`` so that all
73+
issues are resolved *before* posting on the mailing list. For more information,
74+
read :doc:`checkpatch`.
3375

3476
* Source files originating from different projects (for example the MTD
3577
subsystem or the hush shell code from the BusyBox project) may, after

doc/develop/devicetree/control.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ regularly synced with the Linux kernel and hence no need for manual devicetree
7979
sync. You may find that the `dts/upstream/` already has a suitable devicetree
8080
file for your board. Look in `dts/upstream/src/<arch>/<vendor>`.
8181

82-
If not you might find other boards with suitable files that you can
82+
If not, you might find other boards with suitable files that you can
8383
modify to your needs. Look in the board directories for files with a
8484
.dts extension.
8585

@@ -98,7 +98,7 @@ Linux kernel release. To sync the `dts/upstream/` subtree, run::
9898

9999
./tools/update-subtree.sh pull dts <devicetree-rebasing-release-tag>
100100

101-
If required it is also possible to cherry-pick fixes from the
101+
If required, it is also possible to cherry-pick fixes from the
102102
devicetree-rebasing repository prior to next sync, usage::
103103

104104
./tools/update-subtree.sh pick dts <devicetree-rebasing-commit-id>
@@ -192,7 +192,7 @@ With `dts/upstream` Git subtree, it is ensured that devicetree files in U-Boot
192192
are an exact copy of those in Linux kernel available under
193193
`dts/upstream/src/<arch>/<vendor>`.
194194

195-
U-Boot is of course a very different project from Linux, e.g. it operates under
195+
U-Boot is, of course, a very different project from Linux, e.g. it operates under
196196
much more restrictive memory and code-size constraints. Where Linux may use a
197197
full clock driver with Common Clock Format (CCF) to find the input clock to the
198198
UART, U-Boot typically wants to output a banner as early as possible before too
@@ -212,7 +212,7 @@ order::
212212
<CONFIG_SYS_VENDOR>-u-boot.dtsi
213213
u-boot.dtsi
214214

215-
Only one of these is selected but of course you can #include another one within
215+
Only one of these is selected, but, of course, you can #include another one within
216216
that file, to create a hierarchy of shared files.
217217

218218

@@ -309,8 +309,8 @@ Limitations
309309
Devicetrees can help reduce the complexity of supporting variants of boards
310310
which use the same SOC / CPU.
311311

312-
However U-Boot is designed to build for a single architecture type and CPU
313-
type. So for example it is not possible to build a single ARM binary
312+
However, U-Boot is designed to build for a single architecture type and CPU
313+
type. So, for example, it is not possible to build a single ARM binary
314314
which runs on your AT91 and OMAP boards, relying on an fdt to configure
315315
the various features. This is because you must select one of
316316
the CPU families within arch/arm/cpu/arm926ejs (omap or at91) at build
@@ -328,7 +328,7 @@ files are pulled in, and the fdt controls *how* those files work.
328328
History
329329
-------
330330

331-
U-Boot configuration was previous done using CONFIG options in the board
331+
U-Boot configuration was previously done using CONFIG options in the board
332332
config file. This eventually got out of hand with nearly 10,000 options.
333333

334334
U-Boot adopted devicetrees around the same time as Linux and early boards

0 commit comments

Comments
 (0)