1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/linux/12-conf-hacks.patch
3 # Copyright (C) 2004 - 2022 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License version 2 as used by the T2 SDE.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 Set all unset options to module. Needed by the T2 SDE Linux kernel
18 Initally written by Claire Xenia Wolf <claire@clairexen.net> and adapted
19 for various new 2.5, 2.6, 3.x, 4.x and 5.x kernels
20 by Rene Rebe <rene@exactcode.de>.
22 --- linux/scripts/kconfig/conf.c.vanilla 2022-02-09 15:42:20.344450884 +0100
23 +++ linux/scripts/kconfig/conf.c 2022-02-09 15:43:25.824448274 +0100
43 for_all_symbols(i, sym) {
44 - if (sym_has_value(sym) || sym->flags & SYMBOL_VALID)
45 + if (sym_has_value(sym)) /* user defined? */
48 + if ((mode == def_no2m) && (sym->type == S_TRISTATE)) {
49 + if (sym_get_tristate_value(sym) != mod)
50 + fprintf(stderr, "Setting %s to 'm'.\n", sym->name);
51 + if (sym_get_tristate_value(sym) != mod) {
52 + sym->def[S_DEF_USER].tri = mod;
53 + sym->flags |= SYMBOL_DEF_USER;
58 + if (sym->flags & SYMBOL_VALID)
61 switch (sym_get_type(sym)) {
65 {"allyesconfig", no_argument, &input_mode_opt, allyesconfig},
66 {"allmodconfig", no_argument, &input_mode_opt, allmodconfig},
67 {"alldefconfig", no_argument, &input_mode_opt, alldefconfig},
68 + {"no2modconfig", no_argument, &input_mode_opt, no2modconfig},
69 {"randconfig", no_argument, &input_mode_opt, randconfig},
70 {"listnewconfig", no_argument, &input_mode_opt, listnewconfig},
71 {"helpnewconfig", no_argument, &input_mode_opt, helpnewconfig},
85 + conf_set_all_new_symbols(def_no2m);
88 conf_set_all_new_symbols(def_no);
90 --- linux/scripts/kconfig/Makefile.vanilla 2022-02-09 15:41:48.025452173 +0100
91 +++ linux/scripts/kconfig/Makefile 2022-02-09 15:41:57.853451781 +0100
93 # deprecated for external use
94 simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
95 alldefconfig randconfig listnewconfig olddefconfig syncconfig \
96 - helpnewconfig yes2modconfig mod2yesconfig mod2noconfig
97 + helpnewconfig yes2modconfig mod2yesconfig mod2noconfig no2modconfig
99 PHONY += $(simple-targets)
102 @echo ' except those preserved by LMC_KEEP environment variable'
103 @echo ' defconfig - New config with default from ARCH supplied defconfig'
104 @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
105 + @echo ' no2modconfig - New config selecting modules for disabled options'
106 @echo ' allnoconfig - New config where all options are answered with no'
107 @echo ' allyesconfig - New config where all options are accepted with yes'
108 @echo ' allmodconfig - New config selecting modules when possible'