kconfig: use environment option
authorRoman Zippel <zippel@linux-m68k.org>
Mon, 14 Jan 2008 03:51:16 +0000 (04:51 +0100)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 28 Jan 2008 22:14:39 +0000 (23:14 +0100)
Use the environment option to provide the ARCH symbol
and the KERNELVERSION symbol.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
init/Kconfig
scripts/kconfig/symbol.c

index 288444b4cd8ae8a7e1b74614b9fd4745c635de7a..0d0bbf218f1f363d2c4732fe7cde4d9ac0909529 100644 (file)
@@ -1,3 +1,11 @@
+config ARCH
+       string
+       option env="ARCH"
+
+config KERNELVERSION
+       string
+       option env="KERNELVERSION"
+
 config DEFCONFIG_LIST
        string
        depends on !UML
index 99e3d02d1cfc26b2b0d8489377860d62b4fe7807..3929e5b35e79db7dc0d03083aabaa988e10e1992 100644 (file)
@@ -47,7 +47,6 @@ void sym_init(void)
 {
        struct symbol *sym;
        struct utsname uts;
-       char *p;
        static bool inited = false;
 
        if (inited)
@@ -56,20 +55,6 @@ void sym_init(void)
 
        uname(&uts);
 
-       sym = sym_lookup("ARCH", 0);
-       sym->type = S_STRING;
-       sym->flags |= SYMBOL_AUTO;
-       p = getenv("ARCH");
-       if (p)
-               sym_add_default(sym, p);
-
-       sym = sym_lookup("KERNELVERSION", 0);
-       sym->type = S_STRING;
-       sym->flags |= SYMBOL_AUTO;
-       p = getenv("KERNELVERSION");
-       if (p)
-               sym_add_default(sym, p);
-
        sym = sym_lookup("UNAME_RELEASE", 0);
        sym->type = S_STRING;
        sym->flags |= SYMBOL_AUTO;