Skip to content

Commit 80daa56

Browse files
Roman Zippelsravnborg
authored andcommitted
kconfig: use environment option
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>
1 parent 9344908 commit 80daa56

2 files changed

Lines changed: 8 additions & 15 deletions

File tree

‎init/Kconfig‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
config ARCH
2+
string
3+
option env="ARCH"
4+
5+
config KERNELVERSION
6+
string
7+
option env="KERNELVERSION"
8+
19
config DEFCONFIG_LIST
210
string
311
depends on !UML

‎scripts/kconfig/symbol.c‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ void sym_init(void)
4747
{
4848
struct symbol *sym;
4949
struct utsname uts;
50-
char *p;
5150
static bool inited = false;
5251

5352
if (inited)
@@ -56,20 +55,6 @@ void sym_init(void)
5655

5756
uname(&uts);
5857

59-
sym = sym_lookup("ARCH", 0);
60-
sym->type = S_STRING;
61-
sym->flags |= SYMBOL_AUTO;
62-
p = getenv("ARCH");
63-
if (p)
64-
sym_add_default(sym, p);
65-
66-
sym = sym_lookup("KERNELVERSION", 0);
67-
sym->type = S_STRING;
68-
sym->flags |= SYMBOL_AUTO;
69-
p = getenv("KERNELVERSION");
70-
if (p)
71-
sym_add_default(sym, p);
72-
7358
sym = sym_lookup("UNAME_RELEASE", 0);
7459
sym->type = S_STRING;
7560
sym->flags |= SYMBOL_AUTO;

0 commit comments

Comments
 (0)