# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: architecture/blackfin/package/*/12-conf-hacks.patch # Copyright (C) 2004 - 2021 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 kernels by Rene Rebe . --- linux-2.6.36/scripts/kconfig/conf.c.vanilla 2010-11-29 11:39:16.000000000 +0100 +++ linux-2.6.36/scripts/kconfig/conf.c 2010-11-29 11:34:27.000000000 +0100 @@ -24,6 +24,7 @@ oldaskconfig, silentoldconfig, oldconfig, + setno2mod, allnoconfig, allyesconfig, allmodconfig, @@ -446,6 +447,7 @@ {"silentoldconfig", no_argument, NULL, silentoldconfig}, {"defconfig", optional_argument, NULL, defconfig}, {"savedefconfig", required_argument, NULL, savedefconfig}, + {"no2modconfig", no_argument, NULL, setno2mod}, {"allnoconfig", no_argument, NULL, allnoconfig}, {"allyesconfig", no_argument, NULL, allyesconfig}, {"allmodconfig", no_argument, NULL, allmodconfig}, @@ -562,6 +564,9 @@ else if (!stat("all.config", &tmpstat)) conf_read_simple("all.config", S_DEF_USER); break; + case setno2mod: + conf_read_simple(".config", S_DEF_USER); + break; default: break; } @@ -579,6 +584,9 @@ } switch (input_mode) { + case setno2mod: + conf_set_all_new_symbols(def_no2mod); + break; case allnoconfig: conf_set_all_new_symbols(def_no); break; --- linux-2.6.27/scripts/kconfig/lkc.h 2008-10-10 00:13:53.000000000 +0200 +++ linux-2.6.27.work/scripts/kconfig/lkc.h 2008-10-19 14:14:59.000000000 +0200 @@ -46,6 +46,7 @@ def_default, def_yes, def_mod, + def_no2mod, def_no, def_random }; --- linux-4.1/scripts/kconfig/Makefile.orig 2015-06-22 05:05:43.000000000 +0000 +++ linux-4.1/scripts/kconfig/Makefile 2015-06-27 08:43:43.804920458 +0000 @@ -3,7 +3,7 @@ # These targets are used from top-level makefile PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \ - localmodconfig localyesconfig + localmodconfig localyesconfig no2modconfig ifdef KBUILD_KCONFIG Kconfig := $(KBUILD_KCONFIG) @@ -93,6 +93,9 @@ savedefconfig: $(obj)/conf $< $(silent) --$@=defconfig $(Kconfig) +no2modconfig: scripts/kconfig/conf + $< --no2modconfig $(Kconfig) + defconfig: $(obj)/conf ifeq ($(KBUILD_DEFCONFIG),) $< $(silent) --defconfig $(Kconfig) @@ -132,6 +135,7 @@ @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' @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' --- linux-2.6.27.vanilla/scripts/kconfig/confdata.c 2008-10-10 00:13:53.000000000 +0200 +++ linux-2.6.27/scripts/kconfig/confdata.c 2008-10-20 12:45:07.000000000 +0200 @@ -824,6 +824,17 @@ for_all_symbols(i, sym) { if (sym_has_value(sym)) continue; + if ((mode == def_no2mod) && (sym->type == S_TRISTATE)) { + if (sym_get_tristate_value(sym) == no) + fprintf(stderr, "Setting %s to 'm'.\n", sym->name); + if (sym_get_tristate_value(sym) == mod) + fprintf(stderr, "Keep %s as 'm'.\n", sym->name); + if (sym_get_tristate_value(sym) != yes) + sym->def[S_DEF_USER].tri = mod; + if (!sym_is_choice(sym)) + sym->flags |= SYMBOL_DEF_USER; + continue; + } switch (sym_get_type(sym)) { case S_BOOLEAN: case S_TRISTATE: