diff options
author | Simon Glass <sjg@chromium.org> | 2022-01-22 05:07:33 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-02-08 23:07:59 -0500 |
commit | 2b4806e481026df7364cb9ed53ffc577e3dc59bb (patch) | |
tree | b73fe58be13cf418841ce2454975ad2a8da1206e /tools/buildman/builder.py | |
parent | 8ca0931a913d5e25232c454ceca70635c49058dc (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/builder.py')
-rw-r--r-- | tools/buildman/builder.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 122f0d14065..720bbb2cf4d 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -250,7 +250,7 @@ class Builder: mrproper=False, per_board_out_dir=False, config_only=False, squash_config_y=False, warnings_as_errors=False, work_in_output=False, - test_thread_exceptions=False): + test_thread_exceptions=False, adjust_cfg=None): """Create a new Builder object Args: @@ -280,6 +280,15 @@ class Builder: test_thread_exceptions: Uses for tests only, True to make the threads raise an exception instead of reporting their result. This simulates a failure in the code somewhere + adjust_cfg_list (list of str): List of changes to make to .config + file before building. Each is one of (where C is the config + option with or without the CONFIG_ prefix) + + C to enable C + ~C to disable C + C=val to set the value of C (val must have quotes if C is + a string Kconfig + """ self.toolchains = toolchains self.base_dir = base_dir @@ -315,6 +324,8 @@ class Builder: self.squash_config_y = squash_config_y self.config_filenames = BASE_CONFIG_FILENAMES self.work_in_output = work_in_output + self.adjust_cfg = adjust_cfg + if not self.squash_config_y: self.config_filenames += EXTRA_CONFIG_FILENAMES self._terminated = False @@ -1747,6 +1758,7 @@ class Builder: job.commits = commits job.keep_outputs = keep_outputs job.work_in_output = self.work_in_output + job.adjust_cfg = self.adjust_cfg job.step = self._step if self.num_threads: self.queue.put(job) |