summaryrefslogtreecommitdiff
path: root/oldconfig.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-10-01 03:52:32 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-10-01 04:17:13 +0200
commit3b692df8996f5ce55037f5340a6e92db8ad4df67 (patch)
treef88f7e570e0f96f758170f5f0c1ac4f74e06ba66 /oldconfig.py
parent6aab113523a52c2767832a3df35c6c82d3197c60 (diff)
olddefconfig: Add script
Works like 'make olddefconfig', updating a configuration by filling in default values for all new symbols. This could also be accomplished by entering the 'menuconfig' interface and saving the configuration, but it's more awkward and less obvious. Piggyback two oldconfig changes: - Mention KCONFIG_CONFIG - Check if the .config file exists before parsing the Kconfig files, instead of after
Diffstat (limited to 'oldconfig.py')
-rwxr-xr-xoldconfig.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/oldconfig.py b/oldconfig.py
index 29ca533..956bc07 100755
--- a/oldconfig.py
+++ b/oldconfig.py
@@ -10,6 +10,9 @@
# aren't already set in the .config
# 3. Write new .config
#
+# The default input/output filename is '.config'. A different filename can be
+# passed in the KCONFIG_CONFIG environment variable.
+#
# Unlike 'make oldconfig', this script doesn't print menu titles and comments,
# but gives Kconfig definition locations. Printing menus and comments would be
# pretty easy to add: Look at the parents of each item and print all menu
@@ -39,13 +42,11 @@ def _main():
# visible symbols.
global conf_changed
- kconf = standard_kconfig()
-
config_filename = standard_config_filename()
if not os.path.exists(config_filename):
sys.exit("{}: '{}' not found".format(sys.argv[0], config_filename))
-
+ kconf = standard_kconfig()
kconf.load_config(config_filename)
while True: