* updated klickety (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / architecture / avr32 / package / linux / 12-conf-hacks.patch
blob49f484cf7905d2968e599bebce0a80be6e1d18b0
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: architecture/avr32/package/*/12-conf-hacks.patch
3 # Copyright (C) 2004 - 2022 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
5 #
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
8 #
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
16 auto configuration.
18 Initally written by Clifford Wolf <clifford@clifford.at> and adapted
19 for various new 2.5/2.6 kernels by Rene Rebe <rene@exactcode.de>.
21 --- linux-2.6.36/scripts/kconfig/conf.c.vanilla 2010-11-29 11:39:16.000000000 +0100
22 +++ linux-2.6.36/scripts/kconfig/conf.c 2010-11-29 11:34:27.000000000 +0100
23 @@ -24,6 +24,7 @@
24 oldaskconfig,
25 silentoldconfig,
26 oldconfig,
27 + setno2mod,
28 allnoconfig,
29 allyesconfig,
30 allmodconfig,
31 @@ -446,6 +447,7 @@
32 {"silentoldconfig", no_argument, NULL, silentoldconfig},
33 {"defconfig", optional_argument, NULL, defconfig},
34 {"savedefconfig", required_argument, NULL, savedefconfig},
35 + {"no2modconfig", no_argument, NULL, setno2mod},
36 {"allnoconfig", no_argument, NULL, allnoconfig},
37 {"allyesconfig", no_argument, NULL, allyesconfig},
38 {"allmodconfig", no_argument, NULL, allmodconfig},
39 @@ -562,6 +564,9 @@
40 else if (!stat("all.config", &tmpstat))
41 conf_read_simple("all.config", S_DEF_USER);
42 break;
43 + case setno2mod:
44 + conf_read_simple(".config", S_DEF_USER);
45 + break;
46 default:
47 break;
49 @@ -579,6 +584,9 @@
52 switch (input_mode) {
53 + case setno2mod:
54 + conf_set_all_new_symbols(def_no2mod);
55 + break;
56 case allnoconfig:
57 conf_set_all_new_symbols(def_no);
58 break;
59 --- linux-2.6.27/scripts/kconfig/lkc.h 2008-10-10 00:13:53.000000000 +0200
60 +++ linux-2.6.27.work/scripts/kconfig/lkc.h 2008-10-19 14:14:59.000000000 +0200
61 @@ -46,6 +46,7 @@
62 def_default,
63 def_yes,
64 def_mod,
65 + def_no2mod,
66 def_no,
67 def_random
69 --- linux-4.1/scripts/kconfig/Makefile.orig 2015-06-22 05:05:43.000000000 +0000
70 +++ linux-4.1/scripts/kconfig/Makefile 2015-06-27 08:43:43.804920458 +0000
71 @@ -3,7 +3,7 @@
72 # These targets are used from top-level makefile
74 PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \
75 - localmodconfig localyesconfig
76 + localmodconfig localyesconfig no2modconfig
78 ifdef KBUILD_KCONFIG
79 Kconfig := $(KBUILD_KCONFIG)
80 @@ -93,6 +93,9 @@
81 savedefconfig: $(obj)/conf
82 $< $(silent) --$@=defconfig $(Kconfig)
84 +no2modconfig: scripts/kconfig/conf
85 + $< --no2modconfig $(Kconfig)
87 defconfig: $(obj)/conf
88 ifeq ($(KBUILD_DEFCONFIG),)
89 $< $(silent) --defconfig $(Kconfig)
90 @@ -132,6 +135,7 @@
91 @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
92 @echo ' defconfig - New config with default from ARCH supplied defconfig'
93 @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
94 + @echo ' no2modconfig - New config selecting modules for disabled options'
95 @echo ' allnoconfig - New config where all options are answered with no'
96 @echo ' allyesconfig - New config where all options are accepted with yes'
97 @echo ' allmodconfig - New config selecting modules when possible'
98 --- linux-2.6.27.vanilla/scripts/kconfig/confdata.c 2008-10-10 00:13:53.000000000 +0200
99 +++ linux-2.6.27/scripts/kconfig/confdata.c 2008-10-20 12:45:07.000000000 +0200
100 @@ -824,6 +824,17 @@
101 for_all_symbols(i, sym) {
102 if (sym_has_value(sym))
103 continue;
104 + if ((mode == def_no2mod) && (sym->type == S_TRISTATE)) {
105 + if (sym_get_tristate_value(sym) == no)
106 + fprintf(stderr, "Setting %s to 'm'.\n", sym->name);
107 + if (sym_get_tristate_value(sym) == mod)
108 + fprintf(stderr, "Keep %s as 'm'.\n", sym->name);
109 + if (sym_get_tristate_value(sym) != yes)
110 + sym->def[S_DEF_USER].tri = mod;
111 + if (!sym_is_choice(sym))
112 + sym->flags |= SYMBOL_DEF_USER;
113 + continue;
115 switch (sym_get_type(sym)) {
116 case S_BOOLEAN:
117 case S_TRISTATE: