Use the environment option to provide the ARCH symbol and the KERNELVERSION symbol.
Unified · Split
| @@ -1,3 +1,11 @@ | ||
| 1 | +config ARCH | |
| 2 | + string | |
| 3 | + option env="ARCH" | |
| 4 | + | |
| 5 | +config KERNELVERSION | |
| 6 | + string | |
| 7 | + option env="KERNELVERSION" | |
| 8 | + | |
| 1 | 9 | config DEFCONFIG_LIST |
| 2 | 10 | string |
| 3 | 11 | depends on !UML |
| @@ -47,7 +47,6 @@ void sym_init(void) · 46 unmodified lines | ||
| 47 | 47 | { |
| 48 | 48 | struct symbol *sym; |
| 49 | 49 | struct utsname uts; |
| 50 | − char *p; | |
| 51 | 50 | static bool inited = false; |
| 52 | 51 | |
| 53 | 52 | if (inited) |
| @@ -56,20 +55,6 @@ void sym_init(void) · 2 unmodified lines | ||
| 56 | 55 | |
| 57 | 56 | uname(&uts); |
| 58 | 57 | |
| 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 | − | |
| 73 | 58 | sym = sym_lookup("UNAME_RELEASE", 0); |
| 74 | 59 | sym->type = S_STRING; |
| 75 | 60 | sym->flags |= SYMBOL_AUTO; |