kconfig: Update to Linux v6.2
cover kconfig: Update to Linux v6.2
This series starts the process of updating Kconfig to match Linux v6.2
It is not ready for use, just for discussion and bug fixing.
See u-boot-dm/kconf-working for the tree
Simon Glass (2):
kconfig: Bring in from Linux v6.2
kconfig: U-Boot additions
scripts/kconfig/.gitignore | 20 +-
scripts/kconfig/Makefile | 201 +--
scripts/kconfig/conf.c | 499 +++++---
scripts/kconfig/confdata.c | 1074 ++++++++--------
scripts/kconfig/expr.c | 30 +-
scripts/kconfig/expr.h | 17 +-
scripts/kconfig/gconf-cfg.sh | 15 +-
scripts/kconfig/gconf.c | 47 +-
scripts/kconfig/images.c | 34 +-
scripts/kconfig/images.h | 33 +
scripts/kconfig/internal.h | 9 +
scripts/kconfig/kconf_id.c | 52 -
scripts/kconfig/{zconf.l => lexer.l} | 247 ++--
scripts/kconfig/list.h | 2 +-
scripts/kconfig/lkc.h | 91 +-
scripts/kconfig/lkc_proto.h | 22 +-
scripts/kconfig/lxdialog/.gitignore | 4 -
scripts/kconfig/lxdialog/BIG.FAT.WARNING | 2 +-
scripts/kconfig/lxdialog/inputbox.c | 3 +-
scripts/kconfig/lxdialog/util.c | 4 +-
scripts/kconfig/mconf-cfg.sh | 36 +-
scripts/kconfig/mconf.c | 42 +-
scripts/kconfig/menu.c | 263 ++--
scripts/kconfig/merge_config.sh | 75 +-
scripts/kconfig/nconf-cfg.sh | 32 +-
scripts/kconfig/nconf.c | 89 +-
scripts/kconfig/nconf.gui.c | 292 ++---
scripts/kconfig/nconf.h | 56 +-
scripts/kconfig/{zconf.y => parser.y} | 336 ++---
scripts/kconfig/preprocess.c | 12 +-
scripts/kconfig/qconf-cfg.sh | 29 +-
scripts/kconfig/qconf.cc | 1106 +++++++++--------
scripts/kconfig/qconf.h | 163 +--
scripts/kconfig/streamline_config.pl | 98 +-
scripts/kconfig/symbol.c | 106 +-
scripts/kconfig/tests/auto_submenu/Kconfig | 2 +
.../kconfig/tests/auto_submenu/__init__.py | 1 +
scripts/kconfig/tests/choice/Kconfig | 4 +-
scripts/kconfig/tests/choice/__init__.py | 1 +
.../tests/choice_value_with_m_dep/Kconfig | 4 +-
.../tests/choice_value_with_m_dep/__init__.py | 1 +
scripts/kconfig/tests/conftest.py | 4 +
.../tests/err_recursive_dep/expected_stderr | 14 +-
.../kconfig/tests/err_recursive_inc/Kconfig | 1 +
.../tests/err_recursive_inc/Kconfig.inc1 | 1 +
.../tests/err_recursive_inc/Kconfig.inc2 | 1 +
.../tests/err_recursive_inc/Kconfig.inc3 | 1 +
.../tests/err_recursive_inc/__init__.py | 1 +
.../tests/err_recursive_inc/expected_stderr | 6 +-
scripts/kconfig/tests/inter_choice/Kconfig | 4 +-
.../kconfig/tests/inter_choice/__init__.py | 1 +
.../kconfig/tests/new_choice_with_dep/Kconfig | 2 +
.../tests/new_choice_with_dep/__init__.py | 1 +
.../tests/no_write_if_dep_unmet/Kconfig | 2 +
.../tests/no_write_if_dep_unmet/__init__.py | 1 +
.../tests/preprocess/builtin_func/Kconfig | 27 +
.../tests/preprocess/builtin_func/__init__.py | 9 +
.../preprocess/builtin_func/expected_stderr | 5 +
.../preprocess/builtin_func/expected_stdout | 1 +
.../preprocess/circular_expansion/Kconfig | 5 +
.../preprocess/circular_expansion/__init__.py | 11 +
.../circular_expansion/expected_stderr | 1 +
.../kconfig/tests/preprocess/escape/Kconfig | 44 +
.../tests/preprocess/escape/__init__.py | 8 +
.../tests/preprocess/escape/expected_stderr | 10 +
.../kconfig/tests/preprocess/variable/Kconfig | 53 +
.../tests/preprocess/variable/__init__.py | 8 +
.../tests/preprocess/variable/expected_stderr | 9 +
.../kconfig/tests/rand_nested_choice/Kconfig | 33 -
.../tests/rand_nested_choice/__init__.py | 16 -
.../tests/rand_nested_choice/expected_stdout0 | 2 -
.../tests/rand_nested_choice/expected_stdout1 | 4 -
.../tests/rand_nested_choice/expected_stdout2 | 5 -
scripts/kconfig/util.c | 5 +-
74 files changed, 2786 insertions(+), 2664 deletions(-)
create mode 100644 scripts/kconfig/images.h
create mode 100644 scripts/kconfig/internal.h
delete mode 100644 scripts/kconfig/kconf_id.c
rename scripts/kconfig/{zconf.l => lexer.l} (67%)
delete mode 100644 scripts/kconfig/lxdialog/.gitignore
mode change 100644 => 100755 scripts/kconfig/nconf-cfg.sh
rename scripts/kconfig/{zconf.y => parser.y} (70%)
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/expected_stderr
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/expected_stdout
create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/expected_stderr
create mode 100644 scripts/kconfig/tests/preprocess/escape/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/escape/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/escape/expected_stderr
create mode 100644 scripts/kconfig/tests/preprocess/variable/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/variable/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/variable/expected_stderr
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/Kconfig
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/__init__.py
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/expected_stdout0
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/expected_stdout1
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/expected_stdout2Signature · 1 line
2.40.0.rc1.284.g88254d51c5-goog
RFC PATCH 1/2 kconfig: Bring in from Linux v6.2
Bring in this code wholesale, replacing the old U-Boot code.
---
scripts/kconfig/.gitignore | 20 +-
scripts/kconfig/Makefile | 211 ++--
scripts/kconfig/conf.c | 499 +++++---
scripts/kconfig/confdata.c | 1074 ++++++++--------
scripts/kconfig/expr.c | 30 +-
scripts/kconfig/expr.h | 17 +-
scripts/kconfig/gconf-cfg.sh | 15 +-
scripts/kconfig/gconf.c | 47 +-
scripts/kconfig/images.c | 34 +-
scripts/kconfig/images.h | 33 +
scripts/kconfig/internal.h | 9 +
scripts/kconfig/kconf_id.c | 52 -
scripts/kconfig/{zconf.l => lexer.l} | 247 ++--
scripts/kconfig/list.h | 2 +-
scripts/kconfig/lkc.h | 91 +-
scripts/kconfig/lkc_proto.h | 22 +-
scripts/kconfig/lxdialog/.gitignore | 4 -
scripts/kconfig/lxdialog/BIG.FAT.WARNING | 2 +-
scripts/kconfig/lxdialog/inputbox.c | 3 +-
scripts/kconfig/lxdialog/util.c | 4 +-
scripts/kconfig/mconf-cfg.sh | 36 +-
scripts/kconfig/mconf.c | 42 +-
scripts/kconfig/menu.c | 263 ++--
scripts/kconfig/merge_config.sh | 75 +-
scripts/kconfig/nconf-cfg.sh | 32 +-
scripts/kconfig/nconf.c | 89 +-
scripts/kconfig/nconf.gui.c | 292 ++---
scripts/kconfig/nconf.h | 56 +-
scripts/kconfig/{zconf.y => parser.y} | 336 ++---
scripts/kconfig/preprocess.c | 12 +-
scripts/kconfig/qconf-cfg.sh | 29 +-
scripts/kconfig/qconf.cc | 1106 +++++++++--------
scripts/kconfig/qconf.h | 163 +--
scripts/kconfig/streamline_config.pl | 98 +-
scripts/kconfig/symbol.c | 106 +-
scripts/kconfig/tests/auto_submenu/Kconfig | 2 +
.../kconfig/tests/auto_submenu/__init__.py | 1 +
scripts/kconfig/tests/choice/Kconfig | 4 +-
scripts/kconfig/tests/choice/__init__.py | 1 +
.../tests/choice_value_with_m_dep/Kconfig | 4 +-
.../tests/choice_value_with_m_dep/__init__.py | 1 +
scripts/kconfig/tests/conftest.py | 4 +
.../tests/err_recursive_dep/expected_stderr | 14 +-
.../kconfig/tests/err_recursive_inc/Kconfig | 1 +
.../tests/err_recursive_inc/Kconfig.inc1 | 1 +
.../tests/err_recursive_inc/Kconfig.inc2 | 1 +
.../tests/err_recursive_inc/Kconfig.inc3 | 1 +
.../tests/err_recursive_inc/__init__.py | 1 +
.../tests/err_recursive_inc/expected_stderr | 6 +-
scripts/kconfig/tests/inter_choice/Kconfig | 4 +-
.../kconfig/tests/inter_choice/__init__.py | 1 +
.../kconfig/tests/new_choice_with_dep/Kconfig | 2 +
.../tests/new_choice_with_dep/__init__.py | 1 +
.../tests/no_write_if_dep_unmet/Kconfig | 2 +
.../tests/no_write_if_dep_unmet/__init__.py | 1 +
.../tests/preprocess/builtin_func/Kconfig | 27 +
.../tests/preprocess/builtin_func/__init__.py | 9 +
.../preprocess/builtin_func/expected_stderr | 5 +
.../preprocess/builtin_func/expected_stdout | 1 +
.../preprocess/circular_expansion/Kconfig | 5 +
.../preprocess/circular_expansion/__init__.py | 11 +
.../circular_expansion/expected_stderr | 1 +
.../kconfig/tests/preprocess/escape/Kconfig | 44 +
.../tests/preprocess/escape/__init__.py | 8 +
.../tests/preprocess/escape/expected_stderr | 10 +
.../kconfig/tests/preprocess/variable/Kconfig | 53 +
.../tests/preprocess/variable/__init__.py | 8 +
.../tests/preprocess/variable/expected_stderr | 9 +
.../kconfig/tests/rand_nested_choice/Kconfig | 33 -
.../tests/rand_nested_choice/__init__.py | 16 -
.../tests/rand_nested_choice/expected_stdout0 | 2 -
.../tests/rand_nested_choice/expected_stdout1 | 4 -
.../tests/rand_nested_choice/expected_stdout2 | 5 -
scripts/kconfig/util.c | 5 +-
74 files changed, 2786 insertions(+), 2674 deletions(-)
create mode 100644 scripts/kconfig/images.h
create mode 100644 scripts/kconfig/internal.h
delete mode 100644 scripts/kconfig/kconf_id.c
rename scripts/kconfig/{zconf.l => lexer.l} (67%)
delete mode 100644 scripts/kconfig/lxdialog/.gitignore
mode change 100644 => 100755 scripts/kconfig/nconf-cfg.sh
rename scripts/kconfig/{zconf.y => parser.y} (70%)
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/expected_stderr
create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/expected_stdout
create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/expected_stderr
create mode 100644 scripts/kconfig/tests/preprocess/escape/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/escape/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/escape/expected_stderr
create mode 100644 scripts/kconfig/tests/preprocess/variable/Kconfig
create mode 100644 scripts/kconfig/tests/preprocess/variable/__init__.py
create mode 100644 scripts/kconfig/tests/preprocess/variable/expected_stderr
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/Kconfig
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/__init__.py
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/expected_stdout0
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/expected_stdout1
delete mode 100644 scripts/kconfig/tests/rand_nested_choice/expected_stdout2scripts/kconfig/.gitignore +7 -13
@@ -1,13 +1,7 @@ -# -# Generated files -# -*.moc - -# -# configuration programs -# -conf -mconf -nconf -qconf -gconf +# SPDX-License-Identifier: GPL-2.0-only +/conf +/[gmnq]conf +/[gmnq]conf-bin +/[gmnq]conf-cflags +/[gmnq]conf-libs +/qconf-moc.cc
scripts/kconfig/Makefile +101 -110
316 lines not on this page · raw message
scripts/kconfig/conf.c +354 -145
643 lines not on this page · raw message
scripts/kconfig/confdata.c +510 -564
1,366 lines not on this page · raw message
scripts/kconfig/expr.c +14 -16
@@ -1,8 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2002 Roman Zippel <[email protected]> -* Released under the terms of the GNU GPL v2.0. */ +#include <ctype.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h>
@@ -11,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)
@@ -248,10 +249,17 @@ 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; +/* +* A NULL expr is taken to be yes, but there's also a different way to +* represent yes. expr_is_yes() checks for either representation. +*/ +if (!e1 || !e2) +return expr_is_yes (e1) &&expr_is_yes (e2); +if (e1->type != e2->type)return 0 ;switch (e1->type) {
@@ -894,7 +902,7 @@ bool expr_depends_symbol(struct expr *dep, struct symbol *sym)default : ; } -return false; +return false; }/*
@@ -980,7 +988,6 @@ enum string_value_kind { k_string, k_signed, k_unsigned, - k_invalid }; union string_value {
@@ -1011,13 +1018,10 @@ static enum string_value_kind expr_parse_string(const char *str, val->u =strtoull (str, &tail,16 ); kind = k_unsigned;break ; -case S_STRING : -case S_UNKNOWN : +default : val->s =strtoll (str, &tail,0 ); kind = k_signed;break ; -default : -return k_invalid; }return !errno && !*tail && tail > str &&isxdigit (tail[-1 ]) ? kind : k_string;
@@ -1073,13 +1077,7 @@ tristate expr_calc_value(struct expr *e)if (k1 == k_string || k2 == k_string) res =strcmp (str1, str2); -else if (k1 == k_invalid || k2 == k_invalid) { -if (e->type !=E_EQUAL && e->type !=E_UNEQUAL ) { -printf ("Cannot compare \"%s\" and \"%s\"\n" , str1, str2); -return no; - } - res =strcmp (str1, str2); - }else if (k1 == k_unsigned || k2 == k_unsigned) +else if (k1 == k_unsigned || k2 == k_unsigned) res = (lval.u > rval.u) - (lval.u < rval.u);else /* if (k1 == k_signed && k2 == k_signed) */ res = (lval.s > rval.s) - (lval.s < rval.s);
scripts/kconfig/expr.h +6 -11
@@ -1,6 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2002 Roman Zippel <[email protected]> -* Released under the terms of the GNU GPL v2.0. */ #ifndef EXPR_H
@@ -62,7 +62,7 @@ struct symbol_value { };enum symbol_type { -S_UNKNOWN ,S_BOOLEAN ,S_TRISTATE ,S_INT ,S_HEX ,S_STRING ,S_OTHER +S_UNKNOWN ,S_BOOLEAN ,S_TRISTATE ,S_INT ,S_HEX ,S_STRING };/* enum values are used as index to symbol.def[] */
@@ -131,7 +131,7 @@ struct symbol {struct expr_value implied; }; -#define for_all_symbols (i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) +#define for_all_symbols (i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next)#define SYMBOL_CONST 0x0001/* symbol is const */ #define SYMBOL_CHECK 0x0008/* used during dependency checking */
@@ -141,6 +141,7 @@ struct symbol {#define SYMBOL_OPTIONAL 0x0100/* choice is optional - values can be 'n' */ #define SYMBOL_WRITE 0x0200/* write symbol to file (KCONFIG_CONFIG) */ #define SYMBOL_CHANGED 0x0400/* ? */ +#define SYMBOL_WRITTEN 0x0800/* track info to avoid double-write to .config */ #define SYMBOL_NO_WRITE 0x1000/* Symbol for internal use only; it will not be written */ #define SYMBOL_CHECKED 0x2000/* used during dependency checking */ #define SYMBOL_WARNED 0x8000/* warning has been issued */
@@ -155,9 +156,6 @@ 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
@@ -172,7 +170,7 @@ struct symbol {* int "BAZ Value" * range 1..255 * -* Please, also check zconf.y:print_symbol() when modifying the +* Please, also check parser.y:print_symbol() when modifying the * list of property types! */ enum prop_type {
@@ -190,7 +188,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;
@@ -281,15 +278,12 @@ struct jump_key {int index; }; -#define JUMP_NB 9 -extern struct file *file_list;extern struct file *current_file;struct file *lookup_file (const char *name);extern struct symbol symbol_yes, symbol_no, symbol_mod;extern struct symbol *modules_sym; -extern struct symbol *sym_defconfig_list;extern int cdebug;struct expr *expr_alloc_symbol (struct symbol *sym);struct expr *expr_alloc_one (enum expr_type type,struct expr *ce);
@@ -300,6 +294,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-cfg.sh +9 -6
@@ -1,16 +1,19 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 +cflags=$1 +libs=$2 + PKG="gtk+-2.0 gmodule-2.0 libglade-2.0" -if [ -z "$(command -v pkg-config)" ]; then +if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then echo >&2 "*" - echo >&2 "* 'make gconfig' requires 'pkg-config'. Please install it." + echo >&2 "* 'make gconfig' requires '${HOSTPKG_CONFIG}'. Please install it." echo >&2 "*" exit 1 fi -if ! pkg-config --exists $PKG; then +if ! ${HOSTPKG_CONFIG} --exists $PKG; then echo >&2 "*" echo >&2 "* Unable to find the GTK+ installation. Please make sure that" echo >&2 "* the GTK+ 2.0 development package is correctly installed."
@@ -19,12 +22,12 @@ if ! pkg-config --exists $PKG; then exit 1 fi -if ! pkg-config --atleast-version=2.0.0 gtk+-2.0; then +if ! ${HOSTPKG_CONFIG} --atleast-version=2.0.0 gtk+-2.0; then echo >&2 "*" echo >&2 "* GTK+ is present but version >= 2.0.0 is required." echo >&2 "*" exit 1 fi -echo cflags=\"$(pkg-config --cflags $PKG)\" -echo libs=\"$(pkg-config --libs $PKG)\" +${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags} +${HOSTPKG_CONFIG} --libs ${PKG} > ${libs}
scripts/kconfig/gconf.c +22 -25
136 lines not on this page · raw message
scripts/kconfig/images.c +18 -16
@@ -1,9 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2002 Roman Zippel <[email protected]> -* Released under the terms of the GNU GPL v2.0. */ -static const char *xpm_load[] = { +#include "images.h" + +const char *const xpm_load[] = {"22 22 5 1" ,". c None" ,"# c #000000" ,
@@ -33,7 +35,7 @@ static const char *xpm_load[] = {"###############......." , "......................"}; -static const char *xpm_save[] = { +const char *const xpm_save[] = {"22 22 5 1" ,". c None" , "# c #000000",
@@ -63,7 +65,7 @@ static const char *xpm_save[] = {"..##################.." , "......................"}; -static const char *xpm_back[] = { +const char *const xpm_back[] = {"22 22 3 1" ,". c None" , "# c #000083",
@@ -91,7 +93,7 @@ static const char *xpm_back[] = {"......................" , "......................"}; -static const char *xpm_tree_view[] = { +const char *const xpm_tree_view[] = {"22 22 2 1" ,". c None" , "# c #000000",
@@ -118,7 +120,7 @@ static const char *xpm_tree_view[] = {"......................" , "......................"}; -static const char *xpm_single_view[] = { +const char *const xpm_single_view[] = {"22 22 2 1" ,". c None" , "# c #000000",
@@ -145,7 +147,7 @@ static const char *xpm_single_view[] = {"......................" , "......................"}; -static const char *xpm_split_view[] = { +const char *const xpm_split_view[] = {"22 22 2 1" ,". c None" , "# c #000000",
@@ -172,7 +174,7 @@ static const char *xpm_split_view[] = {"......................" , "......................"}; -static const char *xpm_symbol_no[] = { +const char *const xpm_symbol_no[] = {"12 12 2 1" ," c white" , ". c black",
@@ -189,7 +191,7 @@ static const char *xpm_symbol_no[] = {" .......... " , " "}; -static const char *xpm_symbol_mod[] = { +const char *const xpm_symbol_mod[] = {"12 12 2 1" ," c white" , ". c black",
@@ -206,7 +208,7 @@ static const char *xpm_symbol_mod[] = {" .......... " , " "}; -static const char *xpm_symbol_yes[] = { +const char *const xpm_symbol_yes[] = {"12 12 2 1" ," c white" , ". c black",
@@ -223,7 +225,7 @@ static const char *xpm_symbol_yes[] = {" .......... " , " "}; -static const char *xpm_choice_no[] = { +const char *const xpm_choice_no[] = {"12 12 2 1" ," c white" , ". c black",
@@ -240,7 +242,7 @@ static const char *xpm_choice_no[] = {" .... " , " "}; -static const char *xpm_choice_yes[] = { +const char *const xpm_choice_yes[] = {"12 12 2 1" ," c white" , ". c black",
@@ -257,7 +259,7 @@ static const char *xpm_choice_yes[] = {" .... " , " "}; -static const char *xpm_menu[] = { +const char *const xpm_menu[] = {"12 12 2 1" ," c white" , ". c black",
@@ -274,7 +276,7 @@ static const char *xpm_menu[] = {" .......... " , " "}; -static const char *xpm_menu_inv[] = { +const char *const xpm_menu_inv[] = {"12 12 2 1" ," c white" , ". c black",
@@ -291,7 +293,7 @@ static const char *xpm_menu_inv[] = {" .......... " , " "}; -static const char *xpm_menuback[] = { +const char *const xpm_menuback[] = {"12 12 2 1" ," c white" , ". c black",
@@ -308,7 +310,7 @@ static const char *xpm_menuback[] = {" .......... " , " "}; -static const char *xpm_void[] = { +const char *const xpm_void[] = {"12 12 2 1" ," c white" , ". c black",
scripts/kconfig/images.h new file +33 -0
@@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2002 Roman Zippel <[email protected]> +*/ + +#ifndef IMAGES_H +#define IMAGES_H + +#ifdef __cplusplus +extern "C" { +#endif + +extern const char *const xpm_load[]; +extern const char *const xpm_save[]; +extern const char *const xpm_back[]; +extern const char *const xpm_tree_view[]; +extern const char *const xpm_single_view[]; +extern const char *const xpm_split_view[]; +extern const char *const xpm_symbol_no[]; +extern const char *const xpm_symbol_mod[]; +extern const char *const xpm_symbol_yes[]; +extern const char *const xpm_choice_no[]; +extern const char *const xpm_choice_yes[]; +extern const char *const xpm_menu[]; +extern const char *const xpm_menu_inv[]; +extern const char *const xpm_menuback[]; +extern const char *const xpm_void[]; + +#ifdef __cplusplus +} +#endif + +#endif /* IMAGES_H */
scripts/kconfig/internal.h new file +9 -0
@@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef INTERNAL_H +#define INTERNAL_H + +struct menu ; + +extern struct menu *current_menu, *current_entry; + +#endif /* INTERNAL_H */
scripts/kconfig/kconf_id.c deleted +0 -52
52 lines not on this page · raw message
scripts/kconfig/lexer.l renamed from scripts/kconfig/zconf.l +130 -117
108 lines not on this page · raw message
scripts/kconfig/lkc.h +36 -55
91 lines not on this page · raw message
scripts/kconfig/lxdialog/.gitignore deleted +0 -4
Lines of this file are not shown. View the raw message.
scripts/kconfig/lxdialog/BIG.FAT.WARNING +1 -1
Lines of this file are not shown. View the raw message.
scripts/kconfig/mconf.c +23 -19
42 lines not on this page · raw message
scripts/kconfig/menu.c +126 -137
263 lines not on this page · raw message
scripts/kconfig/merge_config.sh +52 -23
75 lines not on this page · raw message
scripts/kconfig/nconf.c +43 -46
89 lines not on this page · raw message
scripts/kconfig/nconf.gui.c +121 -171
292 lines not on this page · raw message
scripts/kconfig/nconf.h +23 -33
56 lines not on this page · raw message
scripts/kconfig/parser.y renamed from scripts/kconfig/zconf.y +131 -205
336 lines not on this page · raw message
scripts/kconfig/qconf.cc +578 -528
1,106 lines not on this page · raw message
scripts/kconfig/qconf.h +54 -109
163 lines not on this page · raw message
scripts/kconfig/streamline_config.pl +61 -37
98 lines not on this page · raw message
scripts/kconfig/symbol.c +21 -85
106 lines not on this page · raw message
scripts/kconfig/tests/auto_submenu/Kconfig +2 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/auto_submenu/__init__.py +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/choice/__init__.py +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/choice_value_with_m_dep/Kconfig +3 -1
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/choice_value_with_m_dep/__init__.py +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/err_recursive_dep/expected_stderr +7 -7
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/err_recursive_inc/Kconfig +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/err_recursive_inc/Kconfig.inc1 +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/err_recursive_inc/Kconfig.inc2 +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/err_recursive_inc/Kconfig.inc3 +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/err_recursive_inc/__init__.py +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/err_recursive_inc/expected_stderr +3 -3
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/inter_choice/Kconfig +3 -1
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/inter_choice/__init__.py +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/new_choice_with_dep/Kconfig +2 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/new_choice_with_dep/__init__.py +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/no_write_if_dep_unmet/Kconfig +2 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/builtin_func/Kconfig new file +27 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/builtin_func/__init__.py new file +9 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/builtin_func/expected_stderr new file +5 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/builtin_func/expected_stdout new file +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/circular_expansion/Kconfig new file +5 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/circular_expansion/__init__.py new file +11 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/circular_expansion/expected_stderr new file +1 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/escape/Kconfig new file +44 -0
44 lines not on this page · raw message
scripts/kconfig/tests/preprocess/escape/__init__.py new file +8 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/escape/expected_stderr new file +10 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/variable/Kconfig new file +53 -0
53 lines not on this page · raw message
scripts/kconfig/tests/preprocess/variable/__init__.py new file +8 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/preprocess/variable/expected_stderr new file +9 -0
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/rand_nested_choice/Kconfig deleted +0 -33
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/rand_nested_choice/__init__.py deleted +0 -16
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/rand_nested_choice/expected_stdout0 deleted +0 -2
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/rand_nested_choice/expected_stdout1 deleted +0 -4
Lines of this file are not shown. View the raw message.
scripts/kconfig/tests/rand_nested_choice/expected_stdout2 deleted +0 -5
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.40.0.rc1.284.g88254d51c5-goog
Part of the diff is not shown here. View the raw message.
Re: [RFC PATCH 1/2] kconfig: Bring in from Linux v6.2
Quoted 98 lines · Simon Glass
Bring in this code wholesale, replacing the old U-Boot code.
Signed-off-by Simon Glass <[email protected]>---
scripts/kconfig/.gitignore | 20 +- scripts/kconfig/Makefile | 211 ++-- scripts/kconfig/conf.c | 499 +++++--- scripts/kconfig/confdata.c | 1074 ++++++++-------- scripts/kconfig/expr.c | 30 +- scripts/kconfig/expr.h | 17 +- scripts/kconfig/gconf-cfg.sh | 15 +- scripts/kconfig/gconf.c | 47 +- scripts/kconfig/images.c | 34 +- scripts/kconfig/images.h | 33 + scripts/kconfig/internal.h | 9 + scripts/kconfig/kconf_id.c | 52 - scripts/kconfig/{zconf.l => lexer.l} | 247 ++-- scripts/kconfig/list.h | 2 +- scripts/kconfig/lkc.h | 91 +- scripts/kconfig/lkc_proto.h | 22 +- scripts/kconfig/lxdialog/.gitignore | 4 - scripts/kconfig/lxdialog/BIG.FAT.WARNING | 2 +- scripts/kconfig/lxdialog/inputbox.c | 3 +- scripts/kconfig/lxdialog/util.c | 4 +- scripts/kconfig/mconf-cfg.sh | 36 +- scripts/kconfig/mconf.c | 42 +- scripts/kconfig/menu.c | 263 ++-- scripts/kconfig/merge_config.sh | 75 +- scripts/kconfig/nconf-cfg.sh | 32 +- scripts/kconfig/nconf.c | 89 +- scripts/kconfig/nconf.gui.c | 292 ++--- scripts/kconfig/nconf.h | 56 +- scripts/kconfig/{zconf.y => parser.y} | 336 ++--- scripts/kconfig/preprocess.c | 12 +- scripts/kconfig/qconf-cfg.sh | 29 +- scripts/kconfig/qconf.cc | 1106 +++++++++-------- scripts/kconfig/qconf.h | 163 +-- scripts/kconfig/streamline_config.pl | 98 +- scripts/kconfig/symbol.c | 106 +- scripts/kconfig/tests/auto_submenu/Kconfig | 2 + .../kconfig/tests/auto_submenu/__init__.py | 1 + scripts/kconfig/tests/choice/Kconfig | 4 +- scripts/kconfig/tests/choice/__init__.py | 1 + .../tests/choice_value_with_m_dep/Kconfig | 4 +- .../tests/choice_value_with_m_dep/__init__.py | 1 + scripts/kconfig/tests/conftest.py | 4 + .../tests/err_recursive_dep/expected_stderr | 14 +- .../kconfig/tests/err_recursive_inc/Kconfig | 1 + .../tests/err_recursive_inc/Kconfig.inc1 | 1 + .../tests/err_recursive_inc/Kconfig.inc2 | 1 + .../tests/err_recursive_inc/Kconfig.inc3 | 1 + .../tests/err_recursive_inc/__init__.py | 1 + .../tests/err_recursive_inc/expected_stderr | 6 +- scripts/kconfig/tests/inter_choice/Kconfig | 4 +- .../kconfig/tests/inter_choice/__init__.py | 1 + .../kconfig/tests/new_choice_with_dep/Kconfig | 2 + .../tests/new_choice_with_dep/__init__.py | 1 + .../tests/no_write_if_dep_unmet/Kconfig | 2 + .../tests/no_write_if_dep_unmet/__init__.py | 1 + .../tests/preprocess/builtin_func/Kconfig | 27 + .../tests/preprocess/builtin_func/__init__.py | 9 + .../preprocess/builtin_func/expected_stderr | 5 + .../preprocess/builtin_func/expected_stdout | 1 + .../preprocess/circular_expansion/Kconfig | 5 + .../preprocess/circular_expansion/__init__.py | 11 + .../circular_expansion/expected_stderr | 1 + .../kconfig/tests/preprocess/escape/Kconfig | 44 + .../tests/preprocess/escape/__init__.py | 8 + .../tests/preprocess/escape/expected_stderr | 10 + .../kconfig/tests/preprocess/variable/Kconfig | 53 + .../tests/preprocess/variable/__init__.py | 8 + .../tests/preprocess/variable/expected_stderr | 9 + .../kconfig/tests/rand_nested_choice/Kconfig | 33 - .../tests/rand_nested_choice/__init__.py | 16 - .../tests/rand_nested_choice/expected_stdout0 | 2 - .../tests/rand_nested_choice/expected_stdout1 | 4 - .../tests/rand_nested_choice/expected_stdout2 | 5 - scripts/kconfig/util.c | 5 +- 74 files changed, 2786 insertions(+), 2674 deletions(-) create mode 100644 scripts/kconfig/images.h create mode 100644 scripts/kconfig/internal.h delete mode 100644 scripts/kconfig/kconf_id.c rename scripts/kconfig/{zconf.l => lexer.l} (67%) delete mode 100644 scripts/kconfig/lxdialog/.gitignore mode change 100644 => 100755 scripts/kconfig/nconf-cfg.sh rename scripts/kconfig/{zconf.y => parser.y} (70%) create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/Kconfig create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/__init__.py create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/expected_stderr create mode 100644 scripts/kconfig/tests/preprocess/builtin_func/expected_stdout create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/Kconfig create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/__init__.py create mode 100644 scripts/kconfig/tests/preprocess/circular_expansion/expected_stderr create mode 100644 scripts/kconfig/tests/preprocess/escape/Kconfig create mode 100644 scripts/kconfig/tests/preprocess/escape/__init__.py create mode 100644 scripts/kconfig/tests/preprocess/escape/expected_stderr
Quoted 9 lines
create mode 100644 scripts/kconfig/tests/preprocess/variable/Kconfig create mode 100644 scripts/kconfig/tests/preprocess/variable/__init__.py create mode 100644 scripts/kconfig/tests/preprocess/variable/expected_stderr delete mode 100644 scripts/kconfig/tests/rand_nested_choice/Kconfig delete mode 100644 scripts/kconfig/tests/rand_nested_choice/__init__.py delete mode 100644 scripts/kconfig/tests/rand_nested_choice/expected_stdout0 delete mode 100644 scripts/kconfig/tests/rand_nested_choice/expected_stdout1 delete mode 100644 scripts/kconfig/tests/rand_nested_choice/expected_stdout2
Tested building qemu-x86 and qemu-riscv_spl, and boot on QEMU
RFC PATCH 2/2 kconfig: U-Boot additions
In reply to Simon GlassBring in some U-Boot additions
This seems to build OK, but 'make menuconfig' does not build the scripts/kconfig/mconf utility.
---
scripts/kconfig/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)
scripts/kconfig/Makefile +10 -0
@@ -3,6 +3,12 @@ # Kernel configuration targets # These targets are used from top-level makefile +# Added for U-Boot +# Linux has defconfig files in arch/$(SRCARCH)/configs/, +# on the other hand, U-Boot does in configs/. +# Set SRCARCH to .. fake this Makefile. +SRCARCH := .. + ifdef KBUILD_KCONFIG Kconfig := $(KBUILD_KCONFIG) else
@@ -93,6 +99,10 @@ endif %_defconfig: $(obj)/conf $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) +# Added for U-Boot (backward compatibility) +%_config: %_defconfig + @: + configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@) %.config: $(obj)/conf
Signature · 1 line
2.40.0.rc1.284.g88254d51c5-goog
Re: [RFC PATCH 2/2] kconfig: U-Boot additions
Quoted 12 lines · Simon Glass
Bring in some U-Boot additions
This seems to build OK, but 'make menuconfig' does not build the
scripts/kconfig/mconfutility.Signed-off-by Simon Glass <[email protected]>---
scripts/kconfig/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)
Tested building qemu-x86 and qemu-riscv_spl, and boot on QEMU