On 4/18/25 13:39, Simon Glass wrote:
Hi Quentin,
On Fri, 18 Apr 2025 at 05:27, Quentin Schulz <quentin.sch...@cherry.de> wrote:
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
?
Yes that could be useful. It would also allow wildcards, although the
code would need to drop the config/ directory prefix. Also, I see that
-z is available so perhaps that could be a (bad) short option?
Hello Simon,
What do you mean by useful?
--fragments a,b conveys the same information as --fragment a --fragment b.
We are not passing any config/ directory with the fragment names.
Using wildcards in does not depend on how fragment names are passed.
As maintainer of buildman, please, clearly express how you want the
fragment names to be passed. "Could be useful" does not indicate any
decision but let's me hang in limbo.
Best regards
Heinrich
Another idea would be to also allow specifying the fragment name
without the '.config' suffix. Less to type.
...
[...]
@@ -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?).
Regards,
Simon