Skip to content

Commit

Permalink
kconfig: use environment option
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roman Zippel authored and Sam Ravnborg committed Jan 28, 2008
1 parent 9344908 commit 80daa56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
8 changes: 8 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
config ARCH
string
option env="ARCH"

config KERNELVERSION
string
option env="KERNELVERSION"

config DEFCONFIG_LIST
string
depends on !UML
Expand Down
15 changes: 0 additions & 15 deletions scripts/kconfig/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ void sym_init(void)
{
struct symbol *sym;
struct utsname uts;
char *p;
static bool inited = false;

if (inited)
Expand All @@ -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;
Expand Down

0 comments on commit 80daa56

Please sign in to comment.