Commit 0748cb3e authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Michal Marek

kconfig: add alldefconfig

alldefconfig create a configuration with all values set
to their default value (form the Kconfig files).

This may be useful when we try to use more sensible default
values and may also be used in combination with
the minimal defconfigs.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent d595cea6
...@@ -65,7 +65,7 @@ also use the environment variable KCONFIG_ALLCONFIG as a flag or a ...@@ -65,7 +65,7 @@ also use the environment variable KCONFIG_ALLCONFIG as a flag or a
filename that contains config symbols that the user requires to be filename that contains config symbols that the user requires to be
set to a specific value. If KCONFIG_ALLCONFIG is used without a set to a specific value. If KCONFIG_ALLCONFIG is used without a
filename, "make *config" checks for a file named filename, "make *config" checks for a file named
"all{yes/mod/no/random}.config" (corresponding to the *config command "all{yes/mod/no/def/random}.config" (corresponding to the *config command
that was used) for symbol values that are to be forced. If this file that was used) for symbol values that are to be forced. If this file
is not found, it checks for a file named "all.config" to contain forced is not found, it checks for a file named "all.config" to contain forced
values. values.
......
...@@ -85,9 +85,9 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h ...@@ -85,9 +85,9 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
$(Q)rm -f arch/um/Kconfig.arch $(Q)rm -f arch/um/Kconfig.arch
$(Q)rm -f $(obj)/config.pot $(Q)rm -f $(obj)/config.pot
PHONY += allnoconfig allyesconfig allmodconfig randconfig PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
allnoconfig allyesconfig allmodconfig randconfig: $(obj)/conf allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
$< --$@ $(Kconfig) $< --$@ $(Kconfig)
PHONY += listnewconfig oldnoconfig defconfig PHONY += listnewconfig oldnoconfig defconfig
...@@ -117,11 +117,12 @@ help: ...@@ -117,11 +117,12 @@ help:
@echo ' localmodconfig - Update current config disabling modules not loaded' @echo ' localmodconfig - Update current config disabling modules not loaded'
@echo ' localyesconfig - Update current config converting local mods to core' @echo ' localyesconfig - Update current config converting local mods to core'
@echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
@echo ' randconfig - New config with random answer to all options' @echo ' defconfig - New config with default from ARCH supplied defconfig'
@echo ' defconfig - New config with default answer to all options'
@echo ' allmodconfig - New config selecting modules when possible'
@echo ' allyesconfig - New config where all options are accepted with yes'
@echo ' allnoconfig - New config where all options are answered with no' @echo ' allnoconfig - New config where all options are answered with no'
@echo ' allyesconfig - New config where all options are accepted with yes'
@echo ' allmodconfig - New config selecting modules when possible'
@echo ' alldefconfig - New config with all symbols set to default'
@echo ' randconfig - New config with random answer to all options'
@echo ' listnewconfig - List new options' @echo ' listnewconfig - List new options'
@echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)' @echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)'
......
...@@ -27,6 +27,7 @@ enum input_mode { ...@@ -27,6 +27,7 @@ enum input_mode {
allnoconfig, allnoconfig,
allyesconfig, allyesconfig,
allmodconfig, allmodconfig,
alldefconfig,
randconfig, randconfig,
defconfig, defconfig,
listnewconfig, listnewconfig,
...@@ -446,6 +447,7 @@ static struct option long_opts[] = { ...@@ -446,6 +447,7 @@ static struct option long_opts[] = {
{"allnoconfig", no_argument, NULL, allnoconfig}, {"allnoconfig", no_argument, NULL, allnoconfig},
{"allyesconfig", no_argument, NULL, allyesconfig}, {"allyesconfig", no_argument, NULL, allyesconfig},
{"allmodconfig", no_argument, NULL, allmodconfig}, {"allmodconfig", no_argument, NULL, allmodconfig},
{"alldefconfig", no_argument, NULL, alldefconfig},
{"randconfig", no_argument, NULL, randconfig}, {"randconfig", no_argument, NULL, randconfig},
{"listnewconfig", no_argument, NULL, listnewconfig}, {"listnewconfig", no_argument, NULL, listnewconfig},
{"oldnoconfig", no_argument, NULL, oldnoconfig}, {"oldnoconfig", no_argument, NULL, oldnoconfig},
...@@ -534,6 +536,7 @@ int main(int ac, char **av) ...@@ -534,6 +536,7 @@ int main(int ac, char **av)
case allnoconfig: case allnoconfig:
case allyesconfig: case allyesconfig:
case allmodconfig: case allmodconfig:
case alldefconfig:
case randconfig: case randconfig:
name = getenv("KCONFIG_ALLCONFIG"); name = getenv("KCONFIG_ALLCONFIG");
if (name && !stat(name, &tmpstat)) { if (name && !stat(name, &tmpstat)) {
...@@ -544,6 +547,7 @@ int main(int ac, char **av) ...@@ -544,6 +547,7 @@ int main(int ac, char **av)
case allnoconfig: name = "allno.config"; break; case allnoconfig: name = "allno.config"; break;
case allyesconfig: name = "allyes.config"; break; case allyesconfig: name = "allyes.config"; break;
case allmodconfig: name = "allmod.config"; break; case allmodconfig: name = "allmod.config"; break;
case alldefconfig: name = "alldef.config"; break;
case randconfig: name = "allrandom.config"; break; case randconfig: name = "allrandom.config"; break;
default: break; default: break;
} }
...@@ -578,6 +582,9 @@ int main(int ac, char **av) ...@@ -578,6 +582,9 @@ int main(int ac, char **av)
case allmodconfig: case allmodconfig:
conf_set_all_new_symbols(def_mod); conf_set_all_new_symbols(def_mod);
break; break;
case alldefconfig:
conf_set_all_new_symbols(def_default);
break;
case randconfig: case randconfig:
conf_set_all_new_symbols(def_random); conf_set_all_new_symbols(def_random);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment