# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/linux/12-conf-hacks.patch # Copyright (C) 2004 - 2022 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- Set all unset options to module. Needed by the T2 SDE Linux kernel auto configuration. Initally written by Clifford Wolf and adapted for various new 2.5, 2.6, 3.x, 4.x and 5.x kernels by Rene Rebe . --- linux/scripts/kconfig/conf.c.vanilla 2022-02-09 15:42:20.344450884 +0100 +++ linux/scripts/kconfig/conf.c 2022-02-09 15:43:25.824448274 +0100 @@ -23,6 +23,7 @@ oldaskconfig, syncconfig, oldconfig, + no2modconfig, allnoconfig, allyesconfig, allmodconfig, @@ -166,6 +167,7 @@ def_y2m, def_m2y, def_no, + def_no2m, def_random }; @@ -228,8 +230,22 @@ } for_all_symbols(i, sym) { - if (sym_has_value(sym) || sym->flags & SYMBOL_VALID) + if (sym_has_value(sym)) /* user defined? */ continue; + + if ((mode == def_no2m) && (sym->type == S_TRISTATE)) { + if (sym_get_tristate_value(sym) != mod) + fprintf(stderr, "Setting %s to 'm'.\n", sym->name); + if (sym_get_tristate_value(sym) != mod) { + sym->def[S_DEF_USER].tri = mod; + sym->flags |= SYMBOL_DEF_USER; + } + continue; + } + + if (sym->flags & SYMBOL_VALID) + continue; + switch (sym_get_type(sym)) { case S_BOOLEAN: case S_TRISTATE: @@ -690,6 +705,7 @@ {"allyesconfig", no_argument, &input_mode_opt, allyesconfig}, {"allmodconfig", no_argument, &input_mode_opt, allmodconfig}, {"alldefconfig", no_argument, &input_mode_opt, alldefconfig}, + {"no2modconfig", no_argument, &input_mode_opt, no2modconfig}, {"randconfig", no_argument, &input_mode_opt, randconfig}, {"listnewconfig", no_argument, &input_mode_opt, listnewconfig}, {"helpnewconfig", no_argument, &input_mode_opt, helpnewconfig}, @@ -806,6 +806,7 @@ case yes2modconfig: case mod2yesconfig: case mod2noconfig: + case no2modconfig: conf_read(NULL); break; case allnoconfig: @@ -851,6 +867,9 @@ } switch (input_mode) { + case no2modconfig: + conf_set_all_new_symbols(def_no2m); + break; case allnoconfig: conf_set_all_new_symbols(def_no); break; --- linux/scripts/kconfig/Makefile.vanilla 2022-02-09 15:41:48.025452173 +0100 +++ linux/scripts/kconfig/Makefile 2022-02-09 15:41:57.853451781 +0100 @@ -69,7 +69,7 @@ # deprecated for external use simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ alldefconfig randconfig listnewconfig olddefconfig syncconfig \ - helpnewconfig yes2modconfig mod2yesconfig mod2noconfig + helpnewconfig yes2modconfig mod2yesconfig mod2noconfig no2modconfig PHONY += $(simple-targets) @@ -127,6 +127,7 @@ @echo ' except those preserved by LMC_KEEP environment variable' @echo ' defconfig - New config with default from ARCH supplied defconfig' @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' + @echo ' no2modconfig - New config selecting modules for disabled options' @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'