]> xenbits.xensource.com Git - seabios.git/commitdiff
build: Update kconfig to version in Linux 3.16.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 24 Aug 2014 02:06:21 +0000 (22:06 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 25 Aug 2014 15:36:19 +0000 (11:36 -0400)
Update kconfig (from Linux v3.13) to the latest version (Linux v3.16).

This copies kconfig from Linux with only the changes necessary to work
with the SeaBIOS build (the equivalent of the earlier SeaBIOS 0da7bfdf
commit) and the changes necessary to always emit symbols (SeaBIOS
b623e7c5 commit).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
22 files changed:
scripts/kconfig/Makefile
scripts/kconfig/check.sh
scripts/kconfig/conf.c
scripts/kconfig/confdata.c
scripts/kconfig/expr.h
scripts/kconfig/gconf.c
scripts/kconfig/lkc.h
scripts/kconfig/lxdialog/checklist.c
scripts/kconfig/lxdialog/inputbox.c
scripts/kconfig/lxdialog/menubox.c
scripts/kconfig/lxdialog/util.c
scripts/kconfig/mconf.c
scripts/kconfig/menu.c
scripts/kconfig/nconf.c
scripts/kconfig/streamline_config.pl
scripts/kconfig/util.c
scripts/kconfig/zconf.gperf
scripts/kconfig/zconf.hash.c_shipped
scripts/kconfig/zconf.l
scripts/kconfig/zconf.lex.c_shipped
scripts/kconfig/zconf.tab.c_shipped
scripts/kconfig/zconf.y

index 3f37c9630742222195e124b7c436c499d8d1ae05..1c1293618764c891f04d55f7ca5a24d42a218215 100644 (file)
@@ -34,11 +34,11 @@ oldconfig: $(obj)/conf
 
 silentoldconfig: $(obj)/conf
        @echo "  Build Kconfig config file"
-       $(Q)mkdir -p include/generated
+       $(Q)mkdir -p include/config include/generated
        $(Q)$< --$@ $(Kconfig)
 
 localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
-       $(Q)mkdir -p include/generated
+       $(Q)mkdir -p include/config include/generated
        $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
        $(Q)if [ -f .config ]; then                                     \
                        cmp -s .tmp.config .config ||                   \
index 854d9c7c675ca4782702e83e1fa04b17aa47d6f8..55b79ba1ba2a5e4c84cb6cc3bf5f25dbb92a3e89 100755 (executable)
@@ -11,4 +11,3 @@ EOF
 if [ ! "$?" -eq "0"  ]; then
        echo -DKBUILD_NO_NLS;
 fi
-
index d19944f9c3acb9e6004ca13a1f6e4444174a5359..fef75fc756f40bfa5ae89c942e49f80719204bb9 100644 (file)
@@ -696,7 +696,7 @@ int main(int ac, char **av)
        } else if (input_mode == savedefconfig) {
                if (conf_write_defconfig(defconfig_file)) {
                        fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"),
-                               defconfig_file);
+                               defconfig_file);
                        return 1;
                }
        } else if (input_mode != listnewconfig) {
index eb52ed507a7103ca3faf408f2949ea84dabea369..08e75599dd2a7064487b3484f41e0a9b1d925365 100644 (file)
@@ -1186,7 +1186,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;
index ba663e1dc7e35b7bf732c4863c1202e3249ac636..412ea8a2abb8b80c6f0a889e2fb9d7b55bf0bafa 100644 (file)
@@ -109,6 +109,9 @@ struct symbol {
 /* choice values need to be set before calculating this symbol value */
 #define SYMBOL_NEED_SET_CHOICE_VALUES  0x100000
 
+/* Set symbol to y if allnoconfig; used for symbols that hide others */
+#define SYMBOL_ALLNOCONFIG_Y 0x200000
+
 #define SYMBOL_MAXLENGTH       256
 #define SYMBOL_HASHSIZE                9973
 
index f2bee70e26f4940061c97add6dafbf273b272dcd..d0a35b21f3087283c286885c26caa58630925231 100644 (file)
@@ -1404,7 +1404,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))*/
 
index 09f4edfdc91132887e1e54e09faf1a9b99865965..d5daa7af8b496e89143b3fd222fc3c35e7eeb748 100644 (file)
@@ -61,6 +61,7 @@ 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    4
 
 struct kconf_id {
        int name;
index 3b15c08ec1fac369f9b6e0b01c738e46fa3efb2d..8d016faa28d704be886cb1c6195a3bdca78d29b0 100644 (file)
@@ -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;
index 447a582198c9bc70c37c4d2d034b128b5a62080d..d58de1dc5360dacf90fce2c177e3fb6c3ed8c83e 100644 (file)
@@ -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;
index c93de0b2faca28525588bceb023f99bdd8a14acf..11ae9ad7ac7b992e2244ae88c0f576977157c254 100644 (file)
@@ -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;
index 58a8289dd650281c29f8e34827c153e9b4d4ac74..f7abdeb92af02188a48712ce48ab76f6b32f1d27 100644 (file)
@@ -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);
 
index 59184bb41ef81054384bcd641097f95e9e5426a2..14cea7463a621b33c6c0b8487781db107d764841 100644 (file)
@@ -299,7 +299,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);
@@ -1034,4 +1034,3 @@ int main(int ac, char **av)
 
        return res;
 }
-
index db1512ae30cc48d6f2ea87bc26a082a084551811..a26cc5d2a9b0217d9c3d52bf0dab21b7337e95d2 100644 (file)
@@ -217,6 +217,9 @@ void menu_add_option(int token, char *arg)
        case T_OPT_ENV:
                prop_add_env(arg);
                break;
+       case T_OPT_ALLNOCONFIG_Y:
+               current_entry->sym->flags |= SYMBOL_ALLNOCONFIG_Y;
+               break;
        }
 }
 
@@ -255,8 +258,8 @@ static void sym_check_prop(struct symbol *sym)
                                    "config symbol '%s' uses select, but is "
                                    "not boolean or tristate", sym->name);
                        else if (sym2->type != S_UNKNOWN &&
-                                sym2->type != S_BOOLEAN &&
-                                sym2->type != S_TRISTATE)
+                                sym2->type != S_BOOLEAN &&
+                                sym2->type != S_TRISTATE)
                                prop_warn(prop,
                                    "'%s' has wrong type. 'select' only "
                                    "accept arguments of boolean and "
@@ -265,7 +268,7 @@ static void sym_check_prop(struct symbol *sym)
                case P_RANGE:
                        if (sym->type != S_INT && sym->type != S_HEX)
                                prop_warn(prop, "range is only allowed "
-                                               "for int or hex symbols");
+                                               "for int or hex symbols");
                        if (!menu_validate_number(sym, prop->expr->left.sym) ||
                            !menu_validate_number(sym, prop->expr->right.sym))
                                prop_warn(prop, "range is invalid");
index 4fbecd2473bc51904629056eaa8bacb7b42fb660..984489ef2b46e12549eedd74a2d8691ba0589489 100644 (file)
@@ -1554,4 +1554,3 @@ int main(int ac, char **av)
        endwin();
        return 0;
 }
-
index 4606cdfb859d59ac71a8e6d353a33d6f2a7110a0..9cb8522d8d22a826caaec968e82c77516339ca01 100644 (file)
@@ -219,6 +219,13 @@ sub read_kconfig {
            $depends{$config} = $1;
        } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) {
            $depends{$config} .= " " . $1;
+       } elsif ($state eq "DEP" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) {
+           my $dep = $3;
+           if ($dep !~ /^\s*(y|m|n)\s*$/) {
+               $dep =~ s/.*\sif\s+//;
+               $depends{$config} .= " " . $dep;
+               dprint "Added default depends $dep to $config\n";
+           }
 
        # Get the configs that select this config
        } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) {
@@ -582,7 +589,7 @@ while ($repeat) {
 
     # Now we need to see if we have to check selects;
     loop_select;
-}          
+}
 
 my %setconfigs;
 
index 6e7fbf1968090463f37ec1af70d65fb0af28a391..94f9c83e324f4a72b79b6fbf8ca6b3999d046702 100644 (file)
@@ -155,5 +155,3 @@ void *xcalloc(size_t nmemb, size_t size)
        fprintf(stderr, "Out of memory.\n");
        exit(1);
 }
-
-
index f14ab41154b665c5759e3234201296a0cfbd43aa..b6ac02d604f1fbcca8ecc04cf09ac038bcb81fa8 100644 (file)
@@ -44,4 +44,5 @@ on,           T_ON,           TF_PARAM
 modules,       T_OPT_MODULES,  TF_OPTION
 defconfig_list,        T_OPT_DEFCONFIG_LIST,TF_OPTION
 env,           T_OPT_ENV,      TF_OPTION
+allnoconfig_y, T_OPT_ALLNOCONFIG_Y,TF_OPTION
 %%
index 40df0005daa928d4684555297c2243d0aef45171..c77a8eff1ef21ef6d5a05d588d732a892f50d2cb 100644 (file)
@@ -55,10 +55,10 @@ kconf_id_hash (register const char *str, register unsigned int len)
       73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
       73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
       73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
-      73, 73, 73, 73, 73, 73, 73, 73, 25, 25,
+      73, 73, 73, 73, 73, 73, 73,  5, 25, 25,
        0,  0,  0,  5,  0,  0, 73, 73,  5,  0,
       10,  5, 45, 73, 20, 20,  0, 15, 15, 73,
-      20, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      20,  5, 73, 73, 73, 73, 73, 73, 73, 73,
       73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
       73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
       73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
@@ -106,6 +106,7 @@ struct kconf_id_strings_t
     char kconf_id_strings_str23[sizeof("mainmenu")];
     char kconf_id_strings_str25[sizeof("menuconfig")];
     char kconf_id_strings_str27[sizeof("modules")];
+    char kconf_id_strings_str28[sizeof("allnoconfig_y")];
     char kconf_id_strings_str29[sizeof("menu")];
     char kconf_id_strings_str31[sizeof("select")];
     char kconf_id_strings_str32[sizeof("comment")];
@@ -141,6 +142,7 @@ static const struct kconf_id_strings_t kconf_id_strings_contents =
     "mainmenu",
     "menuconfig",
     "modules",
+    "allnoconfig_y",
     "menu",
     "select",
     "comment",
@@ -170,7 +172,7 @@ kconf_id_lookup (register const char *str, register unsigned int len)
 {
   enum
     {
-      TOTAL_KEYWORDS = 32,
+      TOTAL_KEYWORDS = 33,
       MIN_WORD_LENGTH = 2,
       MAX_WORD_LENGTH = 14,
       MIN_HASH_VALUE = 2,
@@ -219,7 +221,8 @@ kconf_id_lookup (register const char *str, register unsigned int len)
       {-1},
 #line 44 "scripts/kconfig/zconf.gperf"
       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27,   T_OPT_MODULES,  TF_OPTION},
-      {-1},
+#line 47 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28,   T_OPT_ALLNOCONFIG_Y,TF_OPTION},
 #line 16 "scripts/kconfig/zconf.gperf"
       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29,           T_MENU,         TF_COMMAND},
       {-1},
@@ -282,5 +285,5 @@ kconf_id_lookup (register const char *str, register unsigned int len)
     }
   return 0;
 }
-#line 47 "scripts/kconfig/zconf.gperf"
+#line 48 "scripts/kconfig/zconf.gperf"
 
index 1a9f53e535ca8ba87adc9b1af2bc761f128e56a0..6c62d93b4ffbd018807993788fb78848d176d67d 100644 (file)
@@ -27,8 +27,8 @@ static char *text;
 static int text_size, text_asize;
 
 struct buffer {
-        struct buffer *parent;
-        YY_BUFFER_STATE state;
+       struct buffer *parent;
+       YY_BUFFER_STATE state;
 };
 
 struct buffer *current_buf;
index a0521aa5974b514e7bfcb1811746c283702862f2..349a7f24315b1d1c4887962626365fd749fdae02 100644 (file)
@@ -789,8 +789,8 @@ static char *text;
 static int text_size, text_asize;
 
 struct buffer {
-        struct buffer *parent;
-        YY_BUFFER_STATE state;
+       struct buffer *parent;
+       YY_BUFFER_STATE state;
 };
 
 struct buffer *current_buf;
index 25ae16ac75c85853e24733eb754bc514ba6eb419..de5e84ed3f96f824b63a1e5bd2e4da597996747f 100644 (file)
@@ -2314,7 +2314,7 @@ void conf_parse(const char *name)
        for_all_symbols(i, sym) {
                if (sym_check_deps(sym))
                        zconfnerrs++;
-        }
+       }
        if (zconfnerrs)
                exit(1);
        sym_set_change_count(1);
index 0653886fac4810b0989af918708f4dbfd39f145b..0f683cfa53e9abf9aecc032e03334fca182c0d20 100644 (file)
@@ -510,7 +510,7 @@ void conf_parse(const char *name)
        for_all_symbols(i, sym) {
                if (sym_check_deps(sym))
                        zconfnerrs++;
-        }
+       }
        if (zconfnerrs)
                exit(1);
        sym_set_change_count(1);