1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
4 # T2 SDE: package/*/linux/12-conf-hacks.patch
5 # Copyright (C) 2004 - 2021 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
16 # --- T2-COPYRIGHT-NOTE-END ---
18 Set all unset options to module. Needed by the T2 SDE Linux kernel
21 Initally written by Clifford Wolf <clifford@clifford.at> and adapted
22 for various new 2.5, 2.6, 3.x, 4.x and 5.x kernels
23 by Rene Rebe <rene@exactcode.de>.
25 --- ./scripts/kconfig/conf.c.orig 2021-06-28 00:21:11.000000000 +0200
26 +++ ./scripts/kconfig/conf.c 2021-06-29 18:16:43.215860970 +0200
46 for_all_symbols(i, sym) {
47 - if (sym_has_value(sym) || sym->flags & SYMBOL_VALID)
48 + if (sym_has_value(sym)) /* user defined? */
51 + if ((mode == def_no2m) && (sym->type == S_TRISTATE)) {
52 + fprintf(stderr, "%s %d\n", sym->name, sym_get_tristate_value(sym));
53 + if (sym_get_tristate_value(sym) != mod)
54 + fprintf(stderr, "Setting %s to 'm'.\n", sym->name);
55 + if (sym_get_tristate_value(sym) != mod) {
56 + sym->def[S_DEF_USER].tri = mod;
57 + sym->flags |= SYMBOL_DEF_USER;
62 + if (sym->flags & SYMBOL_VALID)
65 switch (sym_get_type(sym)) {
69 {"allyesconfig", no_argument, &input_mode_opt, allyesconfig},
70 {"allmodconfig", no_argument, &input_mode_opt, allmodconfig},
71 {"alldefconfig", no_argument, &input_mode_opt, alldefconfig},
72 + {"no2modconfig", no_argument, &input_mode_opt, no2modconfig},
73 {"randconfig", no_argument, &input_mode_opt, randconfig},
74 {"listnewconfig", no_argument, &input_mode_opt, listnewconfig},
75 {"helpnewconfig", no_argument, &input_mode_opt, helpnewconfig},
89 + conf_set_all_new_symbols(def_no2m);
92 conf_set_all_new_symbols(def_no);
94 --- linux-5.13/scripts/kconfig/Makefile.orig 2021-06-28 00:21:11.000000000 +0200
95 +++ linux-5.13/scripts/kconfig/Makefile 2021-06-29 17:15:30.664703774 +0200
97 # deprecated for external use
98 simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
99 alldefconfig randconfig listnewconfig olddefconfig syncconfig \
100 - helpnewconfig yes2modconfig mod2yesconfig
101 + helpnewconfig yes2modconfig mod2yesconfig no2modconfig
103 PHONY += $(simple-targets)
106 @echo ' except those preserved by LMC_KEEP environment variable'
107 @echo ' defconfig - New config with default from ARCH supplied defconfig'
108 @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
109 + @echo ' no2modconfig - New config selecting modules for disabled options'
110 @echo ' allnoconfig - New config where all options are answered with no'
111 @echo ' allyesconfig - New config where all options are accepted with yes'
112 @echo ' allmodconfig - New config selecting modules when possible'