summaryrefslogtreecommitdiff
path: root/tools/buildman/control.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-01-22 05:07:33 -0700
committerTom Rini <trini@konsulko.com>2022-02-08 23:07:59 -0500
commit2b4806e481026df7364cb9ed53ffc577e3dc59bb (patch)
treeb73fe58be13cf418841ce2454975ad2a8da1206e /tools/buildman/control.py
parent8ca0931a913d5e25232c454ceca70635c49058dc (diff)
buildman: Allow adjusting board config on the fly
Add a -a option to specify changes to the config before the build commences. For example buildman -a ~CONFIG_CMDLINE disables CONFIG_CMDLINE before doing the build. This makes it easier to try things out as well as to write tests without creating a new board or manually manging the .config file. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/control.py')
-rw-r--r--tools/buildman/control.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index fd9664c85d8..eee81130663 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -10,6 +10,7 @@ import sys
from buildman import board
from buildman import bsettings
+from buildman import cfgutil
from buildman import toolchain
from buildman.builder import Builder
from patman import command
@@ -321,6 +322,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
output_dir = os.path.join(options.output_dir, dirname)
if clean_dir and os.path.exists(output_dir):
shutil.rmtree(output_dir)
+ adjust_cfg = cfgutil.convert_list_to_dict(options.adjust_cfg)
+
builder = Builder(toolchains, output_dir, options.git_dir,
options.threads, options.jobs, gnu_make=gnu_make, checkout=True,
show_unknown=options.show_unknown, step=options.step,
@@ -332,7 +335,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
squash_config_y=not options.preserve_config_y,
warnings_as_errors=options.warnings_as_errors,
work_in_output=options.work_in_output,
- test_thread_exceptions=test_thread_exceptions)
+ test_thread_exceptions=test_thread_exceptions,
+ adjust_cfg=adjust_cfg)
builder.force_config_on_failure = not options.quick
if make_func:
builder.do_make = make_func