Hi Heinrich,

On 4/17/25 12:40 AM, Heinrich Schuchardt wrote:
Currently we are no able to build with configuration fragments in our CI.
With this patch buildman gets a new argument --fragments for passing a
comma separated list of configuration fragments to add to the board
defconfigs, e.g.

     tools/buildman/buildman \
     -o build \
     -k qemu-riscv64_smode \
     --fragments acpi.config


What about using:

--fragment acpi.config --fragment fragment2.config

?

...

[...]
@@ -412,6 +413,8 @@ class BuilderThread(threading.Thread):
          args, cwd, src_dir = self._build_args(brd, out_dir, out_rel_dir,
                                                work_dir, commit_upto)
          config_args = [f'{brd.target}_defconfig']
+        if fragments != None:
+            config_args.extend(fragments.split(','))
          config_out = io.StringIO()
_remove_old_outputs(out_dir)
[...]
diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py
index 7573e5bdfe8..38ea7f9f335 100644
--- a/tools/buildman/cmdline.py
+++ b/tools/buildman/cmdline.py
@@ -62,6 +62,8 @@ def add_upto_m(parser):
            help="Fetch a toolchain for architecture FETCH_ARCH ('list' to 
list)."
                ' You can also fetch several toolchains separate by comma, or'
                " 'all' to download all")
+    parser.add_argument('--fragments', type=str,
+          help="Comma separated list of configuration fragments to be applied")

... and here have an action="append" instead, which will create a Python list already, which seems to be what you want to use anyway considering you later split this by comma? This would also allow to have config fragments with comma in their filename (which is maybe valid?).

Cheers,
Quentin

Reply via email to