kconfig: update to Linux 5.7-rc2
PATCH 1/1 kconfig: update to Linux 5.7-rc2
The previous sync was Linux 5.5. This updates Kconfig to Linux 5.7-rc2.
Highlights:
- add yes2modconfig and mod2yesconfig, which are useful for coping with syzbot configs in Linux
- remove include/config/tristate.conf
- show more precise help
- fix various issues of 'make xconfig'
Signed-off-by Masahiro Yamada <[email protected]>
---
Makefile | 6 +- scripts/kconfig/.gitignore | 4 +- scripts/kconfig/Makefile | 38 +++--- scripts/kconfig/conf.c | 16 +++ scripts/kconfig/confdata.c | 62 +++------ scripts/kconfig/expr.c | 3 +- scripts/kconfig/expr.h | 2 +- scripts/kconfig/gconf.c | 1 + scripts/kconfig/lkc.h | 4 +- scripts/kconfig/mconf.c | 1 + scripts/kconfig/menu.c | 185 ++++++++++++++++----------- scripts/kconfig/nconf.c | 1 + scripts/kconfig/parser.y | 21 ++- scripts/kconfig/qconf.cc | 92 +++++++++---- scripts/kconfig/qconf.h | 2 + scripts/kconfig/streamline_config.pl | 4 +- scripts/kconfig/symbol.c | 31 +---- 17 files changed, 253 insertions(+), 220 deletions(-)
Makefile +5 -1
@@ -176,6 +176,9 @@ SRCARCH := $(ARCH) KCONFIG_CONFIG ?= .config +# Default file for 'make defconfig'. This may be overridden by arch-Makefile. +export KBUILD_DEFCONFIG := defconfig + # SHELL used by kbuild CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \
@@ -468,7 +471,8 @@ $(KCONFIG_CONFIG): # # This exploits the 'multi-target pattern rule' trick. # The syncconfig should be executed only once to make all the targets. -%/auto.conf %/auto.conf.cmd %/tristate.conf: $(KCONFIG_CONFIG) +# (Note: use the grouped target '&:' when we bump to GNU Make 4.3) +%/auto.conf %/auto.conf.cmd: $(KCONFIG_CONFIG) $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig endif # $(dot-config)
scripts/kconfig/.gitignore +1 -3
@@ -1,6 +1,4 @@ -# -# Generated files -# +# SPDX-License-Identifier: GPL-2.0-only *.moc *conf-cfg
scripts/kconfig/Makefile +18 -20
@@ -12,10 +12,6 @@ else Kconfig := Kconfig endif -ifndef KBUILD_DEFCONFIG -KBUILD_DEFCONFIG := defconfig -endif - ifeq ($(quiet),silent_) silent := -s endif
@@ -47,16 +43,16 @@ build_gconfig: $(obj)/gconf build_xconfig: $(obj)/qconf localyesconfig localmodconfig: $(obj)/conf - $(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config - $(Q)if [ -f .config ]; then \ - cmp -s .tmp.config .config || \ - (mv -f .config .config.old.1; \ - mv -f .tmp.config .config; \ - $< $(silent) --oldconfig $(Kconfig); \ - mv -f .config.old.1 .config.old) \ - else \ - mv -f .tmp.config .config; \ - $< $(silent) --oldconfig $(Kconfig); \ + $(Q)$(PERL) $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config + $(Q)if [ -f .config ]; then \ + cmp -s .tmp.config .config || \ + (mv -f .config .config.old.1; \ + mv -f .tmp.config .config; \ + $< $(silent) --oldconfig $(Kconfig); \ + mv -f .config.old.1 .config.old) \ + else \ + mv -f .tmp.config .config; \ + $< $(silent) --oldconfig $(Kconfig); \ fi $(Q)rm -f .tmp.config
@@ -67,7 +63,7 @@ localyesconfig localmodconfig: $(obj)/conf # deprecated for external use simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ alldefconfig randconfig listnewconfig olddefconfig syncconfig \ - helpnewconfig + helpnewconfig yes2modconfig mod2yesconfig PHONY += $(simple-targets)
@@ -135,6 +131,8 @@ help: @echo ' allmodconfig - New config selecting modules when possible' @echo ' alldefconfig - New config with all symbols set to default' @echo ' randconfig - New config with random answer to all options' + @echo ' yes2modconfig - Change answers from yes to mod if possible' + @echo ' mod2yesconfig - Change answers from mod to yes if possible' @echo ' listnewconfig - List new options' @echo ' helpnewconfig - List new options and help text' @echo ' olddefconfig - Same as oldconfig but sets new symbols to their'
@@ -155,11 +153,11 @@ HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src) HOSTCFLAGS_parser.tab.o := -I $(srctree)/$(src) # conf: Used for defconfig, oldconfig and related targets -hostprogs-y += conf +hostprogs += conf conf-objs := conf.o $(common-objs) # nconf: Used for the nconfig target based on ncurses -hostprogs-y += nconf +hostprogs += nconf nconf-objs := nconf.o nconf.gui.o $(common-objs) HOSTLDLIBS_nconf = $(shell . $(obj)/nconf-cfg && echo $$libs)
@@ -169,7 +167,7 @@ HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/nconf-cfg && echo $$cflags) $(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/nconf-cfg # mconf: Used for the menuconfig target based on lxdialog -hostprogs-y += mconf +hostprogs += mconf lxdialog := $(addprefix lxdialog/, \ checklist.o inputbox.o menubox.o textbox.o util.o yesno.o) mconf-objs := mconf.o $(lxdialog) $(common-objs)
@@ -181,7 +179,7 @@ $(foreach f, mconf.o $(lxdialog), \ $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg # qconf: Used for the xconfig target based on Qt -hostprogs-y += qconf +hostprogs += qconf qconf-cxxobjs := qconf.o qconf-objs := images.o $(common-objs)
@@ -197,7 +195,7 @@ $(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg $(call cmd,moc) # gconf: Used for the gconfig target based on GTK+ -hostprogs-y += gconf +hostprogs += gconf gconf-objs := gconf.o images.o $(common-objs) HOSTLDLIBS_gconf = $(shell . $(obj)/gconf-cfg && echo $$libs)
scripts/kconfig/conf.c +16 -0
@@ -34,6 +34,8 @@ enum input_mode { listnewconfig, helpnewconfig, olddefconfig, + yes2modconfig, + mod2yesconfig, };static enum input_mode input_mode = oldaskconfig;
@@ -467,6 +469,8 @@ static struct option long_opts[] = { {"listnewconfig", no_argument, NULL, listnewconfig}, {"helpnewconfig", no_argument, NULL, helpnewconfig}, {"olddefconfig", no_argument, NULL, olddefconfig}, + {"yes2modconfig", no_argument, NULL, yes2modconfig}, + {"mod2yesconfig", no_argument, NULL, mod2yesconfig}, {NULL, 0, NULL, 0} };
@@ -489,6 +493,8 @@ static void conf_usage(const char *progname)printf (" --allmodconfig New config where all options are answered with mod\n" );printf (" --alldefconfig New config with all symbols set to default\n" );printf (" --randconfig New config with random answer to all options\n" ); +printf (" --yes2modconfig Change answers from yes to mod if possible\n" ); +printf (" --mod2yesconfig Change answers from mod to yes if possible\n" ); }int main (int ac,char **av)
@@ -553,6 +559,8 @@ int main(int ac, char **av)case listnewconfig:case helpnewconfig:case olddefconfig: +case yes2modconfig: +case mod2yesconfig:break ;case '?' :conf_usage (progname);
@@ -587,6 +595,8 @@ int main(int ac, char **av)case listnewconfig:case helpnewconfig:case olddefconfig: +case yes2modconfig: +case mod2yesconfig:conf_read (NULL );break ;case allnoconfig:
@@ -660,6 +670,12 @@ int main(int ac, char **av)break ;case savedefconfig:break ; +case yes2modconfig: +conf_rewrite_mod_or_yes (def_y2m); +break ; +case mod2yesconfig: +conf_rewrite_mod_or_yes (def_m2y); +break ;case oldaskconfig: rootEntry = &rootmenu;conf (&rootmenu);
scripts/kconfig/confdata.c +18 -44
112 lines not on this page · raw message
scripts/kconfig/expr.c +1 -2
@@ -13,7 +13,6 @@#define DEBUG_EXPR 0 -static int expr_eq (struct expr *e1,struct expr *e2);static struct expr *expr_eliminate_yn (struct expr *e);struct expr *expr_alloc_symbol (struct symbol *sym)
@@ -250,7 +249,7 @@ void expr_eliminate_eq(struct expr **ep1, struct expr **ep2)* equals some operand in the other (operands do not need to appear in the same * order), recursively. */ -static int expr_eq (struct expr *e1,struct expr *e2) +int expr_eq (struct expr *e1,struct expr *e2) {int res, old_count;
scripts/kconfig/expr.h +1 -1
@@ -191,7 +191,6 @@ enum prop_type {struct property {struct property *next;/* next property - null if last */ -struct symbol *sym;/* the symbol for which the property is associated */ enum prop_type type;/* type of property */ const char *text;/* the prompt value - P_PROMPT, P_MENU, P_COMMENT */ struct expr_value visible;
@@ -301,6 +300,7 @@ struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);struct expr *expr_copy (const struct expr *org);void expr_free (struct expr *e);void expr_eliminate_eq (struct expr **ep1,struct expr **ep2); +int expr_eq (struct expr *e1,struct expr *e2);tristate expr_calc_value (struct expr *e);struct expr *expr_trans_bool (struct expr *e);struct expr *expr_eliminate_dups (struct expr *e);
scripts/kconfig/gconf.c +1 -0
@@ -18,6 +18,7 @@#include <stdio.h> #include <string.h> +#include <strings.h> #include <unistd.h> #include <time.h>
scripts/kconfig/lkc.h +3 -1
@@ -34,6 +34,8 @@ enum conf_def_mode { def_default, def_yes, def_mod, + def_y2m, + def_m2y, def_no, def_random };
@@ -52,6 +54,7 @@ const char *conf_get_configname(void);void sym_set_change_count (int count);void sym_add_change_count (int count);bool conf_set_all_new_symbols (enum conf_def_mode mode); +void conf_rewrite_mod_or_yes (enum conf_def_mode mode);void set_all_choice_values (struct symbol *csym);/* confdata.c and expr.c */
@@ -112,7 +115,6 @@ struct symbol *sym_choice_default(struct symbol *sym);struct property *sym_get_range_prop (struct symbol *sym);const char *sym_get_string_default (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);static inline tristate sym_get_tristate_value (struct symbol *sym)
scripts/kconfig/mconf.c +1 -0
@@ -15,6 +15,7 @@#include <stdarg.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <signal.h> #include <unistd.h>
scripts/kconfig/menu.c +108 -77
256 lines not on this page · raw message
scripts/kconfig/nconf.c +1 -0
@@ -8,6 +8,7 @@#define _GNU_SOURCE#endif #include <string.h> +#include <strings.h> #include <stdlib.h> #include "lkc.h"
scripts/kconfig/parser.y +8 -13
@@ -90,7 +90,6 @@ static struct menu *current_menu, *current_entry; %left T_LESS T_LESS_EQUAL T_GREATER T_GREATER_EQUAL %nonassoc T_NOT -%type <string> prompt %type <symbol> nonconst_symbol %type <symbol> symbol %type <type> type logic_type default
@@ -113,7 +112,7 @@ input: mainmenu_stmt stmt_list | stmt_list; /* mainmenu entry */ -mainmenu_stmt: T_MAINMENU prompt T_EOL +mainmenu_stmt: T_MAINMENU T_WORD_QUOTE T_EOL { menu_add_prompt(P_MENU, $2, NULL); };
@@ -181,7 +180,7 @@ config_option: type prompt_stmt_opt T_EOL $1); }; -config_option: T_PROMPT prompt if_expr T_EOL +config_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL { menu_add_prompt(P_PROMPT, $2, $3); printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
@@ -265,7 +264,7 @@ choice_option_list: | choice_option_list help ; -choice_option: T_PROMPT prompt if_expr T_EOL +choice_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL { menu_add_prompt(P_PROMPT, $2, $3); printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
@@ -334,7 +333,7 @@ if_stmt: if_entry stmt_list if_end /* menu entry */ -menu: T_MENU prompt T_EOL +menu: T_MENU T_WORD_QUOTE T_EOL { menu_add_entry(NULL); menu_add_prompt(P_MENU, $2, NULL);
@@ -363,7 +362,7 @@ menu_option_list: | menu_option_list depends ; -source_stmt: T_SOURCE prompt T_EOL +source_stmt: T_SOURCE T_WORD_QUOTE T_EOL { printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); zconf_nextfile($2);
@@ -372,7 +371,7 @@ source_stmt: T_SOURCE prompt T_EOL /* comment entry */ -comment: T_COMMENT prompt T_EOL +comment: T_COMMENT T_WORD_QUOTE T_EOL { menu_add_entry(NULL); menu_add_prompt(P_COMMENT, $2, NULL);
@@ -429,15 +428,11 @@ visible: T_VISIBLE if_expr T_EOL prompt_stmt_opt: /* empty */ - | prompt if_expr + | T_WORD_QUOTE if_expr { menu_add_prompt(P_PROMPT, $1, $2); }; -prompt: T_WORD - | T_WORD_QUOTE -; - end: T_ENDMENU T_EOL { $$ = "menu"; } | T_ENDCHOICE T_EOL { $$ = "choice"; } | T_ENDIF T_EOL { $$ = "if"; }
@@ -665,7 +660,7 @@ static void print_symbol(FILE *out, struct menu *menu) break; case P_SYMBOL: fputs( " symbol ", out); - fprintf(out, "%s\n", prop->sym->name); + fprintf(out, "%s\n", prop->menu->sym->name); break; default: fprintf(out, " unknown prop %d!\n", prop->type);
scripts/kconfig/qconf.cc +64 -28
211 lines not on this page · raw message
scripts/kconfig/qconf.h +2 -0
@@ -71,6 +71,7 @@ public slots: signals:void menuChanged (struct menu *menu);void menuSelected (struct menu *menu); +void itemSelected (struct menu *menu);void parentSelected (void );void gotFocus (struct menu *);
@@ -298,6 +299,7 @@ public:ConfigMainWindow (void); public slots:void changeMenu (struct menu *); +void changeItens (struct menu *);void setMenuLink (struct menu *);void listFocusChanged (void );void goBack (void );
scripts/kconfig/streamline_config.pl +1 -3
@@ -56,8 +56,6 @@ sub dprint { print STDERR @_; } -my $config = ".config"; - my $uname = `uname -r`; chomp $uname;
@@ -374,7 +372,7 @@ if (defined($lsmod_file)) { $lsmod = "$dir/lsmod"; last; } -} + } if (!defined($lsmod)) { # try just the path $lsmod = "lsmod";
scripts/kconfig/symbol.c +4 -27
@@ -221,7 +221,7 @@ static void sym_calc_visibility(struct symbol *sym)sym_set_changed (sym); } tri = no; -if (sym->implied.expr && sym->dir_dep.tri != no) +if (sym->implied.expr) tri =expr_calc_value (sym->implied.expr);if (tri == mod &&sym_get_type (sym) ==S_BOOLEAN ) tri = yes;
@@ -394,6 +394,8 @@ void sym_calc_value(struct symbol *sym)if (sym->implied.tri != no) { sym->flags |=SYMBOL_WRITE ; newval.tri =EXPR_OR (newval.tri, sym->implied.tri); + newval.tri =EXPR_AND (newval.tri, + sym->dir_dep.tri); } } calc_newval:
@@ -401,8 +403,7 @@ void sym_calc_value(struct symbol *sym)sym_warn_unmet_dep (sym); newval.tri =EXPR_OR (newval.tri, sym->rev_dep.tri); } -if (newval.tri == mod && - (sym_get_type (sym) ==S_BOOLEAN || sym->implied.tri == yes)) +if (newval.tri == mod &&sym_get_type (sym) ==S_BOOLEAN ) newval.tri = yes;break ;case S_STRING :
@@ -484,8 +485,6 @@ bool sym_tristate_within_range(struct symbol *sym, tristate val)return false;if (sym->visible <= sym->rev_dep.tri)return false; -if (sym->implied.tri == yes && val == mod) -return false;if (sym_is_choice_value (sym) && sym->visible == yes)return val == yes;return val >= sym->rev_dep.tri && val <= sym->visible;
@@ -1273,28 +1272,6 @@ struct symbol *sym_check_deps(struct symbol *sym)return sym2; } -struct property *prop_alloc (enum prop_type type,struct symbol *sym) -{ -struct property *prop; -struct property **propp; - - prop =xmalloc (sizeof (*prop)); -memset (prop,0 ,sizeof (*prop)); - prop->type = type; - prop->sym = sym; - prop->file = current_file; - prop->lineno =zconf_lineno (); - -/* append property to the prop list of symbol */ -if (sym) { -for (propp = &sym->prop; *propp; propp = &(*propp)->next) - ; - *propp = prop; - } - -return prop; -} -struct symbol *prop_get_symbol (struct property *prop) { if (prop->expr && (prop->expr->type == E_SYMBOL ||
Signature · 7 lines
2.25.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 7 lines · Masahiro Yamada
The previous sync was Linux 5.5. This updates
Kconfigto Linux 5.7-rc2.Highlights:
- add yes2modconfig and mod2yesconfig, which are useful for coping with syzbot configs in Linux
Quoted 8 lines
- remove
include/config/tristate.conf- show more precise help
- fix various issues of 'make xconfig'
Signed-off-by Masahiro Yamada <[email protected]>---
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox