You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
132 lines
5.0 KiB
132 lines
5.0 KiB
17 years ago
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||
18 years ago
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||
17 years ago
|
#
|
||
13 years ago
|
# Filename: package/.../linux/12-conf-hacks.patch
|
||
13 years ago
|
# Copyright (C) 2008 - 2011 The OpenSDE Project
|
||
16 years ago
|
# Copyright (C) 2004 - 2008 The T2 SDE Project
|
||
|
# Copyright (C) 1998 - 2003 ROCK Linux Project
|
||
17 years ago
|
#
|
||
18 years ago
|
# More information can be found in the files COPYING and README.
|
||
17 years ago
|
#
|
||
18 years ago
|
# 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 as published by the Free Software
|
||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||
|
# version.
|
||
17 years ago
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||
18 years ago
|
|
||
15 years ago
|
Set all unset options to module. Needed by the OpenSDE Linux kernel
|
||
16 years ago
|
auto configuration.
|
||
18 years ago
|
|
||
13 years ago
|
diff -up linux-2.6.36/scripts/kconfig/conf.c.conf_hack linux-2.6.36/scripts/kconfig/conf.c
|
||
|
--- linux-2.6.36/scripts/kconfig/conf.c.conf_hack 2010-12-10 11:05:25.584361328 +0100
|
||
|
+++ linux-2.6.36/scripts/kconfig/conf.c 2010-12-10 11:23:04.154359980 +0100
|
||
|
@@ -33,6 +33,7 @@ enum input_mode {
|
||
|
savedefconfig,
|
||
|
listnewconfig,
|
||
|
oldnoconfig,
|
||
|
+ no2modconfig,
|
||
|
} input_mode = oldaskconfig;
|
||
15 years ago
|
|
||
13 years ago
|
char *defconfig_file;
|
||
|
@@ -453,6 +454,7 @@ static struct option long_opts[] = {
|
||
|
{"randconfig", no_argument, NULL, randconfig},
|
||
|
{"listnewconfig", no_argument, NULL, listnewconfig},
|
||
|
{"oldnoconfig", no_argument, NULL, oldnoconfig},
|
||
|
+ {"no2modconfig", no_argument, NULL, no2modconfig},
|
||
|
{NULL, 0, NULL, 0}
|
||
|
};
|
||
16 years ago
|
|
||
13 years ago
|
@@ -562,6 +564,9 @@ int main(int ac, char **av)
|
||
16 years ago
|
else if (!stat("all.config", &tmpstat))
|
||
|
conf_read_simple("all.config", S_DEF_USER);
|
||
|
break;
|
||
13 years ago
|
+ case no2modconfig:
|
||
16 years ago
|
+ conf_read_simple(".config", S_DEF_USER);
|
||
|
+ break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
13 years ago
|
@@ -597,6 +602,9 @@ int main(int ac, char **av)
|
||
|
case defconfig:
|
||
|
conf_set_all_new_symbols(def_default);
|
||
16 years ago
|
break;
|
||
13 years ago
|
+ case no2modconfig:
|
||
16 years ago
|
+ conf_set_all_new_symbols(def_no2mod);
|
||
|
+ break;
|
||
13 years ago
|
case savedefconfig:
|
||
16 years ago
|
break;
|
||
13 years ago
|
case oldaskconfig:
|
||
|
diff -up linux-2.6.36/scripts/kconfig/confdata.c.conf_hack linux-2.6.36/scripts/kconfig/confdata.c
|
||
|
--- linux-2.6.36/scripts/kconfig/confdata.c.conf_hack 2010-12-10 11:10:30.434361827 +0100
|
||
|
+++ linux-2.6.36/scripts/kconfig/confdata.c 2010-12-10 11:05:25.622361376 +0100
|
||
|
@@ -991,6 +991,17 @@ void conf_set_all_new_symbols(enum conf_
|
||
16 years ago
|
for_all_symbols(i, sym) {
|
||
|
if (sym_has_value(sym))
|
||
|
continue;
|
||
|
+ if ((mode == def_no2mod) && (sym_get_type(sym) == 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;
|
||
18 years ago
|
+ }
|
||
16 years ago
|
switch (sym_get_type(sym)) {
|
||
|
case S_BOOLEAN:
|
||
|
case S_TRISTATE:
|
||
13 years ago
|
diff -up linux-2.6.36/scripts/kconfig/lkc.h.conf_hack linux-2.6.36/scripts/kconfig/lkc.h
|
||
|
--- linux-2.6.36/scripts/kconfig/lkc.h.conf_hack 2010-12-10 11:10:46.819361946 +0100
|
||
|
+++ linux-2.6.36/scripts/kconfig/lkc.h 2010-12-10 11:05:25.623361366 +0100
|
||
|
@@ -46,6 +46,7 @@ enum conf_def_mode {
|
||
15 years ago
|
def_default,
|
||
|
def_yes,
|
||
|
def_mod,
|
||
|
+ def_no2mod,
|
||
|
def_no,
|
||
|
def_random
|
||
|
};
|
||
13 years ago
|
diff -up linux-2.6.36/scripts/kconfig/Makefile.conf_hack linux-2.6.36/scripts/kconfig/Makefile
|
||
|
--- linux-2.6.36/scripts/kconfig/Makefile.conf_hack 2010-10-20 22:30:22.000000000 +0200
|
||
|
+++ linux-2.6.36/scripts/kconfig/Makefile 2010-12-10 11:23:35.187362246 +0100
|
||
|
@@ -3,7 +3,7 @@
|
||
|
# These targets are used from top-level makefile
|
||
|
|
||
|
PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
|
||
|
- localmodconfig localyesconfig
|
||
|
+ localmodconfig localyesconfig no2modconfig
|
||
|
|
||
|
ifdef KBUILD_KCONFIG
|
||
|
Kconfig := $(KBUILD_KCONFIG)
|
||
|
@@ -95,7 +95,7 @@ update-po-config: $(obj)/kxgettext $(obj
|
||
|
$(Q)rm -f arch/um/Kconfig.arch
|
||
|
$(Q)rm -f $(obj)/config.pot
|
||
|
|
||
|
-PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
|
||
|
+PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig no2modconfig
|
||
|
|
||
|
allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
|
||
|
$< --$@ $(Kconfig)
|
||
|
@@ -108,6 +108,9 @@ listnewconfig oldnoconfig: $(obj)/conf
|
||
|
savedefconfig: $(obj)/conf
|
||
|
$< --$@=defconfig $(Kconfig)
|
||
|
|
||
|
+no2modconfig: $(obj)/conf
|
||
|
+ $< --$@ $(Kconfig)
|
||
|
+
|
||
|
defconfig: $(obj)/conf
|
||
|
ifeq ($(KBUILD_DEFCONFIG),)
|
||
|
$< --defconfig $(Kconfig)
|
||
|
@@ -135,6 +138,7 @@ help:
|
||
|
@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'
|
||
|
+ @echo ' no2modconfig - New config selecting modules for disabled options'
|
||
|
@echo ' alldefconfig - New config with all symbols set to default'
|
||
|
@echo ' randconfig - New config with random answer to all options'
|
||
|
@echo ' listnewconfig - List new options'
|