Loading package/config/Makefile.kconfig +18 −17 Original line number Diff line number Diff line Loading @@ -22,24 +22,25 @@ oldconfig: $(obj)/conf silentoldconfig: $(obj)/conf $< -s arch/$(ARCH)/Kconfig # Create new linux.po file # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files # The symlink is used to repair a deficiency in arch/um update-po-config: $(obj)/kxgettext xgettext --default-domain=linux \ --add-comments --keyword=_ --keyword=N_ \ --from-code=UTF-8 \ --files-from=scripts/kconfig/POTFILES.in \ --output scripts/kconfig/config.pot $(Q)ln -fs Kconfig_i386 arch/um/Kconfig_arch $(Q)for i in `ls arch/`; \ --output $(obj)/config.pot $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch (for i in `ls arch/`; \ do \ scripts/kconfig/kxgettext arch/$$i/Kconfig \ | msguniq -o scripts/kconfig/linux_$${i}.pot; \ done $(Q)msgcat scripts/kconfig/config.pot \ `find scripts/kconfig/ -type f -name linux_*.pot` \ --output scripts/kconfig/linux_raw.pot $(Q)msguniq --sort-by-file scripts/kconfig/linux_raw.pot \ --output scripts/kconfig/linux.pot $(Q)rm -f arch/um/Kconfig_arch $(Q)rm -f scripts/kconfig/linux_*.pot scripts/kconfig/config.pot $(obj)/kxgettext arch/$$i/Kconfig; \ done ) >> $(obj)/config.pot msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ --output $(obj)/linux.pot $(Q)rm -f arch/um/Kconfig.arch $(Q)rm -f $(obj)/config.pot PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig Loading package/config/README.buildroot2 +4 −3 Original line number Diff line number Diff line This is a copy of the kconfig code in the kernel (currently 2.6.22.7) tweaked to suit Buildroot. This is a copy of the kconfig code in the kernel (currently 2.6.23.14) tweaked to suit Buildroot. To update: cp -r /usr/src/linux/scripts/kconfig package/config.new cd package/config.new cp /usr/src/linux/Documentation/kbuild/kconfig-language.txt . mv Makefile Makefile.kconfig patch -p1 < ../config/kconfig-to-buildroot2.patch mv Makefile Makefile.kconfig cp ../config/README.buildroot2 . cp ../config/foo.h . cp ../config/Makefile . cp ../config/kconfig-to-buildroot2.patch . cd .. rm -rf config mv config.new config Loading package/config/conf.c +15 −16 Original line number Diff line number Diff line Loading @@ -37,6 +37,14 @@ static struct menu *rootEntry; static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); static const char *get_help(struct menu *menu) { if (menu_has_help(menu)) return menu_get_help(menu); else return nohelp_text; } static void strip(char *str) { char *p = str; Loading Loading @@ -172,7 +180,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) int conf_string(struct menu *menu) { struct symbol *sym = menu->sym; const char *def, *help; const char *def; while (1) { printf("%*s%s ", indent - 1, "", menu->prompt->text); Loading @@ -188,10 +196,7 @@ int conf_string(struct menu *menu) case '?': /* print help */ if (line[1] == '\n') { help = nohelp_text; if (menu->sym->help) help = menu->sym->help; printf("\n%s\n", menu->sym->help); printf("\n%s\n", get_help(menu)); def = NULL; break; } Loading @@ -209,7 +214,6 @@ static int conf_sym(struct menu *menu) struct symbol *sym = menu->sym; int type; tristate oldval, newval; const char *help; while (1) { printf("%*s%s ", indent - 1, "", menu->prompt->text); Loading @@ -235,7 +239,7 @@ static int conf_sym(struct menu *menu) printf("/m"); if (oldval != yes && sym_tristate_within_range(sym, yes)) printf("/y"); if (sym->help) if (menu_has_help(menu)) printf("/?"); printf("] "); if (!conf_askvalue(sym, sym_get_string_value(sym))) Loading Loading @@ -272,10 +276,7 @@ static int conf_sym(struct menu *menu) if (sym_set_tristate_value(sym, newval)) return 0; help: help = nohelp_text; if (sym->help) help = sym->help; printf("\n%s\n", help); printf("\n%s\n", get_help(menu)); } } Loading Loading @@ -345,7 +346,7 @@ static int conf_choice(struct menu *menu) goto conf_childs; } printf("[1-%d", cnt); if (sym->help) if (menu_has_help(menu)) printf("?"); printf("]: "); switch (input_mode) { Loading @@ -362,8 +363,7 @@ static int conf_choice(struct menu *menu) fgets(line, 128, stdin); strip(line); if (line[0] == '?') { printf("\n%s\n", menu->sym->help ? menu->sym->help : nohelp_text); printf("\n%s\n", get_help(menu)); continue; } if (!line[0]) Loading Loading @@ -394,8 +394,7 @@ static int conf_choice(struct menu *menu) if (!child) continue; if (line[strlen(line) - 1] == '?') { printf("\n%s\n", child->sym->help ? child->sym->help : nohelp_text); printf("\n%s\n", get_help(child)); continue; } sym_set_choice_value(sym, child->sym); Loading package/config/confdata.c +26 −11 Original line number Diff line number Diff line Loading @@ -338,27 +338,42 @@ int conf_read(const char *name) conf_unsaved++; /* maybe print value in verbose mode... */ sym_ok: if (!sym_is_choice(sym)) continue; /* The choice symbol only has a set value (and thus is not new) * if all its visible childs have values. */ prop = sym_get_choice_prop(sym); flags = sym->flags; for (e = prop->expr; e; e = e->left.expr) if (e->right.sym->visible != no) flags &= e->right.sym->flags; sym->flags &= flags | ~SYMBOL_DEF_USER; } for_all_symbols(i, sym) { if (sym_has_value(sym) && !sym_is_choice_value(sym)) { if (sym->visible == no) /* Reset values of generates values, so they'll appear * as new, if they should become visible, but that * doesn't quite work if the Kconfig and the saved * configuration disagree. */ if (sym->visible == no && !conf_unsaved) sym->flags &= ~SYMBOL_DEF_USER; switch (sym->type) { case S_STRING: case S_INT: case S_HEX: if (!sym_string_within_range(sym, sym->def[S_DEF_USER].val)) /* Reset a string value if it's out of range */ if (sym_string_within_range(sym, sym->def[S_DEF_USER].val)) break; sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER); conf_unsaved++; break; default: break; } } if (!sym_is_choice(sym)) continue; prop = sym_get_choice_prop(sym); flags = sym->flags; for (e = prop->expr; e; e = e->left.expr) if (e->right.sym->visible != no) flags &= e->right.sym->flags; sym->flags &= flags | ~SYMBOL_DEF_USER; } sym_add_change_count(conf_warnings || conf_unsaved); Loading package/config/expr.h +1 −3 Original line number Diff line number Diff line Loading @@ -71,14 +71,12 @@ enum { struct symbol { struct symbol *next; char *name; char *help; enum symbol_type type; struct symbol_value curr; struct symbol_value def[4]; tristate visible; int flags; struct property *prop; struct expr *dep, *dep2; struct expr_value rev_dep; }; Loading Loading @@ -139,7 +137,7 @@ struct menu { struct property *prompt; struct expr *dep; unsigned int flags; /*char *help; */ char *help; struct file *file; int lineno; void *data; Loading Loading
package/config/Makefile.kconfig +18 −17 Original line number Diff line number Diff line Loading @@ -22,24 +22,25 @@ oldconfig: $(obj)/conf silentoldconfig: $(obj)/conf $< -s arch/$(ARCH)/Kconfig # Create new linux.po file # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files # The symlink is used to repair a deficiency in arch/um update-po-config: $(obj)/kxgettext xgettext --default-domain=linux \ --add-comments --keyword=_ --keyword=N_ \ --from-code=UTF-8 \ --files-from=scripts/kconfig/POTFILES.in \ --output scripts/kconfig/config.pot $(Q)ln -fs Kconfig_i386 arch/um/Kconfig_arch $(Q)for i in `ls arch/`; \ --output $(obj)/config.pot $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch (for i in `ls arch/`; \ do \ scripts/kconfig/kxgettext arch/$$i/Kconfig \ | msguniq -o scripts/kconfig/linux_$${i}.pot; \ done $(Q)msgcat scripts/kconfig/config.pot \ `find scripts/kconfig/ -type f -name linux_*.pot` \ --output scripts/kconfig/linux_raw.pot $(Q)msguniq --sort-by-file scripts/kconfig/linux_raw.pot \ --output scripts/kconfig/linux.pot $(Q)rm -f arch/um/Kconfig_arch $(Q)rm -f scripts/kconfig/linux_*.pot scripts/kconfig/config.pot $(obj)/kxgettext arch/$$i/Kconfig; \ done ) >> $(obj)/config.pot msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ --output $(obj)/linux.pot $(Q)rm -f arch/um/Kconfig.arch $(Q)rm -f $(obj)/config.pot PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig Loading
package/config/README.buildroot2 +4 −3 Original line number Diff line number Diff line This is a copy of the kconfig code in the kernel (currently 2.6.22.7) tweaked to suit Buildroot. This is a copy of the kconfig code in the kernel (currently 2.6.23.14) tweaked to suit Buildroot. To update: cp -r /usr/src/linux/scripts/kconfig package/config.new cd package/config.new cp /usr/src/linux/Documentation/kbuild/kconfig-language.txt . mv Makefile Makefile.kconfig patch -p1 < ../config/kconfig-to-buildroot2.patch mv Makefile Makefile.kconfig cp ../config/README.buildroot2 . cp ../config/foo.h . cp ../config/Makefile . cp ../config/kconfig-to-buildroot2.patch . cd .. rm -rf config mv config.new config Loading
package/config/conf.c +15 −16 Original line number Diff line number Diff line Loading @@ -37,6 +37,14 @@ static struct menu *rootEntry; static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); static const char *get_help(struct menu *menu) { if (menu_has_help(menu)) return menu_get_help(menu); else return nohelp_text; } static void strip(char *str) { char *p = str; Loading Loading @@ -172,7 +180,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) int conf_string(struct menu *menu) { struct symbol *sym = menu->sym; const char *def, *help; const char *def; while (1) { printf("%*s%s ", indent - 1, "", menu->prompt->text); Loading @@ -188,10 +196,7 @@ int conf_string(struct menu *menu) case '?': /* print help */ if (line[1] == '\n') { help = nohelp_text; if (menu->sym->help) help = menu->sym->help; printf("\n%s\n", menu->sym->help); printf("\n%s\n", get_help(menu)); def = NULL; break; } Loading @@ -209,7 +214,6 @@ static int conf_sym(struct menu *menu) struct symbol *sym = menu->sym; int type; tristate oldval, newval; const char *help; while (1) { printf("%*s%s ", indent - 1, "", menu->prompt->text); Loading @@ -235,7 +239,7 @@ static int conf_sym(struct menu *menu) printf("/m"); if (oldval != yes && sym_tristate_within_range(sym, yes)) printf("/y"); if (sym->help) if (menu_has_help(menu)) printf("/?"); printf("] "); if (!conf_askvalue(sym, sym_get_string_value(sym))) Loading Loading @@ -272,10 +276,7 @@ static int conf_sym(struct menu *menu) if (sym_set_tristate_value(sym, newval)) return 0; help: help = nohelp_text; if (sym->help) help = sym->help; printf("\n%s\n", help); printf("\n%s\n", get_help(menu)); } } Loading Loading @@ -345,7 +346,7 @@ static int conf_choice(struct menu *menu) goto conf_childs; } printf("[1-%d", cnt); if (sym->help) if (menu_has_help(menu)) printf("?"); printf("]: "); switch (input_mode) { Loading @@ -362,8 +363,7 @@ static int conf_choice(struct menu *menu) fgets(line, 128, stdin); strip(line); if (line[0] == '?') { printf("\n%s\n", menu->sym->help ? menu->sym->help : nohelp_text); printf("\n%s\n", get_help(menu)); continue; } if (!line[0]) Loading Loading @@ -394,8 +394,7 @@ static int conf_choice(struct menu *menu) if (!child) continue; if (line[strlen(line) - 1] == '?') { printf("\n%s\n", child->sym->help ? child->sym->help : nohelp_text); printf("\n%s\n", get_help(child)); continue; } sym_set_choice_value(sym, child->sym); Loading
package/config/confdata.c +26 −11 Original line number Diff line number Diff line Loading @@ -338,27 +338,42 @@ int conf_read(const char *name) conf_unsaved++; /* maybe print value in verbose mode... */ sym_ok: if (!sym_is_choice(sym)) continue; /* The choice symbol only has a set value (and thus is not new) * if all its visible childs have values. */ prop = sym_get_choice_prop(sym); flags = sym->flags; for (e = prop->expr; e; e = e->left.expr) if (e->right.sym->visible != no) flags &= e->right.sym->flags; sym->flags &= flags | ~SYMBOL_DEF_USER; } for_all_symbols(i, sym) { if (sym_has_value(sym) && !sym_is_choice_value(sym)) { if (sym->visible == no) /* Reset values of generates values, so they'll appear * as new, if they should become visible, but that * doesn't quite work if the Kconfig and the saved * configuration disagree. */ if (sym->visible == no && !conf_unsaved) sym->flags &= ~SYMBOL_DEF_USER; switch (sym->type) { case S_STRING: case S_INT: case S_HEX: if (!sym_string_within_range(sym, sym->def[S_DEF_USER].val)) /* Reset a string value if it's out of range */ if (sym_string_within_range(sym, sym->def[S_DEF_USER].val)) break; sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER); conf_unsaved++; break; default: break; } } if (!sym_is_choice(sym)) continue; prop = sym_get_choice_prop(sym); flags = sym->flags; for (e = prop->expr; e; e = e->left.expr) if (e->right.sym->visible != no) flags &= e->right.sym->flags; sym->flags &= flags | ~SYMBOL_DEF_USER; } sym_add_change_count(conf_warnings || conf_unsaved); Loading
package/config/expr.h +1 −3 Original line number Diff line number Diff line Loading @@ -71,14 +71,12 @@ enum { struct symbol { struct symbol *next; char *name; char *help; enum symbol_type type; struct symbol_value curr; struct symbol_value def[4]; tristate visible; int flags; struct property *prop; struct expr *dep, *dep2; struct expr_value rev_dep; }; Loading Loading @@ -139,7 +137,7 @@ struct menu { struct property *prompt; struct expr *dep; unsigned int flags; /*char *help; */ char *help; struct file *file; int lineno; void *data; Loading