Loading package/config/Makefile.kconfig +19 −23 Original line number Diff line number Diff line Loading @@ -4,23 +4,25 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config Kconfig := arch/$(SRCARCH)/Kconfig xconfig: $(obj)/qconf $< arch/$(ARCH)/Kconfig $< $(Kconfig) gconfig: $(obj)/gconf $< arch/$(ARCH)/Kconfig $< $(Kconfig) menuconfig: $(obj)/mconf $< arch/$(ARCH)/Kconfig $< $(Kconfig) config: $(obj)/conf $< arch/$(ARCH)/Kconfig $< $(Kconfig) oldconfig: $(obj)/conf $< -o arch/$(ARCH)/Kconfig $< -o $(Kconfig) silentoldconfig: $(obj)/conf $< -s arch/$(ARCH)/Kconfig $< -s $(Kconfig) # Create new linux.po file # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files Loading @@ -45,27 +47,27 @@ update-po-config: $(obj)/kxgettext PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig randconfig: $(obj)/conf $< -r arch/$(ARCH)/Kconfig $< -r $(Kconfig) allyesconfig: $(obj)/conf $< -y arch/$(ARCH)/Kconfig $< -y $(Kconfig) allnoconfig: $(obj)/conf $< -n arch/$(ARCH)/Kconfig $< -n $(Kconfig) allmodconfig: $(obj)/conf $< -m arch/$(ARCH)/Kconfig $< -m $(Kconfig) defconfig: $(obj)/conf ifeq ($(KBUILD_DEFCONFIG),) $< -d arch/$(ARCH)/Kconfig $< -d $(Kconfig) else @echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)' $(Q)$< -D arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) arch/$(ARCH)/Kconfig @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" $(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) endif %_defconfig: $(obj)/conf $(Q)$< -D arch/$(ARCH)/configs/$@ arch/$(ARCH)/Kconfig $(Q)$< -D arch/$(SRCARCH)/configs/$@ $(Kconfig) # Help text used by make help help: Loading @@ -84,7 +86,7 @@ help: # lxdialog stuff check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh # Use reursively expanded variables so we do not call gcc unless # Use recursively expanded variables so we do not call gcc unless # we really need to do so. (Do not call gcc as part of make mrproper) HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) Loading Loading @@ -146,14 +148,8 @@ clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c clean-files += mconf qconf gconf # Needed for systems without gettext KBUILD_HAVE_NLS := $(shell \ if echo "\#include <libintl.h>" | $(HOSTCC) $(HOSTCFLAGS) -E - > /dev/null 2>&1 ; \ then echo yes ; \ else echo no ; fi) ifeq ($(KBUILD_HAVE_NLS),no) HOSTCFLAGS += -DKBUILD_NO_NLS endif # Add environment specific flags HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) # generated files seem to need this to find local include files HOSTCFLAGS_lex.zconf.o := -I$(src) Loading package/config/README.buildroot2 +1 −1 Original line number Diff line number Diff line This is a copy of the kconfig code in the kernel (currently 2.6.23.14) tweaked This is a copy of the kconfig code in the kernel (currently 2.6.24.4) tweaked to suit Buildroot. To update: Loading package/config/conf.c +2 −1 Original line number Diff line number Diff line Loading @@ -374,6 +374,7 @@ static int conf_choice(struct menu *menu) continue; break; case set_random: if (is_new) def = (random() % cnt) + 1; case set_default: case set_yes: Loading package/config/confdata.c +64 −55 Original line number Diff line number Diff line Loading @@ -84,6 +84,68 @@ char *conf_get_default_confname(void) return name; } static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) { char *p2; switch (sym->type) { case S_TRISTATE: if (p[0] == 'm') { sym->def[def].tri = mod; sym->flags |= def_flags; break; } case S_BOOLEAN: if (p[0] == 'y') { sym->def[def].tri = yes; sym->flags |= def_flags; break; } if (p[0] == 'n') { sym->def[def].tri = no; sym->flags |= def_flags; break; } conf_warning("symbol value '%s' invalid for %s", p, sym->name); break; case S_OTHER: if (*p != '"') { for (p2 = p; *p2 && !isspace(*p2); p2++) ; sym->type = S_STRING; goto done; } case S_STRING: if (*p++ != '"') break; for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { if (*p2 == '"') { *p2 = 0; break; } memmove(p2, p2 + 1, strlen(p2)); } if (!p2) { conf_warning("invalid string found"); return 1; } case S_INT: case S_HEX: done: if (sym_string_valid(sym, p)) { sym->def[def].val = strdup(p); sym->flags |= def_flags; } else { conf_warning("symbol value '%s' invalid for %s", p, sym->name); return 1; } break; default: ; } return 0; } int conf_read_simple(const char *name, int def) { FILE *in = NULL; Loading Loading @@ -210,61 +272,8 @@ load: conf_warning("trying to reassign symbol %s", sym->name); break; } switch (sym->type) { case S_TRISTATE: if (p[0] == 'm') { sym->def[def].tri = mod; sym->flags |= def_flags; break; } case S_BOOLEAN: if (p[0] == 'y') { sym->def[def].tri = yes; sym->flags |= def_flags; break; } if (p[0] == 'n') { sym->def[def].tri = no; sym->flags |= def_flags; break; } conf_warning("symbol value '%s' invalid for %s", p, sym->name); break; case S_OTHER: if (*p != '"') { for (p2 = p; *p2 && !isspace(*p2); p2++) ; sym->type = S_STRING; goto done; } case S_STRING: if (*p++ != '"') break; for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { if (*p2 == '"') { *p2 = 0; break; } memmove(p2, p2 + 1, strlen(p2)); } if (!p2) { conf_warning("invalid string found"); continue; } case S_INT: case S_HEX: done: if (sym_string_valid(sym, p)) { sym->def[def].val = strdup(p); sym->flags |= def_flags; } else { conf_warning("symbol value '%s' invalid for %s", p, sym->name); if (conf_set_sym_val(sym, def, def_flags, p)) continue; } break; default: ; } break; case '\r': case '\n': Loading package/config/kconfig-language.txt +13 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,12 @@ applicable everywhere (see syntax). Optionally, dependencies only for this default value can be added with "if". - dependencies: "depends on"/"requires" <expr> - type definition + default value: "def_bool"/"def_tristate" <expr> ["if" <expr>] This is a shorthand notation for a type definition plus a value. Optionally dependencies for this default value can be added with "if". - dependencies: "depends on" <expr> This defines a dependency for this menu entry. If multiple dependencies are defined, they are connected with '&&'. Dependencies are applied to all other options within this menu entry (which also Loading Loading @@ -289,3 +294,10 @@ source: "source" <prompt> This reads the specified configuration file. This file is always parsed. mainmenu: "mainmenu" <prompt> This sets the config program's title bar if the config program chooses to use it. Loading
package/config/Makefile.kconfig +19 −23 Original line number Diff line number Diff line Loading @@ -4,23 +4,25 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config Kconfig := arch/$(SRCARCH)/Kconfig xconfig: $(obj)/qconf $< arch/$(ARCH)/Kconfig $< $(Kconfig) gconfig: $(obj)/gconf $< arch/$(ARCH)/Kconfig $< $(Kconfig) menuconfig: $(obj)/mconf $< arch/$(ARCH)/Kconfig $< $(Kconfig) config: $(obj)/conf $< arch/$(ARCH)/Kconfig $< $(Kconfig) oldconfig: $(obj)/conf $< -o arch/$(ARCH)/Kconfig $< -o $(Kconfig) silentoldconfig: $(obj)/conf $< -s arch/$(ARCH)/Kconfig $< -s $(Kconfig) # Create new linux.po file # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files Loading @@ -45,27 +47,27 @@ update-po-config: $(obj)/kxgettext PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig randconfig: $(obj)/conf $< -r arch/$(ARCH)/Kconfig $< -r $(Kconfig) allyesconfig: $(obj)/conf $< -y arch/$(ARCH)/Kconfig $< -y $(Kconfig) allnoconfig: $(obj)/conf $< -n arch/$(ARCH)/Kconfig $< -n $(Kconfig) allmodconfig: $(obj)/conf $< -m arch/$(ARCH)/Kconfig $< -m $(Kconfig) defconfig: $(obj)/conf ifeq ($(KBUILD_DEFCONFIG),) $< -d arch/$(ARCH)/Kconfig $< -d $(Kconfig) else @echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)' $(Q)$< -D arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) arch/$(ARCH)/Kconfig @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" $(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) endif %_defconfig: $(obj)/conf $(Q)$< -D arch/$(ARCH)/configs/$@ arch/$(ARCH)/Kconfig $(Q)$< -D arch/$(SRCARCH)/configs/$@ $(Kconfig) # Help text used by make help help: Loading @@ -84,7 +86,7 @@ help: # lxdialog stuff check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh # Use reursively expanded variables so we do not call gcc unless # Use recursively expanded variables so we do not call gcc unless # we really need to do so. (Do not call gcc as part of make mrproper) HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) Loading Loading @@ -146,14 +148,8 @@ clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c clean-files += mconf qconf gconf # Needed for systems without gettext KBUILD_HAVE_NLS := $(shell \ if echo "\#include <libintl.h>" | $(HOSTCC) $(HOSTCFLAGS) -E - > /dev/null 2>&1 ; \ then echo yes ; \ else echo no ; fi) ifeq ($(KBUILD_HAVE_NLS),no) HOSTCFLAGS += -DKBUILD_NO_NLS endif # Add environment specific flags HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) # generated files seem to need this to find local include files HOSTCFLAGS_lex.zconf.o := -I$(src) Loading
package/config/README.buildroot2 +1 −1 Original line number Diff line number Diff line This is a copy of the kconfig code in the kernel (currently 2.6.23.14) tweaked This is a copy of the kconfig code in the kernel (currently 2.6.24.4) tweaked to suit Buildroot. To update: Loading
package/config/conf.c +2 −1 Original line number Diff line number Diff line Loading @@ -374,6 +374,7 @@ static int conf_choice(struct menu *menu) continue; break; case set_random: if (is_new) def = (random() % cnt) + 1; case set_default: case set_yes: Loading
package/config/confdata.c +64 −55 Original line number Diff line number Diff line Loading @@ -84,6 +84,68 @@ char *conf_get_default_confname(void) return name; } static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) { char *p2; switch (sym->type) { case S_TRISTATE: if (p[0] == 'm') { sym->def[def].tri = mod; sym->flags |= def_flags; break; } case S_BOOLEAN: if (p[0] == 'y') { sym->def[def].tri = yes; sym->flags |= def_flags; break; } if (p[0] == 'n') { sym->def[def].tri = no; sym->flags |= def_flags; break; } conf_warning("symbol value '%s' invalid for %s", p, sym->name); break; case S_OTHER: if (*p != '"') { for (p2 = p; *p2 && !isspace(*p2); p2++) ; sym->type = S_STRING; goto done; } case S_STRING: if (*p++ != '"') break; for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { if (*p2 == '"') { *p2 = 0; break; } memmove(p2, p2 + 1, strlen(p2)); } if (!p2) { conf_warning("invalid string found"); return 1; } case S_INT: case S_HEX: done: if (sym_string_valid(sym, p)) { sym->def[def].val = strdup(p); sym->flags |= def_flags; } else { conf_warning("symbol value '%s' invalid for %s", p, sym->name); return 1; } break; default: ; } return 0; } int conf_read_simple(const char *name, int def) { FILE *in = NULL; Loading Loading @@ -210,61 +272,8 @@ load: conf_warning("trying to reassign symbol %s", sym->name); break; } switch (sym->type) { case S_TRISTATE: if (p[0] == 'm') { sym->def[def].tri = mod; sym->flags |= def_flags; break; } case S_BOOLEAN: if (p[0] == 'y') { sym->def[def].tri = yes; sym->flags |= def_flags; break; } if (p[0] == 'n') { sym->def[def].tri = no; sym->flags |= def_flags; break; } conf_warning("symbol value '%s' invalid for %s", p, sym->name); break; case S_OTHER: if (*p != '"') { for (p2 = p; *p2 && !isspace(*p2); p2++) ; sym->type = S_STRING; goto done; } case S_STRING: if (*p++ != '"') break; for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { if (*p2 == '"') { *p2 = 0; break; } memmove(p2, p2 + 1, strlen(p2)); } if (!p2) { conf_warning("invalid string found"); continue; } case S_INT: case S_HEX: done: if (sym_string_valid(sym, p)) { sym->def[def].val = strdup(p); sym->flags |= def_flags; } else { conf_warning("symbol value '%s' invalid for %s", p, sym->name); if (conf_set_sym_val(sym, def, def_flags, p)) continue; } break; default: ; } break; case '\r': case '\n': Loading
package/config/kconfig-language.txt +13 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,12 @@ applicable everywhere (see syntax). Optionally, dependencies only for this default value can be added with "if". - dependencies: "depends on"/"requires" <expr> - type definition + default value: "def_bool"/"def_tristate" <expr> ["if" <expr>] This is a shorthand notation for a type definition plus a value. Optionally dependencies for this default value can be added with "if". - dependencies: "depends on" <expr> This defines a dependency for this menu entry. If multiple dependencies are defined, they are connected with '&&'. Dependencies are applied to all other options within this menu entry (which also Loading Loading @@ -289,3 +294,10 @@ source: "source" <prompt> This reads the specified configuration file. This file is always parsed. mainmenu: "mainmenu" <prompt> This sets the config program's title bar if the config program chooses to use it.