Commit 0748cb3e1fbd89c03a98c15e91ad65797981de77

Authored by Sam Ravnborg
Committed by Michal Marek
1 parent d595cea624

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: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Showing 3 changed files with 15 additions and 7 deletions Side-by-side Diff

Documentation/kbuild/kconfig.txt
... ... @@ -65,7 +65,7 @@
65 65 filename that contains config symbols that the user requires to be
66 66 set to a specific value. If KCONFIG_ALLCONFIG is used without a
67 67 filename, "make *config" checks for a file named
68   -"all{yes/mod/no/random}.config" (corresponding to the *config command
  68 +"all{yes/mod/no/def/random}.config" (corresponding to the *config command
69 69 that was used) for symbol values that are to be forced. If this file
70 70 is not found, it checks for a file named "all.config" to contain forced
71 71 values.
scripts/kconfig/Makefile
... ... @@ -85,9 +85,9 @@
85 85 $(Q)rm -f arch/um/Kconfig.arch
86 86 $(Q)rm -f $(obj)/config.pot
87 87  
88   -PHONY += allnoconfig allyesconfig allmodconfig randconfig
  88 +PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
89 89  
90   -allnoconfig allyesconfig allmodconfig randconfig: $(obj)/conf
  90 +allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
91 91 $< --$@ $(Kconfig)
92 92  
93 93 PHONY += listnewconfig oldnoconfig defconfig
94 94  
... ... @@ -117,11 +117,12 @@
117 117 @echo ' localmodconfig - Update current config disabling modules not loaded'
118 118 @echo ' localyesconfig - Update current config converting local mods to core'
119 119 @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
120   - @echo ' randconfig - New config with random answer to all options'
121   - @echo ' defconfig - New config with default answer to all options'
122   - @echo ' allmodconfig - New config selecting modules when possible'
123   - @echo ' allyesconfig - New config where all options are accepted with yes'
  120 + @echo ' defconfig - New config with default from ARCH supplied defconfig'
124 121 @echo ' allnoconfig - New config where all options are answered with no'
  122 + @echo ' allyesconfig - New config where all options are accepted with yes'
  123 + @echo ' allmodconfig - New config selecting modules when possible'
  124 + @echo ' alldefconfig - New config with all symbols set to default'
  125 + @echo ' randconfig - New config with random answer to all options'
125 126 @echo ' listnewconfig - List new options'
126 127 @echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)'
127 128  
scripts/kconfig/conf.c
... ... @@ -27,6 +27,7 @@
27 27 allnoconfig,
28 28 allyesconfig,
29 29 allmodconfig,
  30 + alldefconfig,
30 31 randconfig,
31 32 defconfig,
32 33 listnewconfig,
... ... @@ -446,6 +447,7 @@
446 447 {"allnoconfig", no_argument, NULL, allnoconfig},
447 448 {"allyesconfig", no_argument, NULL, allyesconfig},
448 449 {"allmodconfig", no_argument, NULL, allmodconfig},
  450 + {"alldefconfig", no_argument, NULL, alldefconfig},
449 451 {"randconfig", no_argument, NULL, randconfig},
450 452 {"listnewconfig", no_argument, NULL, listnewconfig},
451 453 {"oldnoconfig", no_argument, NULL, oldnoconfig},
... ... @@ -534,6 +536,7 @@
534 536 case allnoconfig:
535 537 case allyesconfig:
536 538 case allmodconfig:
  539 + case alldefconfig:
537 540 case randconfig:
538 541 name = getenv("KCONFIG_ALLCONFIG");
539 542 if (name && !stat(name, &tmpstat)) {
... ... @@ -544,6 +547,7 @@
544 547 case allnoconfig: name = "allno.config"; break;
545 548 case allyesconfig: name = "allyes.config"; break;
546 549 case allmodconfig: name = "allmod.config"; break;
  550 + case alldefconfig: name = "alldef.config"; break;
547 551 case randconfig: name = "allrandom.config"; break;
548 552 default: break;
549 553 }
... ... @@ -577,6 +581,9 @@
577 581 break;
578 582 case allmodconfig:
579 583 conf_set_all_new_symbols(def_mod);
  584 + break;
  585 + case alldefconfig:
  586 + conf_set_all_new_symbols(def_default);
580 587 break;
581 588 case randconfig:
582 589 conf_set_all_new_symbols(def_random);