summaryrefslogtreecommitdiff
path: root/oldconfig.py
AgeCommit message (Collapse)Author
2019-01-15Update copyright years for 2019Ulf Magnusson
2018-12-08Make {load,write}_config(filename=None) implement the standard behaviorUlf Magnusson
Make the previously obligatory 'filename' argument to load_config() and write_config() default to None, and have that implement the behavior you'd usually want: read/write either KCONFIG_CONFIG or ".config" if unset, and read the 'option defconfig_list' configuration file if KCONFIG_CONFIG/".config" doesn't exist. For load_config(), filename=None also allows the configuration file to be missing without raising an error. load_config() returns True if a local configuration file was loaded, which is useful to check in the menuconfig (if no local configuration file exists, we always want to prompt for saving the configuration when exiting). Also add a 'verbose' argument (default True) to load_config() and read_config() that makes them print which files were read/written in filename=None mode. Also generalize olddefconfig.py and oldconfig.py to not require there to already be a local configuration file. This was a bit silly for olddefconfig.py in particular. Remove the examples/defconfig.py script. It's a duplicate of olddefconfig.py.
2018-10-01olddefconfig: Add scriptUlf Magnusson
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
2018-08-26oldconfig: Use Kconfig.node_iter() and clean upUlf Magnusson
Some general cleanup: - Handle the iteration with the new Kconfig.node_iter() helper. This makes some function so short that they become pointless. Have just main() + oldconfig(node) + small helper functions. - Use _name_and_loc_str(sc) for choices too, so that all locations get reported for named choices defined in multiple locations - Rewrite the intro to be less wordy and remove the sample session (leftover from when oldconfig.py was in examples/, and not that exciting) - Print "Updated configuration written to..." instead of "Configuration saved to..." - Various other nits
2018-08-25oldconfig: Fix help display command for choicesUlf Magnusson
'?' should display the help, like for symbols, not '??'. Oversight when the command was changed.
2018-06-22oldconfig: Put standard library imports firstUlf Magnusson
More common style.
2018-06-06Add license tags to scriptsUlf Magnusson
Everything's ISC.
2018-05-30Add tool helper for loading/saving .config filesUlf Magnusson
Removes repeated KCONFIG_CONFIG boilerplate. Also make allyesconfig use KCONFIG_CONFIG when writing (oversight), and document the sys.exit() behavior for standard_kconfig().
2018-05-30Add tool helper for selecting the top-level KconfigUlf Magnusson
standard_kconfig() gets the top-level Kconfig file from the first command-line argument, defaulting to "Kconfig". This removes some boilerplate from tools.
2018-05-27oldconfig: Move from examples/ to rootUlf Magnusson
All the packaged code will appear in the root.