def main(): kconf = kconfiglib.standard_kconfig() # See allnoconfig.py kconf.disable_warnings() # Small optimizations BOOL = kconfiglib.BOOL TRISTATE = kconfiglib.TRISTATE for sym in kconf.unique_defined_syms: if sym.orig_type == BOOL: # 'bool' choice symbols get their default value, as determined by # e.g. 'default's on the choice if not sym.choice: # All other bool symbols get set to 'y', like for allyesconfig sym.set_value(2) elif sym.orig_type == TRISTATE: sym.set_value(1) for choice in kconf.unique_choices: choice.set_value(2 if choice.orig_type == BOOL else 1) kconf.enable_warnings() kconfiglib.load_allconfig(kconf, "allmod.config") kconf.write_config(kconfiglib.standard_config_filename())
def main(): kconf = kconfiglib.standard_kconfig() # See allnoconfig.py kconf.disable_warnings() # Try to set all symbols to 'y'. Dependencies might truncate the value down # later, but this will at least give the highest possible value. # # Assigning 0/1/2 to non-bool/tristate symbols has no effect (int/hex # symbols still take a string, because they preserve formatting). for sym in kconf.unique_defined_syms: # Set choice symbols to 'm'. This value will be ignored for choices in # 'y' mode (the "normal" mode), which will instead just get their # default selection, but will set all symbols in m-mode choices to 'm', # which is as high as they can go. sym.set_value(1 if sym.choice else 2) # Set all choices to the highest possible mode for choice in kconf.unique_choices: choice.set_value(2) kconf.enable_warnings() kconfiglib.load_allconfig(kconf, "allyes.config") kconf.write_config()
def main(): kconf = kconfiglib.standard_kconfig(__doc__) # See allnoconfig.py kconf.warn = False # Try to set all symbols to 'y'. Dependencies might truncate the value down # later, but this will at least give the highest possible value. # # Assigning 0/1/2 to non-bool/tristate symbols has no effect (int/hex # symbols still take a string, because they preserve formatting). for sym in kconf.unique_defined_syms: # Set choice symbols to 'm'. This value will be ignored for choices in # 'y' mode (the "normal" mode), which will instead just get their # default selection, but will set all symbols in m-mode choices to 'm', # which is as high as they can go. # # Here's a convoluted example of how you might get an m-mode choice # even during allyesconfig: # # choice # tristate "weird choice" # depends on m sym.set_value(1 if sym.choice else 2) # Set all choices to the highest possible mode for choice in kconf.unique_choices: choice.set_value(2) kconf.warn = True kconfiglib.load_allconfig(kconf, "allyes.config") print(kconf.write_config())
def main(): kconf = kconfiglib.standard_kconfig() # See allnoconfig.py kconf.disable_warnings() # Try to set all symbols to 'y'. Dependencies might truncate the value down # later, but this will at least give the highest possible value. # # Assigning 0/1/2 to non-bool/tristate symbols has no effect (int/hex # symbols still take a string, because they preserve formatting). for sym in kconf.unique_defined_syms: # Set choice symbols to 'm'. This value will be ignored for choices in # 'y' mode (the "normal" mode), which will instead just get their # default selection, but will set all symbols in m-mode choices to 'm', # which is as high as they can go. # # Here's a convoluted example of how you might get an m-mode choice # even during allyesconfig: # # choice # tristate "weird choice" # depends on m sym.set_value(1 if sym.choice else 2) # Set all choices to the highest possible mode for choice in kconf.unique_choices: choice.set_value(2) kconf.enable_warnings() kconfiglib.load_allconfig(kconf, "allyes.config") kconf.write_config()
def main(): kconf = kconfiglib.standard_kconfig() # Avoid warnings that would otherwise get printed by Kconfiglib for the # following: # # 1. Assigning a value to a symbol without a prompt, which never has any # effect # # 2. Assigning values invalid for the type (only bool/tristate symbols # accept 0/1/2, for n/m/y). The assignments will be ignored for other # symbol types, which is what we want. kconf.disable_warnings() for sym in kconf.unique_defined_syms: sym.set_value(2 if sym.is_allnoconfig_y else 0) kconf.enable_warnings() kconfiglib.load_allconfig(kconf, "allno.config") kconf.write_config(kconfiglib.standard_config_filename())
def main(): kconf = kconfiglib.standard_kconfig() # Avoid warnings that would otherwise get printed by Kconfiglib for the # following: # # 1. Assigning a value to a symbol without a prompt, which never has any # effect # # 2. Assigning values invalid for the type (only bool/tristate symbols # accept 0/1/2, for n/m/y). The assignments will be ignored for other # symbol types, which is what we want. kconf.disable_warnings() for sym in kconf.unique_defined_syms: sym.set_value(2 if sym.is_allnoconfig_y else 0) kconf.enable_warnings() kconfiglib.load_allconfig(kconf, "allno.config") kconf.write_config()
def main(): kconf = kconfiglib.standard_kconfig() # See allnoconfig.py kconf.disable_warnings() for sym in kconf.unique_defined_syms: if sym.orig_type == kconfiglib.BOOL: # 'bool' choice symbols get their default value, as determined by # e.g. 'default's on the choice if not sym.choice: # All other bool symbols get set to 'y', like for allyesconfig sym.set_value(2) elif sym.orig_type == kconfiglib.TRISTATE: sym.set_value(1) for choice in kconf.unique_choices: choice.set_value(2 if choice.orig_type == kconfiglib.BOOL else 1) kconf.enable_warnings() kconfiglib.load_allconfig(kconf, "allmod.config") kconf.write_config()
def main(): kconf = kconfiglib.standard_kconfig(__doc__) # See allnoconfig.py kconf.warn = False for sym in kconf.unique_defined_syms: if sym.orig_type == kconfiglib.BOOL: # 'bool' choice symbols get their default value, as determined by # e.g. 'default's on the choice if not sym.choice: # All other bool symbols get set to 'y', like for allyesconfig sym.set_value(2) elif sym.orig_type == kconfiglib.TRISTATE: sym.set_value(1) for choice in kconf.unique_choices: choice.set_value(2 if choice.orig_type == kconfiglib.BOOL else 1) kconf.warn = True kconfiglib.load_allconfig(kconf, "allmod.config") print(kconf.write_config())
def main(): kconf = kconfiglib.standard_kconfig() kconfiglib.load_allconfig(kconf, "alldef.config") print(kconf.write_config())
def main(): kconf = kconfiglib.standard_kconfig() kconfiglib.load_allconfig(kconf, "alldef.config") kconf.write_config(kconfiglib.standard_config_filename())
def main(): kconf = kconfiglib.standard_kconfig() kconfiglib.load_allconfig(kconf, "alldef.config") kconf.write_config()