Pull request for branch kconfig-update
The following changes since commit 660952565ed0c76b4a2e345bb79fd553a4f53d77:
Thomas Petazzoni (1):
Update CHANGES with recent improvements
are available in the git repository at:
git://git.busybox.net/~tpetazzoni/git/buildroot kconfig-update
Alper Yildirim (2):
config: Update package/config to Kconfig 2.6.30
config: Add support for xconfig
Thomas Petazzoni (2):
xconfig: Change titlebar to Buildroot Configuration
xconfig: Save the configuration properly in qconf
Makefile | 22 +- package/config/Makefile | 9 + package/config/Makefile.kconfig | 57 ++- package/config/POTFILES.in | 7 + package/config/conf.c | 259 ++++---- package/config/confdata.c | 139 ++++- package/config/expr.c | 32 +- package/config/expr.h | 94 ++- package/config/gconf.c | 16 +- package/config/kconfig-language.txt | 102 +++- package/config/kconfig-to-buildroot2.patch | 945 +++++++--------------------- package/config/kxgettext.c | 4 + package/config/lex.zconf.c_shipped | 87 ++- package/config/lkc.h | 21 +- package/config/lkc_proto.h | 2 +- package/config/lxdialog/check-lxdialog.sh | 20 +- package/config/lxdialog/checklist.c | 7 +- package/config/lxdialog/dialog.h | 11 +- package/config/lxdialog/inputbox.c | 6 +- package/config/lxdialog/menubox.c | 6 +- package/config/lxdialog/textbox.c | 2 +- package/config/lxdialog/util.c | 32 +- package/config/lxdialog/yesno.c | 4 +- package/config/mconf.c | 126 ++--- package/config/menu.c | 74 ++- package/config/qconf.cc | 154 +++--- package/config/symbol.c | 219 +++++-- package/config/util.c | 28 +- package/config/zconf.gperf | 2 +- package/config/zconf.hash.c_shipped | 19 +- package/config/zconf.l | 18 +- package/config/zconf.tab.c_shipped | 301 +++++----- package/config/zconf.y | 13 +- 33 files changed, 1384 insertions(+), 1454 deletions(-)
Thanks,
Signature · 1 line
Thomas Petazzoni
PATCH 1/4 config: Update package/config to Kconfig 2.6.30
From: Alper Yildirim <[email protected]>
Update the package/config stuff with the code available in the Linux kernel 2.6.30.
--- package/config/Makefile.kconfig | 53 +- package/config/POTFILES.in | 7 + package/config/conf.c | 259 ++++----- package/config/confdata.c | 139 ++++- package/config/expr.c | 32 +- package/config/expr.h | 94 ++- package/config/gconf.c | 16 +- package/config/kconfig-language.txt | 102 +++- package/config/kconfig-to-buildroot2.patch | 908 ++++++---------------------- package/config/kxgettext.c | 4 + package/config/lex.zconf.c_shipped | 87 ++- package/config/lkc.h | 21 +- package/config/lkc_proto.h | 2 +- package/config/lxdialog/check-lxdialog.sh | 20 +- package/config/lxdialog/checklist.c | 7 +- package/config/lxdialog/dialog.h | 11 +- package/config/lxdialog/inputbox.c | 6 +- package/config/lxdialog/menubox.c | 6 +- package/config/lxdialog/textbox.c | 2 +- package/config/lxdialog/util.c | 32 +- package/config/lxdialog/yesno.c | 4 +- package/config/mconf.c | 126 ++--- package/config/menu.c | 74 ++- package/config/qconf.cc | 149 +++--- package/config/symbol.c | 219 +++++-- package/config/util.c | 28 +- package/config/zconf.gperf | 2 +- package/config/zconf.hash.c_shipped | 19 +- package/config/zconf.l | 18 +- package/config/zconf.tab.c_shipped | 301 +++++----- package/config/zconf.y | 13 +- 31 files changed, 1311 insertions(+), 1450 deletions(-)
package/config/Makefile.kconfig +33 -20
@@ -4,7 +4,11 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config +ifdef KBUILD_KCONFIG +Kconfig := $(KBUILD_KCONFIG) +else Kconfig := arch/$(SRCARCH)/Kconfig +endif xconfig: $(obj)/qconf $< $(Kconfig)
@@ -24,22 +28,25 @@ oldconfig: $(obj)/conf silentoldconfig: $(obj)/conf $< -s $(Kconfig) -# Create new linux.po file +# Create new linux.pot 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 \ +update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h + $(Q)echo " GEN config" + $(Q)xgettext --default-domain=linux \ --add-comments --keyword=_ --keyword=N_ \ --from-code=UTF-8 \ --files-from=scripts/kconfig/POTFILES.in \ --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 \ - $(obj)/kxgettext arch/$$i/Kconfig; \ - done ) >> $(obj)/config.pot - msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ + $(Q)(for i in `ls arch/*/Kconfig`; \ + do \ + echo " GEN $$i"; \ + $(obj)/kxgettext $$i \ + >> $(obj)/config.pot; \ + done ) + $(Q)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
@@ -76,7 +83,7 @@ help: @echo ' xconfig - Update current config utilising a QT based front-end' @echo ' gconfig - Update current config utilising a GTK based front-end' @echo ' oldconfig - Update current config utilising a provided .config as base' - @echo ' silentoldconfig - Same as oldconfig, but quietly' + @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' @echo ' randconfig - New config with random answer to all options' @echo ' defconfig - New config with default answer to all options' @echo ' allmodconfig - New config selecting modules when possible'
@@ -93,17 +100,11 @@ HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) HOST_EXTRACFLAGS += -DLOCALE -PHONY += $(obj)/dochecklxdialog -$(obj)/dochecklxdialog: - $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES) - -always := dochecklxdialog - # =========================================================================== # Shared Makefile for the various kconfig executables: # conf: Used for defconfig, oldconfig and related targets -# mconf: Used for the mconfig target. +# mconf: Used for the menuconfig target # Utilizes the lxdialog package # qconf: Used for the xconfig target # Based on QT which needs to be installed to compile it
@@ -124,7 +125,7 @@ ifeq ($(MAKECMDGOALS),menuconfig) hostprogs-y += mconf endif ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf) - hostprogs-y += mconf + hostprogs-y += mconf endif ifeq ($(MAKECMDGOALS),xconfig)
@@ -145,8 +146,17 @@ gconf-objs := gconf.o kconfig_load.o zconf.tab.o endif clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ - .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c + .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h clean-files += mconf qconf gconf +clean-files += config.pot linux.pot + +# Check that we have the required ncurses stuff installed for lxdialog (menuconfig) +PHONY += $(obj)/dochecklxdialog +$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog +$(obj)/dochecklxdialog: + $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) + +always := dochecklxdialog # Add environment specific flags HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
@@ -184,8 +194,8 @@ $(obj)/.tmp_qtcheck: done; \ if [ -z "$$dir" ]; then \ echo "*"; \ - echo "* Unable to find the QT installation. Please make sure that"; \ - echo "* the QT development package is correctly installed and"; \ + echo "* Unable to find the QT3 installation. Please make sure that"; \ + echo "* the QT3 development package is correctly installed and"; \ echo "* either install pkg-config or set the QTDIR environment"; \ echo "* variable to the correct location."; \ echo "*"; \
@@ -251,6 +261,9 @@ $(obj)/%.moc: $(src)/%.h $(obj)/lkc_defs.h: $(src)/lkc_proto.h sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' +# Extract gconf menu items for I18N support +$(obj)/gconf.glade.h: $(obj)/gconf.glade + intltool-extract --type=gettext/glade $(obj)/gconf.glade ### # The following requires flex/bison/gperf
package/config/POTFILES.in +7 -0
@@ -1,5 +1,12 @@ +scripts/kconfig/lxdialog/checklist.c +scripts/kconfig/lxdialog/inputbox.c +scripts/kconfig/lxdialog/menubox.c +scripts/kconfig/lxdialog/textbox.c +scripts/kconfig/lxdialog/util.c +scripts/kconfig/lxdialog/yesno.c scripts/kconfig/mconf.c scripts/kconfig/conf.c scripts/kconfig/confdata.c scripts/kconfig/gconf.c +scripts/kconfig/gconf.glade.h scripts/kconfig/qconf.cc
package/config/conf.c +122 -137
430 lines not on this page · raw message
package/config/confdata.c +115 -24
215 lines not on this page · raw message
package/config/expr.c +19 -13
@@ -87,7 +87,7 @@ struct expr *expr_copy(struct expr *org)break ;case E_AND :case E_OR : -case E_CHOICE : +case E_LIST : e->left.expr =expr_copy (org->left.expr); e->right.expr =expr_copy (org->right.expr);break ;
@@ -217,7 +217,7 @@ int expr_eq(struct expr *e1, struct expr *e2)expr_free (e2); trans_count = old_count;return res; -case E_CHOICE : +case E_LIST :case E_RANGE :case E_NONE :/* panic */ ;
@@ -648,7 +648,7 @@ struct expr *expr_transform(struct expr *e)case E_EQUAL :case E_UNEQUAL :case E_SYMBOL : -case E_CHOICE : +case E_LIST :break ;default : e->left.expr =expr_transform (e->left.expr);
@@ -932,7 +932,7 @@ struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbbreak ;case E_SYMBOL :return expr_alloc_comp (type, e->left.sym, sym); -case E_CHOICE : +case E_LIST :case E_RANGE :case E_NONE :/* panic */ ;
@@ -955,14 +955,14 @@ tristate expr_calc_value(struct expr *e)case E_AND : val1 =expr_calc_value (e->left.expr); val2 =expr_calc_value (e->right.expr); -return E_AND (val1, val2); +return EXPR_AND (val1, val2);case E_OR : val1 =expr_calc_value (e->left.expr); val2 =expr_calc_value (e->right.expr); -return E_OR (val1, val2); +return EXPR_OR (val1, val2);case E_NOT : val1 =expr_calc_value (e->left.expr); -return E_NOT (val1); +return EXPR_NOT (val1);case E_EQUAL :sym_calc_value (e->left.sym);sym_calc_value (e->right.sym);
@@ -1000,9 +1000,9 @@ int expr_compare_type(enum expr_type t1, enum expr_type t2)if (t2 ==E_OR )return 1 ;case E_OR : -if (t2 ==E_CHOICE ) +if (t2 ==E_LIST )return 1 ; -case E_CHOICE : +case E_LIST :if (t2 ==0 )return 1 ;default :
@@ -1034,12 +1034,18 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *expr_print (e->left.expr, fn, data,E_NOT );break ;case E_EQUAL : -fn (data, e->left.sym, e->left.sym->name); +if (e->left.sym->name) +fn (data, e->left.sym, e->left.sym->name); +else +fn (data,NULL ,"<choice>" );fn (data,NULL ,"=" );fn (data, e->right.sym, e->right.sym->name);break ;case E_UNEQUAL : -fn (data, e->left.sym, e->left.sym->name); +if (e->left.sym->name) +fn (data, e->left.sym, e->left.sym->name); +else +fn (data,NULL ,"<choice>" );fn (data,NULL ,"!=" );fn (data, e->right.sym, e->right.sym->name);break ;
@@ -1053,11 +1059,11 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *fn (data,NULL ," && " );expr_print (e->right.expr, fn, data,E_AND );break ; -case E_CHOICE : +case E_LIST :fn (data, e->right.sym, e->right.sym->name);if (e->left.expr) {fn (data,NULL ," ^ " ); -expr_print (e->left.expr, fn, data,E_CHOICE ); +expr_print (e->left.expr, fn, data,E_LIST ); }break ;case E_RANGE :
package/config/expr.h +61 -33
142 lines not on this page · raw message
package/config/gconf.c +9 -7
@@ -119,8 +119,6 @@ const char *dbg_print_flags(int val)strcat (buf,"choice/" );if (val &SYMBOL_CHOICEVAL )strcat (buf,"choiceval/" ); -if (val &SYMBOL_PRINTED ) -strcat (buf,"printed/" );if (val &SYMBOL_VALID )strcat (buf,"valid/" );if (val &SYMBOL_OPTIONAL )
@@ -457,14 +455,18 @@ static void text_insert_help(struct menu *menu) {GtkTextBuffer *buffer;GtkTextIter start, end; -const char *prompt =menu_get_prompt (menu); +const char *prompt =_ (menu_get_prompt (menu));gchar *name;const char *help; - help =_ (menu_get_help (menu)); + help =menu_get_help (menu); + +/* Gettextize if the help text not empty */ +if ((help !=0 ) && (help[0 ] !=0 )) + help =_ (help);if (menu->sym && menu->sym->name) - name =g_strdup_printf (_ (menu->sym->name)); + name =g_strdup_printf (menu->sym->name);else name =g_strdup ("" );
@@ -1171,7 +1173,7 @@ static gchar **fill_row(struct menu *menu)bzero (row,sizeof (row)); row[COL_OPTION ] = -g_strdup_printf ("%s %s" ,menu_get_prompt (menu), +g_strdup_printf ("%s %s" ,_ (menu_get_prompt (menu)), sym &&sym_has_value (sym) ?"(NEW)" :"" );if (show_all && !menu_is_visible (menu))
@@ -1221,7 +1223,7 @@ static gchar **fill_row(struct menu *menu)if (def_menu) row[COL_VALUE ] = -g_strdup (menu_get_prompt (def_menu)); +g_strdup (_ (menu_get_prompt (def_menu))); }if (sym->flags &SYMBOL_CHOICEVAL ) row[COL_BTNRAD ] =GINT_TO_POINTER (TRUE);
package/config/kconfig-language.txt +89 -13
135 lines not on this page · raw message
package/config/kconfig-to-buildroot2.patch +176 -732
1,201 lines not on this page · raw message
package/config/kxgettext.c +4 -0
@@ -43,6 +43,10 @@ static char *escape(const char* text, char *bf, int len) ++text; goto next; } +else if (*text =='\\' ) { + *bfp++ ='\\' ; + len--; + } *bfp++ = *text++; next: --len;
package/config/lex.zconf.c_shipped +64 -23
197 lines not on this page · raw message
package/config/lkc.h +18 -3
@@ -11,9 +11,9 @@#ifndef KBUILD_NO_NLS # include <libintl.h> #else -# define gettext (Msgid) ((const char *) (Msgid)) -# define textdomain (Domainname) ((const char *) (Domainname)) -# define bindtextdomain (Domainname, Dirname) ((const char *) (Dirname)) +static inline const char *gettext (const char *txt) {return txt; } +static inline void textdomain (const char *domainname) {} +static inline void bindtextdomain (const char *name,const char *dir) {}#endif #ifdef __cplusplus
@@ -42,8 +42,17 @@ extern "C" {#define TF_PARAM 0x0002#define TF_OPTION 0x0004 +enum conf_def_mode { + def_default, + def_yes, + def_mod, + def_no, + def_random +}; +#define T_OPT_MODULES 1#define T_OPT_DEFCONFIG_LIST 2 +#define T_OPT_ENV 3struct kconf_id {int name;
@@ -65,15 +74,18 @@ char *zconf_curname(void);/* confdata.c */ const char *conf_get_configname (void ); +const char *conf_get_autoconfig_name (void );char *conf_get_default_confname (void );void sym_set_change_count (int count);void sym_add_change_count (int count); +void conf_set_all_new_symbols (enum conf_def_mode mode);/* kconfig_load.c */ void kconfig_load (void );/* menu.c */ void menu_init (void ); +void menu_warn (struct menu *menu,const char *fmt, ...);struct menu *menu_add_menu (void );void menu_end_menu (void );void menu_add_entry (struct symbol *sym);
@@ -103,6 +115,8 @@ void str_printf(struct gstr *gs, const char *fmt, ...);const char *str_get (struct gstr *gs);/* symbol.c */ +extern struct expr *sym_env_list; +void sym_init (void );void sym_clear_all_valid (void );void sym_set_all_changed (void );
@@ -110,6 +124,7 @@ void sym_set_changed(struct symbol *sym);struct symbol *sym_check_deps (struct symbol *sym);struct property *prop_alloc (enum prop_type type,struct symbol *sym);struct symbol *prop_get_symbol (struct property *prop); +struct property *sym_get_env_prop (struct symbol *sym);static inline tristate sym_get_tristate_value (struct symbol *sym) {
package/config/lkc_proto.h +1 -1
@@ -21,7 +21,7 @@ P(menu_get_help,const char *,(struct menu *menu));/* symbol.c */ P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); -P(sym_lookup,struct symbol *,(const char *name, int isconst)); +P(sym_lookup,struct symbol *,(const char *name, int flags)); P(sym_find,struct symbol *,(const char *name)); P(sym_re_search,struct symbol **,(const char *pattern)); P(sym_type_name,const char *,(enum symbol_type type));
package/config/lxdialog/check-lxdialog.sh +12 -8
@@ -36,19 +36,23 @@ trap "rm -f $tmp" 0 1 2 3 15 # Check if we can link to ncurses check() { - echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null + $cc -xc - -o $tmp 2>/dev/null <<'EOF' +#include CURSES_LOC +main() {} +EOF if [ $? != 0 ]; then - echo " *** Unable to find the ncurses libraries." 1>&2 - echo " *** make menuconfig require the ncurses libraries" 1>&2 - echo " *** " 1>&2 - echo " *** Install ncurses (ncurses-devel) and try again" 1>&2 - echo " *** " 1>&2 - exit 1 + echo " *** Unable to find the ncurses libraries or the" 1>&2 + echo " *** required header files." 1>&2 + echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2 + echo " *** " 1>&2 + echo " *** Install ncurses (ncurses-devel) and try again." 1>&2 + echo " *** " 1>&2 + exit 1 fi } usage() { - printf "Usage: $0 [-check compiler options|-header|-library]\n" + printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n" } if [ $# -eq 0 ]; then
package/config/lxdialog/checklist.c +4 -3
@@ -41,7 +41,8 @@ static void print_item(WINDOW * win, int choice, int selected)wmove (win, choice, check_x);wattrset (win, selected ? dlg.check_selected.atr : dlg.check.atr); -wprintw (win,"(%c)" ,item_is_tag ('X' ) ?'X' :' ' ); +if (!item_is_tag (':' )) +wprintw (win,"(%c)" ,item_is_tag ('X' ) ?'X' :' ' );wattrset (win, selected ? dlg.tag_selected.atr : dlg.tag.atr);mvwaddch (win, choice, item_x,item_str ()[0 ]);
@@ -97,8 +98,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)int x = width /2 -11 ;int y = height -2 ; -print_button (dialog,"Select" , y, x, selected ==0 ); -print_button (dialog," Help " , y, x +14 , selected ==1 ); +print_button (dialog,gettext ("Select" ), y, x, selected ==0 ); +print_button (dialog,gettext (" Help " ), y, x +14 , selected ==1 );wmove (dialog, y, x +1 +14 * selected);wrefresh (dialog);
package/config/lxdialog/dialog.h +8 -3
@@ -26,6 +26,12 @@#include <string.h> #include <stdbool.h> +#ifndef KBUILD_NO_NLS +# include <libintl.h> +#else +# define gettext (Msgid) ((const char *) (Msgid)) +#endif +#ifdef __sun__#define CURS_MACROS #endif
@@ -187,10 +193,9 @@ int item_is_tag(char tag);int on_key_esc (WINDOW *win);int on_key_resize (void ); -void init_dialog (const char *backtitle); +int init_dialog (const char *backtitle);void set_dialog_backtitle (const char *backtitle); -void reset_dialog (void ); -void end_dialog (void ); +void end_dialog (int x,int y);void attr_clear (WINDOW * win,int height,int width,chtype attr);void dialog_clear (void );void print_autowrap (WINDOW * win,const char *prompt,int width,int y,int x);
package/config/lxdialog/inputbox.c +3 -3
@@ -31,8 +31,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)int x = width /2 -11 ;int y = height -2 ; -print_button (dialog," Ok " , y, x, selected ==0 ); -print_button (dialog," Help " , y, x +14 , selected ==1 ); +print_button (dialog,gettext (" Ok " ), y, x, selected ==0 ); +print_button (dialog,gettext (" Help " ), y, x +14 , selected ==1 );wmove (dialog, y, x +1 +14 * selected);wrefresh (dialog);
@@ -89,7 +89,7 @@ do_resize: box_y = y +2 ; box_x = (width - box_width) /2 ;draw_box (dialog, y +1 , box_x -1 ,3 , box_width +2 , - dlg.border.atr, dlg.dialog.atr); + dlg.dialog.atr, dlg.border.atr);print_buttons (dialog, height, width,0 );
package/config/lxdialog/menubox.c +3 -3
@@ -157,9 +157,9 @@ static void print_buttons(WINDOW * win, int height, int width, int selected)int x = width /2 -16 ;int y = height -2 ; -print_button (win,"Select" , y, x, selected ==0 ); -print_button (win," Exit " , y, x +12 , selected ==1 ); -print_button (win," Help " , y, x +24 , selected ==2 ); +print_button (win,gettext ("Select" ), y, x, selected ==0 ); +print_button (win,gettext (" Exit " ), y, x +12 , selected ==1 ); +print_button (win,gettext (" Help " ), y, x +24 , selected ==2 );wmove (win, y, x +1 +12 * selected);wrefresh (win);
package/config/lxdialog/textbox.c +1 -1
@@ -114,7 +114,7 @@ do_resize:print_title (dialog, title, width); -print_button (dialog," Exit " , height -2 , width /2 -4 , TRUE); +print_button (dialog,gettext (" Exit " ), height -2 , width /2 -4 , TRUE);wnoutrefresh (dialog);getyx (dialog, cur_y, cur_x);/* Save cursor position */
package/config/lxdialog/util.c +21 -11
@@ -266,31 +266,41 @@ void dialog_clear(void)/* * Do some initialization for dialog */ -void init_dialog (const char *backtitle) +int init_dialog (const char *backtitle) { - dlg.backtitle = backtitle; -color_setup (getenv ("MENUCONFIG_COLOR" )); -} +int height, width; + +initscr ();/* Init curses */ +getmaxyx (stdscr, height, width); +if (height <19 || width <80 ) { +endwin (); +return -ERRDISPLAYTOOSMALL ; + } -void set_dialog_backtitle (const char *backtitle) -{ dlg.backtitle = backtitle; -} +color_setup (getenv ("MENUCONFIG_COLOR" )); -void reset_dialog (void ) -{ -initscr ();/* Init curses */ keypad (stdscr, TRUE);cbreak ();noecho ();dialog_clear (); + +return 0 ; +} + +void set_dialog_backtitle (const char *backtitle) +{ + dlg.backtitle = backtitle; }/* * End using dialog functions. */ -void end_dialog (void ) +void end_dialog (int x,int y) { +/* move cursor back to original position */ +move (y, x); +refresh ();endwin (); }
package/config/lxdialog/yesno.c +2 -2
@@ -29,8 +29,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)int x = width /2 -10 ;int y = height -2 ; -print_button (dialog," Yes " , y, x, selected ==0 ); -print_button (dialog," No " , y, x +13 , selected ==1 ); +print_button (dialog,gettext (" Yes " ), y, x, selected ==0 ); +print_button (dialog,gettext (" No " ), y, x +13 , selected ==1 );wmove (dialog, y, x +1 +13 * selected);wrefresh (dialog);
package/config/mconf.c +47 -79
161 lines not on this page · raw message
package/config/menu.c +48 -26
74 lines not on this page · raw message
package/config/qconf.cc +77 -72
149 lines not on this page · raw message
package/config/symbol.c +157 -62
219 lines not on this page · raw message
package/config/zconf.tab.c_shipped +156 -145
301 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.6.0.4
Part of the diff is not shown here. View the raw message.
PATCH 2/4 config: Add support for xconfig
In reply to Thomas PetazzoniFrom: Alper Yildirim <[email protected]>
It involved:
* Modifying the top-level Makefile to create the xconfig target, and the $(CONFIG)/qconf target to compile the qconf utility
* Modifying the package/config/Makefile magic so that C++ files and binaries gets linked properly, re-using the package/config/Makefile.kconfig logic inherited from the kernel
* Hacking a little bit package/config/Makefile.kconfig in a way similar to the modifications done for the mconf (menuconfig interface)
--- Makefile | 22 +++++++++++++++++++--- package/config/Makefile | 9 +++++++++ package/config/Makefile.kconfig | 4 ++++ package/config/kconfig-to-buildroot2.patch | 14 +++++++++++--- 4 files changed, 43 insertions(+), 6 deletions(-)
Makefile +19 -3
@@ -28,7 +28,7 @@ CONFIG_DEFCONFIG=.defconfig CONFIG=package/config DATE:=$(shell date +%Y%m%d) -noconfig_targets:=menuconfig config oldconfig randconfig \ +noconfig_targets:=menuconfig xconfig config oldconfig randconfig \ defconfig allyesconfig allnoconfig release tags \ source-check help
@@ -431,13 +431,29 @@ $(CONFIG)/conf: - at if [ ! -f .config ]; then \ cp $(CONFIG_DEFCONFIG) .config; \ fi + $(CONFIG)/mconf: @mkdir -p $(CONFIG)/buildroot-config - $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf mconf + $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) mconf + - at if [ ! -f .config ]; then \ + cp $(CONFIG_DEFCONFIG) .config; \ + fi + +$(CONFIG)/qconf: + @mkdir -p $(CONFIG)/buildroot-config + $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) qconf - at if [ ! -f .config ]; then \ cp $(CONFIG_DEFCONFIG) .config; \ fi +xconfig: $(CONFIG)/qconf + @mkdir -p $(CONFIG)/buildroot-config + @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ + KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ + $(CONFIG)/qconf $(CONFIG_CONFIG_IN); then \ + test -f .config.cmd || rm -f .config; \ + fi + menuconfig: $(CONFIG)/mconf @mkdir -p $(CONFIG)/buildroot-config @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \
@@ -559,5 +575,5 @@ release: distclean rm -rf $$OUT .PHONY: dummy subdirs release distclean clean config oldconfig \ - menuconfig tags check test depend defconfig help + menuconfig xconfig tags check test depend defconfig help
package/config/Makefile +9 -0
@@ -14,7 +14,10 @@ __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) host-cmulti := $(foreach m,$(__hostprogs),\ $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) +host-cxxmulti := $(foreach m,$(__hostprogs),\ + $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),))) host-cobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-objs))) +host-cxxobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs))) $(host-csingle): %: %.c $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $@
@@ -22,9 +25,15 @@ $(host-csingle): %: %.c $(host-cmulti): %: $(host-cobjs) $(host-cshlib) $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $($@-objs) $(HOST_LOADLIBES) -o $@ +$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $($@-objs) $($@-cxxobjs) $(HOSTLOADLIBES_$@) -o $@ + $(host-cobjs): %.o: %.c $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) -c $< -o $@ +$(host-cxxobjs): %.o: %.cc + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) -c $< -o $@ + $(obj)/%:: $(src)/%_shipped $(Q)cat $< > $@
package/config/Makefile.kconfig +4 -0
@@ -131,6 +131,10 @@ endif ifeq ($(MAKECMDGOALS),xconfig) qconf-target := 1 endif +ifeq ($(findstring qconf,$(MAKECMDGOALS)),qconf) + qconf-target := 1 +endif + ifeq ($(MAKECMDGOALS),gconfig) gconf-target := 1 endif
package/config/kconfig-to-buildroot2.patch +11 -3
@@ -1,5 +1,5 @@ --- - Makefile | 3 + + Makefile | 7 +++ README.buildroot2 | 22 ++++++++++ conf.c | 13 ++---- confdata.c | 101 ++++++++++++++++++++++++++------------------------
@@ -10,13 +10,13 @@ util.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++- zconf.tab.c_shipped | 2 zconf.y | 2 - 11 files changed, 234 insertions(+), 101 deletions(-) + 11 files changed, 238 insertions(+), 101 deletions(-) Index: config/Makefile =================================================================== --- config.orig/Makefile +++ config/Makefile -@@ -124,6 +124,9 @@ +@@ -124,10 +124,17 @@ ifeq ($(MAKECMDGOALS),menuconfig) hostprogs-y += mconf endif
@@ -26,6 +26,14 @@ Index: config/Makefile ifeq ($(MAKECMDGOALS),xconfig) qconf-target := 1 + endif ++ifeq ($(findstring qconf,$(MAKECMDGOALS)),qconf) ++ qconf-target := 1 ++endif ++ + ifeq ($(MAKECMDGOALS),gconfig) + gconf-target := 1 + endif Index: config/README.buildroot2 =================================================================== --- /dev/null
Signature · 1 line
1.6.0.4
PATCH 3/4 xconfig: Change titlebar to Buildroot Configuration
In reply to Thomas Petazzoni--- package/config/kconfig-to-buildroot2.patch | 17 ++++++++++++++++- package/config/qconf.cc | 3 +-- 2 files changed, 17 insertions(+), 3 deletions(-)
package/config/kconfig-to-buildroot2.patch +16 -1
@@ -7,10 +7,11 @@ gconf.c | 4 - gconf.glade | 2 mconf.c | 39 +++++++++---------- + qconf.cc | 3 - util.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++- zconf.tab.c_shipped | 2 zconf.y | 2 - 11 files changed, 238 insertions(+), 101 deletions(-) + 12 files changed, 239 insertions(+), 103 deletions(-) Index: config/Makefile ===================================================================
@@ -726,6 +727,20 @@ Index: config/mconf.c + return conf_write_autoconf(); } +Index: config/qconf.cc +=================================================================== +--- config.orig/qconf.cc ++++ config/qconf.cc +@@ -1277,8 +1277,7 @@ + char title[256]; + + QDesktopWidget *d = configApp->desktop(); +- snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration"), +- getenv("KERNELVERSION")); ++ snprintf(title, sizeof(title), _("Buildroot Configuration")); + setCaption(title); + + width = configSettings->readNumEntry("/window width", d->width() - 64); Index: config/util.c =================================================================== --- config.orig/util.c
package/config/qconf.cc +1 -2
@@ -1277,8 +1277,7 @@ ConfigMainWindow::ConfigMainWindow(void) char title[256]; QDesktopWidget *d = configApp->desktop(); - snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration"), - getenv("KERNELVERSION")); + snprintf(title, sizeof(title), _("Buildroot Configuration")); setCaption(title); width = configSettings->readNumEntry("/window width", d->width() - 64);
Signature · 1 line
1.6.0.4
PATCH 4/4 xconfig: Save the configuration properly in qconf
In reply to Thomas Petazzoni--- package/config/kconfig-to-buildroot2.patch | 20 ++++++++++++++++++-- package/config/qconf.cc | 2 ++ 2 files changed, 20 insertions(+), 2 deletions(-)
package/config/kconfig-to-buildroot2.patch +18 -2
@@ -7,11 +7,11 @@ gconf.c | 4 - gconf.glade | 2 mconf.c | 39 +++++++++---------- - qconf.cc | 3 - + qconf.cc | 5 +- util.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++- zconf.tab.c_shipped | 2 zconf.y | 2 - 12 files changed, 239 insertions(+), 103 deletions(-) + 12 files changed, 241 insertions(+), 103 deletions(-) Index: config/Makefile ===================================================================
@@ -741,6 +741,22 @@ Index: config/qconf.cc setCaption(title); width = configSettings->readNumEntry("/window width", d->width() - 64); +@@ -1612,6 +1611,7 @@ + { + if (!conf_get_changed()) { + e->accept(); ++ conf_write_autoconf(); + return; + } + QMessageBox mb("qconf", _("Save configuration?"), QMessageBox::Warning, +@@ -1622,6 +1622,7 @@ + switch (mb.exec()) { + case QMessageBox::Yes: + conf_write(NULL); ++ conf_write_autoconf(); + case QMessageBox::No: + e->accept(); + break; Index: config/util.c =================================================================== --- config.orig/util.c
package/config/qconf.cc +2 -0
@@ -1611,6 +1611,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) { if (!conf_get_changed()) { e->accept(); + conf_write_autoconf(); return; } QMessageBox mb("qconf", _("Save configuration?"), QMessageBox::Warning,
@@ -1621,6 +1622,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) switch (mb.exec()) { case QMessageBox::Yes: conf_write(NULL); + conf_write_autoconf(); case QMessageBox::No: e->accept(); break;
Signature · 1 line
1.6.0.4
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> The following changes since commit 660952565ed0c76b4a2e345bb79fd553a4f53d77:
Thomas> Thomas Petazzoni (1):
Thomas> Update CHANGES with recent improvements
Thomas> are available in the git repository at:
Thomas> git://git.busybox.net/~tpetazzoni/git/buildroot kconfig-update
Thomas> Alper Yildirim (2):
Thomas> config: Update package/config to Kconfig 2.6.30
Thomas> config: Add support for xconfig
Thomas> Thomas Petazzoni (2):
Thomas> xconfig: Change titlebar to Buildroot Configuration
Thomas> xconfig: Save the configuration properly in qconf
Pulled and pushed, thanks!
A notice about make xconfig in 'make help' and the documentation would be good..
Signature · 1 line
Bye, Peter Korsgaard