Revert 9c900a9c9d9351e55ab6a84e12e3a52c474c7c8b 0f855aa64b3f63d35a891510cf7db932a435c116 2a113281f5cd2febbab21a93c8943f8d3eece4d3 and K64BIT parts of daa93fab824f2b8c35bd11670c7fab2f32b2de5f Signed-off-by: Roman Zippel --- Makefile | 4 - README | 2 scripts/kconfig/conf.c | 1 scripts/kconfig/confdata.c | 146 ++++++++++++++++---------------------------- scripts/kconfig/lkc_proto.h | 1 5 files changed, 56 insertions(+), 98 deletions(-) Index: linux-2.6/Makefile =================================================================== --- linux-2.6.orig/Makefile +++ linux-2.6/Makefile @@ -200,11 +200,9 @@ SRCARCH := $(ARCH) # Additional ARCH settings for x86 ifeq ($(ARCH),i386) SRCARCH := x86 - K64BIT := n endif ifeq ($(ARCH),x86_64) SRCARCH := x86 - K64BIT := y endif KCONFIG_CONFIG ?= .config @@ -341,7 +339,7 @@ KERNELRELEASE = $(shell cat include/conf KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION -export ARCH SRCARCH K64BIT CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC +export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS Index: linux-2.6/README =================================================================== --- linux-2.6.orig/README +++ linux-2.6/README @@ -194,8 +194,6 @@ CONFIGURING the kernel: "make *config" checks for a file named "all{yes/mod/no/random}.config" for symbol values that are to be forced. If this file is not found, it checks for a file named "all.config" to contain forced values. - Finally it checks the environment variable K64BIT and if found, sets - the config symbol "64BIT" to the value of the K64BIT variable. NOTES on "make config": - having unnecessary drivers will make the kernel bigger, and can Index: linux-2.6/scripts/kconfig/conf.c =================================================================== --- linux-2.6.orig/scripts/kconfig/conf.c +++ linux-2.6/scripts/kconfig/conf.c @@ -591,7 +591,6 @@ int main(int ac, char **av) conf_read_simple(name, S_DEF_USER); else if (!stat("all.config", &tmpstat)) conf_read_simple("all.config", S_DEF_USER); - conf_set_env_sym("K64BIT", "64BIT", S_DEF_USER); break; default: break; Index: linux-2.6/scripts/kconfig/confdata.c =================================================================== --- linux-2.6.orig/scripts/kconfig/confdata.c +++ linux-2.6/scripts/kconfig/confdata.c @@ -83,95 +83,6 @@ char *conf_get_default_confname(void) return name; } -static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) -{ - char *p2; - - switch (sym->type) { - case S_TRISTATE: - if (p[0] == 'm') { - sym->def[def].tri = mod; - sym->flags |= def_flags; - break; - } - case S_BOOLEAN: - if (p[0] == 'y') { - sym->def[def].tri = yes; - sym->flags |= def_flags; - break; - } - if (p[0] == 'n') { - sym->def[def].tri = no; - sym->flags |= def_flags; - break; - } - conf_warning("symbol value '%s' invalid for %s", p, sym->name); - break; - case S_OTHER: - if (*p != '"') { - for (p2 = p; *p2 && !isspace(*p2); p2++) - ; - sym->type = S_STRING; - goto done; - } - case S_STRING: - if (*p++ != '"') - break; - for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { - if (*p2 == '"') { - *p2 = 0; - break; - } - memmove(p2, p2 + 1, strlen(p2)); - } - if (!p2) { - conf_warning("invalid string found"); - return 1; - } - case S_INT: - case S_HEX: - done: - if (sym_string_valid(sym, p)) { - sym->def[def].val = strdup(p); - sym->flags |= def_flags; - } else { - conf_warning("symbol value '%s' invalid for %s", p, sym->name); - return 1; - } - break; - default: - ; - } - return 0; -} - -/* Read an environment variable and assign the value to the symbol */ -int conf_set_env_sym(const char *env, const char *symname, int def) -{ - struct symbol *sym; - char *p; - int def_flags; - - p = getenv(env); - if (p) { - char warning[200]; - sprintf(warning, "Environment variable (%s = \"%s\")", env, p); - conf_filename = warning; - def_flags = SYMBOL_DEF << def; - if (def == S_DEF_USER) { - sym = sym_find(symname); - if (!sym) - return 1; - } else { - sym = sym_lookup(symname, 0); - if (sym->type == S_UNKNOWN) - sym->type = S_OTHER; - } - conf_set_sym_val(sym, def, def_flags, p); - } - return 0; -} - int conf_read_simple(const char *name, int def) { FILE *in = NULL; @@ -302,8 +213,61 @@ load: conf_warning("trying to reassign symbol %s", sym->name); break; } - if (conf_set_sym_val(sym, def, def_flags, p)) - continue; + switch (sym->type) { + case S_TRISTATE: + if (p[0] == 'm') { + sym->def[def].tri = mod; + sym->flags |= def_flags; + break; + } + case S_BOOLEAN: + if (p[0] == 'y') { + sym->def[def].tri = yes; + sym->flags |= def_flags; + break; + } + if (p[0] == 'n') { + sym->def[def].tri = no; + sym->flags |= def_flags; + break; + } + conf_warning("symbol value '%s' invalid for %s", p, sym->name); + break; + case S_OTHER: + if (*p != '"') { + for (p2 = p; *p2 && !isspace(*p2); p2++) + ; + sym->type = S_STRING; + goto done; + } + case S_STRING: + if (*p++ != '"') + break; + for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { + if (*p2 == '"') { + *p2 = 0; + break; + } + memmove(p2, p2 + 1, strlen(p2)); + } + if (!p2) { + conf_warning("invalid string found"); + continue; + } + case S_INT: + case S_HEX: + done: + if (sym_string_valid(sym, p)) { + sym->def[def].val = strdup(p); + sym->flags |= def_flags; + } else { + conf_warning("symbol value '%s' invalid for %s", p, sym->name); + continue; + } + break; + default: + ; + } break; case '\r': case '\n': Index: linux-2.6/scripts/kconfig/lkc_proto.h =================================================================== --- linux-2.6.orig/scripts/kconfig/lkc_proto.h +++ linux-2.6/scripts/kconfig/lkc_proto.h @@ -1,7 +1,6 @@ /* confdata.c */ P(conf_parse,void,(const char *name)); -P(conf_set_env_sym,int,(const char *envname, const char *symname, int def)); P(conf_read,int,(const char *name)); P(conf_read_simple,int,(const char *name, int)); P(conf_write,int,(const char *name));