diff options
author | Tom Rini <trini@konsulko.com> | 2022-08-05 13:22:44 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-05 13:22:44 -0400 |
commit | 56edbb5eafc53cd7b34cd231ec11c7e5eb576c9f (patch) | |
tree | 2dd1ae00ca6f61d0efda20d930c2f33bdbb23457 /tools/moveconfig.py | |
parent | 46b5c8ed017958fc387ab86c71ae6c90abb6793c (diff) | |
parent | ff75d6e03ee4346bbe9614f10949649bb704a7e9 (diff) |
Merge branch '2022-08-05-buildman-integrate-boardscfg'
To quote Simon:
This series drops the need for the genboardscfg.py script, so that the
boards.cfg file is produced (and consumed) entirely within buildman. The
file is not entirely removed since it does have some uses and we need some
sort of cache for the information. The genboardscfg.py script is
effectively incorporated in buildman.
It also improves operation from an IDE with a new -I option and fixes up
some of the pylint warnings in buildman.
Finally, this series also fixes a bug which allows use to drop support for
CONFIG_SYS_EXTRA_OPTIONS which is long-standing desire. It also fixes a
minor bug that causes 'Invalid line' spam when checking for function bloat
with the -B option.
Diffstat (limited to 'tools/moveconfig.py')
-rwxr-xr-x | tools/moveconfig.py | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 84bc875fff..09617a07f9 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -443,70 +443,6 @@ def cleanup_headers(configs, args): cleanup_one_header(header_path, patterns, args) cleanup_empty_blocks(header_path, args) -def cleanup_one_extra_option(defconfig_path, configs, args): - """Delete config defines in CONFIG_SYS_EXTRA_OPTIONS in one defconfig file. - - Args: - defconfig_path: path to the cleaned defconfig file. - configs: A list of CONFIGs to remove. - args (Namespace): program arguments - """ - - start = 'CONFIG_SYS_EXTRA_OPTIONS="' - end = '"' - - lines = read_file(defconfig_path) - - for i, line in enumerate(lines): - if line.startswith(start) and line.endswith(end): - break - else: - # CONFIG_SYS_EXTRA_OPTIONS was not found in this defconfig - return - - old_tokens = line[len(start):-len(end)].split(',') - new_tokens = [] - - for token in old_tokens: - pos = token.find('=') - if not (token[:pos] if pos >= 0 else token) in configs: - new_tokens.append(token) - - if new_tokens == old_tokens: - return - - tolines = copy.copy(lines) - - if new_tokens: - tolines[i] = start + ','.join(new_tokens) + end - else: - tolines.pop(i) - - show_diff(lines, tolines, defconfig_path, args.color) - - if args.dry_run: - return - - write_file(defconfig_path, tolines) - -def cleanup_extra_options(configs, args): - """Delete config defines in CONFIG_SYS_EXTRA_OPTIONS in defconfig files. - - Args: - configs: A list of CONFIGs to remove. - args (Namespace): program arguments - """ - if not confirm(args, 'Clean up CONFIG_SYS_EXTRA_OPTIONS?'): - return - - configs = [ config[len('CONFIG_'):] for config in configs ] - - defconfigs = get_all_defconfigs() - - for defconfig in defconfigs: - cleanup_one_extra_option(os.path.join('configs', defconfig), configs, - args) - def cleanup_whitelist(configs, args): """Delete config whitelist entries @@ -1803,7 +1739,6 @@ doc/develop/moveconfig.rst for documentation.''' if configs: cleanup_headers(configs, args) - cleanup_extra_options(configs, args) cleanup_whitelist(configs, args) cleanup_readme(configs, args) |