From c04fb8b505658af98b7a7b9a22647a29d8fbceb0 Mon Sep 17 00:00:00 2001 From: Andrew Goodbody Date: Mon, 11 Aug 2025 13:05:15 +0100 Subject: [PATCH 01/13] efi: serial: Use correct EFI status type int is not sufficient to hold and test the return from an EFI function call. Use efi_status_t instead so that the test can work as expected. This issue was found by Smatch. Fixes: 275854baeeec ("efi: Add a serial driver") Signed-off-by: Andrew Goodbody Reviewed-by: Heinrich Schuchardt --- drivers/serial/serial_efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/serial_efi.c b/drivers/serial/serial_efi.c index 5733eaaf9d4..d3cd4de34a2 100644 --- a/drivers/serial/serial_efi.c +++ b/drivers/serial/serial_efi.c @@ -33,7 +33,7 @@ int serial_efi_setbrg(struct udevice *dev, int baudrate) static int serial_efi_get_key(struct serial_efi_priv *priv) { - int ret; + efi_status_t ret; if (priv->have_key) return 0; From 4910a7cc696ffa3a36e23a215523d1ff31a5c8a1 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 12 Aug 2025 12:01:32 -0600 Subject: [PATCH 02/13] efi_loader: Make EFI_VARIABLES_PRESEED depend on !COMPILE_TEST When doing compile testing build we cannot rely on having a valid file for EFI_VAR_SEED_FILE to exist, so disable this option when doing compile tests. Signed-off-by: Tom Rini Reviewed-by: Ilias Apalodimas Acked-by: Heinrich Schuchardt --- lib/efi_loader/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index c2aa88f59fb..a7092c2e8a8 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -195,6 +195,7 @@ endchoice config EFI_VARIABLES_PRESEED bool "Initial values for UEFI variables" + depends on !COMPILE_TEST depends on !EFI_MM_COMM_TEE help Include a file with the initial values for non-volatile UEFI variables From 6deac6147bdba45e4bb74b608e301cb18a708b79 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 19 Aug 2025 16:33:52 +0200 Subject: [PATCH 03/13] efi: Select also CMD_DHCP from EFI_HTTP_BOOT This is needed because distro_efi_read_bootflow_net will then need dhcp_run which is not already enabled by CMD_NET. Signed-off-by: Jan Kiszka Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index a7092c2e8a8..900113ca3e9 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -565,6 +565,7 @@ config EFI_HTTP_BOOT bool "EFI HTTP Boot support" depends on NET || NET_LWIP select CMD_NET + select CMD_DHCP select CMD_DNS select CMD_WGET select BLKMAP From 6a006c56ee80ed0ad3fc8a35d96f1a184fbed53e Mon Sep 17 00:00:00 2001 From: Adriano Carvalho Date: Mon, 25 Aug 2025 23:32:28 +0100 Subject: [PATCH 04/13] doc: Fix obvious typos and minor improvements These are fixes to what looks like obvious typos. Some minor improvments are also included, such as: - Write "symbolic link" instead of symlink - Correct capitalization for LLVM (all caps) - Remove dead link and surrounding sentence Signed-off-by: Adriano Carvalho --- doc/build/clang.rst | 8 +++--- doc/build/gen_compile_commands.rst | 2 +- doc/build/tools.rst | 9 +++---- tools/buildman/buildman.rst | 41 +++++++++++++++--------------- 4 files changed, 29 insertions(+), 31 deletions(-) diff --git a/doc/build/clang.rst b/doc/build/clang.rst index 09bb988e923..a83ecb4fdc6 100644 --- a/doc/build/clang.rst +++ b/doc/build/clang.rst @@ -46,9 +46,9 @@ It can also be used to compile sandbox: FreeBSD 11 ---------- -Since llvm 3.4 is currently in the base system, the integrated assembler as -is incapable of building U-Boot. Therefore gas from devel/arm-gnueabi-binutils -is used instead. It needs a symlink to be picked up correctly though: +Since LLVM 3.4 is currently in the base system, the integrated assembler is +incapable of building U-Boot. Therefore gas from devel/arm-gnueabi-binutils is +used instead. It needs a symbolic link to be picked up correctly though: .. code-block:: bash @@ -64,7 +64,7 @@ The following commands compile U-Boot using the Clang xdev toolchain. gmake rpi_2_defconfig gmake CC="clang -target arm-freebsd-eabi --sysroot /usr/arm-freebsd" -j8 -Given that U-Boot will default to gcc, above commands can be +Given that U-Boot will default to gcc, the commands above can be simplified with a simple wrapper script - saved as /usr/local/bin/arm-gnueabi-freebsd-gcc - listed below: diff --git a/doc/build/gen_compile_commands.rst b/doc/build/gen_compile_commands.rst index d503764f9e3..5eb9e4ccb0a 100644 --- a/doc/build/gen_compile_commands.rst +++ b/doc/build/gen_compile_commands.rst @@ -39,7 +39,7 @@ course) to have an up-to-date database. The database will be in the root of the repository. No further modifications are needed for it to be usable by the LSP, unless you set a name for the database -other than it's default one (compile_commands.json). +other than the default one (compile_commands.json). Compatible IDEs --------------- diff --git a/doc/build/tools.rst b/doc/build/tools.rst index 5bfa05b2325..1cc8eb93230 100644 --- a/doc/build/tools.rst +++ b/doc/build/tools.rst @@ -8,7 +8,7 @@ Building tools for Linux ------------------------ To allow distributions to distribute all possible tools in a generic way, -avoiding the need of specific tools building for each machine, a tools only +avoiding the need of specific building tools for each machine, a tools-only defconfig file is provided. Using this, we can build the tools by doing:: @@ -30,9 +30,8 @@ installed all required packages below in order to build these host tools:: * diffutils (3.7) * openssl-devel (1.1.1.d) -Note the version numbers in these parentheses above are the package versions -at the time being when writing this document. The MSYS2 installer tested is -http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe. +Note that the version numbers in parentheses above are the package versions at +the time of writing this document. There are 3 MSYS subsystems installed: MSYS2, MinGW32 and MinGW64. Each subsystem provides an environment to build Windows applications. The MSYS2 @@ -50,7 +49,7 @@ Launch the MSYS2 shell of the MSYS2 environment, and do the following:: Building without Python ----------------------- -The tools-only builds bytes pylibfdt by default. To disable this, use the +The tools-only builds pylibfdt by default. To disable this, use the NO_PYTHON variable:: NO_PYTHON=1 make tools-only_defconfig tools-only diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index 8c45a841024..a30cd645bc0 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -22,10 +22,10 @@ example Raspberry Pi 2): What is this? ------------- -This tool handles building U-Boot to check that you have not broken it -with your patch series. It can build each individual commit and report -which boards fail on which commits, and which errors come up. It aims -to make full use of multi-processor machines. +This tool builds U-Boot to check that you have not broken it with your +patch series. It can build each individual commit and report which boards +fail on which commits, and which errors come up. It aims to make full use +of multi-processor machines. A key feature of buildman is its output summary, which allows warnings, errors or image size increases in a particular commit or board to be @@ -83,7 +83,7 @@ incremental build (i.e. not using 'make xxx_defconfig' unless you use -C). Eventually the thread reaches the last commit and stops. If a commit causes an error or warning, buildman will try it again after reconfiguring (but see -Q). Thus some commits may be built twice, with the first result silently -discarded. Lots of errors and warnings will causes lots of reconfigures and your +discarded. Lots of errors and warnings will cause lots of reconfigures and your build will be very slow. This is because a file that produces just a warning would not normally be rebuilt in an incremental build. Once a thread finishes building all the commits for a board, it starts on the commits for another @@ -154,7 +154,7 @@ means to build all arm boards except nvidia, freescale and anything ending with 'ball'. For building specific boards you can use the --boards (or --bo) option, which -takes a comma-separated list of board target names and be used multiple times +takes a comma-separated list of board target names and can be used multiple times on the command line: .. code-block:: bash @@ -212,7 +212,7 @@ Setting up The toolchain-alias section indicates that the i386 toolchain should be used to build x86 commits. - Note that you can also specific exactly toolchain prefixes if you like:: + Note that you can also specify toolchain prefixes if you like:: [toolchain-prefix] arm: /opt/arm-eabi-4.6/bin/arm-eabi- @@ -243,9 +243,9 @@ Setting up This tells buildman to use a compiler wrapper in front of CROSS_COMPILE. In this example, ccache. It doesn't affect the toolchain scan. The wrapper is - added when CROSS_COMPILE environtal variable is set. The name in this - section is ignored. If more than one line is provided, only the last one - is taken. + added when the CROSS_COMPILE environment variable is set. The tag name in + this section is not important. If more than one line is provided, only the + last one is used. #. Make sure you have the required Python pre-requisites @@ -484,7 +484,7 @@ Setting up How to run it ------------- -First do a dry run using the -n flag: (replace with a real, local +First do a dry run using the -n flag (replace with a real, local branch with a valid upstream): .. code-block:: bash @@ -898,7 +898,7 @@ The .buildman settings file The .buildman file provides information about the available toolchains and also allows build flags to be passed to 'make'. It consists of several -sections, with the section name in square brackets. Within each section are +sections, with the section name in square brackets. Within each section there are a set of (tag, value) pairs. '[global]' section @@ -939,8 +939,7 @@ a set of (tag, value) pairs. '[toolchain-prefix]' section This can be used to provide the full toolchain-prefix for one or more architectures. The full CROSS_COMPILE prefix must be provided. These - typically have a higher priority than matches in the '[toolchain]', due to - this prefix. + typically have a higher priority than matches in the '[toolchain]'. The tilde character ``~`` is supported in paths, to represent the home directory. @@ -1062,7 +1061,7 @@ For example:: + u-boot.cfg: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_NET=1 + u-boot-spl.cfg: CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 + all: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_NET=1 - am335x_evm_usbspl : + am335x_evm_usbspl: + u-boot.cfg: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_NET=1 + u-boot-spl.cfg: CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 + all: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_MMC=1 CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_NET=1 @@ -1073,15 +1072,15 @@ This shows that commit 44 enabled three new options for the board am335x_evm_usbspl which were not enabled in commit 43. There is also a summary for 'arm' showing all the changes detected for that architecture. In this case there is only one board with changes, so 'arm' output is the -same as 'am335x_evm_usbspl'/ +same as 'am335x_evm_usbspl'. The -K option uses the u-boot.cfg, spl/u-boot-spl.cfg and tpl/u-boot-tpl.cfg files which are produced by a build. If all you want is to check the configuration you can in fact avoid doing a full build, using --config-only. -This tells buildman to configuration U-Boot and create the .cfg files, but not +This tells buildman to configure U-Boot and create the .cfg files, but not actually build the source. This is 5-10 times faster than doing a full build. -By default buildman considers the follow two configuration methods +By default buildman considers the following two configuration methods equivalent:: #define CONFIG_SOME_OPTION @@ -1089,7 +1088,7 @@ equivalent:: CONFIG_SOME_OPTION=y The former would appear in a header filer and the latter in a defconfig -file. The achieve this, buildman considers 'y' to be '1' in configuration +file. To achieve this, buildman considers 'y' to be '1' in configuration variables. This avoids lots of useless output when converting a CONFIG option to Kconfig. To disable this behaviour, use --squash-config-y. @@ -1364,7 +1363,7 @@ regeneration of the file - in that case buildman exits after writing the file with exit code 2 if there was an error in the maintainer files. To use the default filename, use a hyphen, i.e. `-R -`. -You should use 'buildman -nv ' instead of greoing the boards.cfg file, +You should use 'buildman -nv ' instead of greping the boards.cfg file, since it may be dropped altogether in future. @@ -1378,7 +1377,7 @@ Use the `--maintainer-check` option to check this:: WARNING: board/mikrotik/crs3xx-98dx3236/MAINTAINERS: missing defconfig ending at line 7 WARNING: no maintainers for 'clearfog_spi' -Buildman returns with an exit code of 2 if there area any warnings. +Buildman returns with an exit code of 2 if there are any warnings. An experimental `--full-check option` also checks for boards which don't have a CONFIG_TARGET_xxx where xxx corresponds to their defconfig filename. This is From 45d32d2911b8b854abfd56ca6691bf5d47825656 Mon Sep 17 00:00:00 2001 From: Adriano Carvalho Date: Mon, 25 Aug 2025 23:32:29 +0100 Subject: [PATCH 05/13] doc: Quote all long form options using double backticks/grave accents Otherwise, the two dashes are rendered as just one. Signed-off-by: Adriano Carvalho --- tools/buildman/buildman.rst | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index a30cd645bc0..3b51b9ed2b3 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -100,8 +100,8 @@ threads do not affect the state of your git repository. Any checkouts done by the thread affect only the working directory for that thread. Buildman automatically selects the correct tool chain for each board. You -must supply suitable tool chains (see --fetch-arch), but buildman takes care -of selecting the right one. +must supply suitable tool chains (see ``--fetch-arch``), but buildman takes +care of selecting the right one. Buildman generally builds a branch (with the -b flag), and in this case builds the upstream commit as well, for comparison. So even if you have one @@ -153,9 +153,9 @@ You can also use -x to specifically exclude some boards. For example: means to build all arm boards except nvidia, freescale and anything ending with 'ball'. -For building specific boards you can use the --boards (or --bo) option, which -takes a comma-separated list of board target names and can be used multiple times -on the command line: +For building specific boards you can use the ``--boards`` (or ``--bo``) option, +which takes a comma-separated list of board target names and can be used +multiple times on the command line: .. code-block:: bash @@ -492,7 +492,7 @@ branch with a valid upstream): ./tools/buildman/buildman -b -n If it can't detect the upstream branch, try checking out the branch, and -doing something like 'git branch --set-upstream-to upstream/master' +doing something like ``git branch --set-upstream-to upstream/master`` or something similar. Buildman will try to guess a suitable upstream branch if it can't find one (you will see a message like "Guessing upstream as ..."). You can also use the -c option to manually specify the number of commits to @@ -731,17 +731,17 @@ Note that the 'text' region and 'rodata' are split out. You should add the two together to get the total read-only size (reported as the first column in the output from binutil's 'size' utility). -A useful option is --step which lets you skip some commits. For example ---step 2 will show the image sizes for only every 2nd commit (so it will +A useful option is ``--step`` which lets you skip some commits. For example +``--step 2`` will show the image sizes for only every 2nd commit (so it will compare the image sizes of the 1st, 3rd, 5th... commits). You can also use ---step 0 which will compare only the first and last commits. This is useful +``--step 0`` which will compare only the first and last commits. This is useful for an overview of how your entire series affects code size. It will build only the upstream commit and your final branch commit. You can also use -d to see a detailed size breakdown for each board. This list is sorted in order from largest growth to largest reduction. -It is even possible to go a little further with the -B option (--bloat). This +It is even possible to go a little further with the -B option (``--bloat``). This shows where U-Boot has bloated, breaking the size change down to the function level. Example output is below:: @@ -924,7 +924,7 @@ a set of (tag, value) pairs. This lists the available toolchains. The tag here doesn't matter, but make sure it is unique. The value is the path to the toolchain. Buildman will look in that path for a file ending in 'gcc'. It will then execute - it to check that it is a C compiler, passing only the --version flag to + it to check that it is a C compiler, passing only the ``--version`` flag to it. If the return code is 0, buildman assumes that it is a valid C compiler. It uses the first part of the name as the architecture and strips off the last part when setting the CROSS_COMPILE environment @@ -1005,7 +1005,7 @@ By default, buildman doesn't execute 'make mrproper' prior to building the first commit for each board. This reduces the amount of work 'make' does, and hence speeds up the build. To force use of 'make mrproper', use -the -m flag. This flag will slow down any buildman invocation, since it increases the amount -of work done on any build. An alternative is to use the --fallback-mrproper +of work done on any build. An alternative is to use the ``--fallback-mrproper`` flag, which retries the build with 'make mrproper' only after a build failure. One possible application of buildman is as part of a continual edit, build, @@ -1040,7 +1040,7 @@ of the source tree, thus allowing rapid tested evolution of the code:: ./tools/buildman/buildman -Pr tegra -Note also the `--dtc-skip` option which uses the system device-tree compiler to +Note also the ``--dtc-skip`` option which uses the system device-tree compiler to avoid needing to build it for each board. This can save 10-20% of build time. An alternative is to set DTC=/path/to/dtc when running buildman. @@ -1076,7 +1076,7 @@ same as 'am335x_evm_usbspl'. The -K option uses the u-boot.cfg, spl/u-boot-spl.cfg and tpl/u-boot-tpl.cfg files which are produced by a build. If all you want is to check the -configuration you can in fact avoid doing a full build, using --config-only. +configuration you can in fact avoid doing a full build, using ``--config-only``. This tells buildman to configure U-Boot and create the .cfg files, but not actually build the source. This is 5-10 times faster than doing a full build. @@ -1090,7 +1090,7 @@ equivalent:: The former would appear in a header filer and the latter in a defconfig file. To achieve this, buildman considers 'y' to be '1' in configuration variables. This avoids lots of useless output when converting a CONFIG -option to Kconfig. To disable this behaviour, use --squash-config-y. +option to Kconfig. To disable this behaviour, use ``--squash-config-y``. Checking the environment @@ -1165,7 +1165,7 @@ Link-time optimisation (LTO) is designed to reduce code size by globally optimising the U-Boot build. Unfortunately this can dramatically slow down builds. This is particularly noticeable when running a lot of builds. -Use the -L (--no-lto) flag to disable LTO. +Use the -L (``--no-lto``) flag to disable LTO. .. code-block:: bash @@ -1195,7 +1195,7 @@ each error line. Also, buildman prints information about what it is about to do, along with a summary at the end. When using buildman from an IDE, it is helpful to drop this behaviour. Use the --I/--ide option for that. You might find -W helpful also so that warnings do +``-I/--ide`` option for that. You might also find -W helpful so that warnings do not cause the build to fail: .. code-block:: bash @@ -1287,7 +1287,7 @@ rebuild. You can use -f to work around that. Other options ------------- -Buildman has various other command-line options. Try --help to see them. +Buildman has various other command-line options. Try ``--help`` to see them. To find out what toolchain prefix buildman will use for a build, use the -A option. @@ -1325,11 +1325,11 @@ figure out the root cause of the build failure. For situations where buildman is invoked from multiple running processes, it is sometimes useful to have buildman wait until the others have finished. Use the ---process-limit option for this: --process-limit 1 will allow only one buildman -to process jobs at a time. +``--process-limit`` option for this: ``--process-limit 1`` will allow only one +buildman to process jobs at a time. To build a particular target, rather than the default U-Boot target, use the -`--target` option. This is unlikely to be useful unless you are building a +``--target`` option. This is unlikely to be useful unless you are building a single board. Buildman normally builds out-of-tree, meaning that the source directory is not @@ -1358,7 +1358,7 @@ Using boards.cfg This file is no-longer needed by buildman but it is still generated in the working directory. This helps avoid a delay on every build, since scanning all -the Kconfig files takes a few seconds. Use the `-R ` flag to force +the Kconfig files takes a few seconds. Use the ``-R `` flag to force regeneration of the file - in that case buildman exits after writing the file with exit code 2 if there was an error in the maintainer files. To use the default filename, use a hyphen, i.e. `-R -`. @@ -1371,7 +1371,7 @@ Checking maintainers -------------------- Sometimes a board is added without a corresponding entry in a MAINTAINERS file. -Use the `--maintainer-check` option to check this:: +Use the ``--maintainer-check`` option to check this:: $ buildman --maintainer-check WARNING: board/mikrotik/crs3xx-98dx3236/MAINTAINERS: missing defconfig ending at line 7 @@ -1379,8 +1379,8 @@ Use the `--maintainer-check` option to check this:: Buildman returns with an exit code of 2 if there are any warnings. -An experimental `--full-check option` also checks for boards which don't have a -CONFIG_TARGET_xxx where xxx corresponds to their defconfig filename. This is +An experimental ``--full-check option`` also checks for boards which don't have +a CONFIG_TARGET_xxx where xxx corresponds to their defconfig filename. This is not strictly necessary, but may be useful information. From 76733999b04849ae85c5233f59cce9023c0d45b4 Mon Sep 17 00:00:00 2001 From: Adriano Carvalho Date: Mon, 25 Aug 2025 23:32:30 +0100 Subject: [PATCH 06/13] doc: Use "supports" instead of "has" Strictly speaking, "has" doesn't make sense. "supports" seems like a better word and it probably was what the original author meant. Signed-off-by: Adriano Carvalho --- tools/buildman/buildman.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index 3b51b9ed2b3..49ac5caeb14 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -476,7 +476,7 @@ Setting up Buildman should now be set up to use your new toolchain. - At the time of writing, U-Boot has these architectures: + At the time of writing, U-Boot supports these architectures: arc, arm, m68k, microblaze, mips, nios2, powerpc, sandbox, sh, x86, xtensa From b14d24af409470c380ce67abfd6e2b40bc055c2f Mon Sep 17 00:00:00 2001 From: Adriano Carvalho Date: Mon, 25 Aug 2025 23:32:31 +0100 Subject: [PATCH 07/13] doc: Add riscv and unfold the list with the architecture/code name riscv was missing from the list. To some, the architecture's name may not be obvious from the code name. Signed-off-by: Adriano Carvalho --- tools/buildman/buildman.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index 49ac5caeb14..368ef5c6f19 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -478,7 +478,20 @@ Setting up At the time of writing, U-Boot supports these architectures: - arc, arm, m68k, microblaze, mips, nios2, powerpc, sandbox, sh, x86, xtensa + - ARC (arc) + - ARM (arm) + - Motorola 68k (m68k) + - MicroBlaze (microblaze) + - MIPS (mips) + - Nios II (nios2) + - PowerPC (powerpc) + - RISC-V (riscv) + - Sandbox (sandbox) + - SuperH (sh) + - x86 (x86) + - Xtensa (xtensa) + + Each entry list the architecture's name, followed by its code name in U-Boot. How to run it From 77c72bcb0d1b7b3e25761468749eece98232e9f0 Mon Sep 17 00:00:00 2001 From: Adriano Carvalho Date: Mon, 25 Aug 2025 23:32:32 +0100 Subject: [PATCH 08/13] doc: Rephrase in a simpler way It reads a bit nicer. Signed-off-by: Adriano Carvalho --- tools/buildman/buildman.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index 368ef5c6f19..a6ae9b0a9d1 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -1188,7 +1188,7 @@ Use the -L (``--no-lto``) flag to disable LTO. Doing a simple build -------------------- -In some cases you just want to build a single board and get the full output, use +In case you want to build a single board and get the full output, use the -w option, for example: .. code-block:: bash From ac0e3d2541adad8bd8b78bf8f55b970820c0f6a7 Mon Sep 17 00:00:00 2001 From: Adriano Carvalho Date: Mon, 25 Aug 2025 23:32:33 +0100 Subject: [PATCH 09/13] doc: Rephrase to be more clear It might not be clear what is meant with "to make sure the shell leaves it alone". Signed-off-by: Adriano Carvalho --- tools/buildman/buildman.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index a6ae9b0a9d1..709fe82f845 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -1273,8 +1273,9 @@ Some options have values, in which case you can change them: buildman -a 'BOOTCOMMAND="echo hello"' CONFIG_SYS_LOAD_ADDR=0x1000 -Note that you must put quotes around string options and the whole thing must be -in single quotes, to make sure the shell leave it alone. +Note that you must put quotes around string options and the whole argument must +be in single quotes to ensure that the shell recognizes it as a single +argument. If you try to set an option that does not exist, or that cannot be changed for some other reason (e.g. it is 'selected' by another option), then buildman From 01bf38a05ea5e7dbe30a8170dc4fcf82399228d3 Mon Sep 17 00:00:00 2001 From: Adriano Carvalho Date: Mon, 25 Aug 2025 23:32:34 +0100 Subject: [PATCH 10/13] doc: Rephrase to read a bit nicer Reads better. Signed-off-by: Adriano Carvalho --- tools/buildman/buildman.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index 709fe82f845..dafac017f0e 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -1294,8 +1294,8 @@ shows an error:: One major caveat with this feature with branches (-b) is that buildman does not name the output directories differently when you change the configuration, so -doing the same build again with different configuration will not trigger a -rebuild. You can use -f to work around that. +doing the same build with a different configuration will not trigger a rebuild. +You can use -f to work around that. Other options @@ -1357,7 +1357,7 @@ directory. Build summary ------------- -When buildman finishes it shows a summary, something like this:: +When Buildman finishes, it displays a summary, similar to the following: Completed: 5 total built, duration 0:00:21, rate 0.24 From 0492657c74f517dae71ed4864ef10bb05e22a2d4 Mon Sep 17 00:00:00 2001 From: Adriano Carvalho Date: Mon, 25 Aug 2025 23:32:35 +0100 Subject: [PATCH 11/13] doc: Rephrase to be more precise and less confusing (build) It was "... doing the same build ... will not trigger a rebuild". Signed-off-by: Adriano Carvalho --- tools/buildman/buildman.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index dafac017f0e..6b382942ac8 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -1294,7 +1294,7 @@ shows an error:: One major caveat with this feature with branches (-b) is that buildman does not name the output directories differently when you change the configuration, so -doing the same build with a different configuration will not trigger a rebuild. +re-launching Buildman with an updated configuration will not trigger a rebuild. You can use -f to work around that. From 1041ce48a9942ac6fcb580c8973d420dbe53a8ae Mon Sep 17 00:00:00 2001 From: Adriano Carvalho Date: Mon, 25 Aug 2025 23:32:36 +0100 Subject: [PATCH 12/13] doc: Capitalize the word Buildman whenever it's used as a proper noun This consistency reads a bit nicer. Signed-off-by: Adriano Carvalho --- doc/build/reproducible.rst | 2 +- tools/buildman/buildman.rst | 106 ++++++++++++++++++------------------ 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/doc/build/reproducible.rst b/doc/build/reproducible.rst index 8b030f469d7..1512129e374 100644 --- a/doc/build/reproducible.rst +++ b/doc/build/reproducible.rst @@ -24,4 +24,4 @@ This date is shown when we launch U-Boot: ./u-boot -T U-Boot 2023.01 (Jan 01 2023 - 00:00:00 +0000) -The same effect can be obtained with buildman using the `-r` flag. +The same effect can be obtained with Buildman using the `-r` flag. diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index 6b382942ac8..9e850b26ec0 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -6,7 +6,7 @@ Buildman build tool Quick-start ----------- -If you just want to quickly set up buildman so you can build something (for +If you just want to quickly set up Buildman so you can build something (for example Raspberry Pi 2): .. code-block:: bash @@ -27,7 +27,7 @@ patch series. It can build each individual commit and report which boards fail on which commits, and which errors come up. It aims to make full use of multi-processor machines. -A key feature of buildman is its output summary, which allows warnings, +A key feature of Buildman is its output summary, which allows warnings, errors or image size increases in a particular commit or board to be quickly identified and the offending commit pinpointed. This can be a big help for anyone working with >10 patches at a time. @@ -63,7 +63,7 @@ can be run repeatedly on the same branch after making changes to commits on that branch. In this case it will automatically rebuild commits which have changed (and remove its old results for that commit). It is possible to build a branch for one board, then later build it for another board. This adds to -the output, so now you have results for two boards. If you want buildman to +the output, so now you have results for two boards. If you want Buildman to re-build a commit it has already built (e.g. because of a toolchain update), use the -f flag. @@ -81,7 +81,7 @@ a time. A thread starts at the first commit, configures the source for your board and builds it. Then it checks out the next commit and does an incremental build (i.e. not using 'make xxx_defconfig' unless you use -C). Eventually the thread reaches the last commit and stops. If a commit causes -an error or warning, buildman will try it again after reconfiguring (but see +an error or warning, Buildman will try it again after reconfiguring (but see -Q). Thus some commits may be built twice, with the first result silently discarded. Lots of errors and warnings will cause lots of reconfigures and your build will be very slow. This is because a file that produces just a warning @@ -100,14 +100,14 @@ threads do not affect the state of your git repository. Any checkouts done by the thread affect only the working directory for that thread. Buildman automatically selects the correct tool chain for each board. You -must supply suitable tool chains (see ``--fetch-arch``), but buildman takes +must supply suitable tool chains (see ``--fetch-arch``), but Buildman takes care of selecting the right one. Buildman generally builds a branch (with the -b flag), and in this case builds the upstream commit as well, for comparison. So even if you have one commit in your branch, two commits will be built. Put all your commits in a branch, set the branch's upstream to a valid value, and all will be well. -Otherwise buildman will perform random actions. Use -n to check what the +Otherwise Buildman will perform random actions. Use -n to check what the random actions might be. Buildman effectively has two modes: without -s it builds, with -s it @@ -115,7 +115,7 @@ summarises the results of previous (or active) builds. If you just want to build the current source tree, leave off the -b flag. This will display results and errors as they happen. You can still look at -them later using -se. Note that buildman will assume that the source has +them later using -se. Note that Buildman will assume that the source has changed, and will build all specified boards in this case. Buildman is optimised for building many commits at once, for many boards. @@ -183,7 +183,7 @@ Setting up git checkout -b my-branch origin/master # Add some commits to the branch, reading for testing -#. Create ~/.buildman to tell buildman where to find tool chains (see +#. Create ~/.buildman to tell Buildman where to find tool chains (see buildman_settings_ for details). As an example:: # Buildman settings file @@ -222,18 +222,18 @@ Setting up [toolchain-prefix] arm: /opt/arm-eabi-4.6/bin/arm-eabi-gcc - This tells buildman that you want to use this exact toolchain for the arm + This tells Buildman that you want to use this exact toolchain for the arm architecture. This will override any toolchains found by searching using the [toolchain] settings. - Since the toolchain prefix is an explicit request, buildman will report an + Since the toolchain prefix is an explicit request, Buildman will report an error if a toolchain is not found with that prefix. The current PATH will be searched, so it is possible to use:: [toolchain-prefix] arm: arm-none-eabi- - and buildman will find arm-none-eabi-gcc in /usr/bin if you have it + and Buildman will find arm-none-eabi-gcc in /usr/bin if you have it installed. Another example:: @@ -241,7 +241,7 @@ Setting up [toolchain-wrapper] wrapper: ccache - This tells buildman to use a compiler wrapper in front of CROSS_COMPILE. In + This tells Buildman to use a compiler wrapper in front of CROSS_COMPILE. In this example, ccache. It doesn't affect the toolchain scan. The wrapper is added when the CROSS_COMPILE environment variable is set. The tag name in this section is not important. If more than one line is provided, only the @@ -440,7 +440,7 @@ Setting up You can download toolchains and update the [toolchain] section of the settings file to find them. - To make this easier, buildman can automatically download and install + To make this easier, Buildman can automatically download and install toolchains from kernel.org. First list the available architectures:: $ ./tools/buildman/buildman --fetch-arch list @@ -541,7 +541,7 @@ As an example:: This shows that it will build all 1059 boards, using 4 threads (because we have a 4-core CPU). Each thread will run with -j1, meaning that each make job will use a single CPU. The list of commits to be built helps you -confirm that things look about right. Notice that buildman has chosen a +confirm that things look about right. Notice that Buildman has chosen a 'base' directory for you, immediately above your source tree. Buildman works entirely inside the base directory, here ../lcd9b, @@ -653,7 +653,7 @@ But if you did want to see just the errors for lubbock, use: If you see error lines marked with '-', that means that the errors were fixed by that commit. Sometimes commits can be in the wrong order, so that a breakage is introduced for a few commits and fixed by later commits. This -shows up clearly with buildman. You can then reorder the commits and try +shows up clearly with Buildman. You can then reorder the commits and try again. At commit 16, the error moves: you can see that the old error at line 120 @@ -683,7 +683,7 @@ err Output from stderr, if any. Errors and warnings appear here. log - Output from stdout. Normally there isn't any since buildman runs in silent + Output from stdout. Normally there isn't any since Buildman runs in silent mode. Use -V to force a verbose build (this passes V=1 to 'make') toolchain @@ -938,7 +938,7 @@ a set of (tag, value) pairs. make sure it is unique. The value is the path to the toolchain. Buildman will look in that path for a file ending in 'gcc'. It will then execute it to check that it is a C compiler, passing only the ``--version`` flag to - it. If the return code is 0, buildman assumes that it is a valid C + it. If the return code is 0, Buildman assumes that it is a valid C compiler. It uses the first part of the name as the architecture and strips off the last part when setting the CROSS_COMPILE environment variable (parts are delimited with a hyphen). @@ -961,12 +961,12 @@ a set of (tag, value) pairs. This converts toolchain architecture names to U-Boot names. For example, if an x86 toolchains is called i386-linux-gcc it will not normally be used for architecture 'x86'. Adding 'x86: i386 x86_64' to this section - will tell buildman that the i386 and x86_64 toolchains can be used for + will tell Buildman that the i386 and x86_64 toolchains can be used for the x86 architecture. '[make-flags]' section U-Boot's build system supports a few flags (such as BUILD_TAG) which - affect the build product. These flags can be specified in the buildman + affect the build product. These flags can be specified in the Buildman settings file. They can also be useful when building U-Boot against other open source software. @@ -995,7 +995,7 @@ Quick Sanity Check ------------------ If you have made changes and want to do a quick sanity check of the -currently checked-out source, run buildman without the -b flag. This will +currently checked-out source, run Buildman without the -b flag. This will build the selected boards and display build status as it runs (i.e. -v is enabled automatically). Use -e to see errors/warnings as well. @@ -1014,29 +1014,29 @@ will build commits in us-buildman that are not in upstream/master. Building Faster --------------- -By default, buildman doesn't execute 'make mrproper' prior to building the +By default, Buildman doesn't execute 'make mrproper' prior to building the first commit for each board. This reduces the amount of work 'make' does, and hence speeds up the build. To force use of 'make mrproper', use -the -m flag. -This flag will slow down any buildman invocation, since it increases the amount +This flag will slow down any Buildman invocation, since it increases the amount of work done on any build. An alternative is to use the ``--fallback-mrproper`` flag, which retries the build with 'make mrproper' only after a build failure. -One possible application of buildman is as part of a continual edit, build, -edit, build, ... cycle; repeatedly applying buildman to the same change or +One possible application of Buildman is as part of a continual edit, build, +edit, build, ... cycle; repeatedly applying Buildman to the same change or series of changes while making small incremental modifications to the source each time. This provides quick feedback regarding the correctness of recent -modifications. In this scenario, buildman's default choice of build directory +modifications. In this scenario, Buildman's default choice of build directory causes more build work to be performed than strictly necessary. -By default, each buildman thread uses a single directory for all builds. When a +By default, each Buildman thread uses a single directory for all builds. When a thread builds multiple boards, the configuration built in this directory will cycle through various different configurations, one per board built by the thread. Variations in the configuration will force a rebuild of affected source -files when a thread switches between boards. Ideally, such buildman-induced +files when a thread switches between boards. Ideally, such Buildman-induced rebuilds would not happen, thus allowing the build to operate as efficiently as -the build system and source changes allow. buildman's -P flag may be used to +the build system and source changes allow. Buildman's -P flag may be used to enable this; -P causes each board to be built in a separate (board-specific) -directory, thus avoiding any buildman-induced configuration changes in any +directory, thus avoiding any Buildman-induced configuration changes in any build directory. U-Boot's build system embeds information such as a build timestamp into the @@ -1055,7 +1055,7 @@ of the source tree, thus allowing rapid tested evolution of the code:: Note also the ``--dtc-skip`` option which uses the system device-tree compiler to avoid needing to build it for each board. This can save 10-20% of build time. -An alternative is to set DTC=/path/to/dtc when running buildman. +An alternative is to set DTC=/path/to/dtc when running Buildman. Checking configuration ---------------------- @@ -1090,10 +1090,10 @@ same as 'am335x_evm_usbspl'. The -K option uses the u-boot.cfg, spl/u-boot-spl.cfg and tpl/u-boot-tpl.cfg files which are produced by a build. If all you want is to check the configuration you can in fact avoid doing a full build, using ``--config-only``. -This tells buildman to configure U-Boot and create the .cfg files, but not +This tells Buildman to configure U-Boot and create the .cfg files, but not actually build the source. This is 5-10 times faster than doing a full build. -By default buildman considers the following two configuration methods +By default Buildman considers the following two configuration methods equivalent:: #define CONFIG_SOME_OPTION @@ -1101,7 +1101,7 @@ equivalent:: CONFIG_SOME_OPTION=y The former would appear in a header filer and the latter in a defconfig -file. To achieve this, buildman considers 'y' to be '1' in configuration +file. To achieve this, Buildman considers 'y' to be '1' in configuration variables. This avoids lots of useless output when converting a CONFIG option to Kconfig. To disable this behaviour, use ``--squash-config-y``. @@ -1132,7 +1132,7 @@ and 'brppt1_spi', removing a trailing semicolon. 'brppt1_nand' gained an a value for 'altbootcmd', but lost one for ' altbootcmd'. The -U option uses the u-boot.env files which are produced by a build. -Internally, buildman writes out an out-env file into the build directory for +Internally, Buildman writes out an out-env file into the build directory for later comparison. defconfig fragments @@ -1202,12 +1202,12 @@ specify the output directory with -o when using -w. Support for IDEs (Integrated Development Environments) ------------------------------------------------------ -Normally buildman summarises the output and shows information indicating the +Normally Buildman summarises the output and shows information indicating the meaning of each line of output. For example a '+' symbol appears at the start of -each error line. Also, buildman prints information about what it is about to do, +each error line. Also, Buildman prints information about what it is about to do, along with a summary at the end. -When using buildman from an IDE, it is helpful to drop this behaviour. Use the +When using Buildman from an IDE, it is helpful to drop this behaviour. Use the ``-I/--ide`` option for that. You might also find -W helpful so that warnings do not cause the build to fail: @@ -1227,12 +1227,12 @@ Typically a missing external blob causes a build failure. For build testing of a lot of boards, or boards for which you do not have the blobs, you can use the -M flag to allow missing blobs. This marks the build as if it succeeded, although with warnings shown, including 'Some images are invalid'. If any boards -fail in this way, buildman exits with status 101. +fail in this way, Buildman exits with status 101. -To convert warnings to errors, use -E. To make buildman return success with +To convert warnings to errors, use -E. To make Buildman return success with these warnings, use -W. -It is generally safe to default to enabling -M for all runs of buildman, so long +It is generally safe to default to enabling -M for all runs of Buildman, so long as you check the exit code. To do this, add:: allow-missing = "always" @@ -1278,7 +1278,7 @@ be in single quotes to ensure that the shell recognizes it as a single argument. If you try to set an option that does not exist, or that cannot be changed for -some other reason (e.g. it is 'selected' by another option), then buildman +some other reason (e.g. it is 'selected' by another option), then Buildman shows an error:: $ buildman --board sandbox -a FRED @@ -1292,7 +1292,7 @@ shows an error:: FRED Missing expected line: CONFIG_FRED=y -One major caveat with this feature with branches (-b) is that buildman does not +One major caveat with this feature with branches (-b) is that Buildman does not name the output directories differently when you change the configuration, so re-launching Buildman with an updated configuration will not trigger a rebuild. You can use -f to work around that. @@ -1303,7 +1303,7 @@ Other options Buildman has various other command-line options. Try ``--help`` to see them. -To find out what toolchain prefix buildman will use for a build, use the -A +To find out what toolchain prefix Buildman will use for a build, use the -A option. To request that compiler warnings be promoted to errors, use -E. This passes the @@ -1326,21 +1326,21 @@ warnings are found. Note that it can be useful to combine -E and -W. This means that all compiler warnings will produce failures (code 100) and all other warnings will produce success (since 101 is changed to 0). -If there are both warnings and errors, errors win, so buildman returns 100. +If there are both warnings and errors, errors win, so Buildman returns 100. The -y option is provided (for use with -s) to ignore the bountiful device-tree -warnings. Similarly, -Y tells buildman to ignore the migration warnings. +warnings. Similarly, -Y tells Buildman to ignore the migration warnings. -Sometimes you might get an error in a thread that is not handled by buildman, +Sometimes you might get an error in a thread that is not handled by Buildman, perhaps due to a failure of a tool that it calls. You might see the output, but -then buildman hangs. Failing to handle any eventuality is a bug in buildman and +then Buildman hangs. Failing to handle any eventuality is a bug in Buildman and should be reported. But you can use -T0 to disable threading and hopefully figure out the root cause of the build failure. -For situations where buildman is invoked from multiple running processes, it is -sometimes useful to have buildman wait until the others have finished. Use the +For situations where Buildman is invoked from multiple running processes, it is +sometimes useful to have Buildman wait until the others have finished. Use the ``--process-limit`` option for this: ``--process-limit 1`` will allow only one -buildman to process jobs at a time. +Buildman to process jobs at a time. To build a particular target, rather than the default U-Boot target, use the ``--target`` option. This is unlikely to be useful unless you are building a @@ -1348,7 +1348,7 @@ single board. Buildman normally builds out-of-tree, meaning that the source directory is not disturbed by the build. Use `-i` to do an in-tree build instead. Note that this -does not affect the source directory, since buildman creates a separate git +does not affect the source directory, since Buildman creates a separate git 'worktree' for each board. This means that it is possible to do an in-tree build of an entire branch, or even a 'current source' build for multiple boards. As a special case, you can use `-wi` to do an in-tree build in the current @@ -1370,10 +1370,10 @@ U-Boot build. Using boards.cfg ---------------- -This file is no-longer needed by buildman but it is still generated in the +This file is no-longer needed by Buildman but it is still generated in the working directory. This helps avoid a delay on every build, since scanning all the Kconfig files takes a few seconds. Use the ``-R `` flag to force -regeneration of the file - in that case buildman exits after writing the file +regeneration of the file - in that case Buildman exits after writing the file with exit code 2 if there was an error in the maintainer files. To use the default filename, use a hyphen, i.e. `-R -`. From d20b8792c5228a8d9f20943660d61ea5b2c60232 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 18 Aug 2025 08:47:15 +0200 Subject: [PATCH 13/13] arm: Fix swtiching typo This should say 'switching', so fix it. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt Reviewed-by: Quentin Schulz Signed-off-by: Heinrich Schuchardt --- arch/arm/lib/bootm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 7eb764e1f4e..ca4cec61f22 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -183,7 +183,7 @@ __weak void setup_board_tags(struct tag **in_params) {} static void do_nonsec_virt_switch(void) { smp_kick_all_cpus(); - dcache_disable(); /* flush cache before swtiching to EL2 */ + dcache_disable(); /* flush cache before switching to EL2 */ } #endif