1 diff -rduNp config.new.oorig/Makefile config.new/Makefile
2 --- config.new.oorig/Makefile 2008-04-07 11:03:28.000000000 +0200
3 +++ config.new/Makefile 2008-04-07 11:06:30.000000000 +0200
4 @@ -123,6 +123,9 @@ hostprogs-y := conf qconf gconf kxgettex
5 ifeq ($(MAKECMDGOALS),menuconfig)
8 +ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf)
12 ifeq ($(MAKECMDGOALS),xconfig)
14 @@ -181,8 +184,8 @@ $(obj)/.tmp_qtcheck:
16 if [ -z "$$dir" ]; then \
18 - echo "* Unable to find the QT3 installation. Please make sure that"; \
19 - echo "* the QT3 development package is correctly installed and"; \
20 + echo "* Unable to find the QT installation. Please make sure that"; \
21 + echo "* the QT development package is correctly installed and"; \
22 echo "* either install pkg-config or set the QTDIR environment"; \
23 echo "* variable to the correct location."; \
25 diff -rduNp config.new.oorig/conf.c config.new/conf.c
26 --- config.new.oorig/conf.c 2008-04-07 11:03:28.000000000 +0200
27 +++ config.new/conf.c 2008-04-07 11:06:30.000000000 +0200
28 @@ -545,7 +545,7 @@ int main(int ac, char **av)
32 - //zconfdump(stdout);
33 + /*zconfdump(stdout);*/
37 @@ -560,11 +560,11 @@ int main(int ac, char **av)
39 if (stat(".config", &tmpstat)) {
41 - "*** You have not yet configured your kernel!\n"
42 - "*** (missing kernel .config file)\n"
43 + "*** You have not yet configured Buildroot!\n"
44 + "*** (missing .config file)\n"
46 "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
47 - "*** \"make menuconfig\" or \"make xconfig\").\n"
48 + "*** \"make menuconfig\" or \"make config\").\n"
52 @@ -607,7 +607,7 @@ int main(int ac, char **av)
53 } else if (conf_get_changed()) {
54 name = getenv("KCONFIG_NOSILENTUPDATE");
56 - fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n"));
57 + fprintf(stderr, _("\n*** Buildroot configuration requires explicit update.\n\n"));
61 @@ -618,12 +618,12 @@ int main(int ac, char **av)
62 check_conf(&rootmenu);
64 if (conf_write(NULL)) {
65 - fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
66 + fprintf(stderr, _("\n*** Error during writing of the Buildroot configuration.\n\n"));
70 - if (input_mode == ask_silent && conf_write_autoconf()) {
71 - fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
72 + if (/*input_mode == ask_silent &&*/ conf_write_autoconf()) {
73 + fprintf(stderr, _("\n*** Error during writing of the Buildroot configuration.\n\n"));
77 diff -rduNp config.new.oorig/confdata.c config.new/confdata.c
78 --- config.new.oorig/confdata.c 2008-04-07 11:03:28.000000000 +0200
79 +++ config.new/confdata.c 2008-04-07 11:06:30.000000000 +0200
86 #define LKC_DIRECT_LINK
88 @@ -21,7 +22,7 @@ static void conf_warning(const char *fmt
89 static const char *conf_filename;
90 static int conf_lineno, conf_warnings, conf_unsaved;
92 -const char conf_defname[] = "arch/$ARCH/defconfig";
93 +const char conf_defname[] = ".defconfig";
95 static void conf_warning(const char *fmt, ...)
97 @@ -36,7 +37,7 @@ static void conf_warning(const char *fmt
99 const char *conf_get_configname(void)
101 - char *name = getenv("KCONFIG_CONFIG");
102 + char *name = getenv("BUILDROOT_CONFIG");
104 return name ? name : ".config";
106 @@ -212,22 +213,22 @@ load:
110 - if (memcmp(line + 2, "CONFIG_", 7))
113 - p = strchr(line + 9, ' ');
114 + p = strchr(line + 2, ' ');
118 if (strncmp(p, "is not set", 10))
120 if (def == S_DEF_USER) {
121 - sym = sym_find(line + 9);
122 + sym = sym_find(line + 2);
124 - conf_warning("trying to assign nonexistent symbol %s", line + 9);
125 + conf_warning("trying to assign nonexistent symbol %s", line + 2);
129 - sym = sym_lookup(line + 9, 0);
130 + sym = sym_lookup(line + 2, 0);
131 if (sym->type == S_UNKNOWN)
132 sym->type = S_BOOLEAN;
134 @@ -245,12 +246,8 @@ load:
139 - if (memcmp(line, "CONFIG_", 7)) {
140 - conf_warning("unexpected data");
143 - p = strchr(line + 7, '=');
144 + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
145 + p = strchr(line, '=');
149 @@ -261,13 +258,13 @@ load:
152 if (def == S_DEF_USER) {
153 - sym = sym_find(line + 7);
154 + sym = sym_find(line);
156 - conf_warning("trying to assign nonexistent symbol %s", line + 7);
157 + conf_warning("trying to assign nonexistent symbol %s", line);
161 - sym = sym_lookup(line + 7, 0);
162 + sym = sym_lookup(line, 0);
163 if (sym->type == S_UNKNOWN)
166 @@ -440,7 +437,7 @@ int conf_write(const char *name)
170 - sym = sym_lookup("KERNELVERSION", 0);
171 + sym = sym_lookup("BR2_VERSION", 0);
174 env = getenv("KCONFIG_NOTIMESTAMP");
175 @@ -449,10 +446,8 @@ int conf_write(const char *name)
178 "# Automatically generated make config: don't edit\n"
179 - "# Linux kernel version: %s\n"
182 - sym_get_string_value(sym),
183 use_timestamp ? "# " : "",
184 use_timestamp ? ctime(&now) : "");
186 @@ -486,19 +481,19 @@ int conf_write(const char *name)
188 switch (sym_get_tristate_value(sym)) {
190 - fprintf(out, "# CONFIG_%s is not set\n", sym->name);
191 + fprintf(out, "# %s is not set\n", sym->name);
194 - fprintf(out, "CONFIG_%s=m\n", sym->name);
195 + fprintf(out, "%s=m\n", sym->name);
198 - fprintf(out, "CONFIG_%s=y\n", sym->name);
199 + fprintf(out, "%s=y\n", sym->name);
204 str = sym_get_string_value(sym);
205 - fprintf(out, "CONFIG_%s=\"", sym->name);
206 + fprintf(out, "%s=\"", sym->name);
208 l = strcspn(str, "\"\\");
210 @@ -514,12 +509,12 @@ int conf_write(const char *name)
212 str = sym_get_string_value(sym);
213 if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
214 - fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
215 + fprintf(out, "%s=%s\n", sym->name, str);
219 str = sym_get_string_value(sym);
220 - fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
221 + fprintf(out, "%s=%s\n", sym->name, str);
225 @@ -559,7 +554,7 @@ int conf_write(const char *name)
227 int conf_split_config(void)
229 - char *name, path[128];
230 + char *name, path[128], *opwd, *dir, *_name;
234 @@ -570,8 +565,20 @@ int conf_split_config(void)
235 name = "include/config/auto.conf";
236 conf_read_simple(name, S_DEF_AUTO);
238 - if (chdir("include/config"))
239 + opwd = malloc(256);
240 + _name = strdup(name);
241 + if (opwd == NULL || _name == NULL)
243 + opwd = getcwd(opwd, 256);
244 + dir = dirname(_name);
255 for_all_symbols(i, sym) {
256 @@ -664,9 +671,11 @@ int conf_split_config(void)
260 - if (chdir("../.."))
271 @@ -681,7 +690,7 @@ int conf_write_autoconf(void)
273 sym_clear_all_valid();
275 - file_write_dep("include/config/auto.conf.cmd");
276 + file_write_dep(".config.cmd");
278 if (conf_split_config())
280 @@ -696,22 +705,19 @@ int conf_write_autoconf(void)
284 - sym = sym_lookup("KERNELVERSION", 0);
285 + sym = sym_lookup("BR2_VERSION", 0);
289 "# Automatically generated make config: don't edit\n"
290 - "# Linux kernel version: %s\n"
293 - sym_get_string_value(sym), ctime(&now));
295 fprintf(out_h, "/*\n"
296 " * Automatically generated C config: don't edit\n"
297 - " * Linux kernel version: %s\n"
300 - "#define AUTOCONF_INCLUDED\n",
301 - sym_get_string_value(sym), ctime(&now));
305 for_all_symbols(i, sym) {
307 @@ -724,19 +730,19 @@ int conf_write_autoconf(void)
311 - fprintf(out, "CONFIG_%s=m\n", sym->name);
312 - fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
313 + fprintf(out, "%s=m\n", sym->name);
314 + fprintf(out_h, "#define %s_MODULE 1\n", sym->name);
317 - fprintf(out, "CONFIG_%s=y\n", sym->name);
318 - fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
319 + fprintf(out, "%s=y\n", sym->name);
320 + fprintf(out_h, "#define %s 1\n", sym->name);
325 str = sym_get_string_value(sym);
326 - fprintf(out, "CONFIG_%s=\"", sym->name);
327 - fprintf(out_h, "#define CONFIG_%s \"", sym->name);
328 + fprintf(out, "%s=\"", sym->name);
329 + fprintf(out_h, "#define %s \"", sym->name);
331 l = strcspn(str, "\"\\");
333 @@ -756,14 +762,14 @@ int conf_write_autoconf(void)
335 str = sym_get_string_value(sym);
336 if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
337 - fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
338 - fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
339 + fprintf(out, "%s=%s\n", sym->name, str);
340 + fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
344 str = sym_get_string_value(sym);
345 - fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
346 - fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
347 + fprintf(out, "%s=%s\n", sym->name, str);
348 + fprintf(out_h, "#define %s %s\n", sym->name, str);
352 diff -rduNp config.new.oorig/expr.c config.new/expr.c
353 --- config.new.oorig/expr.c 2008-04-07 11:03:28.000000000 +0200
354 +++ config.new/expr.c 2008-04-07 11:06:30.000000000 +0200
355 @@ -331,7 +331,7 @@ struct expr *expr_trans_bool(struct expr
356 e->right.expr = expr_trans_bool(e->right.expr);
360 + /* FOO!=n -> FOO */
361 if (e->left.sym->type == S_TRISTATE) {
362 if (e->right.sym == &symbol_no) {
364 @@ -380,19 +380,19 @@ struct expr *expr_join_or(struct expr *e
365 if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
366 ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
367 (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) {
368 - // (a='y') || (a='m') -> (a!='n')
369 + /* (a='y') || (a='m') -> (a!='n') */
370 return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no);
372 if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
373 ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
374 (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) {
375 - // (a='y') || (a='n') -> (a!='m')
376 + /* (a='y') || (a='n') -> (a!='m') */
377 return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod);
379 if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
380 ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
381 (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) {
382 - // (a='m') || (a='n') -> (a!='y')
383 + /* (a='m') || (a='n') -> (a!='y') */
384 return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes);
387 @@ -443,29 +443,29 @@ struct expr *expr_join_and(struct expr *
389 if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) ||
390 (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes))
391 - // (a) && (a='y') -> (a='y')
392 + /* (a) && (a='y') -> (a='y') */
393 return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
395 if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) ||
396 (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no))
397 - // (a) && (a!='n') -> (a)
398 + /* (a) && (a!='n') -> (a) */
399 return expr_alloc_symbol(sym1);
401 if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) ||
402 (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod))
403 - // (a) && (a!='m') -> (a='y')
404 + /* (a) && (a!='m') -> (a='y') */
405 return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
407 if (sym1->type == S_TRISTATE) {
408 if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) {
409 - // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
410 + /* (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' */
411 sym2 = e1->right.sym;
412 if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
413 return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
414 : expr_alloc_symbol(&symbol_no);
416 if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) {
417 - // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
418 + /* (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' */
419 sym2 = e2->right.sym;
420 if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
421 return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
422 @@ -474,19 +474,19 @@ struct expr *expr_join_and(struct expr *
423 if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
424 ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
425 (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes)))
426 - // (a!='y') && (a!='n') -> (a='m')
427 + /* (a!='y') && (a!='n') -> (a='m') */
428 return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod);
430 if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
431 ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
432 (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes)))
433 - // (a!='y') && (a!='m') -> (a='n')
434 + /* (a!='y') && (a!='m') -> (a='n') */
435 return expr_alloc_comp(E_EQUAL, sym1, &symbol_no);
437 if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
438 ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
439 (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod)))
440 - // (a!='m') && (a!='n') -> (a='m')
441 + /* (a!='m') && (a!='n') -> (a='m') */
442 return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
444 if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) ||
445 @@ -579,7 +579,7 @@ static void expr_eliminate_dups2(enum ex
448 expr_eliminate_dups2(e1->type, &e1, &e1);
449 - // (FOO || BAR) && (!FOO && !BAR) -> n
450 + /* (FOO || BAR) && (!FOO && !BAR) -> n */
451 tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
452 tmp2 = expr_copy(e2);
453 tmp = expr_extract_eq_and(&tmp1, &tmp2);
454 @@ -594,7 +594,7 @@ static void expr_eliminate_dups2(enum ex
457 expr_eliminate_dups2(e1->type, &e1, &e1);
458 - // (FOO && BAR) || (!FOO || !BAR) -> y
459 + /* (FOO && BAR) || (!FOO || !BAR) -> y */
460 tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
461 tmp2 = expr_copy(e2);
462 tmp = expr_extract_eq_or(&tmp1, &tmp2);
463 @@ -703,7 +703,7 @@ struct expr *expr_transform(struct expr
465 switch (e->left.expr->type) {
469 tmp = e->left.expr->left.expr;
472 @@ -712,14 +712,14 @@ struct expr *expr_transform(struct expr
476 - // !a='x' -> a!='x'
477 + /* !a='x' -> a!='x' */
481 e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL;
484 - // !(a || b) -> !a && !b
485 + /* !(a || b) -> !a && !b */
488 e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
489 @@ -728,7 +728,7 @@ struct expr *expr_transform(struct expr
490 e = expr_transform(e);
493 - // !(a && b) -> !a || !b
494 + /* !(a && b) -> !a || !b */
497 e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
498 @@ -738,7 +738,7 @@ struct expr *expr_transform(struct expr
501 if (e->left.expr->left.sym == &symbol_yes) {
507 @@ -747,7 +747,7 @@ struct expr *expr_transform(struct expr
510 if (e->left.expr->left.sym == &symbol_mod) {
516 @@ -756,7 +756,7 @@ struct expr *expr_transform(struct expr
519 if (e->left.expr->left.sym == &symbol_no) {
525 diff -rduNp config.new.oorig/expr.h config.new/expr.h
526 --- config.new.oorig/expr.h 2008-04-07 11:03:28.000000000 +0200
527 +++ config.new/expr.h 2008-04-07 11:06:30.000000000 +0200
528 @@ -65,7 +65,7 @@ enum symbol_type {
531 S_DEF_USER, /* main user value */
537 diff -rduNp config.new.oorig/gconf.c config.new/gconf.c
538 --- config.new.oorig/gconf.c 2008-04-07 11:03:28.000000000 +0200
539 +++ config.new/gconf.c 2008-04-07 11:06:30.000000000 +0200
540 @@ -268,8 +268,8 @@ void init_main_window(const gchar * glad
541 /*"style", PANGO_STYLE_OBLIQUE, */
544 - sprintf(title, _("Linux Kernel v%s Configuration"),
545 - getenv("KERNELVERSION"));
546 + sprintf(title, _("Buildroot v%s Configuration"),
547 + getenv("BR2_VERSION"));
548 gtk_window_set_title(GTK_WINDOW(main_wnd), title);
550 gtk_widget_show(main_wnd);
551 diff -rduNp config.new.oorig/gconf.glade config.new/gconf.glade
552 --- config.new.oorig/gconf.glade 2008-04-07 11:03:28.000000000 +0200
553 +++ config.new/gconf.glade 2008-04-07 11:06:30.000000000 +0200
556 <widget class="GtkWindow" id="window1">
557 <property name="visible">True</property>
558 - <property name="title" translatable="yes">Gtk Kernel Configurator</property>
559 + <property name="title" translatable="yes">Gtk Buildroot Configurator</property>
560 <property name="type">GTK_WINDOW_TOPLEVEL</property>
561 <property name="window_position">GTK_WIN_POS_NONE</property>
562 <property name="modal">False</property>
563 diff -rduNp config.new.oorig/kconfig-to-buildroot2.patch config.new/kconfig-to-buildroot2.patch
564 --- config.new.oorig/kconfig-to-buildroot2.patch 1970-01-01 01:00:00.000000000 +0100
565 +++ config.new/kconfig-to-buildroot2.patch 2008-04-07 11:12:30.000000000 +0200
567 +diff -rduNp config.new.oorig/Makefile config.new/Makefile
568 +--- config.new.oorig/Makefile 2008-04-07 11:03:28.000000000 +0200
569 ++++ config.new/Makefile 2008-04-07 11:06:30.000000000 +0200
570 +@@ -123,6 +123,9 @@ hostprogs-y := conf qconf gconf kxgettex
571 + ifeq ($(MAKECMDGOALS),menuconfig)
572 + hostprogs-y += mconf
574 ++ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf)
575 ++ hostprogs-y += mconf
578 + ifeq ($(MAKECMDGOALS),xconfig)
580 +@@ -181,8 +184,8 @@ $(obj)/.tmp_qtcheck:
582 + if [ -z "$$dir" ]; then \
584 +- echo "* Unable to find the QT3 installation. Please make sure that"; \
585 +- echo "* the QT3 development package is correctly installed and"; \
586 ++ echo "* Unable to find the QT installation. Please make sure that"; \
587 ++ echo "* the QT development package is correctly installed and"; \
588 + echo "* either install pkg-config or set the QTDIR environment"; \
589 + echo "* variable to the correct location."; \
591 +diff -rduNp config.new.oorig/conf.c config.new/conf.c
592 +--- config.new.oorig/conf.c 2008-04-07 11:03:28.000000000 +0200
593 ++++ config.new/conf.c 2008-04-07 11:06:30.000000000 +0200
594 +@@ -545,7 +545,7 @@ int main(int ac, char **av)
598 +- //zconfdump(stdout);
599 ++ /*zconfdump(stdout);*/
600 + switch (input_mode) {
602 + if (!defconfig_file)
603 +@@ -560,11 +560,11 @@ int main(int ac, char **av)
605 + if (stat(".config", &tmpstat)) {
607 +- "*** You have not yet configured your kernel!\n"
608 +- "*** (missing kernel .config file)\n"
609 ++ "*** You have not yet configured Buildroot!\n"
610 ++ "*** (missing .config file)\n"
612 + "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
613 +- "*** \"make menuconfig\" or \"make xconfig\").\n"
614 ++ "*** \"make menuconfig\" or \"make config\").\n"
618 +@@ -607,7 +607,7 @@ int main(int ac, char **av)
619 + } else if (conf_get_changed()) {
620 + name = getenv("KCONFIG_NOSILENTUPDATE");
621 + if (name && *name) {
622 +- fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n"));
623 ++ fprintf(stderr, _("\n*** Buildroot configuration requires explicit update.\n\n"));
627 +@@ -618,12 +618,12 @@ int main(int ac, char **av)
628 + check_conf(&rootmenu);
629 + } while (conf_cnt);
630 + if (conf_write(NULL)) {
631 +- fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
632 ++ fprintf(stderr, _("\n*** Error during writing of the Buildroot configuration.\n\n"));
636 +- if (input_mode == ask_silent && conf_write_autoconf()) {
637 +- fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
638 ++ if (/*input_mode == ask_silent &&*/ conf_write_autoconf()) {
639 ++ fprintf(stderr, _("\n*** Error during writing of the Buildroot configuration.\n\n"));
643 +diff -rduNp config.new.oorig/confdata.c config.new/confdata.c
644 +--- config.new.oorig/confdata.c 2008-04-07 11:03:28.000000000 +0200
645 ++++ config.new/confdata.c 2008-04-07 11:06:30.000000000 +0200
647 + #include <string.h>
649 + #include <unistd.h>
650 ++#include <libgen.h>
652 + #define LKC_DIRECT_LINK
654 +@@ -21,7 +22,7 @@ static void conf_warning(const char *fmt
655 + static const char *conf_filename;
656 + static int conf_lineno, conf_warnings, conf_unsaved;
658 +-const char conf_defname[] = "arch/$ARCH/defconfig";
659 ++const char conf_defname[] = ".defconfig";
661 + static void conf_warning(const char *fmt, ...)
663 +@@ -36,7 +37,7 @@ static void conf_warning(const char *fmt
665 + const char *conf_get_configname(void)
667 +- char *name = getenv("KCONFIG_CONFIG");
668 ++ char *name = getenv("BUILDROOT_CONFIG");
670 + return name ? name : ".config";
672 +@@ -212,22 +213,22 @@ load:
676 +- if (memcmp(line + 2, "CONFIG_", 7))
679 +- p = strchr(line + 9, ' ');
680 ++ p = strchr(line + 2, ' ');
684 + if (strncmp(p, "is not set", 10))
686 + if (def == S_DEF_USER) {
687 +- sym = sym_find(line + 9);
688 ++ sym = sym_find(line + 2);
690 +- conf_warning("trying to assign nonexistent symbol %s", line + 9);
691 ++ conf_warning("trying to assign nonexistent symbol %s", line + 2);
695 +- sym = sym_lookup(line + 9, 0);
696 ++ sym = sym_lookup(line + 2, 0);
697 + if (sym->type == S_UNKNOWN)
698 + sym->type = S_BOOLEAN;
700 +@@ -245,12 +246,8 @@ load:
705 +- if (memcmp(line, "CONFIG_", 7)) {
706 +- conf_warning("unexpected data");
709 +- p = strchr(line + 7, '=');
710 ++ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
711 ++ p = strchr(line, '=');
715 +@@ -261,13 +258,13 @@ load:
718 + if (def == S_DEF_USER) {
719 +- sym = sym_find(line + 7);
720 ++ sym = sym_find(line);
722 +- conf_warning("trying to assign nonexistent symbol %s", line + 7);
723 ++ conf_warning("trying to assign nonexistent symbol %s", line);
727 +- sym = sym_lookup(line + 7, 0);
728 ++ sym = sym_lookup(line, 0);
729 + if (sym->type == S_UNKNOWN)
730 + sym->type = S_OTHER;
732 +@@ -440,7 +437,7 @@ int conf_write(const char *name)
736 +- sym = sym_lookup("KERNELVERSION", 0);
737 ++ sym = sym_lookup("BR2_VERSION", 0);
738 + sym_calc_value(sym);
740 + env = getenv("KCONFIG_NOTIMESTAMP");
741 +@@ -449,10 +446,8 @@ int conf_write(const char *name)
743 + fprintf(out, _("#\n"
744 + "# Automatically generated make config: don't edit\n"
745 +- "# Linux kernel version: %s\n"
748 +- sym_get_string_value(sym),
749 + use_timestamp ? "# " : "",
750 + use_timestamp ? ctime(&now) : "");
752 +@@ -486,19 +481,19 @@ int conf_write(const char *name)
754 + switch (sym_get_tristate_value(sym)) {
756 +- fprintf(out, "# CONFIG_%s is not set\n", sym->name);
757 ++ fprintf(out, "# %s is not set\n", sym->name);
760 +- fprintf(out, "CONFIG_%s=m\n", sym->name);
761 ++ fprintf(out, "%s=m\n", sym->name);
764 +- fprintf(out, "CONFIG_%s=y\n", sym->name);
765 ++ fprintf(out, "%s=y\n", sym->name);
770 + str = sym_get_string_value(sym);
771 +- fprintf(out, "CONFIG_%s=\"", sym->name);
772 ++ fprintf(out, "%s=\"", sym->name);
774 + l = strcspn(str, "\"\\");
776 +@@ -514,12 +509,12 @@ int conf_write(const char *name)
778 + str = sym_get_string_value(sym);
779 + if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
780 +- fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
781 ++ fprintf(out, "%s=%s\n", sym->name, str);
785 + str = sym_get_string_value(sym);
786 +- fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
787 ++ fprintf(out, "%s=%s\n", sym->name, str);
791 +@@ -559,7 +554,7 @@ int conf_write(const char *name)
793 + int conf_split_config(void)
795 +- char *name, path[128];
796 ++ char *name, path[128], *opwd, *dir, *_name;
798 + struct symbol *sym;
800 +@@ -570,8 +565,20 @@ int conf_split_config(void)
801 + name = "include/config/auto.conf";
802 + conf_read_simple(name, S_DEF_AUTO);
804 +- if (chdir("include/config"))
805 ++ opwd = malloc(256);
806 ++ _name = strdup(name);
807 ++ if (opwd == NULL || _name == NULL)
809 ++ opwd = getcwd(opwd, 256);
810 ++ dir = dirname(_name);
811 ++ if (dir == NULL) {
821 + for_all_symbols(i, sym) {
822 +@@ -664,9 +671,11 @@ int conf_split_config(void)
826 +- if (chdir("../.."))
837 +@@ -681,7 +690,7 @@ int conf_write_autoconf(void)
839 + sym_clear_all_valid();
841 +- file_write_dep("include/config/auto.conf.cmd");
842 ++ file_write_dep(".config.cmd");
844 + if (conf_split_config())
846 +@@ -696,22 +705,19 @@ int conf_write_autoconf(void)
850 +- sym = sym_lookup("KERNELVERSION", 0);
851 ++ sym = sym_lookup("BR2_VERSION", 0);
852 + sym_calc_value(sym);
855 + "# Automatically generated make config: don't edit\n"
856 +- "# Linux kernel version: %s\n"
859 +- sym_get_string_value(sym), ctime(&now));
861 + fprintf(out_h, "/*\n"
862 + " * Automatically generated C config: don't edit\n"
863 +- " * Linux kernel version: %s\n"
866 +- "#define AUTOCONF_INCLUDED\n",
867 +- sym_get_string_value(sym), ctime(&now));
871 + for_all_symbols(i, sym) {
872 + sym_calc_value(sym);
873 +@@ -724,19 +730,19 @@ int conf_write_autoconf(void)
877 +- fprintf(out, "CONFIG_%s=m\n", sym->name);
878 +- fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
879 ++ fprintf(out, "%s=m\n", sym->name);
880 ++ fprintf(out_h, "#define %s_MODULE 1\n", sym->name);
883 +- fprintf(out, "CONFIG_%s=y\n", sym->name);
884 +- fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
885 ++ fprintf(out, "%s=y\n", sym->name);
886 ++ fprintf(out_h, "#define %s 1\n", sym->name);
891 + str = sym_get_string_value(sym);
892 +- fprintf(out, "CONFIG_%s=\"", sym->name);
893 +- fprintf(out_h, "#define CONFIG_%s \"", sym->name);
894 ++ fprintf(out, "%s=\"", sym->name);
895 ++ fprintf(out_h, "#define %s \"", sym->name);
897 + l = strcspn(str, "\"\\");
899 +@@ -756,14 +762,14 @@ int conf_write_autoconf(void)
901 + str = sym_get_string_value(sym);
902 + if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
903 +- fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
904 +- fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
905 ++ fprintf(out, "%s=%s\n", sym->name, str);
906 ++ fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
910 + str = sym_get_string_value(sym);
911 +- fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
912 +- fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
913 ++ fprintf(out, "%s=%s\n", sym->name, str);
914 ++ fprintf(out_h, "#define %s %s\n", sym->name, str);
918 +diff -rduNp config.new.oorig/expr.c config.new/expr.c
919 +--- config.new.oorig/expr.c 2008-04-07 11:03:28.000000000 +0200
920 ++++ config.new/expr.c 2008-04-07 11:06:30.000000000 +0200
921 +@@ -331,7 +331,7 @@ struct expr *expr_trans_bool(struct expr
922 + e->right.expr = expr_trans_bool(e->right.expr);
926 ++ /* FOO!=n -> FOO */
927 + if (e->left.sym->type == S_TRISTATE) {
928 + if (e->right.sym == &symbol_no) {
929 + e->type = E_SYMBOL;
930 +@@ -380,19 +380,19 @@ struct expr *expr_join_or(struct expr *e
931 + if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
932 + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
933 + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) {
934 +- // (a='y') || (a='m') -> (a!='n')
935 ++ /* (a='y') || (a='m') -> (a!='n') */
936 + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no);
938 + if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
939 + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
940 + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) {
941 +- // (a='y') || (a='n') -> (a!='m')
942 ++ /* (a='y') || (a='n') -> (a!='m') */
943 + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod);
945 + if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
946 + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
947 + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) {
948 +- // (a='m') || (a='n') -> (a!='y')
949 ++ /* (a='m') || (a='n') -> (a!='y') */
950 + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes);
953 +@@ -443,29 +443,29 @@ struct expr *expr_join_and(struct expr *
955 + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) ||
956 + (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes))
957 +- // (a) && (a='y') -> (a='y')
958 ++ /* (a) && (a='y') -> (a='y') */
959 + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
961 + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) ||
962 + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no))
963 +- // (a) && (a!='n') -> (a)
964 ++ /* (a) && (a!='n') -> (a) */
965 + return expr_alloc_symbol(sym1);
967 + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) ||
968 + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod))
969 +- // (a) && (a!='m') -> (a='y')
970 ++ /* (a) && (a!='m') -> (a='y') */
971 + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
973 + if (sym1->type == S_TRISTATE) {
974 + if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) {
975 +- // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
976 ++ /* (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' */
977 + sym2 = e1->right.sym;
978 + if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
979 + return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
980 + : expr_alloc_symbol(&symbol_no);
982 + if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) {
983 +- // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
984 ++ /* (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' */
985 + sym2 = e2->right.sym;
986 + if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
987 + return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
988 +@@ -474,19 +474,19 @@ struct expr *expr_join_and(struct expr *
989 + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
990 + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
991 + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes)))
992 +- // (a!='y') && (a!='n') -> (a='m')
993 ++ /* (a!='y') && (a!='n') -> (a='m') */
994 + return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod);
996 + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
997 + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
998 + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes)))
999 +- // (a!='y') && (a!='m') -> (a='n')
1000 ++ /* (a!='y') && (a!='m') -> (a='n') */
1001 + return expr_alloc_comp(E_EQUAL, sym1, &symbol_no);
1003 + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
1004 + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
1005 + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod)))
1006 +- // (a!='m') && (a!='n') -> (a='m')
1007 ++ /* (a!='m') && (a!='n') -> (a='m') */
1008 + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
1010 + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) ||
1011 +@@ -579,7 +579,7 @@ static void expr_eliminate_dups2(enum ex
1012 + switch (e1->type) {
1014 + expr_eliminate_dups2(e1->type, &e1, &e1);
1015 +- // (FOO || BAR) && (!FOO && !BAR) -> n
1016 ++ /* (FOO || BAR) && (!FOO && !BAR) -> n */
1017 + tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
1018 + tmp2 = expr_copy(e2);
1019 + tmp = expr_extract_eq_and(&tmp1, &tmp2);
1020 +@@ -594,7 +594,7 @@ static void expr_eliminate_dups2(enum ex
1023 + expr_eliminate_dups2(e1->type, &e1, &e1);
1024 +- // (FOO && BAR) || (!FOO || !BAR) -> y
1025 ++ /* (FOO && BAR) || (!FOO || !BAR) -> y */
1026 + tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
1027 + tmp2 = expr_copy(e2);
1028 + tmp = expr_extract_eq_or(&tmp1, &tmp2);
1029 +@@ -703,7 +703,7 @@ struct expr *expr_transform(struct expr
1031 + switch (e->left.expr->type) {
1035 + tmp = e->left.expr->left.expr;
1036 + free(e->left.expr);
1038 +@@ -712,14 +712,14 @@ struct expr *expr_transform(struct expr
1042 +- // !a='x' -> a!='x'
1043 ++ /* !a='x' -> a!='x' */
1044 + tmp = e->left.expr;
1047 + e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL;
1050 +- // !(a || b) -> !a && !b
1051 ++ /* !(a || b) -> !a && !b */
1052 + tmp = e->left.expr;
1054 + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
1055 +@@ -728,7 +728,7 @@ struct expr *expr_transform(struct expr
1056 + e = expr_transform(e);
1059 +- // !(a && b) -> !a || !b
1060 ++ /* !(a && b) -> !a || !b */
1061 + tmp = e->left.expr;
1063 + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
1064 +@@ -738,7 +738,7 @@ struct expr *expr_transform(struct expr
1067 + if (e->left.expr->left.sym == &symbol_yes) {
1069 ++ /* !'y' -> 'n' */
1070 + tmp = e->left.expr;
1073 +@@ -747,7 +747,7 @@ struct expr *expr_transform(struct expr
1076 + if (e->left.expr->left.sym == &symbol_mod) {
1078 ++ /* !'m' -> 'm' */
1079 + tmp = e->left.expr;
1082 +@@ -756,7 +756,7 @@ struct expr *expr_transform(struct expr
1085 + if (e->left.expr->left.sym == &symbol_no) {
1087 ++ /* !'n' -> 'y' */
1088 + tmp = e->left.expr;
1091 +diff -rduNp config.new.oorig/expr.h config.new/expr.h
1092 +--- config.new.oorig/expr.h 2008-04-07 11:03:28.000000000 +0200
1093 ++++ config.new/expr.h 2008-04-07 11:06:30.000000000 +0200
1094 +@@ -65,7 +65,7 @@ enum symbol_type {
1097 + S_DEF_USER, /* main user value */
1103 +diff -rduNp config.new.oorig/gconf.c config.new/gconf.c
1104 +--- config.new.oorig/gconf.c 2008-04-07 11:03:28.000000000 +0200
1105 ++++ config.new/gconf.c 2008-04-07 11:06:30.000000000 +0200
1106 +@@ -268,8 +268,8 @@ void init_main_window(const gchar * glad
1107 + /*"style", PANGO_STYLE_OBLIQUE, */
1110 +- sprintf(title, _("Linux Kernel v%s Configuration"),
1111 +- getenv("KERNELVERSION"));
1112 ++ sprintf(title, _("Buildroot v%s Configuration"),
1113 ++ getenv("BR2_VERSION"));
1114 + gtk_window_set_title(GTK_WINDOW(main_wnd), title);
1116 + gtk_widget_show(main_wnd);
1117 +diff -rduNp config.new.oorig/gconf.glade config.new/gconf.glade
1118 +--- config.new.oorig/gconf.glade 2008-04-07 11:03:28.000000000 +0200
1119 ++++ config.new/gconf.glade 2008-04-07 11:06:30.000000000 +0200
1122 + <widget class="GtkWindow" id="window1">
1123 + <property name="visible">True</property>
1124 +- <property name="title" translatable="yes">Gtk Kernel Configurator</property>
1125 ++ <property name="title" translatable="yes">Gtk Buildroot Configurator</property>
1126 + <property name="type">GTK_WINDOW_TOPLEVEL</property>
1127 + <property name="window_position">GTK_WIN_POS_NONE</property>
1128 + <property name="modal">False</property>
1129 diff -rduNp config.new.oorig/mconf.c config.new/mconf.c
1130 --- config.new.oorig/mconf.c 2008-04-07 11:03:28.000000000 +0200
1131 +++ config.new/mconf.c 2008-04-07 11:09:01.000000000 +0200
1133 static const char mconf_readme[] = N_(
1136 -"Some kernel features may be built directly into the kernel.\n"
1137 -"Some may be made into loadable runtime modules. Some features\n"
1138 +"Some features may be built directly into Buildroot. Some features\n"
1139 "may be completely removed altogether. There are also certain\n"
1140 -"kernel parameters which are not really features, but must be\n"
1141 +"parameters which are not really features, but must be\n"
1142 "entered in as decimal or hexadecimal numbers or possibly text.\n"
1144 "Menu items beginning with following braces represent features that\n"
1145 @@ -119,7 +118,7 @@ static const char mconf_readme[] = N_(
1146 "-----------------------------\n"
1147 "Menuconfig supports the use of alternate configuration files for\n"
1148 "those who, for various reasons, find it necessary to switch\n"
1149 -"between different kernel configurations.\n"
1150 +"between different configurations.\n"
1152 "At the end of the main menu you will find two options. One is\n"
1153 "for saving the current configuration to a file of your choosing.\n"
1154 @@ -152,7 +151,7 @@ static const char mconf_readme[] = N_(
1156 "Optional personality available\n"
1157 "------------------------------\n"
1158 -"If you prefer to have all of the kernel options listed in a single\n"
1159 +"If you prefer to have all of the options listed in a single\n"
1160 "menu, rather than the default multimenu hierarchy, run the menuconfig\n"
1161 "with MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
1163 @@ -182,9 +181,9 @@ menu_instructions[] = N_(
1164 "Arrow keys navigate the menu. "
1165 "<Enter> selects submenus --->. "
1166 "Highlighted letters are hotkeys. "
1167 - "Pressing <Y> includes, <N> excludes, <M> modularizes features. "
1168 + "Pressing <Y> selectes a feature, while <N> will exclude a feature. "
1169 "Press <Esc><Esc> to exit, <?> for Help, </> for Search. "
1170 - "Legend: [*] built-in [ ] excluded <M> module < > module capable"),
1171 + "Legend: [*] feature is selected [ ] feature is excluded"),
1172 radiolist_instructions[] = N_(
1173 "Use the arrow keys to navigate this window or "
1174 "press the hotkey of the item you wish to select "
1175 @@ -204,18 +203,18 @@ setmod_text[] = N_(
1176 "This feature depends on another which has been configured as a module.\n"
1177 "As a result, this feature will be built as a module."),
1179 - "There is no help available for this kernel option.\n"),
1180 + "There is no help available for this option.\n"),
1181 load_config_text[] = N_(
1182 "Enter the name of the configuration file you wish to load. "
1183 "Accept the name shown to restore the configuration you "
1184 "last retrieved. Leave blank to abort."),
1185 load_config_help[] = N_(
1187 - "For various reasons, one may wish to keep several different kernel\n"
1188 + "For various reasons, one may wish to keep several different Buildroot\n"
1189 "configurations available on a single machine.\n"
1191 "If you have saved a previous configuration in a file other than the\n"
1192 - "kernel's default, entering the name of the file here will allow you\n"
1193 + "Buildroot's default, entering the name of the file here will allow you\n"
1194 "to modify that configuration.\n"
1196 "If you are uncertain, then you have probably never used alternate\n"
1197 @@ -225,7 +224,7 @@ save_config_text[] = N_(
1198 "as an alternate. Leave blank to abort."),
1199 save_config_help[] = N_(
1201 - "For various reasons, one may wish to keep different kernel\n"
1202 + "For various reasons, one may wish to keep different Buildroot\n"
1203 "configurations available on a single machine.\n"
1205 "Entering a file name here will allow you to later retrieve, modify\n"
1206 @@ -405,10 +404,10 @@ static void set_config_filename(const ch
1210 - sym = sym_lookup("KERNELVERSION", 0);
1211 + sym = sym_lookup("BR2_VERSION", 0);
1212 sym_calc_value(sym);
1213 size = snprintf(menu_backtitle, sizeof(menu_backtitle),
1214 - _("%s - Linux Kernel v%s Configuration"),
1215 + _("%s - buildroot v%s Configuration"),
1216 config_filename, sym_get_string_value(sym));
1217 if (size >= sizeof(menu_backtitle))
1218 menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
1219 @@ -935,7 +934,7 @@ int main(int ac, char **av)
1220 if (conf_get_changed())
1221 res = dialog_yesno(NULL,
1222 _("Do you wish to save your "
1223 - "new kernel configuration?\n"
1224 + "new Buildroot configuration?\n"
1225 "<ESC><ESC> to continue."),
1228 @@ -947,22 +946,22 @@ int main(int ac, char **av)
1230 if (conf_write(filename)) {
1231 fprintf(stderr, _("\n\n"
1232 - "Error during writing of the kernel configuration.\n"
1233 - "Your kernel configuration changes were NOT saved."
1234 + "Error during writing of the Buildroot configuration.\n"
1235 + "Your Buildroot configuration changes were NOT saved."
1241 - "*** End of Linux kernel configuration.\n"
1242 - "*** Execute 'make' to build the kernel or try 'make help'."
1243 + "*** End of Buildroot configuration.\n"
1244 + "*** Execute 'make' to build Buildroot or try 'make help'."
1248 fprintf(stderr, _("\n\n"
1249 - "Your kernel configuration changes were NOT saved."
1250 + "Your Buildroot configuration changes were NOT saved."
1255 + return conf_write_autoconf();
1257 diff -rduNp config.new.oorig/symbol.c config.new/symbol.c
1258 --- config.new.oorig/symbol.c 2008-04-07 11:03:28.000000000 +0200
1259 +++ config.new/symbol.c 2008-04-07 11:06:30.000000000 +0200
1260 @@ -61,10 +61,10 @@ void sym_init(void)
1262 sym_add_default(sym, p);
1264 - sym = sym_lookup("KERNELVERSION", 0);
1265 + sym = sym_lookup("BR2_VERSION", 0);
1266 sym->type = S_STRING;
1267 sym->flags |= SYMBOL_AUTO;
1268 - p = getenv("KERNELVERSION");
1269 + p = getenv("BR2_VERSION");
1271 sym_add_default(sym, p);
1273 diff -rduNp config.new.oorig/util.c config.new/util.c
1274 --- config.new.oorig/util.c 2008-04-07 11:03:28.000000000 +0200
1275 +++ config.new/util.c 2008-04-07 11:06:30.000000000 +0200
1276 @@ -26,6 +26,109 @@ struct file *file_lookup(const char *nam
1280 +static char* br2_symbol_printer(const char * const in)
1282 + ssize_t i, j, len = strlen(in);
1286 + ret = malloc(len);
1288 + printf("Out of memory!");
1291 + memset(ret, 0, len);
1293 + if (strncmp("BR2_", in, 4) == 0)
1295 + if (strncmp("PACKAGE_", in + i, 8) == 0)
1297 + else if (strncmp("TARGET_", in + i, 7) == 0)
1300 + ret[j++] = tolower(in[i++]);
1304 +/* write dependencies of the infividual config-symbols */
1305 +static int write_make_deps(const char *name)
1307 + struct menu *menu;
1308 + struct symbol *sym;
1309 + struct property *prop, *p;
1311 + const char * const name_tmp = "..make.deps.tmp";
1314 + name = ".auto.deps";
1315 + out = fopen(name_tmp, "w");
1318 + fprintf(out, "# ATTENTION! This does not handle 'depends', just 'select'! \n"
1319 + "# See package/config/util.c write_make_deps()\n#\n");
1320 + menu = &rootmenu;//rootmenu.list;
1324 + if (!menu_is_visible(menu))
1326 + } else if (!(sym->flags & SYMBOL_CHOICE)) {
1327 + sym_calc_value(sym);
1328 + if (sym->type == S_BOOLEAN
1329 + && sym_get_tristate_value(sym) != no) {
1331 + for_all_prompts(sym, prop) {
1333 +//printf("\nname=%s\n", sym->name);
1334 + for_all_properties(sym, p, P_SELECT) {
1336 + if (e && e->left.sym->name) {
1338 + fprintf(out, "%s: $(BASE_TARGETS)", br2_symbol_printer(sym->name));
1341 +//printf("SELECTS %s\n",e->left.sym->name);
1342 + fprintf(out, " %s",br2_symbol_printer(e->left.sym->name));
1346 + fprintf(out, "\n");
1348 + e = sym->rev_dep.expr;
1349 + if (e && e->type == E_SYMBOL
1350 + && e->left.sym->name) {
1351 + fprintf(out, "%s: %s", br2_symbol_printer(e->left.sym->name),
1352 + br2_symbol_printer(sym->name));
1353 +printf("%s is Selected BY: %s", sym->name, e->left.sym->name);
1361 + menu = menu->list;
1365 + menu = menu->next;
1366 + else while ((menu = menu->parent)) {
1368 + menu = menu->next;
1374 + rename(name_tmp, name);
1376 + "# make dependencies written to %s\n"
1377 + "# ATTENTION buildroot devels!\n"
1378 + "# See top of this file before playing with this auto-preprequisites!\n"
1383 /* write a dependency file as used by kbuild to track dependencies */
1384 int file_write_dep(const char *name)
1386 @@ -44,12 +147,13 @@ int file_write_dep(const char *name)
1388 fprintf(out, "\t%s\n", file->name);
1390 - fprintf(out, "\ninclude/config/auto.conf: \\\n"
1391 + fprintf(out, "\n$(BR2_DEPENDS_DIR)/config/auto.conf: \\\n"
1392 "\t$(deps_config)\n\n"
1393 "$(deps_config): ;\n");
1395 rename("..config.tmp", name);
1398 + return write_make_deps(NULL);
1402 diff -rduNp config.new.oorig/zconf.tab.c_shipped config.new/zconf.tab.c_shipped
1403 --- config.new.oorig/zconf.tab.c_shipped 2008-04-07 11:03:28.000000000 +0200
1404 +++ config.new/zconf.tab.c_shipped 2008-04-07 11:06:30.000000000 +0200
1405 @@ -2248,7 +2248,7 @@ void conf_parse(const char *name)
1406 modules_sym = sym_lookup(NULL, 0);
1407 modules_sym->type = S_BOOLEAN;
1408 modules_sym->flags |= SYMBOL_AUTO;
1409 - rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
1410 + rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL);
1413 if (getenv("ZCONF_DEBUG"))
1414 diff -rduNp config.new.oorig/zconf.y config.new/zconf.y
1415 --- config.new.oorig/zconf.y 2008-04-07 11:03:28.000000000 +0200
1416 +++ config.new/zconf.y 2008-04-07 11:06:30.000000000 +0200
1417 @@ -473,7 +473,7 @@ void conf_parse(const char *name)
1418 modules_sym = sym_lookup(NULL, 0);
1419 modules_sym->type = S_BOOLEAN;
1420 modules_sym->flags |= SYMBOL_AUTO;
1421 - rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
1422 + rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL);
1425 if (getenv("ZCONF_DEBUG"))
1426 diff --git config.new.oorig/mconf.c config.new/mconf.c
1427 --- config.new.oorig/mconf.c
1428 +++ config.new/mconf.c
1429 @@ -743,7 +743,7 @@ static void show_help(struct menu *menu)
1430 if (menu_has_help(menu))
1433 - str_printf(&help, "CONFIG_%s:\n\n", sym->name);
1434 + str_printf(&help, "%s:\n\n", sym->name);
1435 str_append(&help, _(menu_get_help(menu)));
1436 str_append(&help, "\n");