diff options
| author | LaterComer <[email protected]> | 2024-04-19 08:48:32 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-18 20:48:32 -0400 |
| commit | 6311bcaf24e1d77ef63f01622f15b8b12ea5bbb1 (patch) | |
| tree | 711c1fb5f95f4b5d259d4b0130c0663f3eda5be4 /tools/defconfig.py | |
| parent | 202bacb44d9a4a253d74653d26714c1ae825822c (diff) | |
将scons --menuconfig/--pyconfig/--pyconfig-silent统一调用kconfiglib
Diffstat (limited to 'tools/defconfig.py')
| -rw-r--r-- | tools/defconfig.py | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/tools/defconfig.py b/tools/defconfig.py deleted file mode 100644 index d1b1e4ea73..0000000000 --- a/tools/defconfig.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2019, Ulf Magnusson -# SPDX-License-Identifier: ISC - -""" -Reads a specified configuration file, then writes a new configuration file. -This can be used to initialize the configuration from e.g. an arch-specific -configuration file. This input configuration file would usually be a minimal -configuration file, as generated by e.g. savedefconfig. - -The default output filename is '.config'. A different filename can be passed in -the KCONFIG_CONFIG environment variable. -""" -import argparse - -import kconfiglib - - -def main(): - parser = argparse.ArgumentParser( - formatter_class=argparse.RawDescriptionHelpFormatter, - description=__doc__) - - parser.add_argument( - "--kconfig", - default="Kconfig", - help="Base Kconfig file (default: Kconfig)") - - parser.add_argument( - "config", - metavar="CONFIGURATION", - help="Input configuration file") - - args = parser.parse_args() - - kconf = kconfiglib.Kconfig(args.kconfig) - print(kconf.load_config(args.config)) - print(kconf.write_config()) - - -if __name__ == "__main__": - main() |
