support/kconfig: Add missing target to README.buildroot
PATCH v2 1/2 support/kconfig: Add missing target to README.buildroot
--- support/kconfig/README.buildroot | 1 + 1 file changed, 1 insertion(+)
support/kconfig/README.buildroot +1 -0
@@ -15,6 +15,7 @@ Then verify the toplevel targets work: config defconfig menuconfig + nconfig xconfig gconfig oldconfig
Signature · 1 line
2.16.3
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
This kernel commit required to rename target in Makefile:911a91c39cab kconfig: rename silentoldconfig to syncconfig
Differences from upstrem (kernel):
* Tests are not included. IMHO we don't need them.
* kernel added new tool requirement: flex & bison, added in commit 29c833061c1d kconfig: generate lexer and parser during build instead of shipping but atm we still use generated files (zconf.lex.c_shipped and zconf.tab.c_shipped).
User visible changes (incomplete list):
* make "Selected by:" and "Implied by:" readable:d9119b5925a0 kconfig: Print reverse dependencies in groups 9a47ceec543b kconfig: clean-up reverse dependency help implementation 1ccb27143360 kconfig: make "Selected by:" and "Implied by:" readable
Old version of help:
Symbol: BR2_ARCH_HAS_MMU_MANDATORY [=y]
Type : boolean
Defined at arch/Config.in:12
Selected by: BR2_arcle [=n] && <choice> || BR2_arceb [=n] && <choice> || BR2_aarch64 [=n] && <choice> || BR2_aarch64_be [=n] && <choice> || BR2_csky [=n] && <choice> ...
New version of help:
Symbol: BR2_ARCH_HAS_MMU_MANDATORY [=y]
Type : bool
Defined at arch/Config.in:12
Selected by [y]:
- BR2_x86_64 [=y] && <choice>
Selected by [n]:
- BR2_arcle [=n] && <choice>
- BR2_arceb [=n] && <choice>
- BR2_aarch64 [=n] && <choice>
- BR2_aarch64_be [=n] && <choice>
* 2c37e08464a8 kconfig: Warn if choice default is not in choice toolchain/toolchain-buildroot/Config.in:25:warning: choice default symbol 'BR2_TOOLCHAIN_UCLIBC' is not contained in the choice package/libmediaart/Config.in:21:warning: choice default symbol 'BR2_PACKAGE_LIBMEDIAART_BACKEND_NONE' is not contained in the choice
NOTE: fixes for these errors has already been posted to ML.
---
Changes v1->v2:
* Fix building packages (v1 didn't address change in kernel 911a91c39cab kconfig: rename silentoldconfig to syncconfig)
NOTE: I think I should stop using *shipped files (zconf.hash.c_shipped and zconf.lex.c_shipped), to have the same behavior as kernel. What do you think?
Kind regards,
Petr
--- Makefile | 10 +- support/kconfig/Makefile | 248 ++- support/kconfig/README.buildroot | 3 + support/kconfig/check.sh | 2 +- support/kconfig/conf.c | 127 +- support/kconfig/confdata.c | 40 +- support/kconfig/expr.c | 479 ++++-- support/kconfig/expr.h | 107 +- support/kconfig/gconf.c | 33 +- support/kconfig/kconf_id.c | 53 + support/kconfig/kxgettext.c | 2 +- support/kconfig/list.h | 7 +- support/kconfig/lkc.h | 21 +- support/kconfig/lkc_proto.h | 86 +- support/kconfig/lxdialog/check-lxdialog.sh | 4 +- support/kconfig/lxdialog/checklist.c | 4 +- support/kconfig/lxdialog/dialog.h | 2 +- support/kconfig/lxdialog/inputbox.c | 2 +- support/kconfig/lxdialog/menubox.c | 4 +- support/kconfig/lxdialog/util.c | 2 +- support/kconfig/mconf.c | 40 +- support/kconfig/menu.c | 261 ++- support/kconfig/merge_config.sh | 62 +- support/kconfig/nconf.c | 20 +- support/kconfig/nconf.gui.c | 22 +- support/kconfig/nconf.h | 4 +- .../patches/01-kconfig-kernel-to-buildroot.patch | 66 +- .../patches/06-br-build-system-integration.patch | 56 +- support/kconfig/patches/10-br-build-system.patch | 8 +- .../patches/11-use-mktemp-for-lxdialog.patch | 8 +- .../kconfig/patches/12-fix-glade-file-path.patch | 8 +- .../patches/14-support-out-of-tree-config.patch | 42 +- .../kconfig/patches/15-fix-qconf-moc-rule.patch | 24 - .../16-fix-space-to-de-select-options.patch | 8 +- support/kconfig/patches/17-backport-kecho.patch | 26 + ...dialog-get-ncurses-CFLAGS-with-pkg-config.patch | 50 - ...onfig-nconfig-fix-multi-byte-UTF-handling.patch | 45 - support/kconfig/patches/series | 4 +- support/kconfig/qconf.cc | 708 ++++---- support/kconfig/qconf.h | 150 +- support/kconfig/streamline_config.pl | 58 +- support/kconfig/symbol.c | 167 +- support/kconfig/util.c | 34 +- support/kconfig/zconf.gperf | 47 - support/kconfig/zconf.hash.c_shipped | 286 ---- support/kconfig/zconf.l | 103 +- support/kconfig/zconf.lex.c_shipped | 1136 +++++++------ support/kconfig/zconf.tab.c_shipped | 1756 ++++++++++---------- support/kconfig/zconf.y | 149 +- 49 files changed, 3450 insertions(+), 3134 deletions(-) create mode 100644 support/kconfig/kconf_id.c delete mode 100644 support/kconfig/patches/15-fix-qconf-moc-rule.patch create mode 100644 support/kconfig/patches/17-backport-kecho.patch delete mode 100644 support/kconfig/patches/17-kconfig-lxdialog-get-ncurses-CFLAGS-with-pkg-config.patch delete mode 100644 support/kconfig/patches/18-kconfig-nconfig-fix-multi-byte-UTF-handling.patch mode change 100644 => 100755 support/kconfig/streamline_config.pl delete mode 100644 support/kconfig/zconf.gperf delete mode 100644 support/kconfig/zconf.hash.c_shipped
Makefile +5 -5
@@ -128,7 +128,7 @@ export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlo # List of targets and target patterns for which .config doesn't need to be read in noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \ - defconfig %_defconfig allyesconfig allnoconfig alldefconfig silentoldconfig release \ + defconfig %_defconfig allyesconfig allnoconfig alldefconfig syncconfig release \ randpackageconfig allyespackageconfig allnopackageconfig \ print-version olddefconfig distclean manual manual-%
@@ -565,7 +565,7 @@ dirs: $(BUILD_DIR) $(STAGING_DIR) $(BASE_TARGET_DIR) \ $(HOST_DIR) $(HOST_DIR_SYMLINK) $(BINARIES_DIR) $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG) - $(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig + $(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" syncconfig .PHONY: prepare prepare: $(BUILD_DIR)/buildroot-config/auto.conf
@@ -922,7 +922,7 @@ randpackageconfig allyespackageconfig allnopackageconfig: $(BUILD_DIR)/buildroot @rm -f $(CONFIG_DIR)/.config.nopkg @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null -oldconfig silentoldconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig +oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig @$(COMMON_CONFIG_ENV) $< --$@ $(CONFIG_CONFIG_IN) defconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
@@ -1017,8 +1017,8 @@ help: @echo ' xconfig - interactive Qt-based configurator' @echo ' gconfig - interactive GTK-based configurator' @echo ' oldconfig - resolve any unresolved symbols in .config' - @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' - @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' + @echo ' syncconfig - Same as oldconfig, but quietly, additionally update deps' + @echo ' olddefconfig - Same as syncconfig but sets new symbols to their default value' @echo ' randconfig - New config with random answer to all options' @echo ' defconfig - New config with default answer to all options' @echo ' BR2_DEFCONFIG, if set, is used as input'
support/kconfig/Makefile +121 -127
393 lines not on this page · raw message
support/kconfig/README.buildroot +3 -0
@@ -4,6 +4,9 @@ to suit Buildroot. To update: cp -r /usr/src/linux/scripts/kconfig support/kconfig.new cd support/kconfig.new + mv zconf.lex.c zconf.lex.c_shipped + mv zconf.tab.c zconf.tab.c_shipped + rm -rf tests/ cp -a ../kconfig/patches ../kconfig/README.buildroot ../kconfig/.gitignore . quilt push -a # Fix any conflict
support/kconfig/check.sh +1 -1
@@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0 # Needed for systems without gettext $* -x c -o /dev/null - > /dev/null 2>&1 << EOF #include <libintl.h>
@@ -11,4 +12,3 @@ EOF if [ ! "$?" -eq "0" ]; then echo -DKBUILD_NO_NLS; fi -
support/kconfig/conf.c +63 -64
281 lines not on this page · raw message
support/kconfig/confdata.c +25 -15
@@ -17,6 +17,11 @@#include "lkc.h" +struct conf_printer { +void (*print_symbol)(FILE *,struct symbol *,const char *,void *); +void (*print_comment)(FILE *,const char *,void *); +}; +static void conf_warning (const char *fmt, ...) __attribute__ ((format (printf,1 ,2 )));
@@ -24,7 +29,7 @@ static void conf_message(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));static const char *conf_filename; -static int conf_lineno, conf_warnings, conf_unsaved; +static int conf_lineno, conf_warnings;const char conf_defname[] =".defconfig" ;
@@ -60,6 +65,7 @@ static void conf_message(const char *fmt, ...)va_start (ap, fmt);if (conf_message_callback)conf_message_callback (fmt, ap); +va_end (ap); }const char *conf_get_configname (void )
@@ -171,7 +177,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)case S_HEX : done:if (sym_string_valid (sym, p)) { - sym->def[def].val =strdup (p); + sym->def[def].val =xstrdup (p); sym->flags |= def_flags; }else {if (def !=S_DEF_AUTO )
@@ -194,7 +200,7 @@ static int add_byte(int c, char **lineptr, size_t slen, size_t *n)if (new_size > *n) { new_size +=LINE_GROWTH -1 ; new_size *=2 ; - nline =realloc (*lineptr, new_size); + nline =xrealloc (*lineptr, new_size);if (!nline)return -1 ;
@@ -260,11 +266,8 @@ int conf_read_simple(const char *name, int def)if (in) goto load;sym_add_change_count (1 ); -if (!sym_defconfig_list) { -if (modules_sym) -sym_calc_value (modules_sym); +if (!sym_defconfig_list)return 1 ; - } for_all_defaults(sym_defconfig_list, prop) { if (expr_calc_value(prop->visible.expr) == no ||
@@ -286,7 +289,6 @@ load: conf_filename = name; conf_lineno =0 ; conf_warnings =0 ; - conf_unsaved =0 ; def_flags =SYMBOL_DEF << def; for_all_symbols(i, sym) {
@@ -371,7 +373,9 @@ load:continue ; }else {if (line[0 ] !='\r' && line[0 ] !='\n' ) -conf_warning ("unexpected data" ); +conf_warning ("unexpected data: %.*s" , + (int )strcspn (line,"\r\n" ), line); +continue ; } setsym:
@@ -397,21 +401,23 @@ setsym: }free (line);fclose (in); - -if (modules_sym) -sym_calc_value (modules_sym);return 0 ; }int conf_read (const char *name) {struct symbol *sym; +int conf_unsaved =0 ;int i;sym_set_change_count (0 ); -if (conf_read_simple (name,S_DEF_USER )) +if (conf_read_simple (name,S_DEF_USER )) { +sym_calc_value (modules_sym);return 1 ; + } + +sym_calc_value (modules_sym); for_all_symbols(i, sym) {sym_calc_value (sym);
@@ -846,6 +852,7 @@ static int conf_split_config(void) name =conf_get_autoconfig_name ();conf_read_simple (name,S_DEF_AUTO ); +sym_calc_value (modules_sym); opwd =malloc (256 ); _name =strdup (name);
@@ -1149,7 +1156,7 @@ void set_all_choice_values(struct symbol *csym)bool conf_set_all_new_symbols (enum conf_def_mode mode) {struct symbol *sym, *csym; -int i, cnt, pby, pty, ptm;/* pby: probability of boolean = y +int i, cnt, pby, pty, ptm;/* pby: probability of bool = y * pty: probability of tristate = y * ptm: probability of tristate = m */
@@ -1211,7 +1218,10 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode) sym->def[S_DEF_USER ].tri = mod;break ;case def_no: - sym->def[S_DEF_USER ].tri = no; +if (sym->flags &SYMBOL_ALLNOCONFIG_Y ) + sym->def[S_DEF_USER ].tri = yes; +else + sym->def[S_DEF_USER ].tri = no;break ;case def_random: sym->def[S_DEF_USER ].tri = no;
support/kconfig/expr.c +308 -171
668 lines not on this page · raw message
support/kconfig/expr.h +99 -8
185 lines not on this page · raw message
support/kconfig/gconf.c +6 -27
@@ -169,14 +169,6 @@ void init_main_window(const gchar * glade_file) style =gtk_widget_get_style (main_wnd); widget =glade_xml_get_widget (xml,"toolbar1" ); -#if 0 /* Use stock Gtk icons instead */ -replace_button_icon (xml, main_wnd->window, style, -"button1" , (gchar **) xpm_back); -replace_button_icon (xml, main_wnd->window, style, -"button2" , (gchar **) xpm_load); -replace_button_icon (xml, main_wnd->window, style, -"button3" , (gchar **) xpm_save); -#endif replace_button_icon (xml, main_wnd->window, style,"button4" , (gchar **) xpm_single_view); replace_button_icon(xml, main_wnd->window, style,
@@ -184,22 +176,6 @@ void init_main_window(const gchar * glade_file)replace_button_icon (xml, main_wnd->window, style,"button6" , (gchar **) xpm_tree_view); -#if 0 -switch (view_mode) { -case SINGLE_VIEW : - widget =glade_xml_get_widget (xml,"button4" ); -g_signal_emit_by_name (widget,"clicked" ); -break ; -case SPLIT_VIEW : - widget =glade_xml_get_widget (xml,"button5" ); -g_signal_emit_by_name (widget,"clicked" ); -break ; -case FULL_VIEW : - widget =glade_xml_get_widget (xml,"button6" ); -g_signal_emit_by_name (widget,"clicked" ); -break ; - } -#endif txtbuf =gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_w)); tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1", "foreground", "red",
@@ -938,7 +914,7 @@ on_treeview2_button_press_event(GtkWidget * widget, current = menu;display_tree_part ();gtk_widget_set_sensitive (back_btn, TRUE); - }else if ((col ==COL_OPTION )) { + }else if (col ==COL_OPTION ) {toggle_sym_value (menu);gtk_tree_view_expand_row (view, path, TRUE); }
@@ -1404,7 +1380,7 @@ static void display_tree(struct menu *menu) && (tree == tree2))continue ;/* -if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) +if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) || (view_mode == FULL_VIEW) || (view_mode == SPLIT_VIEW))*/
@@ -1498,9 +1474,12 @@ int main(int ac, char *av[])case 'a' ://showAll = 1; break ; +case 's' : +conf_set_message_callback (NULL ); +break ;case 'h' :case '?' : -printf ("%s <config>\n" , av[0 ]); +printf ("%s [-s] <config>\n" , av[0 ]);exit (0 ); } name = av[2 ];
support/kconfig/kconf_id.c new file +53 -0
53 lines not on this page · raw message
support/kconfig/kxgettext.c +1 -1
@@ -101,7 +101,7 @@ static struct message *message__new(const char *msg, char *option,if (self->files ==NULL ) goto out_fail; - self->msg =strdup (msg); + self->msg =xstrdup (msg);if (self->msg ==NULL ) goto out_fail_msg;
support/kconfig/list.h +4 -3
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef LIST_H #define LIST_H
@@ -34,7 +35,7 @@ struct list_head {* list_entry - get the struct for this entry * @ptr: the &struct list_head pointer. * @type: the type of the struct this is embedded in. -* @member: the name of the list_struct within the struct. +* @member: the name of the list_head within the struct. */ #define list_entry (ptr, type, member) \ container_of(ptr, type, member)
@@ -43,7 +44,7 @@ struct list_head {* list_for_each_entry - iterate over list of given type * @pos: the type * to use as a loop cursor. * @head: the head for your list. -* @member: the name of the list_struct within the struct. +* @member: the name of the list_head within the struct. */ #define list_for_each_entry (pos, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member); \
@@ -55,7 +56,7 @@ struct list_head {* @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. -* @member: the name of the list_struct within the struct. +* @member: the name of the list_head within the struct. */ #define list_for_each_entry_safe (pos, n, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member), \
support/kconfig/lkc.h +5 -16
@@ -21,9 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c;extern "C" {#endif -#define P (name,type,arg) extern type name arg#include "lkc_proto.h" -#undef P#define SRCTREE "srctree"
@@ -61,17 +59,16 @@ enum conf_def_mode {#define T_OPT_MODULES 1#define T_OPT_DEFCONFIG_LIST 2#define T_OPT_ENV 3 +#define T_OPT_ALLNOCONFIG_Y 4struct kconf_id { -int name; +const char *name;int token;unsigned int flags;enum symbol_type stype; }; -extern int zconfdebug; - -int zconfparse (void ); +extern int yylineno;void zconfdump (FILE *out);void zconf_starthelp (void );FILE *zconf_fopen (const char *name);
@@ -89,11 +86,6 @@ void sym_add_change_count(int count);bool conf_set_all_new_symbols (enum conf_def_mode mode);void set_all_choice_values (struct symbol *csym); -struct conf_printer { -void (*print_symbol)(FILE *,struct symbol *,const char *,void *); -void (*print_comment)(FILE *,const char *,void *); -}; -/* confdata.c and expr.c */ static inline void xfwrite (const void *str,size_t len,size_t count,FILE *out) {
@@ -109,10 +101,8 @@ 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); -void menu_end_entry (void );void menu_add_dep (struct expr *dep);void menu_add_visibility (struct expr *dep); -struct property *menu_add_prop (enum prop_type type,char *prompt,struct expr *expr,struct expr *dep);struct property *menu_add_prompt (enum prop_type type,char *prompt,struct expr *dep);void menu_add_expr (enum prop_type type,struct expr *expr,struct expr *dep);void menu_add_symbol (enum prop_type type,struct symbol *sym,struct expr *dep);
@@ -125,6 +115,8 @@ struct file *file_lookup(const char *name);int file_write_dep (const char *name);void *xmalloc (size_t size);void *xcalloc (size_t nmemb,size_t size); +void *xrealloc (void *p,size_t size); +char *xstrdup (const char *s);struct gstr {size_t len;
@@ -136,7 +128,6 @@ struct gstr {int max_width; };struct gstr str_new (void ); -struct gstr str_assign (const char *s);void str_free (struct gstr *gs);void str_append (struct gstr *gs,const char *s);void str_printf (struct gstr *gs,const char *fmt, ...);
@@ -147,8 +138,6 @@ extern struct expr *sym_env_list;void sym_init (void );void sym_clear_all_valid (void ); -void sym_set_all_changed (void ); -void sym_set_changed (struct symbol *sym);struct symbol *sym_choice_default (struct symbol *sym);const char *sym_get_string_default (struct symbol *sym);struct symbol *sym_check_deps (struct symbol *sym);
support/kconfig/lkc_proto.h +41 -45
98 lines not on this page · raw message
support/kconfig/lxdialog/check-lxdialog.sh +3 -1
@@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0 # Check ncurses compatibility # What library to link
@@ -54,7 +55,8 @@ EOF 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 " *** Install ncurses (ncurses-devel or libncurses-dev " 1>&2 + echo " *** depending on your distribution) and try again." 1>&2 echo " *** " 1>&2 exit 1 fi
support/kconfig/lxdialog/checklist.c +2 -2
@@ -168,13 +168,13 @@ do_resize:/* create new window for the list */ list =subwin (dialog, list_height, list_width, y + box_y +1 , - x + box_x +1 ); + x + box_x +1 );keypad (list, TRUE);/* draw a box around the list items */ draw_box (dialog, box_y, box_x, list_height +2 , list_width +2 , - dlg.menubox_border.atr, dlg.menubox.atr); + dlg.menubox_border.atr, dlg.menubox.atr);/* Find length of longest item in order to center checklist */ check_x =0 ;
support/kconfig/lxdialog/dialog.h +1 -1
@@ -170,7 +170,7 @@ char item_tag(void);/* item list manipulation for lxdialog use */ #define MAXITEMSTR 200struct dialog_item { -char str[MAXITEMSTR ];/* promtp displayed */ +char str[MAXITEMSTR ];/* prompt displayed */ char tag;void *data;/* pointer to menu item - used by menubox+checklist */ int selected;/* Set to 1 by dialog_*() function if selected. */
support/kconfig/lxdialog/inputbox.c +1 -1
@@ -42,7 +42,7 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)* Display a dialog box for inputing a string */ int dialog_inputbox (const char *title,const char *prompt,int height,int width, -const char *init) +const char *init) {int i, x, y, box_y, box_x, box_width;int input_x =0 , key =0 , button =-1 ;
support/kconfig/lxdialog/menubox.c +2 -2
@@ -64,7 +64,7 @@ static int menu_width, item_x;* Print menu item */ static void do_print_item (WINDOW * win,const char *item,int line_y, -int selected,int hotkey) +int selected,int hotkey) {int j;char *menu_item =malloc (menu_width +1 );
@@ -182,7 +182,7 @@ static void do_scroll(WINDOW *win, int *scroll, int n)* Display a menu for choosing among a number of options */ int dialog_menu (const char *title,const char *prompt, -const void *selected,int *s_scroll) +const void *selected,int *s_scroll) {int i, j, x, y, box_x, box_y;int height, width, menu_height;
support/kconfig/lxdialog/util.c +1 -1
@@ -623,7 +623,7 @@ void item_make(const char *fmt, ...)void item_add_str (const char *fmt, ...) {va_list ap; -size_t avail; +size_t avail; avail =sizeof (item_cur->node.str) -strlen (item_cur->node.str);
support/kconfig/mconf.c +25 -15
@@ -246,7 +246,7 @@ search_help[] = N_(" Selected by: BAR [=n]\n" "-----------------------------------------------------------------\n" "o The line 'Type:' shows the type of the configuration option for\n" -" this symbol (boolean, tristate, string, ...)\n" +" this symbol (bool, tristate, string, ...)\n" "o The line 'Prompt:' shows the text used in the menu structure for\n" " this symbol\n" "o The 'Defined at' line tells at what file / line number the symbol\n"
@@ -279,6 +279,7 @@ static int child_count;static int single_menu_mode;static int show_all_options;static int save_and_exit; +static int silent;static void conf (struct menu *menu,struct menu *active_menu);static void conf_choice (struct menu *menu);
@@ -299,7 +300,7 @@ static void set_config_filename(const char *config_filename)int size; size =snprintf (menu_backtitle,sizeof (menu_backtitle), -"%s - %s" , config_filename, rootmenu.prompt->text); +"%s - %s" , config_filename, rootmenu.prompt->text);if (size >=sizeof (menu_backtitle)) menu_backtitle[sizeof (menu_backtitle)-1 ] ='\0' ;set_dialog_backtitle (menu_backtitle);
@@ -330,10 +331,10 @@ static void set_subtitle(void)list_for_each_entry (sp, &trail, entries) {if (sp->text) {if (pos) { - pos->next =xcalloc (sizeof (*pos),1 ); + pos->next =xcalloc (1 ,sizeof (*pos)); pos = pos->next; }else { - subtitles = pos =xcalloc (sizeof (*pos),1 ); + subtitles = pos =xcalloc (1 ,sizeof (*pos)); } pos->text = sp->text; }
@@ -777,10 +778,12 @@ static void conf_message_callback(const char *fmt, va_list ap)char buf[PATH_MAX +1 ];vsnprintf (buf,sizeof (buf), fmt, ap); -if (save_and_exit) -printf ("%s" , buf); -else +if (save_and_exit) { +if (!silent) +printf ("%s" , buf); + }else {show_textbox (NULL , buf,6 ,60 ); + } }static void show_help (struct menu *menu)
@@ -977,16 +980,18 @@ static int handle_exit(void) }/* fall through */ case -1 : -printf (_ ("\n\n" -"*** End of the configuration.\n" -"*** Execute 'make' to start the build or try 'make help'." -"\n\n" )); +if (!silent) +printf (_ ("\n\n" +"*** End of the configuration.\n" +"*** Execute 'make' to start the build or try 'make help'." +"\n\n" )); res =0 ;break ;default : -fprintf (stderr,_ ("\n\n" -"Your configuration changes were NOT saved." -"\n\n" )); +if (!silent) +fprintf (stderr,_ ("\n\n" +"Your configuration changes were NOT saved." +"\n\n" ));if (res !=KEY_ESC ) res =0 ; }
@@ -1010,6 +1015,12 @@ int main(int ac, char **av)signal (SIGINT , sig_handler); +if (ac >1 &&strcmp (av[1 ],"-s" ) ==0 ) { + silent =1 ; +/* Silence conf_read() until the real callback is set up */ +conf_set_message_callback (NULL ); + av++; + }conf_parse (av[1 ]);conf_read (NULL );
@@ -1034,4 +1045,3 @@ int main(int ac, char **av)return res; } -
support/kconfig/menu.c +220 -41
452 lines not on this page · raw message
support/kconfig/merge_config.sh +38 -24
125 lines not on this page · raw message
support/kconfig/nconf.c +13 -7
@@ -5,7 +5,9 @@* Derived from menuconfig. * */ +#ifndef _GNU_SOURCE#define _GNU_SOURCE +#endif #include <string.h> #include <stdlib.h>
@@ -269,7 +271,7 @@ static struct mitem k_menu_items[MAX_MENU_ITEMS];static int items_num;static int global_exit;/* the currently selected button */ -const char *current_instructions = menu_instructions; +static const char *current_instructions = menu_instructions;static char *dialog_input_result;static int dialog_input_result_len;
@@ -303,7 +305,7 @@ struct function_keys { };static const int function_keys_num =9 ; -struct function_keys function_keys[] = { +static struct function_keys function_keys[] = { { .key_str ="F1" , .func ="Help" ,
@@ -506,7 +508,7 @@ static int get_mext_match(const char *match_str, match_f flag) index = (index + items_num) % items_num;while (true) {char *str = k_menu_items[index].str; -if (strcasestr (str, match_str) !=0 ) +if (strcasestr (str, match_str) !=NULL )return index;if (flag ==FIND_NEXT_MATCH_UP || flag ==MATCH_TINKER_PATTERN_UP )
@@ -1065,7 +1067,7 @@ static int do_match(int key, struct match_state *state, int *ans)static void conf (struct menu *menu) { -struct menu *submenu =0 ; +struct menu *submenu =NULL ;const char *prompt =menu_get_prompt (menu);struct symbol *sym;int res;
@@ -1232,7 +1234,7 @@ static void show_help(struct menu *menu)static void conf_choice (struct menu *menu) {const char *prompt =_ (menu_get_prompt (menu)); -struct menu *child =0 ; +struct menu *child =NULL ;struct symbol *active;int selected_index =0 ;int last_top_row =0 ;
@@ -1454,7 +1456,7 @@ static void conf_save(void) } } -void setup_windows (void ) +static void setup_windows (void ) {int lines, columns;
@@ -1482,6 +1484,11 @@ int main(int ac, char **av)bindtextdomain (PACKAGE ,LOCALEDIR );textdomain (PACKAGE ); +if (ac >1 &&strcmp (av[1 ],"-s" ) ==0 ) { +/* Silence conf_read() until the real callback is set up */ +conf_set_message_callback (NULL ); + av++; + }conf_parse (av[1 ]);conf_read (NULL );
@@ -1554,4 +1561,3 @@ int main(int ac, char **av)endwin ();return 0 ; } -
support/kconfig/nconf.gui.c +15 -7
@@ -6,6 +6,7 @@* */ #include "nconf.h" +#include "lkc.h" /* a list of all the different widgets we use */ attributes_t attributes[ATTR_MAX +1 ] = {0 };
@@ -129,7 +130,7 @@ static void no_colors_theme(void)mkattrn (FUNCTION_TEXT ,A_REVERSE ); } -void set_colors () +void set_colors (void ) {start_color ();use_default_colors ();
@@ -192,7 +193,7 @@ const char *get_line(const char *text, int line_no)int lines =0 ;if (!text) -return 0 ; +return NULL ;for (i =0 ; text[i] !='\0' && lines < line_no; i++)if (text[i] =='\n' )
@@ -364,15 +365,17 @@ int dialog_inputbox(WINDOW *main_window,WINDOW *prompt_win;WINDOW *form_win;PANEL *panel; -int i, x, y; +int i, x, y, lines, columns, win_lines, win_cols;int res =-1 ;int cursor_position =strlen (init);int cursor_form_win;char *result = *resultp; +getmaxyx (stdscr, lines, columns); +if (strlen (init)+1 > *result_len) { *result_len =strlen (init)+1 ; - *resultp = result =realloc (result, *result_len); + *resultp = result =xrealloc (result, *result_len); }/* find the widest line of msg: */
@@ -386,14 +389,19 @@ int dialog_inputbox(WINDOW *main_window,if (title) prompt_width =max (prompt_width,strlen (title)); + win_lines =min (prompt_lines+6 , lines-2 ); + win_cols =min (prompt_width+7 , columns-2 ); + prompt_lines =max (win_lines-6 ,0 ); + prompt_width =max (win_cols-7 ,0 ); +/* place dialog in middle of screen */ - y = (getmaxy (stdscr)-(prompt_lines+4 ))/2 ; - x = (getmaxx (stdscr)-(prompt_width+4 ))/2 ; + y = (lines-win_lines)/2 ; + x = (columns-win_cols)/2 ;strncpy (result, init, *result_len);/* create the windows */ - win =newwin (prompt_lines+6 , prompt_width+7 , y, x); + win =newwin (win_lines, win_cols, y, x); prompt_win =derwin (win, prompt_lines+1 , prompt_width,2 ,2 ); form_win =derwin (win,1 , prompt_width, prompt_lines+3 ,2 );keypad (form_win, TRUE);
support/kconfig/nconf.h +1 -3
@@ -15,7 +15,7 @@#include <string.h> #include <unistd.h> #include <locale.h> -#include <curses.h> +#include <ncurses.h> #include <menu.h> #include <panel.h> #include <form.h>
@@ -24,8 +24,6 @@#include <time.h> #include <sys/time.h> -#include "ncurses.h" -#define max (a, b) ({\ typeof(a) _a = a;\ typeof(b) _b = b;\
support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch +33 -33
83 lines not on this page · raw message
support/kconfig/patches/06-br-build-system-integration.patch +29 -27
56 lines not on this page · raw message
support/kconfig/patches/10-br-build-system.patch +4 -4
Lines of this file are not shown. View the raw message.
support/kconfig/patches/11-use-mktemp-for-lxdialog.patch +4 -4
Lines of this file are not shown. View the raw message.
support/kconfig/patches/12-fix-glade-file-path.patch +4 -4
Lines of this file are not shown. View the raw message.
support/kconfig/patches/14-support-out-of-tree-config.patch +21 -21
42 lines not on this page · raw message
support/kconfig/patches/15-fix-qconf-moc-rule.patch deleted +0 -24
Lines of this file are not shown. View the raw message.
support/kconfig/patches/16-fix-space-to-de-select-options.patch +4 -4
Lines of this file are not shown. View the raw message.
support/kconfig/patches/17-backport-kecho.patch new file +26 -0
Lines of this file are not shown. View the raw message.
support/kconfig/patches/17-kconfig-lxdialog-get-ncurses-CFLAGS-with-pkg-config.patch deleted +0 -50
50 lines not on this page · raw message
support/kconfig/patches/18-kconfig-nconfig-fix-multi-byte-UTF-handling.patch deleted +0 -45
45 lines not on this page · raw message
support/kconfig/qconf.cc +396 -312
708 lines not on this page · raw message
support/kconfig/qconf.h +71 -79
150 lines not on this page · raw message
support/kconfig/streamline_config.pl +50 -8
58 lines not on this page · raw message
support/kconfig/symbol.c +113 -54
167 lines not on this page · raw message
support/kconfig/zconf.gperf deleted +0 -47
47 lines not on this page · raw message
support/kconfig/zconf.hash.c_shipped deleted +0 -286
286 lines not on this page · raw message
support/kconfig/zconf.l +56 -47
103 lines not on this page · raw message
support/kconfig/zconf.lex.c_shipped +608 -528
1,136 lines not on this page · raw message
support/kconfig/zconf.tab.c_shipped +853 -903
1,756 lines not on this page · raw message
support/kconfig/zconf.y +99 -50
149 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.16.3
Part of the diff is not shown here. View the raw message.
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Hello Petr,
Thanks for looking at the kconfig code update.
Quoted 21 lines · Petr Vorel
This kernel commit required to rename target in
Makefile:911a91c39cabkconfig: rename silentoldconfig to syncconfigDifferences from upstrem (kernel):
* Tests are not included. IMHO we don't need them.
* kernel added new tool requirement: flex & bison, added in commit29c833061c1dkconfig: generate lexer and parser during build instead of shipping but atm we still use generated files (zconf.lex.c_shipped and zconf.tab.c_shipped).User visible changes (incomplete list):
* make "Selected by:" and "Implied by:" readable:d9119b5925a0kconfig: Print reverse dependencies in groups9a47ceec543bkconfig: clean-up reverse dependency help implementation1ccb27143360kconfig: make "Selected by:" and "Implied by:" readableOld version of help:
Symbol:BR2_ARCH_HAS_MMU_MANDATORY[=y]
Type : boolean
Defined atarch/Config.in:12
Selected by:BR2_arcle[=n] && <choice> ||BR2_arceb[=n] && <choice> ||BR2_aarch64[=n] && <choice> ||BR2_aarch64_be[=n] && <choice> ||BR2_csky[=n] && <choice> ...
Quoted 11 lines
New version of help:
Symbol:BR2_ARCH_HAS_MMU_MANDATORY[=y]
Type : bool
Defined atarch/Config.in:12
Selected by [y]:
-BR2_x86_64[=y] && <choice>
Selected by [n]:
-BR2_arcle[=n] && <choice>
-BR2_arceb[=n] && <choice>
-BR2_aarch64[=n] && <choice>
-BR2_aarch64_be[=n] && <choice>
This change is really great!
Quoted 6 lines
*
2c37e08464a8kconfig: Warn if choice default is not in choice toolchain/toolchain-buildroot/Config.in:25:warning: choice default symbol 'BR2_TOOLCHAIN_UCLIBC' is not contained in the choice package/libmediaart/Config.in:21:warning: choice default symbol 'BR2_PACKAGE_LIBMEDIAART_BACKEND_NONE' is not contained in the choice
NOTE: fixes for these errors has already been posted to ML.Signed-off-by Petr Vorel <[email protected]>
I tested this here, but unfortunately "make menuconfig" fails, because it wants <glade/glade.h>, which it shouldn't need as I don't want the Gtk-based gconfig. Here is what happens:
thomas at windsurf:~/projets/buildroot (next)$ make menuconfig
mkdir -p /home/thomas/projets/buildroot/output/build/buildroot-config/lxdialog PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
obj=/home/thomas/projets/buildroot/output/build/buildroot-config -C support/kconfig -f Makefile.br mconf
/usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/thomas/projets/buildroot/output/build/buildroot-config -DCONFIG_=\"\" -MM *.c > /home/thomas/projets/buildroot/output/build/buildroot-config/.depend 2>/dev/null || : /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/thomas/projets/buildroot/output/build/buildroot-config -DCONFIG_=\"\" -c conf.c -o /home/thomas/projets/buildroot/output/build/buildroot-config/conf.o /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/thomas/projets/buildroot/output/build/buildroot-config -DCONFIG_=\"\" `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` -Wno-missing-prototypes -c gconf.c -o /home/thomas/projets/buildroot/output/build/buildroot-config/gconf.o
Package libglade-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libglade-2.0.pc' to the PKG_CONFIG_PATH environment variable
Package 'libglade-2.0', required by 'virtual:world', not found gconf.c:17:10: fatal error: glade/glade.h: No such file or directory
#include <glade/glade.h>
^~~~~~~~~~~~~~~compilation terminated.
make[2]: *** [Makefile.br:34: /home/thomas/projets/buildroot/output/build/buildroot-config/gconf.o] Error 1 make[1]: *** [Makefile:876: /home/thomas/projets/buildroot/output/build/buildroot-config/mconf] Error 2
make: *** [Makefile:79: _all] Error 2
I did not investigate at all, just observed that it didn't work.
Quoted 7 lines
Changes
v1->v2:
* Fix building packages (v1 didn't address change in kernel911a91c39cabkconfig: rename silentoldconfig to syncconfig)NOTE: I think I should stop using *shipped files (zconf.hash.c_shipped and zconf.lex.c_shipped), to have the same behavior as kernel. What do you think?
If we were to drop the *shipped files, it means we would have to build host-flex and host-bison prior to running any "make *config" command. This would be really annoying. Alternatively, we could decide to make "flex" and "bison" mandatory dependencies of Buildroot, and rely on the user to install them on the system rather than building them ourselves. The drawback of this is that we would no longer control which version of flex/bison gets used.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Hello Thomas,
Quoted 3 lines
Hello Petr,
Thanks for looking at the kconfig code update.
Thanks for your review!
Quoted 16 lines
I tested this here, but unfortunately "make menuconfig" fails, because it wants <
glade/glade.h>, which it shouldn't need as I don't want the Gtk-based gconfig. Here is what happens:thomas at windsurf:~/projets/buildroot (next)$ make menuconfig
mkdir -p/home/thomas/projets/buildroot/output/build/buildroot-config/lxdialogPKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
obj=/home/thomas/projets/buildroot/output/build/buildroot-config -C support/kconfig -f Makefile.br mconf/usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/thomas/projets/buildroot/output/build/buildroot-config -DCONFIG_=\"\" -MM *.c > /home/thomas/projets/buildroot/output/build/buildroot-config/.depend 2>/dev/null || : /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/thomas/projets/buildroot/output/build/buildroot-config -DCONFIG_=\"\" -c conf.c -o /home/thomas/projets/buildroot/output/build/buildroot-config/conf.o /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/thomas/projets/buildroot/output/build/buildroot-config -DCONFIG_=\"\" `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` -Wno-missing-prototypes -c gconf.c -o /home/thomas/projets/buildroot/output/build/buildroot-config/gconf.oPackage libglade-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libglade-2.0.pc' to the
PKG_CONFIG_PATHenvironment variable
Package 'libglade-2.0', required by 'virtual:world', not found gconf.c:17:10: fatal error:glade/glade.h: No such file or directory
Quoted 8 lines
#include <glade/glade.h> ^~~~~~~~~~~~~~~compilation terminated.
make[2]: *** [Makefile.br:34:/home/thomas/projets/buildroot/output/build/buildroot-config/gconf.o] Error 1 make[1]: *** [Makefile:876:/home/thomas/projets/buildroot/output/build/buildroot-config/mconf] Error 2
make: *** [Makefile:79:_all] Error 2I did not investigate at all, just observed that it didn't work.
Thanks for a bugreport, I'll fix it in v3.
Quoted 8 lines
Quoted 7 lines
Changes
v1->v2:
* Fix building packages (v1 didn't address change in kernel911a91c39cabkconfig: rename silentoldconfig to syncconfig)NOTE: I think I should stop using *shipped files (zconf.hash.c_shipped and zconf.lex.c_shipped), to have the same behavior as kernel. What do you think?
Quoted 7 lines
If we were to drop the *shipped files, it means we would have to build host-flex and host-bison prior to running any "make *config" command. This would be really annoying. Alternatively, we could decide to make "flex" and "bison" mandatory dependencies of Buildroot, and rely on the user to install them on the system rather than building them ourselves. The drawback of this is that we would no longer control which version of flex/bison gets used.
Lets keep *shipped files for now.
We can always change it later.
Quoted 3 lines
Best regards,
Thomas
Kind regards,
Petr
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
In reply to Thomas PetazzoniThomas, All,
On 2018-05-19 23:03 +0200, Thomas Petazzoni spake thusly:
Quoted 3 lines
If we were to drop the *shipped files, it means we would have to build host-flex and host-bison prior to running any "make *config" command. This would be really annoying.
And would requier quite a rework of the main Makefile, since we do not include that pcakge .mk files until we do have a .coinfig file. So currently, we can't have host-{flex,bison} before we have a .config.
Regards,
Yann E. MORIN.
Quoted 13 lines
Alternatively, we could decide to make
"flex" and "bison" mandatory dependencies of Buildroot, and rely on the user to install them on the system rather than building them ourselves. The drawback of this is that we would no longer control which version of flex/bison gets used.Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Hi Yann,
Quoted 10 lines
Thomas, All,
On 2018-05-19 23:03 +0200, Thomas Petazzoni spake thusly:
Quoted 3 lines
If we were to drop the *shipped files, it means we would have to build host-flex and host-bison prior to running any "make *config" command. This would be really annoying.
And would requier quite a rework of the main
Makefile, since we do not include that pcakge .mk files until we do have a .coinfig file. So currently, we can't have host-{flex,bison} before we have a .config.
Thank you for investigation. IMHO keeping *shipped files is the best option, I'd keep it for a start.
Later we can switch to require flex and bison, as Thomas suggested (works quite well in linux kernel, I suppose it'd be working for Buildroot as well):
Quoted 9 lines
Quoted 5 lines
Alternatively, we could decide to make
"flex" and "bison" mandatory dependencies of Buildroot, and rely on the user to install them on the system rather than building them ourselves. The drawback of this is that we would no longer control which version of flex/bison gets used.Regards,
Yann E. MORIN.
Kind regards,
Petr
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Petr, all,
On 2018-05-20 16:31 +0200, Petr Vorel spake thusly:
Quoted 10 lines
Quoted 8 lines
On 2018-05-19 23:03 +0200, Thomas Petazzoni spake thusly:
Quoted 3 lines
If we were to drop the *shipped files, it means we would have to build host-flex and host-bison prior to running any "make *config" command. This would be really annoying.
And would requier quite a rework of the main
Makefile, since we do not include that pcakge .mk files until we do have a .coinfig file. So currently, we can't have host-{flex,bison} before we have a .config.Thank you for investigation. IMHO keeping *shipped files is the best option, I'd keep it for a start.
Agreed.
Quoted 7 lines
Later we can switch to require flex and bison, as Thomas suggested (works quite well in linux kernel, I suppose it'd be working for Buildroot as well):
Quoted 5 lines
Quoted 5 lines
Alternatively, we could decide to make
"flex" and "bison" mandatory dependencies of Buildroot, and rely on the user to install them on the system rather than building them ourselves. The drawback of this is that we would no longer control which version of flex/bison gets used.
I initially did not reply further to this part, becuase I seem to remember that there was a change in behavious with certain versions of flex/bison, that made the output change drastically, and I was afraid we could be bitten by this...
But in the end, this is not a problem, because we would not care to mix-n-match files built with different versions of said tools, as they would be those from the distro, always, and never those we ship, since we would no longer ship them.
And eventually, I now remember that the issue was with gperf changing its API (a function prototype changed), and that was causing pain. But now, kconfig no longer uses gperf to start with, so no incompatibility anymore anyway.
Which would allow us to drop the dependency of linux on host-{flex,bison} that we had to add recently.
But this is definitely for later.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Hello,
Quoted 10 lines · Yann E. MORIN
I initially did not reply further to this part, becuase I seem to remember that there was a change in behavious with certain versions of flex/bison, that made the output change drastically, and I was afraid we could be bitten by this...
But in the end, this is not a problem, because we would not care to mix-n-match files built with different versions of said tools, as they would be those from the distro, always, and never those we ship, since we would no longer ship them.
Quoted 7 lines
And eventually, I now remember that the issue was with gperf changing its API (a function prototype changed), and that was causing pain. But now, kconfig no longer uses gperf to start with, so no incompatibility anymore anyway.
Which would allow us to drop the dependency of linux on host-{flex,bison} that we had to add recently.
If we start relying on the system-installed flex and bison, then we should remove host-flex and host-bison entirely, not only for the linux package. The question is whether bison and flex both behave in a reasonably similar way regardless of which version is used.
When I see that even "tar" does not have a sufficiently stable behavior (which forces us to build host-tar), I'm a bit worried about more complex tools such as flex and bison.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Quoted 19 lines · Thomas Petazzoni
Hello,
Quoted 15 lines · Yann E. MORIN
I initially did not reply further to this part, becuase I seem to remember that there was a change in behavious with certain versions of flex/bison, that made the output change drastically, and I was afraid we could be bitten by this...
But in the end, this is not a problem, because we would not care to mix-n-match files built with different versions of said tools, as they would be those from the distro, always, and never those we ship, since we would no longer ship them.
And eventually, I now remember that the issue was with gperf changing its API (a function prototype changed), and that was causing pain. But now, kconfig no longer uses gperf to start with, so no incompatibility anymore anyway.
Quoted 7 lines
Quoted 2 lines
Which would allow us to drop the dependency of linux on host-{flex,bison} that we had to add recently.
If we start relying on the system-installed flex and bison, then we should remove host-flex and host-bison entirely, not only for the linux package. The question is whether bison and flex both behave in a reasonably similar way regardless of which version is used.
I briefly looked at this in Paris, and it became clear very quickly that even a
minor change in the bison version would give a completely different .c file. If this is a source file that will be built for the target, it's going to be a major reproducibility-killer. So I don't think we can remove host-bison and host-flex.
Regards,
Arnout
Quoted 9 lines
When I see that even "tar" does not have a sufficiently stable behavior (which forces us to build host-tar), I'm a bit worried about more complex tools such as flex and bison.
Best regards,
Thomas
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Arnout, Thomas, All,
On 2018-05-22 23:22 +0200, Arnout Vandecappelle spake thusly:
Quoted 28 lines · Thomas Petazzoni
Quoted 19 lines
Hello,
Quoted 15 lines · Yann E. MORIN
I initially did not reply further to this part, becuase I seem to remember that there was a change in behavious with certain versions of flex/bison, that made the output change drastically, and I was afraid we could be bitten by this...
But in the end, this is not a problem, because we would not care to mix-n-match files built with different versions of said tools, as they would be those from the distro, always, and never those we ship, since we would no longer ship them.
And eventually, I now remember that the issue was with gperf changing its API (a function prototype changed), and that was causing pain. But now, kconfig no longer uses gperf to start with, so no incompatibility anymore anyway.
Quoted 7 lines
Quoted 2 lines
Which would allow us to drop the dependency of linux on host-{flex,bison} that we had to add recently.
If we start relying on the system-installed flex and bison, then we should remove host-flex and host-bison entirely, not only for the linux package. The question is whether bison and flex both behave in a reasonably similar way regardless of which version is used.
Quoted 5 lines
I briefly looked at this in Paris, and it became clear very quickly that even a
minor change in the bison version would give a completely different .c file. If this is a source file that will be built for the target, it's going to be a major reproducibility-killer. So I don't think we can remove host-bison and host-flex.
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff. In this case, we don;t care that the user generates C code one way or another: it's only a host tool...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Quoted 4 lines · Yann E. MORIN
Arnout, Thomas, All,
On 2018-05-22 23:22 +0200, Arnout Vandecappelle spake thusly:
Quoted 1 line · Thomas Petazzoni
[snip]
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
If we start relying on the system-installed flex and bison, then we should remove host-flex and host-bison entirely, not only for the linux package. The question is whether bison and flex both behave in a reasonably similar way regardless of which version is used.
I briefly looked at this in Paris, and it became clear very quickly that even a
minor change in the bison version would give a completely different .c file. If this is a source file that will be built for the target, it's going to be a major reproducibility-killer. So I don't think we can remove host-bison and host-flex.
Quoted 3 lines
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff. In this case, we don;t care that the user generates C code one way or another: it's only a host tool...
I was replying to Thomas's "we should remove host-flex and host-bison
entirely". Yes we can rely on system-installed flex and bison for kconfig, but we can't rely on that for target packages, e.g. target dtc.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
On 2018-05-29 12:44 +0200, Arnout Vandecappelle spake thusly:
Quoted 17 lines · Yann E. MORIN
Quoted 4 lines
Arnout, Thomas, All,
On 2018-05-22 23:22 +0200, Arnout Vandecappelle spake thusly:
Quoted 1 line · Thomas Petazzoni
[snip]
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
If we start relying on the system-installed flex and bison, then we should remove host-flex and host-bison entirely, not only for the linux package. The question is whether bison and flex both behave in a reasonably similar way regardless of which version is used.
I briefly looked at this in Paris, and it became clear very quickly that even a
minor change in the bison version would give a completely different .c file. If this is a source file that will be built for the target, it's going to be a major reproducibility-killer. So I don't think we can remove host-bison and host-flex.
Quoted 7 lines
Quoted 3 lines
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff. In this case, we don;t care that the user generates C code one way or another: it's only a host tool...
I was replying to Thomas's "we should remove host-flex and host-bison
entirely". Yes we can rely on system-installed flex and bison for kconfig, but we can't rely on that for target packages, e.g. target dtc.
Mostly agreed. Like, 99.9%.
There are two concerns. Reproducibility and compliance.
IANAL, but the second can be achieved given a specific environment. So, if one would state "build done on distro Foo version Bleh, with this C&CS", this is probably enough for compliance. But IANAL.
The first is more interesting. Again, if the build is attmpted a second time if the same envirnment, then this is reproducible, and probably good enough for an industrial context (where official builds for production are hopefully done in a controlled environment, not on a random machine of a random developper).
In both cases, we would not really care to depend on the distro-provided flex and bison, as long as said distro is properly identified.
Now, if we talk about reproducibility on any host for verifiability, then we indeed absolutely want to keep them. Verifiability also helps with compliance anyway.
And finally, there is a third reason that may be interesting to consider:
bugs in flex or bison, or change of API. I am not aware of such issue, though...
So, in the end, I agree with you that we want to keep our host variants, because it at least helps us for verifiable reproducibility.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
In reply to Arnout VandecappelleHello,
Quoted 7 lines · Arnout Vandecappelle
Quoted 3 lines
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff. In this case, we don;t care that the user generates C code one way or another: it's only a host tool...
I was replying to Thomas's "we should remove host-flex and host-bison
entirely". Yes we can rely on system-installed flex and bison for kconfig, but we can't rely on that for target packages, e.g. target dtc.
Why so ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Quoted 8 lines · Thomas Petazzoni
Hello,
Quoted 4 lines · Arnout Vandecappelle
Quoted 3 lines
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff. In this case, we don;t care that the user generates C code one way or another: it's only a host tool...
Quoted 5 lines
Quoted 3 lines
I was replying to Thomas's "we should remove host-flex and host-bison
entirely". Yes we can rely on system-installed flex and bison for kconfig, but we can't rely on that for target packages, e.g. target dtc.Why so ?
Reproducibility. I tested this for something (I think it was flex, but as usual
I don't remember exactly), and the code generated by my system's flex was wildly different from what was generated by Buildroot's host-flex, even though the versions were pretty close. Unfortunately, I don't remember exactly, but that was my concern.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Hello,
Quoted 8 lines · Arnout Vandecappelle
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff. In this case, we don;t care that the user generates C code one way or another: it's only a host tool...
I was replying to Thomas's "we should remove host-flex and host-bison
entirely". Yes we can rely on system-installed flex and bison for kconfig, but we can't rely on that for target packages, e.g. target dtc.
Quoted 7 lines
Quoted 1 line
Why so ?
Reproducibility. I tested this for something (I think it was flex, but as usual
I don't remember exactly), and the code generated by my system's flex was wildly different from what was generated by Buildroot's host-flex, even though the versions were pretty close. Unfortunately, I don't remember exactly, but that was my concern.
True, but then if we have this reproducibility issue, it also applies to building the kconfig code, no ?
Or do you assume that because kconfig is so widely used, it is tested against lots of bison/flex version, so we don't need to build bison/flex for kconfig, but we should still build it for other packages that need bison/flex, as those ones may be less tested against random versions of flex/bison ? Or because the generated flex/bison code goes into the target, and we ideally want binary-identical results for a given Buildroot configuration ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Quoted 14 lines · Thomas Petazzoni
Hello,
Quoted 10 lines · Arnout Vandecappelle
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff. In this case, we don;t care that the user generates C code one way or another: it's only a host tool...
I was replying to Thomas's "we should remove host-flex and host-bison
entirely". Yes we can rely on system-installed flex and bison for kconfig, but we can't rely on that for target packages, e.g. target dtc.Why so ?
Quoted 8 lines
Quoted 5 lines
Reproducibility. I tested this for something (I think it was flex, but as usual
I don't remember exactly), and the code generated by my system's flex was wildly different from what was generated by Buildroot's host-flex, even though the versions were pretty close. Unfortunately, I don't remember exactly, but that was my concern.True, but then if we have this reproducibility issue, it also applies to building the kconfig code, no ?
kconfig is a host package, (target) dtc is a target package.
The point of reproducibility is that when someone gives me a core dump four
years from now, I can still rebuild the same source and see what that core dump really means, and I can make a patch that just changes one little thing in there without upgrading the world. Since host packages are not deployed, it's not needed to have the same level of reproducibility for them.
Quoted 8 lines
Or do you assume that because kconfig is so widely used, it is tested against lots of bison/flex version, so we don't need to build bison/flex for kconfig, but we should still build it for other packages that need bison/flex, as those ones may be less tested against random versions of flex/bison ? Or because the generated flex/bison code goes into the target, and we ideally want binary-identical results for a given Buildroot configuration ?
It's not just for fully binary identical (i.e. BR2_REPRODUCIBLE).
It's basically for the same reason that we have versioned docker images, to
make sure that we really know what we're building for the target.
I realize now that this rule is not something we've written down anywhere. I
just always assumed that Buildroot tries to make sure that for a given config, whatever your build machine, you generate binaries that will behave the same and will expose the same bugs. If you use a different flex, a bug in the parsing code will manifest differently.
The more I think about it, the more I come to the conclusion that maybe this
rule (which I thought was something that I learned from the Buildroot community, not something I invented myself) is not so useful. Because in practice, the kind of bugs where this is relevant are so sensitive to even tiny changes that changing the generated code is not going to make all that much of a difference.
Regards,
Arnout
Quoted 5 lines
Best regards,
Thomas
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Arnout, Thomas, All,
On 2018-07-31 10:20 +0200, Arnout Vandecappelle spake thusly:
Quoted 21 lines · Thomas Petazzoni
Quoted 11 lines · Arnout Vandecappelle
Quoted 10 lines
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff. In this case, we don;t care that the user generates C code one way or another: it's only a host tool...
I was replying to Thomas's "we should remove host-flex and host-bison
entirely". Yes we can rely on system-installed flex and bison for kconfig, but we can't rely on that for target packages, e.g. target dtc.Why so ?
Quoted 8 lines
Quoted 5 lines
Reproducibility. I tested this for something (I think it was flex, but as usual
I don't remember exactly), and the code generated by my system's flex was wildly different from what was generated by Buildroot's host-flex, even though the versions were pretty close. Unfortunately, I don't remember exactly, but that was my concern.True, but then if we have this reproducibility issue, it also applies to building the kconfig code, no ?
Quoted 7 lines
kconfig is a host package, (target) dtc is a target package.
The point of reproducibility is that when someone gives me a core dump four
years from now, I can still rebuild the same source and see what that core dump really means, and I can make a patch that just changes one little thing in there without upgrading the world. Since host packages are not deployed, it's not needed to have the same level of reproducibility for them.
Agreed.
I.e. we don't care about the reproducibility of the host tools that contaon generated code, like flex / bison.
Even if the generated code changes with different versions of flex and/or bison, the _behaviour_ of that generated code is predictable. It night be less or more optimised in size amd/or speed, but the behaviour is predictable. Which is all we care about for host tools, imho.
See how the kconfig code dropped use of gperf, yet still behaves as previously, with different (less) generated code.
But...
Now that we have the 'sdk' feature, people are going to distribute that, and they will have to come in compliance for this sdk. So they will want the build of the host tools to also be as reproducible as possible.
Amd since we now will have to have the toolchain before we can parse the linux kconfig stuff, building host-flex and host-bison is the least of our speed problems...
So, I'd say we should keep the dependency on host-flex and host-bison for the linux kernel...
Regards,
Yann E. MORIN.
Quoted 42 lines
Quoted 7 lines
Or do you assume that because kconfig is so widely used, it is tested against lots of bison/flex version, so we don't need to build bison/flex for kconfig, but we should still build it for other packages that need bison/flex, as those ones may be less tested against random versions of flex/bison ? Or because the generated flex/bison code goes into the target, and we ideally want binary-identical results for a given Buildroot configuration ?
It's not just for fully binary identical (i.e.
BR2_REPRODUCIBLE).It's basically for the same reason that we have versioned docker images, to
make sure that we really know what we're building for the target.I realize now that this rule is not something we've written down anywhere. I
just always assumed that Buildroot tries to make sure that for a given config, whatever your build machine, you generate binaries that will behave the same and will expose the same bugs. If you use a different flex, a bug in the parsing code will manifest differently.The more I think about it, the more I come to the conclusion that maybe this
rule (which I thought was something that I learned from the Buildroot community, not something I invented myself) is not so useful. Because in practice, the kind of bugs where this is relevant are so sensitive to even tiny changes that changing the generated code is not going to make all that much of a difference.Regards,
ArnoutQuoted 5 lines
Best regards,
Thomas
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Thomas, Arnout, All,
On 2018-08-01 21:42 +0200, Yann E. MORIN spake thusly:
Quoted 5 lines
On 2018-07-31 10:20 +0200, Arnout Vandecappelle spake thusly:
Quoted 4 lines · Thomas Petazzoni
Quoted 3 lines · Arnout Vandecappelle
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff.
And currently, even though we have dependencies on host-flex and host-bison, we are broke.
$ make distclean
$ make menuconfig
--> enable the linux kernel, choose a defconfig, save, exit
$ make linux-menuconfig
[...]
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
/bin/sh: bison: command not found
LEX scripts/kconfig/zconf.lex.c
scripts/Makefile.lib:196: recipe for target 'scripts/kconfig/zconf.tab.c' failed
make[3]: *** [scripts/kconfig/zconf.tab.c] Error 127
make[3]: *** Waiting for unfinished jobs....
/bin/sh: flex: command not found
scripts/Makefile.lib:188: recipe for target 'scripts/kconfig/zconf.lex.c' failed
make[3]: *** [scripts/kconfig/zconf.lex.c] Error 127
Makefile:528: recipe for target 'rpc_defconfig' failed
make[2]: *** [rpc_defconfig] Error 2
linux/linux.mk:511: recipe for target '/home/ymorin/dev/buildroot/buildroot/output/build/linux-4.17.11/.config' failed
make[1]: *** [/home/ymorin/dev/buildroot/buildroot/output/build/linux-4.17.11/.config] Error 2
Makefile:79: recipe for target '_all' failed
make: *** [_all] Error 2So we already need to add dependencies for the kconfig step...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
In reply to Yann E. MORINQuoted 43 lines · Yann E. MORIN
Arnout, Thomas, All,
On 2018-07-31 10:20 +0200, Arnout Vandecappelle spake thusly:
Quoted 21 lines · Thomas Petazzoni
Quoted 11 lines · Arnout Vandecappelle
Quoted 10 lines
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
We're only talking about dropping the need for host-flex and host-bison for the kconfig stuff. In this case, we don;t care that the user generates C code one way or another: it's only a host tool...
I was replying to Thomas's "we should remove host-flex and host-bison
entirely". Yes we can rely on system-installed flex and bison for kconfig, but we can't rely on that for target packages, e.g. target dtc.Why so ?
Quoted 8 lines
Quoted 5 lines
Reproducibility. I tested this for something (I think it was flex, but as usual
I don't remember exactly), and the code generated by my system's flex was wildly different from what was generated by Buildroot's host-flex, even though the versions were pretty close. Unfortunately, I don't remember exactly, but that was my concern.True, but then if we have this reproducibility issue, it also applies to building the kconfig code, no ?
Quoted 7 lines
kconfig is a host package, (target) dtc is a target package.
The point of reproducibility is that when someone gives me a core dump four
years from now, I can still rebuild the same source and see what that core dump really means, and I can make a patch that just changes one little thing in there without upgrading the world. Since host packages are not deployed, it's not needed to have the same level of reproducibility for them.Agreed.
I.e. we don't care about the reproducibility of the host tools that contaon generated code, like flex / bison.
Even if the generated code changes with different versions of flex and/or bison, the _behaviour_ of that generated code is predictable. It night be less or more optimised in size amd/or speed, but the behaviour is predictable. Which is all we care about for host tools, imho.
Quoted 8 lines
See how the kconfig code dropped use of gperf, yet still behaves as previously, with different (less) generated code.
But...
Now that we have the 'sdk' feature, people are going to distribute that, and they will have to come in compliance for this sdk. So they will want the build of the host tools to also be as reproducible as possible.
I don't see the reasoning behind this statement. For GPL compliance,
reproducibility is definitely not an issue, otherwise every GPL binary distributed in the last 30 years would be in violation...
Quoted 3 lines
Amd since we now will have to have the toolchain before we can parse the linux kconfig stuff, building host-flex and host-bison is the least of our speed problems...
It is a big speed problem if you're using an external toolchain and you could
use the system flex and bison. This thread (long ago, in a galaxy far away) was about requiring flex and bison to be installed on the system, because Buildroot's own kconfig would also no longer ship the generated files. The general agreement was that that would be OK, and we could remove host-flex and host-bison entirely (speeding up the build for a bunch of other packages).
My statement was (and still is): drop host-flex and host-bison for building
host tools, but keep them for building target binaries (in casu, dtc).
Thomas (if I understand correctly) is questioning the need for keeping
host-flex and host-bison even for building the target binaries. And I have to agree that the need for host-flex and host-bison for target binaries is not that strong.
Quoted 2 lines
So, I'd say we should keep the dependency on host-flex and host-bison for the linux kernel...
I would really prefer to not double the build time of a simple kernel...
Regards,
Arnout
Quoted 47 lines
Regards,
Yann E. MORIN.Quoted 42 lines
Quoted 7 lines
Or do you assume that because kconfig is so widely used, it is tested against lots of bison/flex version, so we don't need to build bison/flex for kconfig, but we should still build it for other packages that need bison/flex, as those ones may be less tested against random versions of flex/bison ? Or because the generated flex/bison code goes into the target, and we ideally want binary-identical results for a given Buildroot configuration ?
It's not just for fully binary identical (i.e.
BR2_REPRODUCIBLE).It's basically for the same reason that we have versioned docker images, to
make sure that we really know what we're building for the target.I realize now that this rule is not something we've written down anywhere. I
just always assumed that Buildroot tries to make sure that for a given config, whatever your build machine, you generate binaries that will behave the same and will expose the same bugs. If you use a different flex, a bug in the parsing code will manifest differently.The more I think about it, the more I come to the conclusion that maybe this
rule (which I thought was something that I learned from the Buildroot community, not something I invented myself) is not so useful. Because in practice, the kind of bugs where this is relevant are so sensitive to even tiny changes that changing the generated code is not going to make all that much of a difference.Regards,
ArnoutQuoted 5 lines
Best regards,
Thomas
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Arnout, All,
On 2018-08-02 13:02 +0200, Arnout Vandecappelle spake thusly:
Quoted 1 line · Yann E. MORIN
[--SNIP a lot of threaded discussion--]
Quoted 6 lines
Quoted 3 lines
Now that we have the 'sdk' feature, people are going to distribute that, and they will have to come in compliance for this sdk. So they will want the build of the host tools to also be as reproducible as possible.
I don't see the reasoning behind this statement. For GPL compliance,
reproducibility is definitely not an issue, otherwise every GPL binary distributed in the last 30 years would be in violation...
I never said it was mandatory to be reproducible to be compliant. But let me expand a bit, on this slightly tangential topic.
When distributing (especially code under copyleft lincenses such as the GPL), you may have to prove your are indeed compliant. Every bit of diffference has to be researched and explained; reproducibility helps prove compliance.
On the other hand, as a recipient (especially code under copyleft licenses such as the GPL), you may want to check that the compliance delivery you got is indeed compliant. Again, every bit of diffference has to be researched and explained; reproducibility helps prove compliance.
But you are right: reproducibility is not mandated by the GPL.
Quoted 11 lines
Quoted 3 lines
Amd since we now will have to have the toolchain before we can parse the linux kconfig stuff, building host-flex and host-bison is the least of our speed problems...
It is a big speed problem if you're using an external toolchain and you could
use the system flex and bison. This thread (long ago, in a galaxy far away) was about requiring flex and bison to be installed on the system, because Buildroot's own kconfig would also no longer ship the generated files. The general agreement was that that would be OK, and we could remove host-flex and host-bison entirely (speeding up the build for a bunch of other packages).
Quoted 2 lines
My statement was (and still is): drop host-flex and host-bison for building
host tools, but keep them for building target binaries (in casu, dtc).
I agree that we do have a chicken-n-egg problem for our own kconfig. Which we can easily solve by bundling the generated kconfig lexer and parser sources [*], as we do today, even if the kernel does not.
[*] as long as we identify the versions of flex+bison that were used to generate said code.
Quoted 4 lines
Thomas (if I understand correctly) is questioning the need for keeping
host-flex and host-bison even for building the target binaries. And I have to agree that the need for host-flex and host-bison for target binaries is not that strong.
See my reply, below...
Quoted 4 lines
Quoted 2 lines
So, I'd say we should keep the dependency on host-flex and host-bison for the linux kernel...
I would really prefer to not double the build time of a simple kernel...
But that ship has long sailed...
And I do prefer reproducibility and correctness over speed or convenience.
But since we do have an option for reproducibility, those dependencies an be conditional for those speed- or reproducibility-afficionados.
Regards,
Yann E. MORIN.
Quoted 58 lines
Regards,
ArnoutQuoted 47 lines
Regards,
Yann E. MORIN.Quoted 42 lines
Quoted 7 lines
Or do you assume that because kconfig is so widely used, it is tested against lots of bison/flex version, so we don't need to build bison/flex for kconfig, but we should still build it for other packages that need bison/flex, as those ones may be less tested against random versions of flex/bison ? Or because the generated flex/bison code goes into the target, and we ideally want binary-identical results for a given Buildroot configuration ?
It's not just for fully binary identical (i.e.
BR2_REPRODUCIBLE).It's basically for the same reason that we have versioned docker images, to
make sure that we really know what we're building for the target.I realize now that this rule is not something we've written down anywhere. I
just always assumed that Buildroot tries to make sure that for a given config, whatever your build machine, you generate binaries that will behave the same and will expose the same bugs. If you use a different flex, a bug in the parsing code will manifest differently.The more I think about it, the more I come to the conclusion that maybe this
rule (which I thought was something that I learned from the Buildroot community, not something I invented myself) is not so useful. Because in practice, the kind of bugs where this is relevant are so sensitive to even tiny changes that changing the generated code is not going to make all that much of a difference.Regards,
ArnoutQuoted 5 lines
Best regards,
Thomas
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDFSignature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC PATCH v2 2/2 support/kconfig: Bump to kconfig from Linux 4.17-rc2
Arnout, Thomas, All,
On 2018-08-02 19:10 +0200, Yann E. MORIN spake thusly:
Quoted 2 lines
On 2018-08-02 13:02 +0200, Arnout Vandecappelle spake thusly:
Quoted 1 line · Yann E. MORIN
[--SNIP--]
Quoted 15 lines
Quoted 2 lines
My statement was (and still is): drop host-flex and host-bison for building
host tools, but keep them for building target binaries (in casu, dtc).I agree that we do have a chicken-n-egg problem for our own kconfig. Which we can easily solve by bundling the generated kconfig lexer and parser sources [*], as we do today, even if the kernel does not.
[*] as long as we identify the versions of flex+bison that were used to generate said code.
Quoted 4 lines
Thomas (if I understand correctly) is questioning the need for keeping
host-flex and host-bison even for building the target binaries. And I have to agree that the need for host-flex and host-bison for target binaries is not that strong.
Quoted 8 lines
See my reply, below...
Quoted 4 lines
Quoted 2 lines
So, I'd say we should keep the dependency on host-flex and host-bison for the linux kernel...
I would really prefer to not double the build time of a simple kernel...
But that ship has long sailed...
However...
It just occured to me that we are here speakign about a host tool that is not installed in host/ but stays in the package's build directory.
And for those, we indeed do not care much, and do not really require our own version of host-{flex,bison}. For those, we can rely on the flex and bison from the host.
However, I still believe that packages we install in host/ (and would thus be in the sdk) should use our own host-{flex,bison}.
Regards,
Yann E. MORIN.
Quoted 78 lines
And I do prefer reproducibility and correctness over speed or convenience.
But since we do have an option for reproducibility, those dependencies an be conditional for those speed- or reproducibility-afficionados.
Regards,
Yann E. MORIN.Quoted 58 lines
Regards,
ArnoutQuoted 47 lines
Regards,
Yann E. MORIN.Quoted 42 lines
Quoted 7 lines
Or do you assume that because kconfig is so widely used, it is tested against lots of bison/flex version, so we don't need to build bison/flex for kconfig, but we should still build it for other packages that need bison/flex, as those ones may be less tested against random versions of flex/bison ? Or because the generated flex/bison code goes into the target, and we ideally want binary-identical results for a given Buildroot configuration ?
It's not just for fully binary identical (i.e.
BR2_REPRODUCIBLE).It's basically for the same reason that we have versioned docker images, to
make sure that we really know what we're building for the target.I realize now that this rule is not something we've written down anywhere. I
just always assumed that Buildroot tries to make sure that for a given config, whatever your build machine, you generate binaries that will behave the same and will expose the same bugs. If you use a different flex, a bug in the parsing code will manifest differently.The more I think about it, the more I come to the conclusion that maybe this
rule (which I thought was something that I learned from the Buildroot community, not something I invented myself) is not so useful. Because in practice, the kind of bugs where this is relevant are so sensitive to even tiny changes that changing the generated code is not going to make all that much of a difference.Regards,
ArnoutQuoted 5 lines
Best regards,
Thomas
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDFSignature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDFSignature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/2 support/kconfig: Add missing target to README.buildroot
In reply to Petr VorelHi,
the second patch is again waiting for approval as it's too big.
Kind regards,
Petr
Thomas Petazzoni
AppliedPATCH v2 1/2 support/kconfig: Add missing target to README.buildroot
In reply to Petr VorelHello,
Quoted 4 lines · Petr Vorel
Signed-off-by Petr Vorel <[email protected]>--- support/kconfig/README.buildroot | 1 + 1 file changed, 1 insertion(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com