summaryrefslogtreecommitdiff
path: root/examples/allnoconfig_walk.py
AgeCommit message (Collapse)Author
2019-03-06Use a consistent style in examplesUlf Magnusson
Also remove some unused imports.
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-09-27Use a consistent import style in the examplesUlf Magnusson
Do the PEP 8 ordering thingy with standard library imports first.
2018-09-15Update some examples to use node_iter()Ulf Magnusson
Simplifies the code. Should promote new APIs. Also fix list_undefined.py for recent kernels. More environment variables are referenced now.
2018-08-22Introduce Kconfig.unique_defined_syms and Kconfig.unique_choicesUlf Magnusson
These are the same as Kconfig.defined_syms and Kconfig.choices, except duplicates are removed. Kconfig order is still preserved. This is almost always what you want when iterating through symbols and choices, as it potentially saves work, avoids generating duplicates when writing output, and still preserves Kconfig order for readability. The old attributes will be kept for backwards compatibility (maybe there's some rare cases where they could be useful too). They're created internally anyway.
2018-05-27allnoconfig: Move from examples/ to rootUlf Magnusson
Put to-be-packaged stuff in the root. Use allnoconfig_simpler.py, and rename allnoconfig.py to allnoconfig_walk.py and keep it as an example.