[PATCH v4 3/3] doc/buildman: describe using fragments

Simon Glass sjg at chromium.org
Fri Apr 18 13:39:32 CEST 2025


On Thu, 17 Apr 2025 at 22:31, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Describe the new --fragments parameter
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> v4:
>         Describe the invocation of merge_config.sh
> v3:
>         no change
> v2:
>         new patch
> ---
>  tools/buildman/buildman.rst | 28 ++++++++++++----------------
>  1 file changed, 12 insertions(+), 16 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>

> diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst
> index 07ecc5c110c..0729f15f2b5 100644
> --- a/tools/buildman/buildman.rst
> +++ b/tools/buildman/buildman.rst
> @@ -1126,27 +1126,23 @@ later comparison.
>  defconfig fragments
>  -------------------
>
> -Buildman provides some initial support for configuration fragments. It can scan
> -these when present in defconfig files and handle the resuiting Kconfig
> -correctly. Thus it is possible to build a board which has a ``#include`` in the
> -defconfig file.
> +A comma separated list of configuration fragments can be added via the

comma-separated


> +--fragments parameter to all processed defconfig files, e.g.
>
> -For now, Buildman simply includes the files to produce a single output file,
> -using the C preprocessor. It does not call the ``merge_config.sh`` script. The
> -redefined/redundant logic in that script could fairly easily be repeated in
> -Buildman, to detect potential problems. For now it is not clear that this is
> -useful.
> +.. code-block:: bash
>
> -To specify the C preprocessor to use, set the ``CPP`` environment variable. The
> -default is ``cpp``.
> +    buildman -k qemu-riscv64_smode --fragments acpi.config
>
> -Note that Buildman does not support adding fragments to existing boards, e.g.
> -like::
> +Buildman invokes ``make`` passing the defconfig file and the fragment files as
> +target arguments. In ``scripts/kconfig/Makefile`` the script ``merge_config.sh``
> +is called for each fragment file to add it to the configuration.
>
> -    make qemu_riscv64_defconfig acpi.config
> +Buildman also supports configuration fragments that are included in defconfig
> +files via an ``#include`` statement. It can scan these and handle the resulting
> +Kconfig correctly.
>
> -This is partly because there is no way for Buildman to know which fragments are
> -valid on which boards.
> +To specify the C preprocessor to use, set the ``CPP`` environment variable. The
> +default is ``cpp``.
>
>  Building with clang
>  -------------------
> --
> 2.48.1
>


More information about the U-Boot mailing list