2010-08-21 15:59:10 +02:00
|
|
|
---
|
2011-02-02 11:48:58 +01:00
|
|
|
confdata.c | 57 +++++++++++++++++++++++++++++----------------------------
|
|
|
|
lkc.h | 2 +-
|
|
|
|
menu.c | 2 +-
|
|
|
|
3 files changed, 31 insertions(+), 30 deletions(-)
|
2010-08-21 15:59:10 +02:00
|
|
|
|
2010-10-31 17:35:11 +01:00
|
|
|
Index: config/confdata.c
|
2010-08-21 15:59:10 +02:00
|
|
|
===================================================================
|
2010-10-31 17:35:11 +01:00
|
|
|
--- config.orig/confdata.c
|
|
|
|
+++ config/confdata.c
|
2011-02-02 11:48:58 +01:00
|
|
|
@@ -12,6 +12,7 @@
|
2010-08-21 15:59:10 +02:00
|
|
|
#include <string.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
+#include <libgen.h>
|
|
|
|
|
|
|
|
#define LKC_DIRECT_LINK
|
|
|
|
#include "lkc.h"
|
2011-02-02 11:48:58 +01:00
|
|
|
@@ -25,7 +26,7 @@
|
2010-08-21 15:59:10 +02:00
|
|
|
static const char *conf_filename;
|
|
|
|
static int conf_lineno, conf_warnings, conf_unsaved;
|
|
|
|
|
|
|
|
-const char conf_defname[] = "arch/$ARCH/defconfig";
|
|
|
|
+const char conf_defname[] = ".defconfig";
|
|
|
|
|
|
|
|
static void conf_warning(const char *fmt, ...)
|
|
|
|
{
|
2011-02-02 11:48:58 +01:00
|
|
|
@@ -63,7 +64,7 @@
|
2010-08-21 15:59:10 +02:00
|
|
|
|
|
|
|
const char *conf_get_configname(void)
|
|
|
|
{
|
|
|
|
- char *name = getenv("KCONFIG_CONFIG");
|
|
|
|
+ char *name = getenv("BUILDROOT_CONFIG");
|
|
|
|
|
|
|
|
return name ? name : ".config";
|
|
|
|
}
|
2011-02-02 11:48:58 +01:00
|
|
|
@@ -249,20 +250,20 @@
|
|
|
|
if (line[0] == '#') {
|
|
|
|
if (memcmp(line + 2, CONFIG_, strlen(CONFIG_)))
|
2010-08-21 15:59:10 +02:00
|
|
|
continue;
|
2011-02-02 11:48:58 +01:00
|
|
|
- p = strchr(line + 2 + strlen(CONFIG_), ' ');
|
2010-08-21 15:59:10 +02:00
|
|
|
+ p = strchr(line + 2, ' ');
|
|
|
|
if (!p)
|
|
|
|
continue;
|
|
|
|
*p++ = 0;
|
|
|
|
if (strncmp(p, "is not set", 10))
|
|
|
|
continue;
|
|
|
|
if (def == S_DEF_USER) {
|
2011-02-02 11:48:58 +01:00
|
|
|
- sym = sym_find(line + 2 + strlen(CONFIG_));
|
2010-08-21 15:59:10 +02:00
|
|
|
+ sym = sym_find(line + 2);
|
|
|
|
if (!sym) {
|
|
|
|
sym_add_change_count(1);
|
2011-02-02 11:48:58 +01:00
|
|
|
goto setsym;
|
2010-08-21 15:59:10 +02:00
|
|
|
}
|
|
|
|
} else {
|
2011-02-02 11:48:58 +01:00
|
|
|
- sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
|
2010-08-21 15:59:10 +02:00
|
|
|
+ sym = sym_lookup(line + 2, 0);
|
|
|
|
if (sym->type == S_UNKNOWN)
|
|
|
|
sym->type = S_BOOLEAN;
|
|
|
|
}
|
2011-02-02 11:48:58 +01:00
|
|
|
@@ -278,8 +279,8 @@
|
|
|
|
default:
|
2010-08-21 15:59:10 +02:00
|
|
|
;
|
|
|
|
}
|
2011-02-02 11:48:58 +01:00
|
|
|
- } else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) {
|
|
|
|
- p = strchr(line + strlen(CONFIG_), '=');
|
|
|
|
+ } else if (isupper(line[0])) {
|
2010-08-21 15:59:10 +02:00
|
|
|
+ p = strchr(line, '=');
|
|
|
|
if (!p)
|
|
|
|
continue;
|
|
|
|
*p++ = 0;
|
2011-02-02 11:48:58 +01:00
|
|
|
@@ -290,13 +291,13 @@
|
2010-08-21 15:59:10 +02:00
|
|
|
*p2 = 0;
|
|
|
|
}
|
|
|
|
if (def == S_DEF_USER) {
|
2011-02-02 11:48:58 +01:00
|
|
|
- sym = sym_find(line + strlen(CONFIG_));
|
2010-08-21 15:59:10 +02:00
|
|
|
+ sym = sym_find(line);
|
|
|
|
if (!sym) {
|
|
|
|
sym_add_change_count(1);
|
2011-02-02 11:48:58 +01:00
|
|
|
goto setsym;
|
2010-08-21 15:59:10 +02:00
|
|
|
}
|
|
|
|
} else {
|
2011-02-02 11:48:58 +01:00
|
|
|
- sym = sym_lookup(line + strlen(CONFIG_), 0);
|
2010-08-21 15:59:10 +02:00
|
|
|
+ sym = sym_lookup(line, 0);
|
|
|
|
if (sym->type == S_UNKNOWN)
|
|
|
|
sym->type = S_OTHER;
|
|
|
|
}
|
2011-02-02 11:48:58 +01:00
|
|
|
@@ -423,9 +424,9 @@
|
2010-08-21 17:00:49 +02:00
|
|
|
{
|
|
|
|
int l;
|
|
|
|
if (headerfile)
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(out, "#define %s%s \"", CONFIG_, name);
|
2010-08-21 17:00:49 +02:00
|
|
|
+ fprintf(out, "#define %s \"", name);
|
|
|
|
else
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(out, "%s%s=\"", CONFIG_, name);
|
2010-08-21 17:00:49 +02:00
|
|
|
+ fprintf(out, "%s=\"", name);
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
l = strcspn(str, "\"\\");
|
2011-02-02 14:59:18 +01:00
|
|
|
@@ -450,14 +451,14 @@
|
2010-08-21 17:00:49 +02:00
|
|
|
switch (sym_get_tristate_value(sym)) {
|
|
|
|
case no:
|
|
|
|
if (write_no)
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(out, "# %s%s is not set\n",
|
|
|
|
- CONFIG_, sym->name);
|
|
|
|
+ fprintf(out, "# %s is not set\n",
|
|
|
|
+ sym->name);
|
2010-08-21 17:00:49 +02:00
|
|
|
break;
|
|
|
|
case mod:
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(out, "%s%s=m\n", CONFIG_, sym->name);
|
2010-08-21 17:00:49 +02:00
|
|
|
+ fprintf(out, "%s=m\n", sym->name);
|
|
|
|
break;
|
|
|
|
case yes:
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(out, "%s%s=y\n", CONFIG_, sym->name);
|
2010-08-21 17:00:49 +02:00
|
|
|
+ fprintf(out, "%s=y\n", sym->name);
|
|
|
|
break;
|
2010-08-21 15:59:10 +02:00
|
|
|
}
|
2010-08-21 17:00:49 +02:00
|
|
|
break;
|
2011-02-02 14:59:18 +01:00
|
|
|
@@ -467,7 +468,7 @@
|
2010-08-21 17:00:49 +02:00
|
|
|
case S_HEX:
|
|
|
|
case S_INT:
|
|
|
|
str = sym_get_string_value(sym);
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(out, "%s%s=%s\n", CONFIG_, sym->name, str);
|
2010-08-21 17:00:49 +02:00
|
|
|
+ fprintf(out, "%s=%s\n", sym->name, str);
|
|
|
|
break;
|
|
|
|
case S_OTHER:
|
|
|
|
case S_UNKNOWN:
|
2011-02-02 14:59:18 +01:00
|
|
|
@@ -844,17 +845,17 @@
|
2010-08-21 15:59:10 +02:00
|
|
|
case no:
|
|
|
|
break;
|
|
|
|
case mod:
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(tristate, "%s%s=M\n",
|
|
|
|
- CONFIG_, sym->name);
|
|
|
|
- fprintf(out_h, "#define %s%s_MODULE 1\n",
|
|
|
|
- CONFIG_, sym->name);
|
|
|
|
+ fprintf(tristate, "%s=M\n",
|
|
|
|
+ sym->name);
|
|
|
|
+ fprintf(out_h, "#define %s_MODULE 1\n",
|
|
|
|
+ sym->name);
|
2010-08-21 15:59:10 +02:00
|
|
|
break;
|
|
|
|
case yes:
|
2010-08-21 17:00:49 +02:00
|
|
|
if (sym->type == S_TRISTATE)
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(tristate,"%s%s=Y\n",
|
|
|
|
- CONFIG_, sym->name);
|
|
|
|
- fprintf(out_h, "#define %s%s 1\n",
|
|
|
|
- CONFIG_, sym->name);
|
|
|
|
+ fprintf(tristate,"%s=Y\n",
|
|
|
|
+ sym->name);
|
|
|
|
+ fprintf(out_h, "#define %s 1\n",
|
|
|
|
+ sym->name);
|
2010-08-21 15:59:10 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2011-02-02 14:59:18 +01:00
|
|
|
@@ -864,14 +865,14 @@
|
2010-08-21 15:59:10 +02:00
|
|
|
case S_HEX:
|
|
|
|
str = sym_get_string_value(sym);
|
|
|
|
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(out_h, "#define %s%s 0x%s\n",
|
|
|
|
- CONFIG_, sym->name, str);
|
|
|
|
+ fprintf(out_h, "#define %s 0x%s\n",
|
|
|
|
+ sym->name, str);
|
2010-08-21 15:59:10 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case S_INT:
|
|
|
|
str = sym_get_string_value(sym);
|
2011-02-02 11:48:58 +01:00
|
|
|
- fprintf(out_h, "#define %s%s %s\n",
|
|
|
|
- CONFIG_, sym->name, str);
|
|
|
|
+ fprintf(out_h, "#define %s %s\n",
|
|
|
|
+ sym->name, str);
|
2010-08-21 15:59:10 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2011-02-02 11:48:58 +01:00
|
|
|
Index: config/lkc.h
|
|
|
|
===================================================================
|
|
|
|
--- config.orig/lkc.h
|
|
|
|
+++ config/lkc.h
|
2011-02-02 14:59:18 +01:00
|
|
|
@@ -42,7 +42,7 @@
|
2011-02-02 11:48:58 +01:00
|
|
|
#define N_(text) (text)
|
|
|
|
|
|
|
|
#ifndef CONFIG_
|
|
|
|
-#define CONFIG_ "CONFIG_"
|
|
|
|
+#define CONFIG_ "BR2_"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define TF_COMMAND 0x0001
|
|
|
|
Index: config/menu.c
|
|
|
|
===================================================================
|
|
|
|
--- config.orig/menu.c
|
|
|
|
+++ config/menu.c
|
2011-02-02 14:59:18 +01:00
|
|
|
@@ -597,7 +597,7 @@
|
2011-02-02 11:48:58 +01:00
|
|
|
|
|
|
|
if (menu_has_help(menu)) {
|
|
|
|
if (sym->name) {
|
|
|
|
- str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
|
|
|
|
+ str_printf(help, "%s:\n\n", sym->name);
|
|
|
|
str_append(help, _(menu_get_help(menu)));
|
|
|
|
str_append(help, "\n");
|
|
|
|
}
|