From 258551b7f111d6229accb5829b4d5edc4442759b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 7 Dec 2021 13:00:01 +0100 Subject: [PATCH 01/42] dtc: import package for dtc & fdt from packages feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fdt* utils are needed by targets that use U-Boot FIT images for sysupgrade. It includes all recent BCM4908 SoC routers as Broadcom switched from CFE to U-Boot. fdtget is required for extracting images (bootfs & rootfs) from Broadcom's ITB. Extracted images can be then flashed to UBI volumes. sysupgrade is core functionality so it needs dtc as part of base code base. Cc: Yousong Zhou Signed-off-by: Rafał Miłecki --- package/utils/dtc/Makefile | 93 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 package/utils/dtc/Makefile diff --git a/package/utils/dtc/Makefile b/package/utils/dtc/Makefile new file mode 100644 index 0000000000..94534b9c5e --- /dev/null +++ b/package/utils/dtc/Makefile @@ -0,0 +1,93 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (C) 2016-2019 Yousong Zhou + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dtc +PKG_VERSION:=1.6.1 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_HASH:=65cec529893659a49a89740bb362f507a3b94fc8cd791e76a8d6a2b6f3203473 +PKG_SOURCE_URL:=@KERNEL/software/utils/dtc + +PKG_MAINTAINER:=Yousong Zhou +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=GPL + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/meson.mk + +define Package/dtc + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Device Tree Compiler + URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git +endef + +define Package/dtc/description + Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes + as input a device-tree in a given format and outputs a device-tree in another + format for booting kernels on embedded systems. +endef + +define Package/dtc/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/dtc $(1)/usr/bin +endef + + +# See Documentation/manual.txt for details about each utility +define Package/fdt-utils + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Flat Device Tree Utilities + URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git + DEPENDS:=+libfdt +endef + +define Package/fdt-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/convert-dtsv0 $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtdump $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtget $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtput $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtoverlay $(1)/usr/bin +endef + + +define Package/libfdt + SECTION:=libs + CATEGORY:=Libraries + TITLE:=a utility library for reading and manipulating dtb files + URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git +endef + +define Package/libfdt/description + This is a library containing functions for manipulating Flat Device Trees. +endef + +define Package/libfdt/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdt*.so* $(1)/usr/lib +endef + +MESON_ARGS += \ + -Dtools=true \ + -Dyaml=disabled \ + -Dvalgrind=disabled \ + -Dpython=disabled + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,dtc)) +$(eval $(call BuildPackage,fdt-utils)) +$(eval $(call BuildPackage,libfdt)) From 81a8caea9c4e55a792b9d0bcc8f61f2a202a914c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 7 Dec 2021 13:00:02 +0100 Subject: [PATCH 02/42] dtc: support printing binary data with fdtget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's needed for extracting binary images. Cc: Yousong Zhou Signed-off-by: Rafał Miłecki --- ...t-for-printing-raw-bytes-with-fdtget.patch | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch diff --git a/package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch b/package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch new file mode 100644 index 0000000000..f7731f1a9d --- /dev/null +++ b/package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch @@ -0,0 +1,137 @@ +From 17739b7ef510917471409d71fb45d8eaf6a1e1fb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 9 Dec 2021 07:14:20 +0100 +Subject: [PATCH] Support 'r' format for printing raw bytes with fdtget +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +FT is sometimes used for storing raw data. That is quite common for +U-Boot FIT images. + +Extracting such data is not trivial currently. Using type 's' (string) +will replace every 0x00 (NUL) with 0x20 (space). Using type 'x' will +print bytes but in xxd incompatible format. + +This commit adds support for 'r' (raw) format. Example usage: +fdtget -t r firmware.itb /images/foo data > image.raw + +Support for encoding isn't added as there isn't any clean way of passing +binary data as command line argument. + +Signed-off-by: Rafał Miłecki +Message-Id: <20211209061420.29466-1-zajec5@gmail.com> +Signed-off-by: David Gibson +--- + Documentation/manual.txt | 2 +- + fdtget.c | 5 +++++ + fdtput.c | 2 ++ + tests/run_tests.sh | 2 ++ + tests/utilfdt_test.c | 5 ++++- + util.c | 4 ++-- + util.h | 3 ++- + 7 files changed, 18 insertions(+), 5 deletions(-) + +--- a/Documentation/manual.txt ++++ b/Documentation/manual.txt +@@ -712,7 +712,7 @@ The syntax of the fdtget command is: + + where options are: + +- s=string, i=int, u=unsigned, x=hex ++ s=string, i=int, u=unsigned, x=hex, r=raw + Optional modifier prefix: + hh or b=byte, h=2 byte, l=4 byte (default) + +--- a/fdtget.c ++++ b/fdtget.c +@@ -91,6 +91,11 @@ static int show_data(struct display_info + if (len == 0) + return 0; + ++ if (disp->type == 'r') { ++ fwrite(data, 1, len, stdout); ++ return 0; ++ } ++ + is_string = (disp->type) == 's' || + (!disp->type && util_is_printable_string(data, len)); + if (is_string) { +--- a/fdtput.c ++++ b/fdtput.c +@@ -433,6 +433,8 @@ int main(int argc, char *argv[]) + if (utilfdt_decode_type(optarg, &disp.type, + &disp.size)) + usage("Invalid type string"); ++ if (disp.type == 'r') ++ usage("Unsupported raw data type"); + break; + + case 'v': +--- a/tests/run_tests.sh ++++ b/tests/run_tests.sh +@@ -852,6 +852,8 @@ fdtget_tests () { + run_fdtget_test 8000 -tx $dtb /cpus/PowerPC,970@1 d-cache-size + run_fdtget_test "61 62 63 0" -tbx $dtb /randomnode tricky1 + run_fdtget_test "a b c d de ea ad be ef" -tbx $dtb /randomnode blob ++ run_fdtget_test "MyBoardName\0MyBoardFamilyName\0" -tr $dtb / compatible ++ run_fdtget_test "\x0a\x0b\x0c\x0d\xde\xea\xad\xbe\xef" -tr $dtb /randomnode blob + + # Here the property size is not a multiple of 4 bytes, so it should fail + run_wrap_error_test $DTGET -tlx $dtb /randomnode mixed +--- a/tests/utilfdt_test.c ++++ b/tests/utilfdt_test.c +@@ -73,6 +73,9 @@ static void check_sizes(char *modifier, + + *ptr = 's'; + check(fmt, 's', -1); ++ ++ *ptr = 'r'; ++ check(fmt, 'r', -1); + } + + static void test_utilfdt_decode_type(void) +@@ -90,7 +93,7 @@ static void test_utilfdt_decode_type(voi + /* try every other character */ + checkfail(""); + for (ch = ' '; ch < 127; ch++) { +- if (!strchr("iuxs", ch)) { ++ if (!strchr("iuxsr", ch)) { + *fmt = ch; + fmt[1] = '\0'; + checkfail(fmt); +--- a/util.c ++++ b/util.c +@@ -353,11 +353,11 @@ int utilfdt_decode_type(const char *fmt, + } + + /* we should now have a type */ +- if ((*fmt == '\0') || !strchr("iuxs", *fmt)) ++ if ((*fmt == '\0') || !strchr("iuxsr", *fmt)) + return -1; + + /* convert qualifier (bhL) to byte size */ +- if (*fmt != 's') ++ if (*fmt != 's' && *fmt != 'r') + *size = qualifier == 'b' ? 1 : + qualifier == 'h' ? 2 : + qualifier == 'l' ? 4 : -1; +--- a/util.h ++++ b/util.h +@@ -143,6 +143,7 @@ int utilfdt_write_err(const char *filena + * i signed integer + * u unsigned integer + * x hex ++ * r raw + * + * TODO: Implement ll modifier (8 bytes) + * TODO: Implement o type (octal) +@@ -160,7 +161,7 @@ int utilfdt_decode_type(const char *fmt, + */ + + #define USAGE_TYPE_MSG \ +- "\ts=string, i=int, u=unsigned, x=hex\n" \ ++ "\ts=string, i=int, u=unsigned, x=hex, r=raw\n" \ + "\tOptional modifier prefix:\n" \ + "\t\thh or b=byte, h=2 byte, l=4 byte (default)"; + From 53df97e7893f97a5afd91f8ee5d77979fbe890d8 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Thu, 6 Jan 2022 22:16:29 +0800 Subject: [PATCH 03/42] autocore: fix count core number `uniq` doesn't work, I don't know why. Fixes: #558 Signed-off-by: Tianling Shen --- package/emortal/autocore/files/generic/cpuinfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/emortal/autocore/files/generic/cpuinfo b/package/emortal/autocore/files/generic/cpuinfo index bbc94cedd4..8c9afd7a45 100755 --- a/package/emortal/autocore/files/generic/cpuinfo +++ b/package/emortal/autocore/files/generic/cpuinfo @@ -3,7 +3,7 @@ cpu_arch="$(grep "model name" "/proc/cpuinfo" | head -n1 | awk -F ': ' '{print $2}' | xargs)" [ -z "${cpu_arch}" ] && cpu_arch="?" if grep -q "x86" "/etc/openwrt_release"; then - cpu_cores="$(grep "core id" "/proc/cpuinfo" | uniq | wc -l)C $(grep -c "processor" "/proc/cpuinfo")T" + cpu_cores="$(grep "core id" "/proc/cpuinfo" | sort -u | wc -l)C $(grep -c "processor" "/proc/cpuinfo")T" else cpu_cores="$(grep -c "processor" "/proc/cpuinfo")" fi From fc12d1add343292dc55eabf3fc63343c878c1834 Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Sun, 2 Jan 2022 22:18:04 +0300 Subject: [PATCH 04/42] utils/mdadm: fix build on hosts without /run dir CHECK_RUN_DIR=0 must be a part of MAKE_FLAGS, not MAKE_VARS, otherwise it is not possible to compile mdadm on host without /run dir. Signed-off-by: Sergey V. Lobanov --- package/utils/mdadm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/utils/mdadm/Makefile b/package/utils/mdadm/Makefile index f20a58b704..f6696bf21c 100644 --- a/package/utils/mdadm/Makefile +++ b/package/utils/mdadm/Makefile @@ -52,7 +52,7 @@ TARGET_CFLAGS += \ TARGET_LDFLAGS += -Wl,--gc-sections -MAKE_VARS += CHECK_RUN_DIR=0 +MAKE_FLAGS += CHECK_RUN_DIR=0 define Build/Compile $(call Build/Compile/Default,mdadm) From 522a1d7e10e1ebb779d3c81260cf2d9adfb036d9 Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Tue, 4 Jan 2022 17:22:07 +0300 Subject: [PATCH 05/42] elfutils: update to 0.186 Upstreamed patches (deleted): 0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch - https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=8382833a257b57b0d288be07d2d5e7af6c102869 110-no-cdefs.patch - https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=d390548df1942e98a1d836269a5e41ba52e121f1 Auto-refreshed: 006-Fix-build-on-aarch64-musl.patch 101-no-fts.patch Manually updated and refreshed: 005-build_only_libs.patch 003-libintl-compatibility.patch 100-musl-compat.patch Disabled _obstack_free check (via configure vars) Signed-off-by: Sergey V. Lobanov --- package/libs/elfutils/Makefile | 10 +++- ...cliude-asm-ptrace.h-for-pt_regs-defi.patch | 29 ---------- .../patches/003-libintl-compatibility.patch | 54 ++----------------- .../patches/005-build_only_libs.patch | 2 +- .../elfutils/patches/100-musl-compat.patch | 48 ++++++----------- .../libs/elfutils/patches/101-no-fts.patch | 6 +-- .../libs/elfutils/patches/110-no-cdefs.patch | 26 --------- 7 files changed, 30 insertions(+), 145 deletions(-) delete mode 100644 package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch delete mode 100644 package/libs/elfutils/patches/110-no-cdefs.patch diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile index b0c9b8bd8c..f9a350f9fe 100644 --- a/package/libs/elfutils/Makefile +++ b/package/libs/elfutils/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=elfutils -PKG_VERSION:=0.182 +PKG_VERSION:=0.186 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) -PKG_HASH:=ecc406914edf335f0b7fc084ebe6c460c4d6d5175bfdd6688c1c78d9146b8858 +PKG_HASH:=7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=GPL-3.0-or-later @@ -74,6 +74,12 @@ CONFIGURE_ARGS += \ --without-lzma \ --without-zstd +HOST_CONFIGURE_VARS += \ + ac_cv_search__obstack_free=yes + +CONFIGURE_VARS += \ + ac_cv_search__obstack_free=yes + TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral define Build/InstallDev diff --git a/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch b/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch deleted file mode 100644 index 839f86ee6a..0000000000 --- a/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch +++ /dev/null @@ -1,29 +0,0 @@ -From http://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch - -From 2e2232d0935bf8ef6e66ebffba3be68a73b5b3e5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 8 Sep 2019 15:57:59 -0700 -Subject: [PATCH] ppc_initreg.c: Incliude asm/ptrace.h for pt_regs definition - -Fixes -| ../../elfutils-0.176/backends/ppc_initreg.c:79:22: error: field 'r' has incomplete type -| struct pt_regs r; -| ^ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - backends/ppc_initreg.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/backends/ppc_initreg.c -+++ b/backends/ppc_initreg.c -@@ -33,6 +33,7 @@ - #include - #if defined(__powerpc__) && defined(__linux__) - # include -+# include - # include - #endif - diff --git a/package/libs/elfutils/patches/003-libintl-compatibility.patch b/package/libs/elfutils/patches/003-libintl-compatibility.patch index 26fcc85c8b..3254dcffb2 100644 --- a/package/libs/elfutils/patches/003-libintl-compatibility.patch +++ b/package/libs/elfutils/patches/003-libintl-compatibility.patch @@ -11,9 +11,9 @@ Requires.private: zlib --- a/configure.ac +++ b/configure.ac -@@ -590,6 +590,9 @@ AC_CONFIG_FILES([config/libelf.pc config - AC_SUBST(USE_NLS, yes) - AM_PO_SUBDIRS +@@ -610,6 +610,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo + AM_GNU_GETTEXT_VERSION([0.19.6]) + AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6]) +case "$USE_NLS" in yes) intl_LDFLAGS="-lintl" ;; esac +AC_SUBST([intl_LDFLAGS]) @@ -21,51 +21,3 @@ dnl Appended to the config.h file. dnl We hide all kinds of configuration magic in lib/eu-config.h. AH_BOTTOM([#include ]) ---- a/libasm/libasmP.h -+++ b/libasm/libasmP.h -@@ -36,6 +36,9 @@ - - #include "libdwelf.h" - -+#ifdef _ /* fix libintl-stub */ -+#undef _ -+#endif - /* gettext helper macros. */ - #define _(Str) dgettext ("elfutils", Str) - ---- a/libdw/libdwP.h -+++ b/libdw/libdwP.h -@@ -37,6 +37,9 @@ - #include - #include "atomics.h" - -+#ifdef _ /* fix libintl-stub */ -+#undef _ -+#endif - - /* gettext helper macros. */ - #define _(Str) dgettext ("elfutils", Str) ---- a/libdwfl/libdwflP.h -+++ b/libdwfl/libdwflP.h -@@ -47,6 +47,9 @@ - - typedef struct Dwfl_Process Dwfl_Process; - -+#ifdef _ /* fix libintl-stub */ -+#undef _ -+#endif - /* gettext helper macros. */ - #define _(Str) dgettext ("elfutils", Str) - ---- a/libelf/libelfP.h -+++ b/libelf/libelfP.h -@@ -39,6 +39,9 @@ - #include - #include - -+#ifdef _ /* fix libintl-stub */ -+#undef _ -+#endif - /* gettext helper macros. */ - #define _(Str) dgettext ("elfutils", Str) - diff --git a/package/libs/elfutils/patches/005-build_only_libs.patch b/package/libs/elfutils/patches/005-build_only_libs.patch index 501348f21c..304b85c47a 100644 --- a/package/libs/elfutils/patches/005-build_only_libs.patch +++ b/package/libs/elfutils/patches/005-build_only_libs.patch @@ -3,7 +3,7 @@ @@ -27,7 +27,7 @@ AM_MAKEFLAGS = --no-print-directory pkginclude_HEADERS = version.h - SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl libdw \ + SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \ - libasm debuginfod src po doc tests + libasm diff --git a/package/libs/elfutils/patches/100-musl-compat.patch b/package/libs/elfutils/patches/100-musl-compat.patch index 508ff9e946..52b9f2c43b 100644 --- a/package/libs/elfutils/patches/100-musl-compat.patch +++ b/package/libs/elfutils/patches/100-musl-compat.patch @@ -1,27 +1,3 @@ -https://sourceware.org/bugzilla/show_bug.cgi?id=21002 - ---- a/lib/system.h -+++ b/lib/system.h -@@ -30,7 +30,18 @@ - #define LIB_SYSTEM_H 1 - - #include --#include -+#ifdef HAVE_ERROR_H -+#include "error.h" -+#else -+#include "err.h" -+#include -+#define error(status, errno, ...) \ -+ do { \ -+ fflush(stdout); \ -+ warn(__VA_ARGS__); \ -+ if (status) exit(status); \ -+ } while(0) -+#endif - #include - #include - #include --- a/libdw/libdw_alloc.c +++ b/libdw/libdw_alloc.c @@ -152,5 +152,5 @@ __attribute ((noreturn)) attribute_hidde @@ -33,15 +9,21 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002 } --- a/libdwfl/dwfl_error.c +++ b/libdwfl/dwfl_error.c -@@ -154,7 +154,11 @@ dwfl_errmsg (int error) - switch (error &~ 0xffff) - { - case OTHER_ERROR (ERRNO): +@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error) + static const char * + errnomsg(int error) + { +#if defined(__GLIBC__) && !defined(__UCLIBC__) - return strerror_r (error & 0xffff, "bad", 0); + /* Won't be changed by strerror_r, but not const so compiler doesn't throw warning */ + static char unknown[] = "unknown error"; + +@@ -150,6 +151,9 @@ errnomsg(int error) + static __thread char msg[128]; + return strerror_r (error, msg, sizeof (msg)) ? unknown : msg; + #endif +#else -+ return strerror (error & 0xffff); ++ return strerror (error & 0xffff); +#endif - case OTHER_ERROR (LIBELF): - return elf_errmsg (error & 0xffff); - case OTHER_ERROR (LIBDW): + } + + const char * diff --git a/package/libs/elfutils/patches/101-no-fts.patch b/package/libs/elfutils/patches/101-no-fts.patch index 29ec9ecac0..c4f0b88233 100644 --- a/package/libs/elfutils/patches/101-no-fts.patch +++ b/package/libs/elfutils/patches/101-no-fts.patch @@ -1,6 +1,6 @@ --- a/libdwfl/argp-std.c +++ b/libdwfl/argp-std.c -@@ -56,9 +56,6 @@ static const struct argp_option options[ +@@ -53,9 +53,6 @@ static const struct argp_option options[ { "linux-process-map", 'M', "FILE", 0, N_("Find addresses in files mapped as read from FILE" " in Linux /proc/PID/maps format"), 0 }, @@ -10,7 +10,7 @@ { "debuginfo-path", OPT_DEBUGINFO, "PATH", 0, N_("Search path for separate debuginfo files"), 0 }, { NULL, 0, NULL, 0, NULL, 0 } -@@ -85,15 +82,6 @@ static const Dwfl_Callbacks proc_callbac +@@ -82,15 +79,6 @@ static const Dwfl_Callbacks proc_callbac .find_elf = INTUSE(dwfl_linux_proc_find_elf), }; @@ -26,7 +26,7 @@ /* Structure held at state->HOOK. */ struct parse_opt { -@@ -226,43 +214,6 @@ parse_opt (int key, char *arg, struct ar +@@ -223,43 +211,6 @@ parse_opt (int key, char *arg, struct ar } break; diff --git a/package/libs/elfutils/patches/110-no-cdefs.patch b/package/libs/elfutils/patches/110-no-cdefs.patch deleted file mode 100644 index d66f1e924f..0000000000 --- a/package/libs/elfutils/patches/110-no-cdefs.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e399540ab67ffe83ca3c4cb768a2f0f2f32a9057 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Sun, 5 Apr 2020 15:56:59 -0700 -Subject: [PATCH] libelf: remove usage of sys/cdefs - -sys/cdefs is a deprecated glibc header that is unavailable with other -libc implementations such as musl. - -features.h under glibc includes sys/cdefs whereas it does not under musl. - -Signed-off-by: Rosen Penev ---- - lib/fixedsizehash.h | 1 - - libelf/elf.h | 10 ++++++---- - 2 files changed, 6 insertions(+), 5 deletions(-) - ---- a/lib/fixedsizehash.h -+++ b/lib/fixedsizehash.h -@@ -30,7 +30,6 @@ - #include - #include - #include --#include - - #include - From cd129540ff057f2ad1d856904d2f9a2803397a53 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Wed, 28 Oct 2020 16:39:58 -0400 Subject: [PATCH 06/42] mbedtls: enable session tickets session tickets are a feature of TLSv1.2 and require less memory and overhead on the server than does managing a session cache Building mbedtls with support for session tickets will allow the feature to be used with lighttpd-1.4.56 and later. Signed-off-by: Glenn Strauss --- package/libs/mbedtls/patches/200-config.patch | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/package/libs/mbedtls/patches/200-config.patch b/package/libs/mbedtls/patches/200-config.patch index 1e3d41f0eb..67f331674c 100644 --- a/package/libs/mbedtls/patches/200-config.patch +++ b/package/libs/mbedtls/patches/200-config.patch @@ -126,15 +126,6 @@ /** * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO -@@ -1690,7 +1690,7 @@ - * - * Comment this macro to disable support for SSL session tickets - */ --#define MBEDTLS_SSL_SESSION_TICKETS -+//#define MBEDTLS_SSL_SESSION_TICKETS - - /** - * \def MBEDTLS_SSL_EXPORT_KEYS @@ -1720,7 +1720,7 @@ * * Comment this macro to disable support for truncated HMAC in SSL @@ -216,15 +207,6 @@ /** * \def MBEDTLS_RSA_C -@@ -2913,7 +2913,7 @@ - * - * Requires: MBEDTLS_CIPHER_C - */ --#define MBEDTLS_SSL_TICKET_C -+//#define MBEDTLS_SSL_TICKET_C - - /** - * \def MBEDTLS_SSL_CLI_C @@ -3013,7 +3013,7 @@ * * This module provides run-time version information. From 35e626c0c55ba480fe6bd27ba1babe007bbdf855 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Mon, 3 Jan 2022 09:29:53 +0200 Subject: [PATCH 07/42] busybox: update to 1.35.0 Update busybox to 1.35.0 * refresh patches Config refresh: Refresh commands, run after busybox is first built once: cd package/utils/busybox/config/ ../convert_menuconfig.pl ../../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.35.0 cd .. ./convert_defaults.pl ../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.35.0/.config > Config-defaults.in Manual edits needed after config refresh: * Config-defaults.in: OpenWrt config symbol IPV6 logic applied to BUSYBOX_DEFAULT_FEATURE_IPV6 * Config-defaults.in: OpenWrt configTARGET_bcm53xx logic applied to BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec) * Config-defaults.in: OpenWrt logic applied to BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917) * config/editors/Config.in: Add USE_GLIBC dependency to BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090) * config/shell/Config.in : change at "Options common to all shells" the symbol SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html Apparently our script does not see the hidden option while prepending config options with "BUSYBOX_CONFIG_" which leads to a missed dependency when the options are later evaluated.) * Edit Config.in files by adding quotes to sourced items in config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f) Signed-off-by: Hannu Nyman --- package/utils/busybox/Config-defaults.in | 116 +++++++----- package/utils/busybox/Makefile | 4 +- .../utils/busybox/config/archival/Config.in | 14 ++ .../utils/busybox/config/coreutils/Config.in | 91 ++++++--- .../utils/busybox/config/findutils/Config.in | 43 ++++- package/utils/busybox/config/libbb/Config.in | 176 ++++++------------ .../utils/busybox/config/mailutils/Config.in | 14 +- .../utils/busybox/config/networking/Config.in | 39 +++- package/utils/busybox/config/procps/Config.in | 23 ++- .../301-ip-link-fix-netlink-msg-size.patch | 2 +- 10 files changed, 314 insertions(+), 208 deletions(-) diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index 540c09ba76..4ac60570cd 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -211,15 +211,24 @@ config BUSYBOX_DEFAULT_MD5_SMALL config BUSYBOX_DEFAULT_SHA3_SMALL int default 1 -config BUSYBOX_DEFAULT_FEATURE_FAST_TOP +config BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP bool default y -config BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS +config BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE bool default n -config BUSYBOX_DEFAULT_FEATURE_ETC_SERVICES +config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE bool - default n + default y +config BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB + int + default 4 +config BUSYBOX_DEFAULT_MONOTONIC_SYSCALL + bool + default y +config BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR + bool + default y config BUSYBOX_DEFAULT_FEATURE_EDITING bool default y @@ -289,30 +298,6 @@ config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN bool default n -config BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP - bool - default y -config BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE - bool - default n -config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE - bool - default y -config BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB - int - default 4 -config BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS - bool - default n -config BUSYBOX_DEFAULT_MONOTONIC_SYSCALL - bool - default y -config BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR - bool - default y -config BUSYBOX_DEFAULT_FEATURE_HWIB - bool - default n config BUSYBOX_DEFAULT_FEATURE_SEAMLESS_XZ bool default n @@ -391,6 +376,12 @@ config BUSYBOX_DEFAULT_FEATURE_CPIO_O config BUSYBOX_DEFAULT_FEATURE_CPIO_P bool default n +config BUSYBOX_DEFAULT_FEATURE_CPIO_IGNORE_DEVNO + bool + default n +config BUSYBOX_DEFAULT_FEATURE_CPIO_RENUMBER_INODES + bool + default n config BUSYBOX_DEFAULT_DPKG bool default n @@ -484,6 +475,18 @@ config BUSYBOX_DEFAULT_FEATURE_UNZIP_XZ config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST bool default n +config BUSYBOX_DEFAULT_FEATURE_VERBOSE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_TIMEZONE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS + bool + default y +config BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE + bool + default y config BUSYBOX_DEFAULT_BASENAME bool default y @@ -568,6 +571,9 @@ config BUSYBOX_DEFAULT_DF config BUSYBOX_DEFAULT_FEATURE_DF_FANCY bool default n +config BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS + bool + default n config BUSYBOX_DEFAULT_DIRNAME bool default y @@ -908,15 +914,6 @@ config BUSYBOX_DEFAULT_WHOAMI config BUSYBOX_DEFAULT_YES bool default y -config BUSYBOX_DEFAULT_FEATURE_VERBOSE - bool - default n -config BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS - bool - default y -config BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE - bool - default y config BUSYBOX_DEFAULT_CHVT bool default n @@ -1118,9 +1115,21 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_PRINT0 config BUSYBOX_DEFAULT_FEATURE_FIND_MTIME bool default y +config BUSYBOX_DEFAULT_FEATURE_FIND_ATIME + bool + default n +config BUSYBOX_DEFAULT_FEATURE_FIND_CTIME + bool + default n config BUSYBOX_DEFAULT_FEATURE_FIND_MMIN bool default y +config BUSYBOX_DEFAULT_FEATURE_FIND_AMIN + bool + default n +config BUSYBOX_DEFAULT_FEATURE_FIND_CMIN + bool + default n config BUSYBOX_DEFAULT_FEATURE_FIND_PERM bool default y @@ -1142,6 +1151,9 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_NEWER config BUSYBOX_DEFAULT_FEATURE_FIND_INUM bool default n +config BUSYBOX_DEFAULT_FEATURE_FIND_SAMEFILE + bool + default n config BUSYBOX_DEFAULT_FEATURE_FIND_EXEC bool default y @@ -2211,6 +2223,15 @@ config BUSYBOX_DEFAULT_FEATURE_PREFER_IPV4_ADDRESS config BUSYBOX_DEFAULT_VERBOSE_RESOLUTION_ERRORS bool default y +config BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS + bool + default n +config BUSYBOX_DEFAULT_FEATURE_ETC_SERVICES + bool + default n +config BUSYBOX_DEFAULT_FEATURE_HWIB + bool + default n config BUSYBOX_DEFAULT_FEATURE_TLS_SHA1 bool default n @@ -2265,6 +2286,9 @@ config BUSYBOX_DEFAULT_DNSDOMAINNAME config BUSYBOX_DEFAULT_HTTPD bool default n +config BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT + int + default 80 config BUSYBOX_DEFAULT_FEATURE_HTTPD_RANGES bool default n @@ -2544,6 +2568,9 @@ config BUSYBOX_DEFAULT_TELNETD config BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE bool default n +config BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT + int + default 23 config BUSYBOX_DEFAULT_FEATURE_TELNETD_INETD_WAIT bool default n @@ -2700,6 +2727,9 @@ config BUSYBOX_DEFAULT_LPR config BUSYBOX_DEFAULT_LPQ bool default n +config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET + string + default "" config BUSYBOX_DEFAULT_MAKEMIME bool default n @@ -2718,9 +2748,12 @@ config BUSYBOX_DEFAULT_FEATURE_REFORMIME_COMPAT config BUSYBOX_DEFAULT_SENDMAIL bool default n -config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET - string - default "" +config BUSYBOX_DEFAULT_FEATURE_FAST_TOP + bool + default y +config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS + bool + default n config BUSYBOX_DEFAULT_FREE bool default y @@ -2835,9 +2868,6 @@ config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT config BUSYBOX_DEFAULT_WATCH bool default n -config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS - bool - default n config BUSYBOX_DEFAULT_CHPST bool default n diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 5d34abfc24..38c693cfeb 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -5,14 +5,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox -PKG_VERSION:=1.34.1 +PKG_VERSION:=1.35.0 PKG_RELEASE:=$(AUTORELEASE) PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.busybox.net/downloads \ http://sources.buildroot.net -PKG_HASH:=415fbd89e5344c96acf449d94a6f956dbed62e18e835fc83e064db33a34bd549 +PKG_HASH:=faeeb244c35a348a334f4a59e44626ee870fb07b6884d68c10ae8bc19f83a694 PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam PKG_BUILD_PARALLEL:=1 diff --git a/package/utils/busybox/config/archival/Config.in b/package/utils/busybox/config/archival/Config.in index ea167a46af..ac2b3d2056 100644 --- a/package/utils/busybox/config/archival/Config.in +++ b/package/utils/busybox/config/archival/Config.in @@ -204,6 +204,20 @@ config BUSYBOX_CONFIG_FEATURE_CPIO_P depends on BUSYBOX_CONFIG_FEATURE_CPIO_O help Passthrough mode. Rarely used. + +config BUSYBOX_CONFIG_FEATURE_CPIO_IGNORE_DEVNO + bool "Support --ignore-devno like GNU cpio" + default BUSYBOX_DEFAULT_FEATURE_CPIO_IGNORE_DEVNO + depends on BUSYBOX_CONFIG_FEATURE_CPIO_O && BUSYBOX_CONFIG_LONG_OPTS + help + Optionally ignore device numbers when creating archives. + +config BUSYBOX_CONFIG_FEATURE_CPIO_RENUMBER_INODES + bool "Support --renumber-inodes like GNU cpio" + default BUSYBOX_DEFAULT_FEATURE_CPIO_RENUMBER_INODES + depends on BUSYBOX_CONFIG_FEATURE_CPIO_O && BUSYBOX_CONFIG_LONG_OPTS + help + Optionally renumber inodes when creating archives. config BUSYBOX_CONFIG_DPKG bool "dpkg (43 kb)" default BUSYBOX_DEFAULT_DPKG diff --git a/package/utils/busybox/config/coreutils/Config.in b/package/utils/busybox/config/coreutils/Config.in index c84c1d5a94..835ce7950a 100644 --- a/package/utils/busybox/config/coreutils/Config.in +++ b/package/utils/busybox/config/coreutils/Config.in @@ -6,6 +6,47 @@ menu "Coreutils" +config BUSYBOX_CONFIG_FEATURE_VERBOSE + bool "Support verbose options (usually -v) for various applets" + default BUSYBOX_DEFAULT_FEATURE_VERBOSE + help + Enable cp -v, rm -v and similar messages. + Also enables long option (--verbose) if it exists. + Without this option, -v is accepted but ignored. + +comment "Common options for date and touch" + +config BUSYBOX_CONFIG_FEATURE_TIMEZONE + bool "Allow timezone in dates" + default BUSYBOX_DEFAULT_FEATURE_TIMEZONE + depends on BUSYBOX_CONFIG_DESKTOP + help + Permit the use of timezones when parsing user-provided data + strings, e.g. '1996-04-09 12:45:00 -0500'. + + This requires support for the '%z' extension to strptime() which + may not be available in all implementations. + +comment "Common options for cp and mv" + depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV + +config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS + bool "Preserve hard links" + default BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS + depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV + help + Allow cp and mv to preserve hard links. + +comment "Common options for df, du, ls" + depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS + +config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE + bool "Support human readable output (example 13k, 23M, 235G)" + default BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE + depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS + help + Allow df, du, and ls to have human readable output. + config BUSYBOX_CONFIG_BASENAME bool "basename (438 bytes)" default BUSYBOX_DEFAULT_BASENAME @@ -200,6 +241,26 @@ config BUSYBOX_CONFIG_FEATURE_DF_FANCY -a Show all filesystems -i Inodes -B Blocksize + +config BUSYBOX_CONFIG_FEATURE_SKIP_ROOTFS + bool "Skip rootfs in mount table" + default BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS + depends on BUSYBOX_CONFIG_DF + help + Ignore rootfs entry in mount table. + + In Linux, kernel has a special filesystem, rootfs, which is initially + mounted on /. It contains initramfs data, if kernel is configured + to have one. Usually, another file system is mounted over / early + in boot process, and therefore most tools which manipulate + mount table, such as df, will skip rootfs entry. + + However, some systems do not mount anything on /. + If you need to configure busybox for one of these systems, + you may find it useful to turn this option off to make df show + initramfs statistics. + + Otherwise, choose Y. config BUSYBOX_CONFIG_DIRNAME bool "dirname (329 bytes)" default BUSYBOX_DEFAULT_DIRNAME @@ -896,34 +957,4 @@ config BUSYBOX_CONFIG_YES yes is used to repeatedly output a specific string, or the default string 'y'. -comment "Common options" - -config BUSYBOX_CONFIG_FEATURE_VERBOSE - bool "Support verbose options (usually -v) for various applets" - default BUSYBOX_DEFAULT_FEATURE_VERBOSE - help - Enable cp -v, rm -v and similar messages. - Also enables long option (--verbose) if it exists. - Without this option, -v is accepted but ignored. - -comment "Common options for cp and mv" - depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV - -config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS - bool "Preserve hard links" - default BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS - depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV - help - Allow cp and mv to preserve hard links. - -comment "Common options for df, du, ls" - depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS - -config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE - bool "Support human readable output (example 13k, 23M, 235G)" - default BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE - depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS - help - Allow df, du, and ls to have human readable output. - endmenu diff --git a/package/utils/busybox/config/findutils/Config.in b/package/utils/busybox/config/findutils/Config.in index 89901ca59d..805d44f149 100644 --- a/package/utils/busybox/config/findutils/Config.in +++ b/package/utils/busybox/config/findutils/Config.in @@ -23,21 +23,53 @@ config BUSYBOX_CONFIG_FEATURE_FIND_PRINT0 interpreted by other programs. config BUSYBOX_CONFIG_FEATURE_FIND_MTIME - bool "Enable -mtime: modified time matching" + bool "Enable -mtime: modification time matching" default BUSYBOX_DEFAULT_FEATURE_FIND_MTIME depends on BUSYBOX_CONFIG_FIND help Allow searching based on the modification time of files, in days. +config BUSYBOX_CONFIG_FEATURE_FIND_ATIME + bool "Enable -atime: access time matching" + default BUSYBOX_DEFAULT_FEATURE_FIND_ATIME + depends on BUSYBOX_CONFIG_FEATURE_FIND_MTIME + help + Allow searching based on the access time of + files, in days. + +config BUSYBOX_CONFIG_FEATURE_FIND_CTIME + bool "Enable -ctime: status change timestamp matching" + default BUSYBOX_DEFAULT_FEATURE_FIND_CTIME + depends on BUSYBOX_CONFIG_FEATURE_FIND_MTIME + help + Allow searching based on the status change timestamp of + files, in days. + config BUSYBOX_CONFIG_FEATURE_FIND_MMIN - bool "Enable -mmin: modified time matching by minutes" + bool "Enable -mmin: modification time matching by minutes" default BUSYBOX_DEFAULT_FEATURE_FIND_MMIN depends on BUSYBOX_CONFIG_FIND help Allow searching based on the modification time of files, in minutes. +config BUSYBOX_CONFIG_FEATURE_FIND_AMIN + bool "Enable -amin: access time matching by minutes" + default BUSYBOX_DEFAULT_FEATURE_FIND_AMIN + depends on BUSYBOX_CONFIG_FEATURE_FIND_MMIN + help + Allow searching based on the access time of + files, in minutes. + +config BUSYBOX_CONFIG_FEATURE_FIND_CMIN + bool "Enable -cmin: status change timestamp matching by minutes" + default BUSYBOX_DEFAULT_FEATURE_FIND_CMIN + depends on BUSYBOX_CONFIG_FEATURE_FIND_MMIN + help + Allow searching based on the status change timestamp of + files, in minutes. + config BUSYBOX_CONFIG_FEATURE_FIND_PERM bool "Enable -perm: permissions matching" default BUSYBOX_DEFAULT_FEATURE_FIND_PERM @@ -79,6 +111,13 @@ config BUSYBOX_CONFIG_FEATURE_FIND_INUM default BUSYBOX_DEFAULT_FEATURE_FIND_INUM depends on BUSYBOX_CONFIG_FIND +config BUSYBOX_CONFIG_FEATURE_FIND_SAMEFILE + bool "Enable -samefile: reference file matching" + default BUSYBOX_DEFAULT_FEATURE_FIND_SAMEFILE + depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -samefile' option for searching by a reference file. + config BUSYBOX_CONFIG_FEATURE_FIND_EXEC bool "Enable -exec: execute commands" default BUSYBOX_DEFAULT_FEATURE_FIND_EXEC diff --git a/package/utils/busybox/config/libbb/Config.in b/package/utils/busybox/config/libbb/Config.in index 906649c5c9..e050c4a915 100644 --- a/package/utils/busybox/config/libbb/Config.in +++ b/package/utils/busybox/config/libbb/Config.in @@ -117,32 +117,73 @@ config BUSYBOX_CONFIG_SHA3_SMALL 64-bit x86: +270 bytes of code, 45% faster 32-bit x86: +450 bytes of code, 75% faster -config BUSYBOX_CONFIG_FEATURE_FAST_TOP - bool "Faster /proc scanning code (+100 bytes)" - default BUSYBOX_DEFAULT_FEATURE_FAST_TOP # all "fast or small" options default to small +config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP + bool "Non-POSIX, but safer, copying to special nodes" + default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP help - This option makes top and ps ~20% faster (or 20% less CPU hungry), - but code size is slightly bigger. + With this option, "cp file symlink" will delete symlink + and create a regular file. This does not conform to POSIX, + but prevents a symlink attack. + Similarly, "cp file device" will not send file's data + to the device. (To do that, use "cat file >device") -config BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS - bool "Support /etc/networks" - default BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS +config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE + bool "Give more precise messages when copy fails (cp, mv etc)" + default BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE help - Enable support for network names in /etc/networks. This is - a rarely used feature which allows you to use names - instead of IP/mask pairs in route command. + Error messages with this feature enabled: -config BUSYBOX_CONFIG_FEATURE_ETC_SERVICES - bool "Consult /etc/services even for well-known ports" - default BUSYBOX_DEFAULT_FEATURE_ETC_SERVICES + $ cp file /does_not_exist/file + cp: cannot create '/does_not_exist/file': Path does not exist + $ cp file /vmlinuz/file + cp: cannot stat '/vmlinuz/file': Path has non-directory component + + If this feature is not enabled, they will be, respectively: + + cp: cannot create '/does_not_exist/file': No such file or directory + cp: cannot stat '/vmlinuz/file': Not a directory + + This will cost you ~60 bytes. + +config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE + bool "Use sendfile system call" + default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE help - Look up e.g. "telnet" and "http" in /etc/services file - instead of assuming ports 23 and 80. - This is almost never necessary (everybody uses standard ports), - and it makes sense to avoid reading this file. - If you disable this option, in the cases where port is explicitly - specified as a service name (e.g. "telnet HOST PORTNAME"), - it will still be looked up in /etc/services. + When enabled, busybox will use the kernel sendfile() function + instead of read/write loops to copy data between file descriptors + (for example, cp command does this a lot). + If sendfile() doesn't work, copying code falls back to read/write + loop. sendfile() was originally implemented for faster I/O + from files to sockets, but since Linux 2.6.33 it was extended + to work for many more file types. + +config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB + int "Copy buffer size, in kilobytes" + range 1 1024 + default BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB + help + Size of buffer used by cp, mv, install, wget etc. + Buffers which are 4 kb or less will be allocated on stack. + Bigger buffers will be allocated with mmap, with fallback to 4 kb + stack buffer if mmap fails. + +config BUSYBOX_CONFIG_MONOTONIC_SYSCALL + bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" + default BUSYBOX_DEFAULT_MONOTONIC_SYSCALL + help + Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring + time intervals (time, ping, traceroute etc need this). + Probably requires Linux 2.6+. If not selected, gettimeofday + will be used instead (which gives wrong results if date/time + is reset). + +config BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR + bool "Use ioctl names rather than hex values in error messages" + default BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR + help + Use ioctl names rather than hex values in error messages + (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this + saves about 1400 bytes. config BUSYBOX_CONFIG_FEATURE_EDITING bool "Command line editing" @@ -358,96 +399,3 @@ config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN For example, this means that entering 'l', 's', ' ', 0xff, [Enter] at shell prompt will list file named 0xff (single char name with char value 255), not file named '?'. - -config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP - bool "Non-POSIX, but safer, copying to special nodes" - default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP - help - With this option, "cp file symlink" will delete symlink - and create a regular file. This does not conform to POSIX, - but prevents a symlink attack. - Similarly, "cp file device" will not send file's data - to the device. (To do that, use "cat file >device") - -config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE - bool "Give more precise messages when copy fails (cp, mv etc)" - default BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE - help - Error messages with this feature enabled: - - $ cp file /does_not_exist/file - cp: cannot create '/does_not_exist/file': Path does not exist - $ cp file /vmlinuz/file - cp: cannot stat '/vmlinuz/file': Path has non-directory component - - If this feature is not enabled, they will be, respectively: - - cp: cannot create '/does_not_exist/file': No such file or directory - cp: cannot stat '/vmlinuz/file': Not a directory - - This will cost you ~60 bytes. - -config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE - bool "Use sendfile system call" - default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE - help - When enabled, busybox will use the kernel sendfile() function - instead of read/write loops to copy data between file descriptors - (for example, cp command does this a lot). - If sendfile() doesn't work, copying code falls back to read/write - loop. sendfile() was originally implemented for faster I/O - from files to sockets, but since Linux 2.6.33 it was extended - to work for many more file types. - -config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB - int "Copy buffer size, in kilobytes" - range 1 1024 - default BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB - help - Size of buffer used by cp, mv, install, wget etc. - Buffers which are 4 kb or less will be allocated on stack. - Bigger buffers will be allocated with mmap, with fallback to 4 kb - stack buffer if mmap fails. - -config BUSYBOX_CONFIG_FEATURE_SKIP_ROOTFS - bool "Skip rootfs in mount table" - default BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS - help - Ignore rootfs entry in mount table. - - In Linux, kernel has a special filesystem, rootfs, which is initially - mounted on /. It contains initramfs data, if kernel is configured - to have one. Usually, another file system is mounted over / early - in boot process, and therefore most tools which manipulate - mount table, such as df, will skip rootfs entry. - - However, some systems do not mount anything on /. - If you need to configure busybox for one of these systems, - you may find it useful to turn this option off to make df show - initramfs statistics. - - Otherwise, choose Y. - -config BUSYBOX_CONFIG_MONOTONIC_SYSCALL - bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" - default BUSYBOX_DEFAULT_MONOTONIC_SYSCALL - help - Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring - time intervals (time, ping, traceroute etc need this). - Probably requires Linux 2.6+. If not selected, gettimeofday - will be used instead (which gives wrong results if date/time - is reset). - -config BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR - bool "Use ioctl names rather than hex values in error messages" - default BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR - help - Use ioctl names rather than hex values in error messages - (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this - saves about 1400 bytes. - -config BUSYBOX_CONFIG_FEATURE_HWIB - bool "Support infiniband HW" - default BUSYBOX_DEFAULT_FEATURE_HWIB - help - Support for printing infiniband addresses in network applets. diff --git a/package/utils/busybox/config/mailutils/Config.in b/package/utils/busybox/config/mailutils/Config.in index a8632471a8..ea7ae6d649 100644 --- a/package/utils/busybox/config/mailutils/Config.in +++ b/package/utils/busybox/config/mailutils/Config.in @@ -1,6 +1,13 @@ # DO NOT EDIT. This file is generated from Config.src menu "Mail Utilities" +config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET + string "Default charset" + default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET + depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL + help + Default charset of the message. + config BUSYBOX_CONFIG_MAKEMIME bool "makemime (5.4 kb)" default BUSYBOX_DEFAULT_MAKEMIME @@ -41,11 +48,4 @@ config BUSYBOX_CONFIG_SENDMAIL help Barebones sendmail. -config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET - string "Default charset" - default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET - depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL - help - Default charset of the message. - endmenu diff --git a/package/utils/busybox/config/networking/Config.in b/package/utils/busybox/config/networking/Config.in index 79bb6b1f53..861e4f9bbf 100644 --- a/package/utils/busybox/config/networking/Config.in +++ b/package/utils/busybox/config/networking/Config.in @@ -47,6 +47,32 @@ config BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS "can't resolve 'hostname.com'" and want to know more. This may increase size of your executable a bit. +config BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS + bool "Support /etc/networks" + default BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS + help + Enable support for network names in /etc/networks. This is + a rarely used feature which allows you to use names + instead of IP/mask pairs in route command. + +config BUSYBOX_CONFIG_FEATURE_ETC_SERVICES + bool "Consult /etc/services even for well-known ports" + default BUSYBOX_DEFAULT_FEATURE_ETC_SERVICES + help + Look up e.g. "telnet" and "http" in /etc/services file + instead of assuming ports 23 and 80. + This is almost never necessary (everybody uses standard ports), + and it makes sense to avoid reading this file. + If you disable this option, in the cases where port is explicitly + specified as a service name (e.g. "telnet HOST PORTNAME"), + it will still be looked up in /etc/services. + +config BUSYBOX_CONFIG_FEATURE_HWIB + bool "Support infiniband HW" + default BUSYBOX_DEFAULT_FEATURE_HWIB + help + Support for printing infiniband addresses in network applets. + config BUSYBOX_CONFIG_FEATURE_TLS_SHA1 bool "In TLS code, support ciphers which use deprecated SHA1" depends on BUSYBOX_CONFIG_TLS @@ -173,6 +199,12 @@ config BUSYBOX_CONFIG_HTTPD help HTTP server. +config BUSYBOX_CONFIG_FEATURE_HTTPD_PORT_DEFAULT + int "Default port" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT + range 1 65535 + depends on BUSYBOX_CONFIG_HTTPD + config BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES bool "Support 'Ranges:' header" default BUSYBOX_DEFAULT_FEATURE_HTTPD_RANGES @@ -774,7 +806,6 @@ config BUSYBOX_CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS bool "Enable long options" default BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_LONG_OPTIONS depends on BUSYBOX_CONFIG_FEATURE_NSLOOKUP_BIG && BUSYBOX_CONFIG_LONG_OPTS - config BUSYBOX_CONFIG_NTPD bool "ntpd (22 kb)" default BUSYBOX_DEFAULT_NTPD @@ -945,6 +976,12 @@ config BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE help Selecting this will make telnetd able to run standalone. +config BUSYBOX_CONFIG_FEATURE_TELNETD_PORT_DEFAULT + int "Default port" + default BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT + range 1 65535 + depends on BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE + config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD_WAIT bool "Support -w SEC option (inetd wait mode)" default BUSYBOX_DEFAULT_FEATURE_TELNETD_INETD_WAIT diff --git a/package/utils/busybox/config/procps/Config.in b/package/utils/busybox/config/procps/Config.in index e6c3271254..0501daf8fd 100644 --- a/package/utils/busybox/config/procps/Config.in +++ b/package/utils/busybox/config/procps/Config.in @@ -6,6 +6,21 @@ menu "Process Utilities" +config BUSYBOX_CONFIG_FEATURE_FAST_TOP + bool "Faster /proc scanning code (+100 bytes)" + default BUSYBOX_DEFAULT_FEATURE_FAST_TOP # all "fast or small" options default to small + help + This option makes top and ps ~20% faster (or 20% less CPU hungry), + but code size is slightly bigger. + +config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS + bool "Support thread display in ps/pstree/top" + default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS + depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE + help + Enables the ps -T option, showing of threads in pstree, + and 'h' command in top. + config BUSYBOX_CONFIG_FREE bool "free (3.1 kb)" default BUSYBOX_DEFAULT_FREE @@ -259,12 +274,4 @@ config BUSYBOX_CONFIG_WATCH watch is used to execute a program periodically, showing output to the screen. -config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS - bool "Support thread display in ps/pstree/top" - default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS - depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE - help - Enables the ps -T option, showing of threads in pstree, - and 'h' command in top. - endmenu diff --git a/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch b/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch index f7cd2322c9..f4c0a80922 100644 --- a/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch +++ b/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch @@ -1,6 +1,6 @@ --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c -@@ -652,7 +652,7 @@ static int do_add_or_delete(char **argv, +@@ -683,7 +683,7 @@ static int do_add_or_delete(char **argv, } xrtnl_open(&rth); ll_init_map(&rth); From e2699b38d14c3e0a6a974bbe17d0fdbc41a72a6b Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Fri, 7 Jan 2022 20:50:50 -0800 Subject: [PATCH 08/42] elfutils: Add missing musl-fts dependency libdw depends on libfts.so when building with the musl-libc library, add this missing dependency. Fixes: 6835ea13f0fa ("elfutils: update to 0.186") Signed-off-by: Florian Fainelli --- package/libs/elfutils/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile index f9a350f9fe..9aa78d8352 100644 --- a/package/libs/elfutils/Makefile +++ b/package/libs/elfutils/Makefile @@ -44,7 +44,7 @@ endef define Package/libdw $(call Package/elfutils/Default) - DEPENDS:=+libelf +libbz2 + DEPENDS:=+libelf +libbz2 +USE_MUSL:musl-fts TITLE+= (libdw) endef From a5fea8c2547115af6afdaf3477649cccf89c21da Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Thu, 30 Dec 2021 20:03:48 +0100 Subject: [PATCH 09/42] kernel: add kmod-phy-microchip phy drivers for Microchip's LAN88xx PHYs. This is needed for the "LAN7801" variant of the upstream lan78xx usb ethernet driver. Signed-off-by: Christian Lamparter --- package/kernel/linux/modules/netdevices.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 8d0811f496..6d6fcb33c4 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -161,6 +161,21 @@ endef $(eval $(call KernelPackage,et131x)) +define KernelPackage/phy-microchip + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Microchip Ethernet PHY driver + KCONFIG:=CONFIG_MICROCHIP_PHY + DEPENDS:=+kmod-libphy + FILES:=$(LINUX_DIR)/drivers/net/phy/microchip.ko + AUTOLOAD:=$(call AutoLoad,18,microchip,1) +endef + +define KernelPackage/phy-microchip/description + Supports the LAN88XX PHYs. +endef + +$(eval $(call KernelPackage,phy-microchip)) + define KernelPackage/phylib-broadcom SUBMENU:=$(NETWORK_DEVICES_MENU) From a5915ccad9168ed25d4bf3b9bc88b298a695e15b Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Thu, 30 Dec 2021 20:05:15 +0100 Subject: [PATCH 10/42] kernel: provide kmod-fixed-phy as separate kmod Almost all targets have the fixed-phy feature built into the kernel. One big exception is x86. This caused a problem with the upcoming LAN78xx usb driver. Hence this patch breaks out the fixed-phy from of_mdio (which didn't include the .ko) and puts into a separate module. Signed-off-by: Christian Lamparter --- package/kernel/linux/modules/netdevices.mk | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 6d6fcb33c4..39a2bc8298 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -985,14 +985,28 @@ endef $(eval $(call KernelPackage,forcedeth)) +define KernelPackage/fixed-phy + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=MDIO Bus/PHY emulation with fixed speed/link PHYs + DEPENDS:=+kmod-libphy + KCONFIG:=CONFIG_FIXED_PHY + FILES:=$(LINUX_DIR)/drivers/net/phy/fixed_phy.ko + AUTOLOAD:=$(call AutoProbe,fixed_phy) +endef + +define KernelPackage/fixed-phy/description + Kernel driver for "fixed" MDIO Bus to cover the boards + and devices that use PHYs that are not connected to the real MDIO bus. +endef + +$(eval $(call KernelPackage,fixed-phy)) + define KernelPackage/of-mdio SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=OpenFirmware MDIO support - DEPENDS:=+kmod-libphy + DEPENDS:=+kmod-libphy +kmod-fixed-phy @!TARGET_x86 KCONFIG:=CONFIG_OF_MDIO - FILES:= \ - $(LINUX_DIR)/drivers/net/phy/fixed_phy.ko@ge4.9 \ - $(LINUX_DIR)/drivers/of/of_mdio.ko + FILES:=$(LINUX_DIR)/drivers/of/of_mdio.ko AUTOLOAD:=$(call AutoLoad,41,of_mdio) endef From d35265d87fedfbab887f3dbb88b24294ac0c18b4 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Tue, 28 Dec 2021 23:43:57 +0100 Subject: [PATCH 11/42] kernel: add kmod-usb-net-lan78xx Add kernel module for Microchip LAN78XX based USB 2 & USB 3 10/100/1000 Ethernet adapters. [1] This kernel module is required for the Seeed Studio's Mini Router based on RPI CM4 [2]. [1] [2] Link: Signed-off-by: Josef Schlehofer (added kmod-phy-microchip and kmod-fixed-phy dependencies, rpi3 needs lan78xx but has it built-in) Signed-off-by: Christian Lamparter --- package/kernel/linux/modules/usb.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index b49566ab14..ee2a201f91 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1239,6 +1239,23 @@ endef $(eval $(call KernelPackage,usb-net-kaweth)) +define KernelPackage/usb-net-lan78xx + TITLE:=USB-To-Ethernet Microchip LAN78XX convertors + DEPENDS:=+kmod-fixed-phy +kmod-phy-microchip + KCONFIG:=CONFIG_USB_LAN78XX + FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/lan78xx.ko + AUTOLOAD:=$(call AutoProbe,lan78xx) + $(call AddDepends/usb-net) +endef + +define KernelPackage/usb-net-lan78xx/description + Kernel module for Microchip LAN78XX based USB 2 & USB 3 + 10/100/1000 Ethernet adapters. +endef + +$(eval $(call KernelPackage,usb-net-lan78xx)) + + define KernelPackage/usb-net-pegasus TITLE:=Kernel module for USB-to-Ethernet Pegasus convertors KCONFIG:=CONFIG_USB_PEGASUS From 41e7c777bff325d58f9c2aac7b4ca75355894114 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 8 Jan 2022 23:18:15 +0800 Subject: [PATCH 12/42] shellsync: cleanup package --- package/network/services/shellsync/Makefile | 6 +++--- .../services/shellsync/src/shellsync.c | 20 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/package/network/services/shellsync/Makefile b/package/network/services/shellsync/Makefile index dcbce1d21c..08bc5c11ec 100644 --- a/package/network/services/shellsync/Makefile +++ b/package/network/services/shellsync/Makefile @@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/package.mk define Package/shellsync CATEGORY:=Utilities - TITLE:=shellsync + TITLE:=Sync shell scripts DEPENDS:=+libpthread +kmod-macvlan endef @@ -18,7 +18,8 @@ define Build/Prepare endef define Package/shellsync/description -A tool to sync different shell scripts.Based on syncppp patch by morfast. +A tool to sync different shell scripts. +Based on syncppp patch by morfast. endef define Build/Compile @@ -30,5 +31,4 @@ define Package/shellsync/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/shellsync $(1)/usr/bin endef - $(eval $(call BuildPackage,shellsync)) diff --git a/package/network/services/shellsync/src/shellsync.c b/package/network/services/shellsync/src/shellsync.c index 4aef1e9ba2..ba9e2100a0 100644 --- a/package/network/services/shellsync/src/shellsync.c +++ b/package/network/services/shellsync/src/shellsync.c @@ -4,20 +4,23 @@ > Mail: gch981213@gmail.com > Created Time: 2014年11月06日 星期四 19时15分30秒 ************************************************************************/ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include + #define SEM_BLOCK_NAME "SYNCSHELL_block" #define SEM_COUNT_NAME "SYNCSHELL_count" + int wait_timeout; + int sync_wait(int nproc) { int flags; int value; - sem_t *block; + sem_t *block; sem_t *count; struct timespec ts; @@ -32,7 +35,6 @@ int sync_wait(int nproc) } ts.tv_sec += wait_timeout; - flags = O_RDWR | O_CREAT; block = sem_open(SEM_BLOCK_NAME, flags, 0644, 0); count = sem_open(SEM_COUNT_NAME, flags, 0644, 0); @@ -50,6 +52,7 @@ int sync_wait(int nproc) return -1; } printf("%d processes have arrived, waiting for the left %d\n", value, nproc-value); + if (value >= nproc) { while (nproc-1 > 0) { if (sem_post(block) < 0) { @@ -67,7 +70,6 @@ int sync_wait(int nproc) } return -1; } - } sem_close(count); From 634ebca484226100f5ad670adb84a7290f845fec Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 18 Dec 2021 23:18:50 +0800 Subject: [PATCH 13/42] rtl88x2bu: fixes ap mode not working (cherry picked from commit 444d028) --- package/kernel/rtl88x2bu/Makefile | 12 ++++------- .../patches/010-remove-repeat-flies.patch | 2 +- ...nge-value-of-vht-enable-and-usb-mode.patch | 20 +++++++++++++++++++ 3 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 package/kernel/rtl88x2bu/patches/020-change-value-of-vht-enable-and-usb-mode.patch diff --git a/package/kernel/rtl88x2bu/Makefile b/package/kernel/rtl88x2bu/Makefile index 8569378788..6f283a666c 100644 --- a/package/kernel/rtl88x2bu/Makefile +++ b/package/kernel/rtl88x2bu/Makefile @@ -11,15 +11,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rtl88x2bu PKG_RELEASE:=1 -PKG_SOURCE_URL:=https://github.com/cilynx/rtl88x2bu.git +PKG_SOURCE_URL:=https://github.com/morrownr/88x2bu.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-01-21 -PKG_SOURCE_VERSION:=48e7c19c92a77554403e1347447f8e2cfd780228 -PKG_MIRROR_HASH:=2991028fb7bd7e31d041b1e99d0e0d86781fff95fc70e4560ca9fcbe038f063f +PKG_SOURCE_DATE:=2021-11-09 +PKG_SOURCE_VERSION:=47a666315d0a5ff37b53adb48ca21404787565cf +PKG_MIRROR_HASH:=454449d0d11dec7cfc4196899ddbb6cd4851dcc767b7f40e293820952a12b024 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINTER:=ElonH PKG_BUILD_PARALLEL:=1 @@ -50,13 +49,10 @@ NOSTDINC_FLAGS = \ EXTRA_CFLAGS:= \ -DRTW_SINGLE_WIPHY \ -DRTW_USE_CFG80211_STA_EVENT \ - -DCONFIG_RADIO_WORK \ -DCONFIG_IOCTL_CFG80211 \ -DCONFIG_CONCURRENT_MODE EXTRA_KCONFIG:= \ - CONFIG_POWER_SAVING=n \ - CONFIG_RTW_DEBUG=y \ CONFIG_RTL8822BU=m \ USER_MODULE_NAME=rtl88x2bu diff --git a/package/kernel/rtl88x2bu/patches/010-remove-repeat-flies.patch b/package/kernel/rtl88x2bu/patches/010-remove-repeat-flies.patch index 51bbd8d3e0..67cfa1d87a 100644 --- a/package/kernel/rtl88x2bu/patches/010-remove-repeat-flies.patch +++ b/package/kernel/rtl88x2bu/patches/010-remove-repeat-flies.patch @@ -27,8 +27,8 @@ index 0d20a7e..f0a9f88 100644 +#include +#include "rtl_autoconf.h" #include "hal_ic_cfg.h" - #if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS) + #define CONFIG_RSSI_PRIORITY diff --git a/include/linux/wireless.h b/include/linux/old_unused_rtl_wireless.h similarity index 100% rename from include/linux/wireless.h diff --git a/package/kernel/rtl88x2bu/patches/020-change-value-of-vht-enable-and-usb-mode.patch b/package/kernel/rtl88x2bu/patches/020-change-value-of-vht-enable-and-usb-mode.patch new file mode 100644 index 0000000000..2944a514cf --- /dev/null +++ b/package/kernel/rtl88x2bu/patches/020-change-value-of-vht-enable-and-usb-mode.patch @@ -0,0 +1,20 @@ +--- a/os_dep/linux/os_intfs.c ++++ b/os_dep/linux/os_intfs.c +@@ -309,7 +309,7 @@ int rtw_bfee_rf_number = 0; /*BeamformeeCapRfNum Rf path number, 0 for auto, ot + #endif /* CONFIG_80211N_HT */ + + #ifdef CONFIG_80211AC_VHT +-int rtw_vht_enable = 1; /* 0:disable, 1:enable, 2:force auto enable */ ++int rtw_vht_enable = 2; /* 0:disable, 1:enable, 2:force auto enable */ + module_param(rtw_vht_enable, int, 0644); + + int rtw_ampdu_factor = 7; +@@ -392,7 +392,7 @@ int rtw_drv_ant_band_switch = 1; /* 0:OFF , 1:ON, Driver control antenna band sw + int rtw_single_ant_path; /*0:main ant , 1:aux ant , Fixed single antenna path, default main ant*/ + + /* 0: doesn't switch, 1: switch from usb2.0 to usb 3.0 2: switch from usb3.0 to usb 2.0 */ +-int rtw_switch_usb_mode = 0; ++int rtw_switch_usb_mode = 1; + + #ifdef CONFIG_USB_AUTOSUSPEND + int rtw_enusbss = 1;/* 0:disable,1:enable */ From 3d6248d855ab19f1050bf1c0004f6aa1d8601fcc Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 25 Jan 2022 19:40:05 +0800 Subject: [PATCH 14/42] kernel: bump to 4.9.297, 4.14.262, 4.19.225 Signed-off-by: Tianling Shen --- include/kernel-version.mk | 12 ++++++------ ...d-firmware-loader-for-uPD720201-and-uPD72.patch | 6 +++--- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- ...d-firmware-loader-for-uPD720201-and-uPD72.patch | 6 +++--- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- ...-lan78xx-Enable-LEDs-and-auto-negotiation.patch | 6 +++--- ...0-lan78xx-Read-initial-EEE-status-from-DT.patch | 2 +- ...78xx-Disable-TCP-Segmentation-Offload-TSO.patch | 4 ++-- ...x-Move-enabling-of-EEE-into-PHY-init-code.patch | 4 ++-- ...benff-driver-for-BigBen-Interactive-PS3OF.patch | 2 +- ...bounce-link-events-to-minimize-poll-storm.patch | 4 ++-- ...lan78xx-EEE-support-is-now-a-PHY-property.patch | 2 +- ...78xx-use-default-alignment-for-rx-buffers.patch | 2 +- ...xhci-Show-that-the-VIA-VL805-supports-LPM.patch | 2 +- ...irk-for-host-controllers-that-don-t-updat.patch | 2 +- ...ore-remove-synchronize_net-call-if-nfqueu.patch | 2 +- ...15-netfilter-exit_net-cleanup-check-added.patch | 4 ++-- ...jecting-with-source-address-failed-policy.patch | 14 +++++++------- ...jecting-with-source-address-failed-policy.patch | 12 ++++++------ ...ci-allow-imod-interval-to-be-configurable.patch | 2 +- 20 files changed, 46 insertions(+), 46 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 7bc8ca57bb..c556d7e8ce 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,13 +6,13 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-4.9 = .294 -LINUX_VERSION-4.14 = .259 -LINUX_VERSION-4.19 = .222 +LINUX_VERSION-4.9 = .297 +LINUX_VERSION-4.14 = .262 +LINUX_VERSION-4.19 = .225 -LINUX_KERNEL_HASH-4.9.294 = 31ca50df2076040d84e721a6f01021ac2a125a0c5adb73c977fed91f323fa268 -LINUX_KERNEL_HASH-4.14.259 = 26e284541ff77bd3af14e40aa690bcf229d0f9b9677704fd9fecb59e108e4368 -LINUX_KERNEL_HASH-4.19.222 = 97b0830c3d7d90acfc850bcbfdeb64e6cb3e1cb58e079b8b7d0f5bb0a9618838 +LINUX_KERNEL_HASH-4.9.297 = e43ba8cde809b3126a5192f5a8a83f47134a138955ce6811672f5f704db6d89f +LINUX_KERNEL_HASH-4.14.262 = 4cfd785381edbfcd86dfb1cd8d264d872643d71afd2b832fa2090f5b7228d417 +LINUX_KERNEL_HASH-4.19.225 = 4b9ab3979541cd436b7b7e8905c77ffcf594a9cf4ea3fb9474ef95fe09586796 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index 7efc437fa1..cea448e8bb 100644 --- a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter #include "xhci.h" #include "xhci-trace.h" -@@ -282,6 +284,458 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -285,6 +287,458 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -320,6 +774,22 @@ static int xhci_pci_probe(struct pci_dev +@@ -323,6 +777,22 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter driver = (struct hc_driver *)id->driver_data; /* For some HW implementation, a XHCI reset is just not enough... */ -@@ -381,6 +851,16 @@ static void xhci_pci_remove(struct pci_d +@@ -384,6 +854,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch index bfc5fe8507..3e0c34a0d9 100644 --- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -228,7 +228,7 @@ static void xhci_pci_quirks(struct devic +@@ -231,7 +231,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_RENESAS && pdev->device == 0x0015) diff --git a/target/linux/apm821xx/patches-4.19/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.19/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index 8f4d7537a0..e1a3dff9c8 100644 --- a/target/linux/apm821xx/patches-4.19/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.19/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter #include "xhci.h" #include "xhci-trace.h" -@@ -285,6 +287,458 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -288,6 +290,458 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -326,6 +780,22 @@ static int xhci_pci_probe(struct pci_dev +@@ -329,6 +783,22 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter driver = (struct hc_driver *)id->driver_data; /* Prevent runtime suspending between USB-2 and USB-3 initialization */ -@@ -384,6 +854,16 @@ static void xhci_pci_remove(struct pci_d +@@ -387,6 +857,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; diff --git a/target/linux/apm821xx/patches-4.19/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.19/802-usb-xhci-force-msi-renesas-xhci.patch index dcf43547ec..dd9cbae4b8 100644 --- a/target/linux/apm821xx/patches-4.19/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.19/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -231,6 +231,7 @@ static void xhci_pci_quirks(struct devic +@@ -234,6 +234,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x0015) { xhci->quirks |= XHCI_RESET_ON_RESUME; xhci->quirks |= XHCI_ZERO_64B_REGS; diff --git a/target/linux/bcm27xx/patches-4.19/950-0032-lan78xx-Enable-LEDs-and-auto-negotiation.patch b/target/linux/bcm27xx/patches-4.19/950-0032-lan78xx-Enable-LEDs-and-auto-negotiation.patch index 86ea033619..24f989d74b 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0032-lan78xx-Enable-LEDs-and-auto-negotiation.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0032-lan78xx-Enable-LEDs-and-auto-negotiation.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2479,6 +2479,11 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2481,6 +2481,11 @@ static int lan78xx_reset(struct lan78xx_ int ret = 0; unsigned long timeout; u8 sig; @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_read_reg(dev, HW_CFG, &buf); buf |= HW_CFG_LRST_; -@@ -2532,6 +2537,9 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2534,6 +2539,9 @@ static int lan78xx_reset(struct lan78xx_ ret = lan78xx_read_reg(dev, HW_CFG, &buf); buf |= HW_CFG_MEF_; @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_write_reg(dev, HW_CFG, buf); ret = lan78xx_read_reg(dev, USB_CFG0, &buf); -@@ -2587,6 +2595,9 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2589,6 +2597,9 @@ static int lan78xx_reset(struct lan78xx_ buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_; } } diff --git a/target/linux/bcm27xx/patches-4.19/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch b/target/linux/bcm27xx/patches-4.19/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch index a2e424f442..8b97994673 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2661,6 +2661,22 @@ static int lan78xx_open(struct net_devic +@@ -2663,6 +2663,22 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/bcm27xx/patches-4.19/950-0127-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch b/target/linux/bcm27xx/patches-4.19/950-0127-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch index fee86f52ed..0c7dd24dc0 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0127-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0127-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch @@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -436,6 +436,15 @@ static int msg_level = -1; +@@ -438,6 +438,15 @@ static int msg_level = -1; module_param(msg_level, int, 0); MODULE_PARM_DESC(msg_level, "Override default message level"); @@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL); -@@ -2946,8 +2955,14 @@ static int lan78xx_bind(struct lan78xx_n +@@ -2948,8 +2957,14 @@ static int lan78xx_bind(struct lan78xx_n if (DEFAULT_RX_CSUM_ENABLE) dev->net->features |= NETIF_F_RXCSUM; diff --git a/target/linux/bcm27xx/patches-4.19/950-0128-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch b/target/linux/bcm27xx/patches-4.19/950-0128-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch index 912742d0a2..c26ba13560 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0128-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0128-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch @@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2193,6 +2193,22 @@ static int lan78xx_phy_init(struct lan78 +@@ -2195,6 +2195,22 @@ static int lan78xx_phy_init(struct lan78 mii_adv = (u32)mii_advertise_flowctrl(dev->fc_request_control); phydev->advertising |= mii_adv_to_ethtool_adv_t(mii_adv); @@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell if (phydev->mdio.dev.of_node) { u32 reg; int len; -@@ -2670,22 +2686,6 @@ static int lan78xx_open(struct net_devic +@@ -2672,22 +2688,6 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/bcm27xx/patches-4.19/950-0150-HID-hid-bigbenff-driver-for-BigBen-Interactive-PS3OF.patch b/target/linux/bcm27xx/patches-4.19/950-0150-HID-hid-bigbenff-driver-for-BigBen-Interactive-PS3OF.patch index 52bd49af5e..c315903e5e 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0150-HID-hid-bigbenff-driver-for-BigBen-Interactive-PS3OF.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0150-HID-hid-bigbenff-driver-for-BigBen-Interactive-PS3OF.patch @@ -23,7 +23,7 @@ Signed-off-by: Jiri Kosina --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig -@@ -182,6 +182,19 @@ config HID_BETOP_FF +@@ -183,6 +183,19 @@ config HID_BETOP_FF Currently the following devices are known to be supported: - BETOP 2185 PC & BFM MODE diff --git a/target/linux/bcm27xx/patches-4.19/950-0259-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch b/target/linux/bcm27xx/patches-4.19/950-0259-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch index 68742aa72e..03935e9297 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0259-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0259-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch @@ -16,7 +16,7 @@ See: https://github.com/raspberrypi/linux/issues/2447 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -445,6 +445,11 @@ static bool enable_tso; +@@ -447,6 +447,11 @@ static bool enable_tso; module_param(enable_tso, bool, 0644); MODULE_PARM_DESC(enable_tso, "Enables TCP segmentation offload"); @@ -28,7 +28,7 @@ See: https://github.com/raspberrypi/linux/issues/2447 static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL); -@@ -3793,7 +3798,12 @@ static int lan78xx_probe(struct usb_inte +@@ -3795,7 +3800,12 @@ static int lan78xx_probe(struct usb_inte netdev->max_mtu = MAX_SINGLE_PACKET_SIZE; netif_set_gso_max_size(netdev, MAX_SINGLE_PACKET_SIZE - MAX_HEADER); diff --git a/target/linux/bcm27xx/patches-4.19/950-0316-lan78xx-EEE-support-is-now-a-PHY-property.patch b/target/linux/bcm27xx/patches-4.19/950-0316-lan78xx-EEE-support-is-now-a-PHY-property.patch index cacd95c8a3..dbc74cca8c 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0316-lan78xx-EEE-support-is-now-a-PHY-property.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0316-lan78xx-EEE-support-is-now-a-PHY-property.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2198,7 +2198,7 @@ static int lan78xx_phy_init(struct lan78 +@@ -2200,7 +2200,7 @@ static int lan78xx_phy_init(struct lan78 mii_adv = (u32)mii_advertise_flowctrl(dev->fc_request_control); phydev->advertising |= mii_adv_to_ethtool_adv_t(mii_adv); diff --git a/target/linux/bcm27xx/patches-4.19/950-0413-lan78xx-use-default-alignment-for-rx-buffers.patch b/target/linux/bcm27xx/patches-4.19/950-0413-lan78xx-use-default-alignment-for-rx-buffers.patch index a59bd78a87..91fc9075bf 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0413-lan78xx-use-default-alignment-for-rx-buffers.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0413-lan78xx-use-default-alignment-for-rx-buffers.patch @@ -12,7 +12,7 @@ in both dwc_otg and in ipv6 processing. --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -3193,7 +3193,7 @@ static int rx_submit(struct lan78xx_net +@@ -3195,7 +3195,7 @@ static int rx_submit(struct lan78xx_net size_t size = dev->rx_urb_size; int ret = 0; diff --git a/target/linux/bcm27xx/patches-4.19/950-0476-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch b/target/linux/bcm27xx/patches-4.19/950-0476-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch index 47d99f0a0d..5ea2079dd7 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0476-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0476-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch @@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -238,6 +238,10 @@ static void xhci_pci_quirks(struct devic +@@ -241,6 +241,10 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3432) xhci->quirks |= XHCI_BROKEN_STREAMS; diff --git a/target/linux/bcm27xx/patches-4.19/950-0609-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-4.19/950-0609-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch index f24aaac269..1e47724126 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0609-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0609-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch @@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -239,8 +239,10 @@ static void xhci_pci_quirks(struct devic +@@ -242,8 +242,10 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_BROKEN_STREAMS; if (pdev->vendor == PCI_VENDOR_ID_VIA && diff --git a/target/linux/generic/backport-4.14/291-v4.16-netfilter-core-remove-synchronize_net-call-if-nfqueu.patch b/target/linux/generic/backport-4.14/291-v4.16-netfilter-core-remove-synchronize_net-call-if-nfqueu.patch index 0ac5783624..cbaaaa619a 100644 --- a/target/linux/generic/backport-4.14/291-v4.16-netfilter-core-remove-synchronize_net-call-if-nfqueu.patch +++ b/target/linux/generic/backport-4.14/291-v4.16-netfilter-core-remove-synchronize_net-call-if-nfqueu.patch @@ -88,7 +88,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c -@@ -941,23 +941,18 @@ static struct notifier_block nfqnl_dev_n +@@ -942,23 +942,18 @@ static struct notifier_block nfqnl_dev_n .notifier_call = nfqnl_rcv_dev_event, }; diff --git a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch index 79f4342d7e..bd26f2d163 100644 --- a/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch +++ b/target/linux/generic/backport-4.14/336-v4.15-netfilter-exit_net-cleanup-check-added.patch @@ -44,7 +44,7 @@ Signed-off-by: Pablo Neira Ayuso static int __init nf_tables_module_init(void) --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c -@@ -1093,10 +1093,15 @@ static int __net_init nfnl_log_net_init( +@@ -1094,10 +1094,15 @@ static int __net_init nfnl_log_net_init( static void __net_exit nfnl_log_net_exit(struct net *net) { @@ -62,7 +62,7 @@ Signed-off-by: Pablo Neira Ayuso static struct pernet_operations nfnl_log_net_ops = { --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c -@@ -1510,10 +1510,15 @@ static int __net_init nfnl_queue_net_ini +@@ -1511,10 +1511,15 @@ static int __net_init nfnl_queue_net_ini static void __net_exit nfnl_queue_net_exit(struct net *net) { diff --git a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index bbcc159240..1c26d8b5c2 100644 --- a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3519,6 +3553,9 @@ static int rt6_fill_node(struct net *net +@@ -3543,6 +3577,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3837,6 +3874,8 @@ static int ip6_route_dev_notify(struct n +@@ -3861,6 +3898,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3848,6 +3887,7 @@ static int ip6_route_dev_notify(struct n +@@ -3872,6 +3911,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -208,7 +208,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -4064,6 +4104,17 @@ static int __net_init ip6_route_net_init +@@ -4088,6 +4128,17 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -226,7 +226,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -4082,6 +4133,8 @@ out: +@@ -4106,6 +4157,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -4099,6 +4152,7 @@ static void __net_exit ip6_route_net_exi +@@ -4123,6 +4176,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -4172,6 +4226,9 @@ void __init ip6_route_init_special_entri +@@ -4196,6 +4250,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 2397801a4b..278cc649a4 100644 --- a/target/linux/generic/pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -5100,6 +5131,8 @@ static int ip6_route_dev_notify(struct n +@@ -5124,6 +5155,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -5111,6 +5144,7 @@ static int ip6_route_dev_notify(struct n +@@ -5135,6 +5168,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -5305,6 +5339,15 @@ static int __net_init ip6_route_net_init +@@ -5329,6 +5363,15 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -218,7 +218,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -5323,6 +5366,8 @@ out: +@@ -5347,6 +5390,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -227,7 +227,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -5343,6 +5388,7 @@ static void __net_exit ip6_route_net_exi +@@ -5367,6 +5412,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -5419,6 +5465,9 @@ void __init ip6_route_init_special_entri +@@ -5443,6 +5489,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch index 91a645710b..47aa8a3f97 100644 --- a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch +++ b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch @@ -86,7 +86,7 @@ Signed-off-by: Greg Kroah-Hartman if (!xhci->shared_hcd) { --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -293,6 +293,9 @@ static int xhci_pci_setup(struct usb_hcd +@@ -296,6 +296,9 @@ static int xhci_pci_setup(struct usb_hcd if (!xhci->sbrn) pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn); From c29e71856711f557426d96d8837cf97e5796fb3d Mon Sep 17 00:00:00 2001 From: Lienol <23146169+Lienol@users.noreply.github.com> Date: Wed, 26 Jan 2022 16:27:09 +0800 Subject: [PATCH 15/42] autocore: index: add `Target Platform` Signed-off-by: Tianling Shen --- package/emortal/autocore/files/generic/index.htm | 1 + 1 file changed, 1 insertion(+) diff --git a/package/emortal/autocore/files/generic/index.htm b/package/emortal/autocore/files/generic/index.htm index 418531a702..800eea1d97 100644 --- a/package/emortal/autocore/files/generic/index.htm +++ b/package/emortal/autocore/files/generic/index.htm @@ -729,6 +729,7 @@ <% if has_temp then %> <%:Temperature%><%=luci.sys.exec("/sbin/tempinfo") or "?"%> <% end %> + <%:Target Platform%><%=pcdata(boardinfo.release.target or "?")%> <%:Firmware Version%> <%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> / <%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>) From 36a4e6e0d452aa3f12e92daac8fbeb3c49fb346f Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 26 Jan 2022 16:37:22 +0800 Subject: [PATCH 16/42] default-settings: set lang to `auto` Signed-off-by: Tianling Shen --- .../emortal/default-settings/files/99-default-settings-chinese | 1 - 1 file changed, 1 deletion(-) diff --git a/package/emortal/default-settings/files/99-default-settings-chinese b/package/emortal/default-settings/files/99-default-settings-chinese index 58ef48f177..30a9167bca 100755 --- a/package/emortal/default-settings/files/99-default-settings-chinese +++ b/package/emortal/default-settings/files/99-default-settings-chinese @@ -1,7 +1,6 @@ #!/bin/sh uci -q batch <<-EOF - set luci.main.lang='zh_cn' set system.@system[0].timezone='CST-8' set system.@system[0].zonename='Asia/Shanghai' From 78e2b8c1a7b9fdffb1f05bbed7cd6fd768f96ab9 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 26 Jan 2022 16:42:46 +0800 Subject: [PATCH 17/42] default-settings: remove @LUCI_LANG_en dependencies Signed-off-by: Tianling Shen --- package/emortal/default-settings/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/emortal/default-settings/Makefile b/package/emortal/default-settings/Makefile index 89f13bec19..0f7ac7ea77 100644 --- a/package/emortal/default-settings/Makefile +++ b/package/emortal/default-settings/Makefile @@ -23,7 +23,7 @@ define Package/default-settings CATEGORY:=LuCI TITLE:=LuCI support for Default Settings PKGARCH:=all - DEPENDS:=+luci-base +@LUCI_LANG_en + DEPENDS:=+luci-base endef define Package/default-settings-chn From 5ad73cea12d951316a8fbd8a21e3b85610238a5a Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 29 Jan 2022 20:26:48 +0100 Subject: [PATCH 18/42] samba36: Disable parallel build Serializing the build works around this. Signed-off-by: Jan Kiszka --- package/network/services/samba36/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/samba36/Makefile b/package/network/services/samba36/Makefile index 4471f6f67f..25a8943688 100644 --- a/package/network/services/samba36/Makefile +++ b/package/network/services/samba36/Makefile @@ -20,7 +20,7 @@ PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:samba:samba -PKG_BUILD_PARALLEL:=1 +PKG_BUILD_PARALLEL:=0 include $(INCLUDE_DIR)/package.mk From 82399a87458cd79df8c8a699542e1eb4dbdfc708 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jan 2022 11:55:03 +0100 Subject: [PATCH 19/42] toolchain: gdb: Update to version 11.2 This is a minor corrective release over GDB 11.1, fixing the following issues: * PR sim/28302 (gdb fails to build with glibc 2.34) * PR build/28318 (std::thread support configure check does not use CXX_DIALECT) * PR gdb/28405 (arm-none-eabi: internal-error: ptid_t remote_target::select_thread_for_ambiguous_stop_reply(const target_waitstatus*): Assertion `first_resumed_thread != nullptr' failed) * PR tui/28483 ([gdb/tui] breakpoint creation not displayed) * PR build/28555 (uclibc compile failure since commit 4655f8509fd44e6efabefa373650d9982ff37fd6) * PR rust/28637 (Rust characters will be encoded using DW_ATE_UTF) * PR gdb/28758 (GDB 11 doesn't work correctly on binaries with a SHT_RELR (.relr.dyn) section) * PR gdb/28785 (Support SHT_RELR (.relr.dyn) section) Signed-off-by: Hauke Mehrtens --- toolchain/gdb/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index 2adb7d165a..6ed3b190ce 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=11.1 +PKG_VERSION:=11.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94 +PKG_HASH:=1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR) From 07f8b74d16edf153333c25b8fd437b2a156ca9fb Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jan 2022 11:54:49 +0100 Subject: [PATCH 20/42] gdb: Update gdb to version 11.2 This is a minor corrective release over GDB 11.1, fixing the following issues: * PR sim/28302 (gdb fails to build with glibc 2.34) * PR build/28318 (std::thread support configure check does not use CXX_DIALECT) * PR gdb/28405 (arm-none-eabi: internal-error: ptid_t remote_target::select_thread_for_ambiguous_stop_reply(const target_waitstatus*): Assertion `first_resumed_thread != nullptr' failed) * PR tui/28483 ([gdb/tui] breakpoint creation not displayed) * PR build/28555 (uclibc compile failure since commit 4655f8509fd44e6efabefa373650d9982ff37fd6) * PR rust/28637 (Rust characters will be encoded using DW_ATE_UTF) * PR gdb/28758 (GDB 11 doesn't work correctly on binaries with a SHT_RELR (.relr.dyn) section) * PR gdb/28785 (Support SHT_RELR (.relr.dyn) section) The sizes of the ipk changed on mips 24Kc like this: 2285775 gdb_11.1-3_mips_24kc.ipk 2287441 gdb_11.2-4_mips_24kc.ipk 191828 gdbserver_11.1-3_mips_24kc.ipk 191811 gdbserver_11.2-4_mips_24kc.ipk Signed-off-by: Hauke Mehrtens --- package/devel/gdb/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index 24569634a9..dd1df7af85 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=11.1 +PKG_VERSION:=11.2 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94 +PKG_HASH:=1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 From 47f44d75041d89fe7dd07bb7e566f976f153d751 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jan 2022 11:56:27 +0100 Subject: [PATCH 21/42] mbedtls: Update to version 2.16.12 This fixes the following security problems: * Zeroize several intermediate variables used to calculate the expected value when verifying a MAC or AEAD tag. This hardens the library in case the value leaks through a memory disclosure vulnerability. For example, a memory disclosure vulnerability could have allowed a man-in-the-middle to inject fake ciphertext into a DTLS connection. * Fix a double-free that happened after mbedtls_ssl_set_session() or mbedtls_ssl_get_session() failed with MBEDTLS_ERR_SSL_ALLOC_FAILED (out of memory). After that, calling mbedtls_ssl_session_free() and mbedtls_ssl_free() would cause an internal session buffer to be free()'d twice. CVE-2021-44732 The sizes of the ipk changed on MIPS 24Kc like this: 182454 libmbedtls12_2.16.11-2_mips_24kc.ipk 182742 libmbedtls12_2.16.12-1_mips_24kc.ipk Signed-off-by: Hauke Mehrtens --- package/libs/mbedtls/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index 36f9950820..e51c97fa7e 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mbedtls -PKG_VERSION:=2.16.11 +PKG_VERSION:=2.16.12 PKG_RELEASE:=$(AUTORELEASE) PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=c18e7e9abf95e69e425260493720470021384a1728417042060a35d0b7b18b41 +PKG_HASH:=294871ab1864a65d0b74325e9219d5bcd6e91c34a3c59270c357bb9ae4d5c393 PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=gpl-2.0.txt From 31a75e7526654756a4d2b2bc62ab60591b8259bd Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jan 2022 17:35:19 +0100 Subject: [PATCH 22/42] util-linux: Do not build raw any more. The man page of the raw tool does not build because the disk-utils/raw.8 file is missing. It looks like it should be in the tar.xz file we download, but it is missing. We do not package the raw tool, so this is not a problem. This fixes the following build error: No rule to make target 'disk-utils/raw.8', needed by 'all-am'. Stop. Signed-off-by: Hauke Mehrtens --- package/utils/util-linux/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 74f3f17469..f89b786b1d 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -523,6 +523,7 @@ CONFIGURE_ARGS += \ --disable-lslogins \ --disable-runuser \ --disable-chfn-chsh \ + --disable-raw \ --without-python \ --without-udev \ --without-readline \ From dd686f3315e9ead5f6c6a607b5165b7f03787b21 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jan 2022 12:01:19 +0100 Subject: [PATCH 23/42] util-linux: Update to version 2.37.3 This release fixes two security mount(8) and umount(8) issues: CVE-2021-3996 Improper UID check in libmount allows an unprivileged user to unmount FUSE filesystems of users with similar UID. CVE-2021-3995 This issue is related to parsing the /proc/self/mountinfo file allows an unprivileged user to unmount other user's filesystems that are either world-writable themselves or mounted in a world-writable directory. Signed-off-by: Hauke Mehrtens --- package/utils/util-linux/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index f89b786b1d..c8a365693b 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux -PKG_VERSION:=2.37 +PKG_VERSION:=2.37.3 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.37 -PKG_HASH:=bd07b7e98839e0359842110525a3032fdb8eaf3a90bedde3dd1652d32d15cce5 +PKG_HASH:=590c592e58cd6bf38519cb467af05ce6a1ab18040e3e3418f24bcfb2f55f9776 PKG_CPE_ID:=cpe:/a:kernel:util-linux PKG_LICENSE:=GPL-2.0-only From e9173d63d1f1dac64883c3fcdcc676a357b085c3 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jan 2022 12:15:20 +0100 Subject: [PATCH 24/42] e2fsprogs: Update to version 1.46.5 The sizes of the ipk changed on MIPS 24Kc like this: 8788 badblocks_1.45.6-2_mips_24kc.ipk 8861 badblocks_1.46.5-1_mips_24kc.ipk 3652 chattr_1.45.6-2_mips_24kc.ipk 3657 chattr_1.46.5-1_mips_24kc.ipk 58128 debugfs_1.45.6-2_mips_24kc.ipk 60279 debugfs_1.46.5-1_mips_24kc.ipk 8551 dumpe2fs_1.45.6-2_mips_24kc.ipk 8567 dumpe2fs_1.46.5-1_mips_24kc.ipk 4797 e2freefrag_1.45.6-2_mips_24kc.ipk 4791 e2freefrag_1.46.5-1_mips_24kc.ipk 159790 e2fsprogs_1.45.6-2_mips_24kc.ipk 168212 e2fsprogs_1.46.5-1_mips_24kc.ipk 7083 e4crypt_1.45.6-2_mips_24kc.ipk 7134 e4crypt_1.46.5-1_mips_24kc.ipk 5749 filefrag_1.45.6-2_mips_24kc.ipk 6233 filefrag_1.46.5-1_mips_24kc.ipk 4361 libcomerr0_1.45.6-2_mips_24kc.ipk 4355 libcomerr0_1.46.5-1_mips_24kc.ipk 168040 libext2fs2_1.45.6-2_mips_24kc.ipk 174209 libext2fs2_1.46.5-1_mips_24kc.ipk 8514 libss2_1.45.6-2_mips_24kc.ipk 8613 libss2_1.46.5-1_mips_24kc.ipk 3148 lsattr_1.45.6-2_mips_24kc.ipk 3227 lsattr_1.46.5-1_mips_24kc.ipk 22530 resize2fs_1.45.6-2_mips_24kc.ipk 22909 resize2fs_1.46.5-1_mips_24kc.ipk 33315 tune2fs_1.45.6-2_mips_24kc.ipk 34511 tune2fs_1.46.5-1_mips_24kc.ipk Signed-off-by: Hauke Mehrtens --- package/utils/e2fsprogs/Makefile | 6 ++-- .../patches/001-com_err_version.patch | 2 +- ...build-Add-SYSLIBS-to-e4crypt-linking.patch | 28 ------------------- 3 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile index 3d64fab587..b131cdccac 100644 --- a/package/utils/e2fsprogs/Makefile +++ b/package/utils/e2fsprogs/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs -PKG_VERSION:=1.45.6 -PKG_RELEASE:=2 +PKG_VERSION:=1.46.5 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/ -PKG_HASH:=ffa7ae6954395abdc50d0f8605d8be84736465afc53b8938ef473fcf7ff44256 +PKG_HASH:=2f16c9176704cf645dc69d5b15ff704ae722d665df38b2ed3cfc249757d8d81e PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=NOTICE diff --git a/package/utils/e2fsprogs/patches/001-com_err_version.patch b/package/utils/e2fsprogs/patches/001-com_err_version.patch index 62f1e08e71..c80896344b 100644 --- a/package/utils/e2fsprogs/patches/001-com_err_version.patch +++ b/package/utils/e2fsprogs/patches/001-com_err_version.patch @@ -1,6 +1,6 @@ --- a/lib/et/Makefile.in +++ b/lib/et/Makefile.in -@@ -25,8 +25,8 @@ SHARE_FILES= et_c.awk et_h.awk +@@ -26,8 +26,8 @@ SHARE_FILES= et_c.awk et_h.awk LIBRARY= libcom_err LIBDIR= et diff --git a/package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch b/package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch deleted file mode 100644 index dad71cf0b3..0000000000 --- a/package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e33ecf1595e390b2657018442c68ae824b3e13b4 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Tue, 15 Dec 2020 23:58:53 +0100 -Subject: [PATCH e2fsprogs] build: Add SYSLIBS to e4crypt linking - -The $(SYSLIBS) was missing when linking the e4crypt application. This is -available in the e4crypt.profiled variant, so I assume this was just -missing in the normal variant and is not left out intentionally. - -This fixes building e2fsprogrs with -fsanitize=undefined in the global -CFLAGS nad LDFLAGS. - -Signed-off-by: Hauke Mehrtens ---- - misc/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/misc/Makefile.in -+++ b/misc/Makefile.in -@@ -242,7 +242,7 @@ e4defrag: $(E4DEFRAG_OBJS) $(DEPLIBS) - e4crypt: $(E4CRYPT_OBJS) $(DEPLIBS) $(DEPSTATIC_LIBUUID) - $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o e4crypt $(E4CRYPT_OBJS) \ -- $(LIBUUID) $(LIBS) -+ $(LIBUUID) $(LIBS) $(SYSLIBS) - - e4defrag.profiled: $(E4DEFRAG_OBJS) $(PROFILED_DEPLIBS) - $(E) " LD $@" From 69b51ecb1752563ed733ceb8defe29d1df57f0fa Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jan 2022 12:23:56 +0100 Subject: [PATCH 25/42] libcap: Update to version 2.63 The sizes of the ipk changed on MIPS 24Kc like this: 11248 libcap_2.51-1_mips_24kc.ipk 14461 libcap_2.63-1_mips_24kc.ipk 18864 libcap-bin_2.51-1_mips_24kc.ipk 20576 libcap-bin_2.63-1_mips_24kc.ipk Signed-off-by: Hauke Mehrtens --- package/libs/libcap/Makefile | 6 ++++-- package/libs/libcap/patches/300-disable-tests.patch | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package/libs/libcap/Makefile b/package/libs/libcap/Makefile index 53a577f1f9..dcd535becd 100644 --- a/package/libs/libcap/Makefile +++ b/package/libs/libcap/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcap -PKG_VERSION:=2.51 +PKG_VERSION:=2.63 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2 -PKG_HASH:=6609f3ab7aebcc8f9277f53a577c657d9f3056d1352ea623da7fd7c0f00890f9 +PKG_HASH:=0c637b8f44fc7d8627787e9cf57f15ac06c1ddccb53e41feec5496be3466f77f PKG_MAINTAINER:=Paul Wassi PKG_LICENSE:=GPL-2.0-only @@ -74,6 +74,8 @@ MAKE_FLAGS += \ DYNAMIC="yes" \ lib="lib" +TARGET_CFLAGS += $(FPIC) + ifneq ($(CONFIG_PACKAGE_libcap-bin-capsh-shell),) TARGET_CFLAGS += -DSHELL='\"$(CONFIG_PACKAGE_libcap-bin-capsh-shell)\"' endif diff --git a/package/libs/libcap/patches/300-disable-tests.patch b/package/libs/libcap/patches/300-disable-tests.patch index c1779e28ec..1cf9cc4ea6 100644 --- a/package/libs/libcap/patches/300-disable-tests.patch +++ b/package/libs/libcap/patches/300-disable-tests.patch @@ -7,4 +7,4 @@ - $(MAKE) -C tests $@ $(MAKE) -C progs $@ $(MAKE) -C doc $@ - $(MAKE) -C kdebug $@ + From 6ba4f6b8fa8278d7975c29b1f338b5be8ad1c397 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 12 Feb 2022 23:13:47 +0100 Subject: [PATCH 26/42] tcpdump: Fix CVE-2018-16301 This fixes the following security problem: The command-line argument parser in tcpdump before 4.99.0 has a buffer overflow in tcpdump.c:read_infile(). To trigger this vulnerability the attacker needs to create a 4GB file on the local filesystem and to specify the file name as the value of the -F command-line argument of tcpdump. Signed-off-by: Hauke Mehrtens --- package/network/utils/tcpdump/Makefile | 2 +- .../tcpdump/patches/102-CVE-2018-16301.patch | 101 ++++++++++++++++++ 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 package/network/utils/tcpdump/patches/102-CVE-2018-16301.patch diff --git a/package/network/utils/tcpdump/Makefile b/package/network/utils/tcpdump/Makefile index a14fb9a1b7..f14f86e9a3 100644 --- a/package/network/utils/tcpdump/Makefile +++ b/package/network/utils/tcpdump/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcpdump PKG_VERSION:=4.9.3 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.tcpdump.org/release/ diff --git a/package/network/utils/tcpdump/patches/102-CVE-2018-16301.patch b/package/network/utils/tcpdump/patches/102-CVE-2018-16301.patch new file mode 100644 index 0000000000..39cd368915 --- /dev/null +++ b/package/network/utils/tcpdump/patches/102-CVE-2018-16301.patch @@ -0,0 +1,101 @@ +From 8ab211a7ec728bb0ad8c766c8eeb12deb0a13b86 Mon Sep 17 00:00:00 2001 +From: Guy Harris +Date: Wed, 30 Sep 2020 11:37:30 -0700 +Subject: [PATCH] Handle very large -f files by rejecting them. + +_read(), on Windows, has a 32-bit size argument and a 32-bit return +value, so reject -f files that have more than 2^31-1 characters. + +Add some #defines so that, on Windows, we use _fstati64 to get the size +of that file, to handle large files. + +Don't assume that our definition for ssize_t is the same size as size_t; +by the time we want to print the return value of the read, we know it'll +fit into an int, so just cast it to int and print it with %d. + +(cherry picked from commit faf8fb70af3a013e5d662b8283dec742fd6b1a77) +--- + netdissect-stdinc.h | 16 +++++++++++++++- + tcpdump.c | 15 ++++++++++++--- + 2 files changed, 27 insertions(+), 4 deletions(-) + +--- a/netdissect-stdinc.h ++++ b/netdissect-stdinc.h +@@ -149,10 +149,17 @@ + #ifdef _MSC_VER + #define stat _stat + #define open _open +-#define fstat _fstat + #define read _read + #define close _close + #define O_RDONLY _O_RDONLY ++ ++/* ++ * We define our_fstat64 as _fstati64, and define our_statb as ++ * struct _stati64, so we get 64-bit file sizes. ++ */ ++#define our_fstat _fstati64 ++#define our_statb struct _stati64 ++ + #endif /* _MSC_VER */ + + /* +@@ -211,6 +218,13 @@ typedef char* caddr_t; + + #include + ++/* ++ * We should have large file support enabled, if it's available, ++ * so just use fstat as our_fstat and struct stat as our_statb. ++ */ ++#define our_fstat fstat ++#define our_statb struct stat ++ + #endif /* _WIN32 */ + + #ifndef HAVE___ATTRIBUTE__ +--- a/tcpdump.c ++++ b/tcpdump.c +@@ -108,6 +108,7 @@ The Regents of the University of Califor + #endif /* HAVE_CAP_NG_H */ + #endif /* HAVE_LIBCAP_NG */ + ++#include "netdissect-stdinc.h" + #include "netdissect.h" + #include "interface.h" + #include "addrtoname.h" +@@ -861,15 +862,22 @@ read_infile(char *fname) + { + register int i, fd, cc; + register char *cp; +- struct stat buf; ++ our_statb buf; + + fd = open(fname, O_RDONLY|O_BINARY); + if (fd < 0) + error("can't open %s: %s", fname, pcap_strerror(errno)); + +- if (fstat(fd, &buf) < 0) ++ if (our_fstat(fd, &buf) < 0) + error("can't stat %s: %s", fname, pcap_strerror(errno)); + ++ /* ++ * Reject files whose size doesn't fit into an int; a filter ++ * *that* large will probably be too big. ++ */ ++ if (buf.st_size > INT_MAX) ++ error("%s is too large", fname); ++ + cp = malloc((u_int)buf.st_size + 1); + if (cp == NULL) + error("malloc(%d) for %s: %s", (u_int)buf.st_size + 1, +@@ -878,7 +886,8 @@ read_infile(char *fname) + if (cc < 0) + error("read %s: %s", fname, pcap_strerror(errno)); + if (cc != buf.st_size) +- error("short read %s (%d != %d)", fname, cc, (int)buf.st_size); ++ error("short read %s (%d != %d)", fname, (int) cc, ++ (int)buf.st_size); + + close(fd); + /* replace "# comment" with spaces */ From d127c7bf643ce7ad80fb69c0541a49993d9c5692 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Fri, 19 Nov 2021 20:26:14 +0100 Subject: [PATCH 27/42] ethtool: update to version 5.15 cef54c4 Release version 5.15. 23beb39 update UAPI header copies fd7db64 netlink: settings: Correct duplicate condition 88892ec Merge branch 'review/module-fixes-2-v2' 79cb4ab sff-8636: Remove extra blank lines 128e97c sff-8636: Convert if statement to switch-case 7ff603b sff-8636: Fix incorrect function name 86e9784 sff-8636: Remove incorrect comment 001aecd cmis: Correct comment 1bad83c cmis: Fix wrong define name 2c2fa88 cmis: Fix CLEI code parsing d007b49 Merge branch 'review/module-fixes' into master a7431bc netlink: eeprom: Fix compilation when pretty dump is disabled d02409c ethtool: Fix compilation warning when pretty dump is disabled 2ddb1a1 netlink: eeprom: Fallback to IOCTL when a complete hex/raw dump is requested 7e153a7 cmis: Fix invalid memory access in IOCTL path 769a50e sff-8636: Fix parsing of Page 03h in IOCTL path Signed-off-by: Hans Dedecker --- package/network/utils/ethtool/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index d34dc96b98..6f51652575 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool -PKG_VERSION:=5.14 +PKG_VERSION:=5.15 PKG_RELEASE:=1 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/ethtool -PKG_HASH:=bb13db91915cacd7a492b65b65df07a67e4b974ddbeaf76205b1945a23d27686 +PKG_HASH:=686fd6110389d49c2a120f00c3cd5dfe43debada8e021e4270d74bbe452a116d PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING From 8594d706711d7c77efec8eda553742c4375d393c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jan 2022 11:57:25 +0100 Subject: [PATCH 28/42] ethtool: Update to version 5.16 795f420 cmis: Rename CMIS parsing functions 369b43a cmis: Initialize CMIS memory map da16288 cmis: Use memory map during parsing 6acaeb9 cmis: Consolidate code between IOCTL and netlink paths d7d15f7 sff-8636: Rename SFF-8636 parsing functions 4230597 sff-8636: Initialize SFF-8636 memory map b74c040 sff-8636: Use memory map during parsing 799572f sff-8636: Consolidate code between IOCTL and netlink paths 9fdf45c sff-8079: Split SFF-8079 parsing function 2ccda25 netlink: eeprom: Export a function to request an EEPROM page 86792db cmis: Request specific pages for parsing in netlink path 6e2b32a sff-8636: Request specific pages for parsing in netlink path c2170d4 sff-8079: Request specific pages for parsing in netlink path 9538f38 netlink: eeprom: Defer page requests to individual parsers 664586e Merge branch 'review/next/module-mem-map' into master 50fdaec ethtool: Set mask correctly for dumping advertised FEC modes c5e7133 cable-test: Fix premature process termination 73091cd sff-8636: Use an SFF-8636 specific define for maximum number of channels 837c166 sff-common: Move OFFSET_TO_U16_PTR() to common header file 8658852 cmis: Initialize Page 02h in memory map 27b42a9 cmis: Initialize Banked Page 11h in memory map 340d88e cmis: Parse and print diagnostic information eae6a99 cmis: Print Module State and Fault Cause 82012f2 cmis: Print Module-Level Controls d7b1007 sff-8636: Print Power set and Power override bits 429f2fc Merge branch 'review/cmis-diag' into master 32457a9 monitor: do not show duplicate options in help text c01963e Release version 5.16. The sizes of the ipk changed on MIPS 24Kc like this: 34317 ethtool_5.15-1_mips_24kc.ipk 34311 ethtool_5.16-1_mips_24kc.ipk Signed-off-by: Hauke Mehrtens --- package/network/utils/ethtool/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index 6f51652575..5182c55331 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool -PKG_VERSION:=5.15 +PKG_VERSION:=5.16 PKG_RELEASE:=1 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/ethtool -PKG_HASH:=686fd6110389d49c2a120f00c3cd5dfe43debada8e021e4270d74bbe452a116d +PKG_HASH:=aa2fef1936dd4a11755dfa0bdb93f0ec5bea45208d27c9754bc3abe1aa42c1cb PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING From 9531fac7df9cb6768b6eba6d1601a4a30443d1cb Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 Jan 2022 11:59:19 +0100 Subject: [PATCH 29/42] strace: Update to version 5.16 The sizes of the ipk changed on MIPS 24Kc like this: 289764 strace_5.14-1_mips_24kc.ipk 310899 strace_5.16-1_mips_24kc.ipk Signed-off-by: Hauke Mehrtens --- package/devel/strace/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index 527b3e01d8..8f66ffbe47 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=strace -PKG_VERSION:=5.14 +PKG_VERSION:=5.16 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION) -PKG_HASH:=901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73 +PKG_HASH:=dc7db230ff3e57c249830ba94acab2b862da1fcaac55417e9b85041a833ca285 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=LGPL-2.1-or-later From 0d224e34ea28e59722616550ce5c128d91f87fb7 Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Sat, 1 Jan 2022 22:37:13 +0300 Subject: [PATCH 30/42] wolfssl: update to 5.1.1-stable Bump from 4.8.1-stable to 5.1.1-stable Detailed release notes: https://github.com/wolfSSL/wolfssl/releases Upstreamed patches: 001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch - https://github.com/wolfSSL/wolfssl/commit/fa8f23284d4689c2a737204b337b58d966dcbd8c 002-Update-macro-guard-on-SHA256-transform-call.patch - https://github.com/wolfSSL/wolfssl/commit/f447e4c1fa4c932c0286fa0331966756e243db81 Refreshed patches: 100-disable-hardening-check.patch 200-ecc-rng.patch CFLAG -DWOLFSSL_ALT_CERT_CHAINS replaced to --enable-altcertchains configure option The size of the ipk changed on aarch64 like this: 491341 libwolfssl4.8.1.31258522_4.8.1-stable-7_aarch64_cortex-a53.ipk 520322 libwolfssl5.1.1.31258522_5.1.1-stable-1_aarch64_cortex-a53.ipk Tested-by: Alozxy Acked-by: Eneas U de Queiroz Signed-off-by: Sergey V. Lobanov --- package/libs/wolfssl/Makefile | 6 +- ...change-asm-snippets-to-get-compiling.patch | 116 ------------------ ...macro-guard-on-SHA256-transform-call.patch | 22 ---- .../patches/100-disable-hardening-check.patch | 2 +- .../libs/wolfssl/patches/200-ecc-rng.patch | 4 +- 5 files changed, 6 insertions(+), 144 deletions(-) delete mode 100644 package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch delete mode 100644 package/libs/wolfssl/patches/002-Update-macro-guard-on-SHA256-transform-call.patch diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 9fe7fa763c..8ad9f804b6 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl -PKG_VERSION:=4.8.1-stable +PKG_VERSION:=5.1.1-stable PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) -PKG_HASH:=50db45f348f47e00c93dd244c24108220120cb3cc9d01434789229c32937c444 +PKG_HASH:=d3e0544dbe7e9587c0f6538cdc671b6492663bb7a4281819538abe6c99cdbd92 PKG_FIXUP:=libtool PKG_INSTALL:=1 @@ -62,7 +62,6 @@ TARGET_CFLAGS += \ -fomit-frame-pointer \ -flto \ -DFP_MAX_BITS=8192 \ - -DWOLFSSL_ALT_CERT_CHAINS \ $(if $(CONFIG_WOLFSSL_ALT_NAMES),-DWOLFSSL_ALT_NAMES) TARGET_LDFLAGS += -flto @@ -75,6 +74,7 @@ CONFIGURE_ARGS += \ --enable-opensslextra \ --enable-sni \ --enable-stunnel \ + --enable-altcertchains \ --disable-crypttests \ --disable-examples \ --disable-jobserver \ diff --git a/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch b/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch deleted file mode 100644 index 763f9e8d06..0000000000 --- a/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch +++ /dev/null @@ -1,116 +0,0 @@ -From fa8f23284d4689c2a737204b337b58d966dcbd8c Mon Sep 17 00:00:00 2001 -From: Sean Parkinson -Date: Fri, 20 Aug 2021 10:23:38 +1000 -Subject: [PATCH] Maths x86 asm: change asm snippets to get compiling - -TFM: - Use register or memory for c0, c1, c2 in SQRADD and SQRADD2. -SP: - Use register or memory for vl, vh, vo in SP_ASM_MUL_ADD, -SP_ASM_MUL_ADD2 and SP_ASM_SQR_ADD. ---- - wolfcrypt/src/asm.c | 29 ++++++++++++++++++++--------- - wolfcrypt/src/sp_int.c | 6 +++--- - 2 files changed, 23 insertions(+), 12 deletions(-) - ---- a/wolfcrypt/src/asm.c -+++ b/wolfcrypt/src/asm.c -@@ -698,33 +698,39 @@ __asm__( \ - - #define SQRADD(i, j) \ - __asm__( \ -- "movl %6,%%eax \n\t" \ -+ "movl %3,%%eax \n\t" \ - "mull %%eax \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ -- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","cc"); -+ :"+rm"(c0), "+rm"(c1), "+rm"(c2) \ -+ : "m"(i) \ -+ :"%eax","%edx","cc"); - - #define SQRADD2(i, j) \ - __asm__( \ -- "movl %6,%%eax \n\t" \ -- "mull %7 \n\t" \ -+ "movl %3,%%eax \n\t" \ -+ "mull %4 \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ -- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx", "cc"); -+ :"+rm"(c0), "+rm"(c1), "+rm"(c2) \ -+ : "m"(i), "m"(j) \ -+ :"%eax","%edx", "cc"); - - #define SQRADDSC(i, j) \ --__asm__( \ -+__asm__( \ - "movl %3,%%eax \n\t" \ - "mull %4 \n\t" \ - "movl %%eax,%0 \n\t" \ - "movl %%edx,%1 \n\t" \ - "xorl %2,%2 \n\t" \ -- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%eax","%edx","cc"); -+ :"=r"(sc0), "=r"(sc1), "=r"(sc2) \ -+ : "g"(i), "g"(j) \ -+ :"%eax","%edx","cc"); - - #define SQRADDAC(i, j) \ - __asm__( \ -@@ -733,7 +739,9 @@ __asm__( - "addl %%eax,%0 \n\t" \ - "adcl %%edx,%1 \n\t" \ - "adcl $0,%2 \n\t" \ -- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","cc"); -+ :"=r"(sc0), "=r"(sc1), "=r"(sc2) \ -+ : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \ -+ :"%eax","%edx","cc"); - - #define SQRADDDB \ - __asm__( \ -@@ -743,7 +751,10 @@ __asm__( - "addl %6,%0 \n\t" \ - "adcl %7,%1 \n\t" \ - "adcl %8,%2 \n\t" \ -- :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc"); -+ :"=r"(c0), "=r"(c1), "=r"(c2) \ -+ : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), \ -+ "r"(sc2) \ -+ : "cc"); - - #elif defined(TFM_X86_64) - /* x86-64 optimized */ ---- a/wolfcrypt/src/sp_int.c -+++ b/wolfcrypt/src/sp_int.c -@@ -476,7 +476,7 @@ static WC_INLINE sp_int_digit sp_div_wor - "addl %%eax, %[l] \n\t" \ - "adcl %%edx, %[h] \n\t" \ - "adcl $0 , %[o] \n\t" \ -- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \ -+ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \ - : [a] "r" (va), [b] "r" (vb) \ - : "eax", "edx", "cc" \ - ) -@@ -502,7 +502,7 @@ static WC_INLINE sp_int_digit sp_div_wor - "addl %%eax, %[l] \n\t" \ - "adcl %%edx, %[h] \n\t" \ - "adcl $0 , %[o] \n\t" \ -- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \ -+ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \ - : [a] "r" (va), [b] "r" (vb) \ - : "eax", "edx", "cc" \ - ) -@@ -541,7 +541,7 @@ static WC_INLINE sp_int_digit sp_div_wor - "addl %%eax, %[l] \n\t" \ - "adcl %%edx, %[h] \n\t" \ - "adcl $0 , %[o] \n\t" \ -- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \ -+ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \ - : [a] "m" (va) \ - : "eax", "edx", "cc" \ - ) diff --git a/package/libs/wolfssl/patches/002-Update-macro-guard-on-SHA256-transform-call.patch b/package/libs/wolfssl/patches/002-Update-macro-guard-on-SHA256-transform-call.patch deleted file mode 100644 index f986b72798..0000000000 --- a/package/libs/wolfssl/patches/002-Update-macro-guard-on-SHA256-transform-call.patch +++ /dev/null @@ -1,22 +0,0 @@ -From f447e4c1fa4c932c0286fa0331966756e243db81 Mon Sep 17 00:00:00 2001 -From: JacobBarthelmeh -Date: Fri, 17 Sep 2021 15:06:13 -0700 -Subject: [PATCH] update macro guard on SHA256 transform call - ---- - src/ssl.c | 3 ++- - tests/api.c | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - ---- a/src/ssl.c -+++ b/src/ssl.c -@@ -17639,7 +17639,8 @@ size_t wolfSSL_get_client_random(const W - - #if defined(OPENSSL_EXTRA) - #if !defined(HAVE_SELFTEST) && (!defined(HAVE_FIPS) || \ -- (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))) -+ (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))) && \ -+ !defined(WOLFSSL_DEVCRYPTO_HASH) && !defined(WOLFSSL_AFALG_HASH) - /* Apply SHA256 transformation to the data */ - int wolfSSL_SHA256_Transform(WOLFSSL_SHA256_CTX* sha256, - const unsigned char* data) diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch index 4141e28750..79d0d6f759 100644 --- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch +++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch @@ -1,6 +1,6 @@ --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h -@@ -2274,7 +2274,7 @@ extern void uITRON4_free(void *p) ; +@@ -2346,7 +2346,7 @@ extern void uITRON4_free(void *p) ; #endif /* warning for not using harden build options (default with ./configure) */ diff --git a/package/libs/wolfssl/patches/200-ecc-rng.patch b/package/libs/wolfssl/patches/200-ecc-rng.patch index d8581be7eb..78ff4b1f4a 100644 --- a/package/libs/wolfssl/patches/200-ecc-rng.patch +++ b/package/libs/wolfssl/patches/200-ecc-rng.patch @@ -11,7 +11,7 @@ RNG regardless of the built settings for wolfssl. --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c -@@ -10938,21 +10938,21 @@ void wc_ecc_fp_free(void) +@@ -11647,21 +11647,21 @@ void wc_ecc_fp_free(void) #endif /* FP_ECC */ @@ -37,7 +37,7 @@ RNG regardless of the built settings for wolfssl. --- a/wolfssl/wolfcrypt/ecc.h +++ b/wolfssl/wolfcrypt/ecc.h -@@ -616,10 +616,8 @@ WOLFSSL_API +@@ -647,10 +647,8 @@ WOLFSSL_API void wc_ecc_fp_free(void); WOLFSSL_LOCAL void wc_ecc_fp_init(void); From e7fab4490fe1292117958414aa6101a9bf6bcd65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20M=C3=B6rlein?= Date: Wed, 15 Sep 2021 03:09:18 +0200 Subject: [PATCH 31/42] wireguard-tools: allow generating private_key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the uci configuration is created automatically during a very early stage, where no entropy daemon is set up, generating the key directly is not an option. Therefore we allow to set the private_key to "generate" and generate the private key directly before the interface is taken up. Signed-off-by: Leonardo Mörlein Tested-by: Jan-Niklas Burfeind --- .../utils/wireguard-tools/files/wireguard.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/package/network/utils/wireguard-tools/files/wireguard.sh b/package/network/utils/wireguard-tools/files/wireguard.sh index 2e6d74bc91..f6ad967b40 100644 --- a/package/network/utils/wireguard-tools/files/wireguard.sh +++ b/package/network/utils/wireguard-tools/files/wireguard.sh @@ -102,6 +102,23 @@ proto_wireguard_setup_peer() { fi } +ensure_key_is_generated() { + local private_key + private_key="$(uci get network."$1".private_key)" + + if [ "$private_key" == "generate" ]; then + local ucitmp + oldmask="$(umask)" + umask 077 + ucitmp="$(mktemp -d)" + private_key="$("${WG}" genkey)" + uci -q -t "$ucitmp" set network."$1".private_key="$private_key" && \ + uci -q -t "$ucitmp" commit network + rm -rf "$ucitmp" + umask "$oldmask" + fi +} + proto_wireguard_setup() { local config="$1" local wg_dir="/tmp/wireguard" @@ -111,6 +128,8 @@ proto_wireguard_setup() { local listen_port local mtu + ensure_key_is_generated "${config}" + config_load network config_get private_key "${config}" "private_key" config_get listen_port "${config}" "listen_port" From ddb1474999672c55c1941adf0e19b84417c8c6cf Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Fri, 18 Feb 2022 00:50:24 +0100 Subject: [PATCH 32/42] sunix: fix typo in kmod-ata-core There was a missing `k` in the package name. s/mod-ata-core/kmod-ata-core Signed-off-by: Paul Spooren --- target/linux/sunxi/image/cortex-a8.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/sunxi/image/cortex-a8.mk b/target/linux/sunxi/image/cortex-a8.mk index de10d5d6cc..58906ba073 100644 --- a/target/linux/sunxi/image/cortex-a8.mk +++ b/target/linux/sunxi/image/cortex-a8.mk @@ -25,7 +25,7 @@ TARGET_DEVICES += linksprite_a10-pcduino define Device/marsboard_a10-marsboard DEVICE_VENDOR := HAOYU Electronics DEVICE_MODEL := MarsBoard A10 - DEVICE_PACKAGES:=mod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi \ + DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi \ sound-soc-sunxi SOC := sun4i endef From 672481e01eae7877bb0274d359d825a71403e90a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 12 Feb 2022 20:37:12 +0100 Subject: [PATCH 33/42] hostapd: Apply SAE/EAP-pwd side-channel attack update 2 This fixes some recent security problems in hostapd. See here for details: https://w1.fi/security/2022-1 * CVE-2022-23303 * CVE-2022-23304 Signed-off-by: Hauke Mehrtens --- package/network/services/hostapd/Makefile | 2 +- ...-Add-more-bignum-EC-helper-functions.patch | 309 ++++++++++++++++++ ...2-dragonfly-Add-sqrt-helper-function.patch | 65 ++++ ...-coordinate-for-PWE-with-own-impleme.patch | 94 ++++++ ...he-y-coordinate-for-PWE-with-own-imp.patch | 108 ++++++ 5 files changed, 577 insertions(+), 1 deletion(-) create mode 100644 package/network/services/hostapd/patches/081-crypto-Add-more-bignum-EC-helper-functions.patch create mode 100644 package/network/services/hostapd/patches/082-dragonfly-Add-sqrt-helper-function.patch create mode 100644 package/network/services/hostapd/patches/083-SAE-Derive-the-y-coordinate-for-PWE-with-own-impleme.patch create mode 100644 package/network/services/hostapd/patches/084-EAP-pwd-Derive-the-y-coordinate-for-PWE-with-own-imp.patch diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 9e9604e69a..e9fea9052a 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/patches/081-crypto-Add-more-bignum-EC-helper-functions.patch b/package/network/services/hostapd/patches/081-crypto-Add-more-bignum-EC-helper-functions.patch new file mode 100644 index 0000000000..e83c5e60f2 --- /dev/null +++ b/package/network/services/hostapd/patches/081-crypto-Add-more-bignum-EC-helper-functions.patch @@ -0,0 +1,309 @@ +From 208e5687ff2e48622e28d8888ce5444a54353bbd Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Tue, 27 Aug 2019 16:33:15 +0300 +Subject: [PATCH 1/4] crypto: Add more bignum/EC helper functions + +These are needed for implementing SAE hash-to-element. + +Signed-off-by: Jouni Malinen +--- + src/crypto/crypto.h | 45 ++++++++++++++++++ + src/crypto/crypto_openssl.c | 94 +++++++++++++++++++++++++++++++++++++ + src/crypto/crypto_wolfssl.c | 66 ++++++++++++++++++++++++++ + 3 files changed, 205 insertions(+) + +--- a/src/crypto/crypto.h ++++ b/src/crypto/crypto.h +@@ -519,6 +519,13 @@ struct crypto_bignum * crypto_bignum_ini + struct crypto_bignum * crypto_bignum_init_set(const u8 *buf, size_t len); + + /** ++ * crypto_bignum_init_set - Allocate memory for bignum and set the value (uint) ++ * @val: Value to set ++ * Returns: Pointer to allocated bignum or %NULL on failure ++ */ ++struct crypto_bignum * crypto_bignum_init_uint(unsigned int val); ++ ++/** + * crypto_bignum_deinit - Free bignum + * @n: Bignum from crypto_bignum_init() or crypto_bignum_init_set() + * @clear: Whether to clear the value from memory +@@ -613,6 +620,19 @@ int crypto_bignum_div(const struct crypt + struct crypto_bignum *c); + + /** ++ * crypto_bignum_addmod - d = a + b (mod c) ++ * @a: Bignum ++ * @b: Bignum ++ * @c: Bignum ++ * @d: Bignum; used to store the result of (a + b) % c ++ * Returns: 0 on success, -1 on failure ++ */ ++int crypto_bignum_addmod(const struct crypto_bignum *a, ++ const struct crypto_bignum *b, ++ const struct crypto_bignum *c, ++ struct crypto_bignum *d); ++ ++/** + * crypto_bignum_mulmod - d = a * b (mod c) + * @a: Bignum + * @b: Bignum +@@ -626,6 +646,28 @@ int crypto_bignum_mulmod(const struct cr + struct crypto_bignum *d); + + /** ++ * crypto_bignum_sqrmod - c = a^2 (mod b) ++ * @a: Bignum ++ * @b: Bignum ++ * @c: Bignum; used to store the result of a^2 % b ++ * Returns: 0 on success, -1 on failure ++ */ ++int crypto_bignum_sqrmod(const struct crypto_bignum *a, ++ const struct crypto_bignum *b, ++ struct crypto_bignum *c); ++ ++/** ++ * crypto_bignum_sqrtmod - returns sqrt(a) (mod b) ++ * @a: Bignum ++ * @b: Bignum ++ * @c: Bignum; used to store the result ++ * Returns: 0 on success, -1 on failure ++ */ ++int crypto_bignum_sqrtmod(const struct crypto_bignum *a, ++ const struct crypto_bignum *b, ++ struct crypto_bignum *c); ++ ++/** + * crypto_bignum_rshift - r = a >> n + * @a: Bignum + * @n: Number of bits +@@ -731,6 +773,9 @@ const struct crypto_bignum * crypto_ec_g + */ + const struct crypto_bignum * crypto_ec_get_order(struct crypto_ec *e); + ++const struct crypto_bignum * crypto_ec_get_a(struct crypto_ec *e); ++const struct crypto_bignum * crypto_ec_get_b(struct crypto_ec *e); ++ + /** + * struct crypto_ec_point - Elliptic curve point + * +--- a/src/crypto/crypto_openssl.c ++++ b/src/crypto/crypto_openssl.c +@@ -1283,6 +1283,24 @@ struct crypto_bignum * crypto_bignum_ini + } + + ++struct crypto_bignum * crypto_bignum_init_uint(unsigned int val) ++{ ++ BIGNUM *bn; ++ ++ if (TEST_FAIL()) ++ return NULL; ++ ++ bn = BN_new(); ++ if (!bn) ++ return NULL; ++ if (BN_set_word(bn, val) != 1) { ++ BN_free(bn); ++ return NULL; ++ } ++ return (struct crypto_bignum *) bn; ++} ++ ++ + void crypto_bignum_deinit(struct crypto_bignum *n, int clear) + { + if (clear) +@@ -1449,6 +1467,28 @@ int crypto_bignum_div(const struct crypt + } + + ++int crypto_bignum_addmod(const struct crypto_bignum *a, ++ const struct crypto_bignum *b, ++ const struct crypto_bignum *c, ++ struct crypto_bignum *d) ++{ ++ int res; ++ BN_CTX *bnctx; ++ ++ if (TEST_FAIL()) ++ return -1; ++ ++ bnctx = BN_CTX_new(); ++ if (!bnctx) ++ return -1; ++ res = BN_mod_add((BIGNUM *) d, (const BIGNUM *) a, (const BIGNUM *) b, ++ (const BIGNUM *) c, bnctx); ++ BN_CTX_free(bnctx); ++ ++ return res ? 0 : -1; ++} ++ ++ + int crypto_bignum_mulmod(const struct crypto_bignum *a, + const struct crypto_bignum *b, + const struct crypto_bignum *c, +@@ -1472,6 +1512,48 @@ int crypto_bignum_mulmod(const struct cr + } + + ++int crypto_bignum_sqrmod(const struct crypto_bignum *a, ++ const struct crypto_bignum *b, ++ struct crypto_bignum *c) ++{ ++ int res; ++ BN_CTX *bnctx; ++ ++ if (TEST_FAIL()) ++ return -1; ++ ++ bnctx = BN_CTX_new(); ++ if (!bnctx) ++ return -1; ++ res = BN_mod_sqr((BIGNUM *) c, (const BIGNUM *) a, (const BIGNUM *) b, ++ bnctx); ++ BN_CTX_free(bnctx); ++ ++ return res ? 0 : -1; ++} ++ ++ ++int crypto_bignum_sqrtmod(const struct crypto_bignum *a, ++ const struct crypto_bignum *b, ++ struct crypto_bignum *c) ++{ ++ BN_CTX *bnctx; ++ BIGNUM *res; ++ ++ if (TEST_FAIL()) ++ return -1; ++ ++ bnctx = BN_CTX_new(); ++ if (!bnctx) ++ return -1; ++ res = BN_mod_sqrt((BIGNUM *) c, (const BIGNUM *) a, (const BIGNUM *) b, ++ bnctx); ++ BN_CTX_free(bnctx); ++ ++ return res ? 0 : -1; ++} ++ ++ + int crypto_bignum_rshift(const struct crypto_bignum *a, int n, + struct crypto_bignum *r) + { +@@ -1682,6 +1764,18 @@ const struct crypto_bignum * crypto_ec_g + } + + ++const struct crypto_bignum * crypto_ec_get_a(struct crypto_ec *e) ++{ ++ return (const struct crypto_bignum *) e->a; ++} ++ ++ ++const struct crypto_bignum * crypto_ec_get_b(struct crypto_ec *e) ++{ ++ return (const struct crypto_bignum *) e->b; ++} ++ ++ + void crypto_ec_point_deinit(struct crypto_ec_point *p, int clear) + { + if (clear) +--- a/src/crypto/crypto_wolfssl.c ++++ b/src/crypto/crypto_wolfssl.c +@@ -1042,6 +1042,26 @@ struct crypto_bignum * crypto_bignum_ini + } + + ++struct crypto_bignum * crypto_bignum_init_uint(unsigned int val) ++{ ++ mp_int *a; ++ ++ if (TEST_FAIL()) ++ return NULL; ++ ++ a = (mp_int *) crypto_bignum_init(); ++ if (!a) ++ return NULL; ++ ++ if (mp_set_int(a, val) != MP_OKAY) { ++ os_free(a); ++ a = NULL; ++ } ++ ++ return (struct crypto_bignum *) a; ++} ++ ++ + void crypto_bignum_deinit(struct crypto_bignum *n, int clear) + { + if (!n) +@@ -1168,6 +1188,19 @@ int crypto_bignum_div(const struct crypt + } + + ++int crypto_bignum_addmod(const struct crypto_bignum *a, ++ const struct crypto_bignum *b, ++ const struct crypto_bignum *c, ++ struct crypto_bignum *d) ++{ ++ if (TEST_FAIL()) ++ return -1; ++ ++ return mp_addmod((mp_int *) a, (mp_int *) b, (mp_int *) c, ++ (mp_int *) d) == MP_OKAY ? 0 : -1; ++} ++ ++ + int crypto_bignum_mulmod(const struct crypto_bignum *a, + const struct crypto_bignum *b, + const struct crypto_bignum *m, +@@ -1181,6 +1214,27 @@ int crypto_bignum_mulmod(const struct cr + } + + ++int crypto_bignum_sqrmod(const struct crypto_bignum *a, ++ const struct crypto_bignum *b, ++ struct crypto_bignum *c) ++{ ++ if (TEST_FAIL()) ++ return -1; ++ ++ return mp_sqrmod((mp_int *) a, (mp_int *) b, ++ (mp_int *) c) == MP_OKAY ? 0 : -1; ++} ++ ++ ++int crypto_bignum_sqrtmod(const struct crypto_bignum *a, ++ const struct crypto_bignum *b, ++ struct crypto_bignum *c) ++{ ++ /* TODO */ ++ return -1; ++} ++ ++ + int crypto_bignum_rshift(const struct crypto_bignum *a, int n, + struct crypto_bignum *r) + { +@@ -1386,6 +1440,18 @@ const struct crypto_bignum * crypto_ec_g + } + + ++const struct crypto_bignum * crypto_ec_get_a(struct crypto_ec *e) ++{ ++ return (const struct crypto_bignum *) &e->a; ++} ++ ++ ++const struct crypto_bignum * crypto_ec_get_b(struct crypto_ec *e) ++{ ++ return (const struct crypto_bignum *) &e->b; ++} ++ ++ + void crypto_ec_point_deinit(struct crypto_ec_point *p, int clear) + { + ecc_point *point = (ecc_point *) p; diff --git a/package/network/services/hostapd/patches/082-dragonfly-Add-sqrt-helper-function.patch b/package/network/services/hostapd/patches/082-dragonfly-Add-sqrt-helper-function.patch new file mode 100644 index 0000000000..b8b1e078b0 --- /dev/null +++ b/package/network/services/hostapd/patches/082-dragonfly-Add-sqrt-helper-function.patch @@ -0,0 +1,65 @@ +From 2232d3d5f188b65dbb6c823ac62175412739eb16 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 7 Jan 2022 13:47:16 +0200 +Subject: [PATCH 2/4] dragonfly: Add sqrt() helper function + +This is a backport of "SAE: Move sqrt() implementation into a helper +function" to introduce the helper function needed for the following +patches. + +Signed-off-by: Jouni Malinen +--- + src/common/dragonfly.c | 34 ++++++++++++++++++++++++++++++++++ + src/common/dragonfly.h | 2 ++ + 2 files changed, 36 insertions(+) + +--- a/src/common/dragonfly.c ++++ b/src/common/dragonfly.c +@@ -213,3 +213,37 @@ int dragonfly_generate_scalar(const stru + "dragonfly: Unable to get randomness for own scalar"); + return -1; + } ++ ++ ++/* res = sqrt(val) */ ++int dragonfly_sqrt(struct crypto_ec *ec, const struct crypto_bignum *val, ++ struct crypto_bignum *res) ++{ ++ const struct crypto_bignum *prime; ++ struct crypto_bignum *tmp, *one; ++ int ret = 0; ++ u8 prime_bin[DRAGONFLY_MAX_ECC_PRIME_LEN]; ++ size_t prime_len; ++ ++ /* For prime p such that p = 3 mod 4, sqrt(w) = w^((p+1)/4) mod p */ ++ ++ prime = crypto_ec_get_prime(ec); ++ prime_len = crypto_ec_prime_len(ec); ++ tmp = crypto_bignum_init(); ++ one = crypto_bignum_init_uint(1); ++ ++ if (crypto_bignum_to_bin(prime, prime_bin, sizeof(prime_bin), ++ prime_len) < 0 || ++ (prime_bin[prime_len - 1] & 0x03) != 3 || ++ !tmp || !one || ++ /* tmp = (p+1)/4 */ ++ crypto_bignum_add(prime, one, tmp) < 0 || ++ crypto_bignum_rshift(tmp, 2, tmp) < 0 || ++ /* res = sqrt(val) */ ++ crypto_bignum_exptmod(val, tmp, prime, res) < 0) ++ ret = -1; ++ ++ crypto_bignum_deinit(tmp, 0); ++ crypto_bignum_deinit(one, 0); ++ return ret; ++} +--- a/src/common/dragonfly.h ++++ b/src/common/dragonfly.h +@@ -27,5 +27,7 @@ int dragonfly_generate_scalar(const stru + struct crypto_bignum *_rand, + struct crypto_bignum *_mask, + struct crypto_bignum *scalar); ++int dragonfly_sqrt(struct crypto_ec *ec, const struct crypto_bignum *val, ++ struct crypto_bignum *res); + + #endif /* DRAGONFLY_H */ diff --git a/package/network/services/hostapd/patches/083-SAE-Derive-the-y-coordinate-for-PWE-with-own-impleme.patch b/package/network/services/hostapd/patches/083-SAE-Derive-the-y-coordinate-for-PWE-with-own-impleme.patch new file mode 100644 index 0000000000..d2a46c68f5 --- /dev/null +++ b/package/network/services/hostapd/patches/083-SAE-Derive-the-y-coordinate-for-PWE-with-own-impleme.patch @@ -0,0 +1,94 @@ +From fe534b0baaa8c0e6ddeb24cf529d6e50e33dc501 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 7 Jan 2022 13:47:16 +0200 +Subject: [PATCH 3/4] SAE: Derive the y coordinate for PWE with own + implementation + +The crypto_ec_point_solve_y_coord() wrapper function might not use +constant time operations in the crypto library and as such, could leak +side channel information about the password that is used to generate the +PWE in the hunting and pecking loop. As such, calculate the two possible +y coordinate values and pick the correct one to use with constant time +selection. + +Signed-off-by: Jouni Malinen +--- + src/common/sae.c | 47 +++++++++++++++++++++++++++++++++-------------- + 1 file changed, 33 insertions(+), 14 deletions(-) + +--- a/src/common/sae.c ++++ b/src/common/sae.c +@@ -286,14 +286,16 @@ static int sae_derive_pwe_ecc(struct sae + int pwd_seed_odd = 0; + u8 prime[SAE_MAX_ECC_PRIME_LEN]; + size_t prime_len; +- struct crypto_bignum *x = NULL, *qr = NULL, *qnr = NULL; ++ struct crypto_bignum *x = NULL, *y = NULL, *qr = NULL, *qnr = NULL; + u8 x_bin[SAE_MAX_ECC_PRIME_LEN]; + u8 x_cand_bin[SAE_MAX_ECC_PRIME_LEN]; + u8 qr_bin[SAE_MAX_ECC_PRIME_LEN]; + u8 qnr_bin[SAE_MAX_ECC_PRIME_LEN]; ++ u8 x_y[2 * SAE_MAX_ECC_PRIME_LEN]; + int res = -1; + u8 found = 0; /* 0 (false) or 0xff (true) to be used as const_time_* + * mask */ ++ unsigned int is_eq; + + os_memset(x_bin, 0, sizeof(x_bin)); + +@@ -402,25 +404,42 @@ static int sae_derive_pwe_ecc(struct sae + goto fail; + } + +- if (!sae->tmp->pwe_ecc) +- sae->tmp->pwe_ecc = crypto_ec_point_init(sae->tmp->ec); +- if (!sae->tmp->pwe_ecc) +- res = -1; +- else +- res = crypto_ec_point_solve_y_coord(sae->tmp->ec, +- sae->tmp->pwe_ecc, x, +- pwd_seed_odd); +- if (res < 0) { +- /* +- * This should not happen since we already checked that there +- * is a result. +- */ ++ /* y = sqrt(x^3 + ax + b) mod p ++ * if LSB(save) == LSB(y): PWE = (x, y) ++ * else: PWE = (x, p - y) ++ * ++ * Calculate y and the two possible values for PWE and after that, ++ * use constant time selection to copy the correct alternative. ++ */ ++ y = crypto_ec_point_compute_y_sqr(sae->tmp->ec, x); ++ if (!y || ++ dragonfly_sqrt(sae->tmp->ec, y, y) < 0 || ++ crypto_bignum_to_bin(y, x_y, SAE_MAX_ECC_PRIME_LEN, ++ prime_len) < 0 || ++ crypto_bignum_sub(sae->tmp->prime, y, y) < 0 || ++ crypto_bignum_to_bin(y, x_y + SAE_MAX_ECC_PRIME_LEN, ++ SAE_MAX_ECC_PRIME_LEN, prime_len) < 0) { + wpa_printf(MSG_DEBUG, "SAE: Could not solve y"); ++ goto fail; ++ } ++ ++ is_eq = const_time_eq(pwd_seed_odd, x_y[prime_len - 1] & 0x01); ++ const_time_select_bin(is_eq, x_y, x_y + SAE_MAX_ECC_PRIME_LEN, ++ prime_len, x_y + prime_len); ++ os_memcpy(x_y, x_bin, prime_len); ++ wpa_hexdump_key(MSG_DEBUG, "SAE: PWE", x_y, 2 * prime_len); ++ crypto_ec_point_deinit(sae->tmp->pwe_ecc, 1); ++ sae->tmp->pwe_ecc = crypto_ec_point_from_bin(sae->tmp->ec, x_y); ++ if (!sae->tmp->pwe_ecc) { ++ wpa_printf(MSG_DEBUG, "SAE: Could not generate PWE"); ++ res = -1; + } + + fail: ++ forced_memzero(x_y, sizeof(x_y)); + crypto_bignum_deinit(qr, 0); + crypto_bignum_deinit(qnr, 0); ++ crypto_bignum_deinit(y, 1); + os_free(dummy_password); + bin_clear_free(tmp_password, password_len); + crypto_bignum_deinit(x, 1); diff --git a/package/network/services/hostapd/patches/084-EAP-pwd-Derive-the-y-coordinate-for-PWE-with-own-imp.patch b/package/network/services/hostapd/patches/084-EAP-pwd-Derive-the-y-coordinate-for-PWE-with-own-imp.patch new file mode 100644 index 0000000000..c5ddddcec3 --- /dev/null +++ b/package/network/services/hostapd/patches/084-EAP-pwd-Derive-the-y-coordinate-for-PWE-with-own-imp.patch @@ -0,0 +1,108 @@ +From 603cd880e7f90595482658a7136fa6a7be5cb485 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 7 Jan 2022 18:52:27 +0200 +Subject: [PATCH 4/4] EAP-pwd: Derive the y coordinate for PWE with own + implementation + +The crypto_ec_point_solve_y_coord() wrapper function might not use +constant time operations in the crypto library and as such, could leak +side channel information about the password that is used to generate the +PWE in the hunting and pecking loop. As such, calculate the two possible +y coordinate values and pick the correct one to use with constant time +selection. + +Signed-off-by: Jouni Malinen +--- + src/eap_common/eap_pwd_common.c | 46 ++++++++++++++++++++++++++------- + 1 file changed, 36 insertions(+), 10 deletions(-) + +--- a/src/eap_common/eap_pwd_common.c ++++ b/src/eap_common/eap_pwd_common.c +@@ -127,7 +127,8 @@ int compute_password_element(EAP_PWD_gro + u8 qr_or_qnr_bin[MAX_ECC_PRIME_LEN]; + u8 x_bin[MAX_ECC_PRIME_LEN]; + u8 prime_bin[MAX_ECC_PRIME_LEN]; +- struct crypto_bignum *tmp2 = NULL; ++ u8 x_y[2 * MAX_ECC_PRIME_LEN]; ++ struct crypto_bignum *tmp2 = NULL, *y = NULL; + struct crypto_hash *hash; + unsigned char pwe_digest[SHA256_MAC_LEN], *prfbuf = NULL, ctr; + int ret = 0, res; +@@ -139,6 +140,7 @@ int compute_password_element(EAP_PWD_gro + u8 found_ctr = 0, is_odd = 0; + int cmp_prime; + unsigned int in_range; ++ unsigned int is_eq; + + if (grp->pwe) + return -1; +@@ -151,11 +153,6 @@ int compute_password_element(EAP_PWD_gro + if (crypto_bignum_to_bin(prime, prime_bin, sizeof(prime_bin), + primebytelen) < 0) + return -1; +- grp->pwe = crypto_ec_point_init(grp->group); +- if (!grp->pwe) { +- wpa_printf(MSG_INFO, "EAP-pwd: unable to create bignums"); +- goto fail; +- } + + if ((prfbuf = os_malloc(primebytelen)) == NULL) { + wpa_printf(MSG_INFO, "EAP-pwd: unable to malloc space for prf " +@@ -261,10 +258,37 @@ int compute_password_element(EAP_PWD_gro + */ + crypto_bignum_deinit(x_candidate, 1); + x_candidate = crypto_bignum_init_set(x_bin, primebytelen); +- if (!x_candidate || +- crypto_ec_point_solve_y_coord(grp->group, grp->pwe, x_candidate, +- is_odd) != 0) { +- wpa_printf(MSG_INFO, "EAP-pwd: Could not solve for y"); ++ if (!x_candidate) ++ goto fail; ++ ++ /* y = sqrt(x^3 + ax + b) mod p ++ * if LSB(y) == LSB(pwd-seed): PWE = (x, y) ++ * else: PWE = (x, p - y) ++ * ++ * Calculate y and the two possible values for PWE and after that, ++ * use constant time selection to copy the correct alternative. ++ */ ++ y = crypto_ec_point_compute_y_sqr(grp->group, x_candidate); ++ if (!y || ++ dragonfly_sqrt(grp->group, y, y) < 0 || ++ crypto_bignum_to_bin(y, x_y, MAX_ECC_PRIME_LEN, primebytelen) < 0 || ++ crypto_bignum_sub(prime, y, y) < 0 || ++ crypto_bignum_to_bin(y, x_y + MAX_ECC_PRIME_LEN, ++ MAX_ECC_PRIME_LEN, primebytelen) < 0) { ++ wpa_printf(MSG_DEBUG, "SAE: Could not solve y"); ++ goto fail; ++ } ++ ++ /* Constant time selection of the y coordinate from the two ++ * options */ ++ is_eq = const_time_eq(is_odd, x_y[primebytelen - 1] & 0x01); ++ const_time_select_bin(is_eq, x_y, x_y + MAX_ECC_PRIME_LEN, ++ primebytelen, x_y + primebytelen); ++ os_memcpy(x_y, x_bin, primebytelen); ++ wpa_hexdump_key(MSG_DEBUG, "EAP-pwd: PWE", x_y, 2 * primebytelen); ++ grp->pwe = crypto_ec_point_from_bin(grp->group, x_y); ++ if (!grp->pwe) { ++ wpa_printf(MSG_DEBUG, "EAP-pwd: Could not generate PWE"); + goto fail; + } + +@@ -289,6 +313,7 @@ int compute_password_element(EAP_PWD_gro + /* cleanliness and order.... */ + crypto_bignum_deinit(x_candidate, 1); + crypto_bignum_deinit(tmp2, 1); ++ crypto_bignum_deinit(y, 1); + crypto_bignum_deinit(qr, 1); + crypto_bignum_deinit(qnr, 1); + bin_clear_free(prfbuf, primebytelen); +@@ -296,6 +321,7 @@ int compute_password_element(EAP_PWD_gro + os_memset(qnr_bin, 0, sizeof(qnr_bin)); + os_memset(qr_or_qnr_bin, 0, sizeof(qr_or_qnr_bin)); + os_memset(pwe_digest, 0, sizeof(pwe_digest)); ++ forced_memzero(x_y, sizeof(x_y)); + + return ret; + } From d37c0d6a5961f06a79cb58fbcb433ad5b506aafe Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 9 Feb 2022 17:15:14 -0800 Subject: [PATCH 34/42] tools/cmake: add MAKE config variable Makes sure that Ninja from staging_dir is used and nowhere else. Reported by reproducible builds project. Builds have been failing ever since tools/cmake started using Ninja. Signed-off-by: Rosen Penev --- tools/cmake/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index e54e8c4547..8f0631eb74 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -25,7 +25,8 @@ HOST_CONFIGURE_VARS += \ CC="$(HOSTCC_NOCACHE)" \ CXX="$(HOSTCXX_NOCACHE)" \ MAKEFLAGS="$(HOST_JOBS)" \ - CXXFLAGS="$(HOST_CFLAGS)" + CXXFLAGS="$(HOST_CFLAGS)" \ + MAKE="$(STAGING_DIR_HOST)/bin/ninja" HOST_CONFIGURE_ARGS := \ $(if $(MAKE_JOBSERVER),--parallel="$(MAKE_JOBSERVER)") \ From 29cb743c4a4f1cc45a578973b34129d9c629eb23 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Wed, 24 Nov 2021 18:25:43 -0300 Subject: [PATCH 35/42] build: scripts/config - update to kconfig-v5.14 Functional Changes ---------- ------- - make 'imply' not impose any restrictions: allow symbols implied by y to become m - change "modules" from sub-option to first-level attribute Bugfixes -------- - nconf: fix core dump when searching in empty menu - nconf: stop endless search loops - xconfig: fix content of the main widget - xconfig: fix support for the split view mode Other Changes ----- ------- - highlight xconfig 'comment' lines with '***' - xconfig: navigate menus on hyperlinks - xconfig: drop support for Qt4 - improve host ncurses detection Update the 'option modules' usage to just 'modules' in Config.in. Signed-off-by: Eneas U de Queiroz --- Config.in | 2 +- scripts/config/.gitignore | 28 +- scripts/config/Makefile | 62 +- scripts/config/README | 9 +- scripts/config/conf.c | 449 ++++-- scripts/config/confdata.c | 279 +--- scripts/config/expr.h | 6 - scripts/config/images.c | 30 +- scripts/config/images.h | 30 +- scripts/config/internal.h | 9 + scripts/config/lexer.l | 8 +- scripts/config/lexer.lex.c | 2466 ++++++++++++++------------------ scripts/config/lkc.h | 68 +- scripts/config/lkc_proto.h | 15 +- scripts/config/lxdialog/util.c | 4 +- scripts/config/mconf-cfg.sh | 4 +- scripts/config/mconf.c | 15 +- scripts/config/menu.c | 26 +- scripts/config/nconf.c | 59 +- scripts/config/nconf.gui.c | 276 ++-- scripts/config/nconf.h | 51 +- scripts/config/parser.tab.c | 1810 ++++++++++------------- scripts/config/parser.tab.h | 120 +- scripts/config/parser.y | 57 +- scripts/config/preprocess.c | 2 +- scripts/config/qconf-cfg.sh | 14 +- scripts/config/qconf.cc | 1050 +++++++------- scripts/config/qconf.h | 166 +-- scripts/config/symbol.c | 30 +- target/sdk/files/Config.in | 2 +- 30 files changed, 3217 insertions(+), 3930 deletions(-) create mode 100644 scripts/config/internal.h diff --git a/Config.in b/Config.in index 546e8249cc..164f41efda 100644 --- a/Config.in +++ b/Config.in @@ -5,7 +5,7 @@ mainmenu "OpenWrt Configuration" config MODULES - option modules + modules bool default y diff --git a/scripts/config/.gitignore b/scripts/config/.gitignore index 072a534361..05c55c3c8e 100644 --- a/scripts/config/.gitignore +++ b/scripts/config/.gitignore @@ -1,22 +1,16 @@ -# -# Generated files -# -*.moc -*conf-cfg +# SPDX-License-Identifier: GPL-2.0-only +/conf +/[gmnq]conf +/[gmnq]conf-cfg +/qconf-moc.cc -# -# configuration programs -# -conf -mconf -nconf -qconf -gconf +# From linux kconfig parent directories +.* -# -# temporary files from older version. Should be removed -# +# OpenWrt-generated files mconf_check + +# Temporary files from older versions. They should be removed after the +# end of support for OpenWrt 19.07. zconf.???.c zconf.hash.c -.tmp_qtcheck diff --git a/scripts/config/Makefile b/scripts/config/Makefile index 3082a65ceb..486c356f3c 100644 --- a/scripts/config/Makefile +++ b/scripts/config/Makefile @@ -5,11 +5,11 @@ .PHONY: clean all all: conf mconf clean: - rm -f *.o lxdialog/*.o *.moc $(clean-files) conf mconf qconf nconf + rm -f *.o lxdialog/*.o *.moc .*.cmd $(clean-files) # This clean-files definition is here to ensure that temporary files from the # previous version are removed by make config-clean. -# It should be removed or emptied when this Makefile get updated again. +# It should be emptied after the end of support for OpenWrt 19.07. clean-files := zconf.tab.c zconf.lex.c zconf.hash.c .tmp_qtcheck # =========================================================================== @@ -24,9 +24,11 @@ src:=. obj:=. Q:=$(if $V,,@) cmd = $(cmd_$(1)) -dot-target = $(dir $@).$(notdir $@) -# taken from ../Kbuild.include +# some definitions taken from ../Kbuild.include +dot-target = $(dir $@).$(notdir $@) +squote := ' +escsq = $(subst $(squote),'\$(squote)',$1) define filechk $(Q)set -e; \ mkdir -p $(dir $@); \ @@ -37,23 +39,29 @@ define filechk mv -f $(dot-target).tmp $@; \ fi endef +cmd-check = $(if $(strip $(cmd_$@)),,1) +make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))) +newer-prereqs = $(filter-out $(PHONY),$?) +if_changed = $(if $(newer-prereqs)$(cmd-check), \ + $(cmd); \ + printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) ### Stripped down upstream Makefile follows: # =========================================================================== # object files used by all kconfig flavours -common-objs := confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \ - symbol.o util.o +common-objs := confdata.o expr.o lexer.lex.o menu.o parser.tab.o \ + preprocess.o symbol.o util.o $(obj)/lexer.lex.o: $(obj)/parser.tab.h 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) @@ -63,7 +71,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) @@ -75,20 +83,23 @@ $(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 -qconf-cxxobjs := qconf.o +hostprogs += qconf +qconf-cxxobjs := qconf.o qconf-moc.o qconf-objs := images.o $(common-objs) HOSTLDLIBS_qconf = $(shell . $(obj)/qconf-cfg && echo $$libs) HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/qconf-cfg && echo $$cflags) +HOSTCXXFLAGS_qconf-moc.o = $(shell . $(obj)/qconf-cfg && echo $$cflags) -$(obj)/qconf.o: $(obj)/qconf-cfg $(obj)/qconf.moc +$(obj)/qconf.o: $(obj)/qconf-cfg quiet_cmd_moc = MOC $@ - cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) -i $< -o $@ + cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) $< -o $@ -$(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg - $(call cmd,moc) +$(obj)/qconf-moc.cc: $(src)/qconf.h $(obj)/qconf-cfg FORCE + $(call if_changed,moc) + +targets += qconf-moc.cc # check if necessary packages are available, and configure build flags filechk_conf_cfg = $(CONFIG_SHELL) $< @@ -102,6 +113,8 @@ clean-files += *conf-cfg # OpenWrt rules and final adjustments that need to be made after reading the # full upstream Makefile +clean-files += $(targets) $(hostprogs) + FORCE: ifdef BUILD_SHIPPED_FILES @@ -117,24 +130,25 @@ clean-files += $(shipped-files) flex -L -o$@ $< endif -$(foreach f, mconf.o $(lxdialog), \ - $(eval $f: CFLAGS+=$$(HOSTCFLAGS_$f))) +$(foreach f,$(conf-objs) $(filter-out $(common-objs),$(mconf-objs) \ + $(qconf-objs) \ + $(nconf-objs)), \ + $(eval $(obj)/$f: CFLAGS+=$$(HOSTCFLAGS_$f))) -$(obj)/lexer.lex.o: CFLAGS += $(HOSTCFLAGS_lexer.lex.o) -$(obj)/parser.tab.o: CFLAGS += $(HOSTCFLAGS_parser.tab.o) -$(obj)/qconf.o: CXXFLAGS+=$(HOSTCXXFLAGS_qconf.o) +$(foreach f,$(qconf-cxxobjs), \ + $(eval $(obj)/$f: CXXFLAGS+=$$(HOSTCXXFLAGS_$f))) -conf: $(conf-objs) +$(obj)/conf: $(addprefix $(obj)/,$(conf-objs)) # The *conf-cfg file is used (then filtered out) as the first prerequisite to # avoid sourcing it before the script is built, when trying to compute CFLAGS # for the actual first prerequisite. This avoids errors like: # '/bin/sh: ./mconf-cfg: No such file or directory' -mconf: mconf-cfg $(mconf-objs) +$(obj)/mconf: mconf-cfg $(addprefix $(obj)/,$(mconf-objs)) $(CC) -o $@ $(filter-out mconf-cfg,$^) $(HOSTLDLIBS_mconf) -nconf: nconf-cfg $(nconf-objs) +$(obj)/nconf: nconf-cfg $(addprefix $(obj)/,$(nconf-objs)) $(CC) -o $@ $(filter-out nconf-cfg,$^) $(HOSTLDLIBS_nconf) -qconf: qconf-cfg $(qconf-cxxobjs) $(qconf-objs) +$(obj)/qconf: qconf-cfg $(addprefix $(obj)/,$(qconf-cxxobjs) $(qconf-objs)) $(CXX) -o $@ $(filter-out qconf-cfg,$^) $(HOSTLDLIBS_qconf) diff --git a/scripts/config/README b/scripts/config/README index f402cdc746..99a7d535ab 100644 --- a/scripts/config/README +++ b/scripts/config/README @@ -1,7 +1,6 @@ -These files were taken from the Linux Kernel Configuration System at commit -089b7d890f972f6b649fedc9259f6b93a18fb970 (Feb 4, 2020) and modified for the -OpenWrt Buildroot: - - Removed gconf, tests and kernel configuration targets. +These files were taken from the Linux 5.14 Kernel Configuration System and +modified for the OpenWrt Buildroot: + - Removed nconf, gconf, tests and kernel configuration targets. - Adjusted the Makefile to compile outside the kernel. - Always use default file when running make all{no,mod,yes}config. - Added a 'reset' command to reset config when the target changes. @@ -24,4 +23,4 @@ OpenWrt Buildroot: BUILD_SHIPPED_FILES defined For a full list of changes, see the repository at: -https://github.com/cotequeiroz/linux/commits/openwrt/scripts/kconfig +https://github.com/cotequeiroz/linux/commits/openwrt-5.14/scripts/kconfig diff --git a/scripts/config/conf.c b/scripts/config/conf.c index d96eab50f1..b8d9ac01de 100644 --- a/scripts/config/conf.c +++ b/scripts/config/conf.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -39,7 +38,7 @@ enum input_mode { fatalrecursive, }; static enum input_mode input_mode = oldaskconfig; - +static int input_mode_opt; static int indent = 1; static int tty_stdio; static int sync_kconfig; @@ -84,10 +83,243 @@ static void xfgets(char *str, int size, FILE *in) printf("%s", str); } +static void set_randconfig_seed(void) +{ + unsigned int seed; + char *env; + bool seed_set = false; + + env = getenv("KCONFIG_SEED"); + if (env && *env) { + char *endp; + + seed = strtol(env, &endp, 0); + if (*endp == '\0') + seed_set = true; + } + + if (!seed_set) { + struct timeval now; + + /* + * Use microseconds derived seed, compensate for systems where it may + * be zero. + */ + gettimeofday(&now, NULL); + seed = (now.tv_sec + 1) * (now.tv_usec + 1); + } + + printf("KCONFIG_SEED=0x%X\n", seed); + srand(seed); +} + +static bool randomize_choice_values(struct symbol *csym) +{ + struct property *prop; + struct symbol *sym; + struct expr *e; + int cnt, def; + + /* + * If choice is mod then we may have more items selected + * and if no then no-one. + * In both cases stop. + */ + if (csym->curr.tri != yes) + return false; + + prop = sym_get_choice_prop(csym); + + /* count entries in choice block */ + cnt = 0; + expr_list_for_each_sym(prop->expr, e, sym) + cnt++; + + /* + * find a random value and set it to yes, + * set the rest to no so we have only one set + */ + def = rand() % cnt; + + cnt = 0; + expr_list_for_each_sym(prop->expr, e, sym) { + if (def == cnt++) { + sym->def[S_DEF_USER].tri = yes; + csym->def[S_DEF_USER].val = sym; + } else { + sym->def[S_DEF_USER].tri = no; + } + sym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + sym->flags &= ~SYMBOL_VALID; + } + csym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + csym->flags &= ~SYMBOL_VALID; + + return true; +} + +enum conf_def_mode { + def_default, + def_yes, + def_mod, + def_y2m, + def_m2y, + def_no, + def_random +}; + +static bool conf_set_all_new_symbols(enum conf_def_mode mode) +{ + struct symbol *sym, *csym; + int i, cnt; + /* + * can't go as the default in switch-case below, otherwise gcc whines + * about -Wmaybe-uninitialized + */ + int pby = 50; /* probability of bool = y */ + int pty = 33; /* probability of tristate = y */ + int ptm = 33; /* probability of tristate = m */ + bool has_changed = false; + + if (mode == def_random) { + int n, p[3]; + char *env = getenv("KCONFIG_PROBABILITY"); + + n = 0; + while (env && *env) { + char *endp; + int tmp = strtol(env, &endp, 10); + + if (tmp >= 0 && tmp <= 100) { + p[n++] = tmp; + } else { + errno = ERANGE; + perror("KCONFIG_PROBABILITY"); + exit(1); + } + env = (*endp == ':') ? endp + 1 : endp; + if (n >= 3) + break; + } + switch (n) { + case 1: + pby = p[0]; + ptm = pby / 2; + pty = pby - ptm; + break; + case 2: + pty = p[0]; + ptm = p[1]; + pby = pty + ptm; + break; + case 3: + pby = p[0]; + pty = p[1]; + ptm = p[2]; + break; + } + + if (pty + ptm > 100) { + errno = ERANGE; + perror("KCONFIG_PROBABILITY"); + exit(1); + } + } + + sym_clear_all_valid(); + + for_all_symbols(i, sym) { + if (sym_has_value(sym) || sym->flags & SYMBOL_VALID) + continue; + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: + has_changed = true; + switch (mode) { + case def_yes: + sym->def[S_DEF_USER].tri = yes; + break; + case def_mod: + sym->def[S_DEF_USER].tri = mod; + break; + case def_no: + sym->def[S_DEF_USER].tri = no; + break; + case def_random: + sym->def[S_DEF_USER].tri = no; + cnt = rand() % 100; + if (sym->type == S_TRISTATE) { + if (cnt < pty) + sym->def[S_DEF_USER].tri = yes; + else if (cnt < pty + ptm) + sym->def[S_DEF_USER].tri = mod; + } else if (cnt < pby) + sym->def[S_DEF_USER].tri = yes; + break; + default: + continue; + } + if (!(sym_is_choice(sym) && mode == def_random)) + sym->flags |= SYMBOL_DEF_USER; + break; + default: + break; + } + + } + + /* + * We have different type of choice blocks. + * If curr.tri equals to mod then we can select several + * choice symbols in one block. + * In this case we do nothing. + * If curr.tri equals yes then only one symbol can be + * selected in a choice block and we set it to yes, + * and the rest to no. + */ + if (mode != def_random) { + for_all_symbols(i, csym) { + if ((sym_is_choice(csym) && !sym_has_value(csym)) || + sym_is_choice_value(csym)) + csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES; + } + } + + for_all_symbols(i, csym) { + if (sym_has_value(csym) || !sym_is_choice(csym)) + continue; + + sym_calc_value(csym); + if (mode == def_random) + has_changed |= randomize_choice_values(csym); + else { + set_all_choice_values(csym); + has_changed = true; + } + } + + return has_changed; +} + +static void conf_rewrite_mod_or_yes(enum conf_def_mode mode) +{ + struct symbol *sym; + int i; + tristate old_val = (mode == def_y2m) ? yes : mod; + tristate new_val = (mode == def_y2m) ? mod : yes; + + for_all_symbols(i, sym) { + if (sym_get_type(sym) == S_TRISTATE && + sym->def[S_DEF_USER].tri == old_val) + sym->def[S_DEF_USER].tri = new_val; + } + sym_clear_all_valid(); +} + static int conf_askvalue(struct symbol *sym, const char *def) { - enum symbol_type type = sym_get_type(sym); - if (!sym_has_value(sym)) printf("(NEW) "); @@ -109,24 +341,12 @@ static int conf_askvalue(struct symbol *sym, const char *def) return 0; } /* fall through */ - case oldaskconfig: + default: fflush(stdout); xfgets(line, sizeof(line), stdin); - return 1; - default: break; } - switch (type) { - case S_INT: - case S_HEX: - case S_STRING: - printf("%s\n", def); - return 1; - default: - ; - } - printf("%s", line); return 1; } @@ -139,7 +359,7 @@ static int conf_string(struct menu *menu) printf("%*s%s ", indent - 1, "", menu->prompt->text); printf("(%s) ", sym->name); def = sym_get_string_value(sym); - if (sym_get_string_value(sym)) + if (def) printf("[%s] ", def); if (!conf_askvalue(sym, def)) return 0; @@ -421,34 +641,37 @@ static void check_conf(struct menu *menu) return; sym = menu->sym; - if (sym && !sym_has_value(sym)) { - if (sym_is_changeable(sym) || - (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { - if (input_mode == listnewconfig) { - if (sym->name) { - const char *str; + if (sym && !sym_has_value(sym) && + (sym_is_changeable(sym) || + (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes))) { - if (sym->type == S_STRING) { - str = sym_get_string_value(sym); - str = sym_escape_string_value(str); - printf("%s%s=%s\n", CONFIG_, sym->name, str); - free((void *)str); - } else { - str = sym_get_string_value(sym); - printf("%s%s=%s\n", CONFIG_, sym->name, str); - } + switch (input_mode) { + case listnewconfig: + if (sym->name) { + const char *str; + + if (sym->type == S_STRING) { + str = sym_get_string_value(sym); + str = sym_escape_string_value(str); + printf("%s%s=%s\n", CONFIG_, sym->name, str); + free((void *)str); + } else { + str = sym_get_string_value(sym); + printf("%s%s=%s\n", CONFIG_, sym->name, str); } - } else if (input_mode == helpnewconfig) { - printf("-----\n"); - print_help(menu); - printf("-----\n"); - - } else { - if (!conf_cnt++) - printf("*\n* Restart config...\n*\n"); - rootEntry = menu_get_parent_menu(menu); - conf(rootEntry); } + break; + case helpnewconfig: + printf("-----\n"); + print_help(menu); + printf("-----\n"); + break; + default: + if (!conf_cnt++) + printf("*\n* Restart config...\n*\n"); + rootEntry = menu_get_parent_menu(menu); + conf(rootEntry); + break; } } @@ -456,31 +679,38 @@ static void check_conf(struct menu *menu) check_conf(child); } -static struct option long_opts[] = { - {"oldaskconfig", no_argument, NULL, oldaskconfig}, - {"oldconfig", no_argument, NULL, oldconfig}, - {"syncconfig", no_argument, NULL, syncconfig}, - {"defconfig", required_argument, NULL, defconfig}, - {"savedefconfig", required_argument, NULL, savedefconfig}, - {"allnoconfig", no_argument, NULL, allnoconfig}, - {"allyesconfig", no_argument, NULL, allyesconfig}, - {"allmodconfig", no_argument, NULL, allmodconfig}, - {"alldefconfig", no_argument, NULL, alldefconfig}, - {"randconfig", no_argument, NULL, randconfig}, - {"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}, - {"fatalrecursive", no_argument, NULL, fatalrecursive}, +static const struct option long_opts[] = { + {"help", no_argument, NULL, 'h'}, + {"silent", no_argument, NULL, 's'}, + {"oldaskconfig", no_argument, &input_mode_opt, oldaskconfig}, + {"oldconfig", no_argument, &input_mode_opt, oldconfig}, + {"syncconfig", no_argument, &input_mode_opt, syncconfig}, + {"defconfig", required_argument, &input_mode_opt, defconfig}, + {"savedefconfig", required_argument, &input_mode_opt, savedefconfig}, + {"allnoconfig", no_argument, &input_mode_opt, allnoconfig}, + {"allyesconfig", no_argument, &input_mode_opt, allyesconfig}, + {"allmodconfig", no_argument, &input_mode_opt, allmodconfig}, + {"alldefconfig", no_argument, &input_mode_opt, alldefconfig}, + {"randconfig", no_argument, &input_mode_opt, randconfig}, + {"listnewconfig", no_argument, &input_mode_opt, listnewconfig}, + {"helpnewconfig", no_argument, &input_mode_opt, helpnewconfig}, + {"olddefconfig", no_argument, &input_mode_opt, olddefconfig}, + {"yes2modconfig", no_argument, &input_mode_opt, yes2modconfig}, + {"mod2yesconfig", no_argument, &input_mode_opt, mod2yesconfig}, + {"fatalrecursive",no_argument, NULL, fatalrecursive}, {NULL, 0, NULL, 0} }; static void conf_usage(const char *progname) { - - printf("Usage: %s [-s] [--fatalrecursive] [option] \n", progname); - printf("[option] is _one_ of the following:\n"); + printf("Usage: %s [options] \n", progname); + printf("\n"); + printf("Generic options:\n"); + printf(" -h, --help Print this message and exit.\n"); + printf(" -s, --silent Do not print log.\n"); + printf(" --fatalrecursive Treat recursive depenendencies as a fatal error\n"); + printf("\n"); + printf("Mode options:\n"); printf(" --listnewconfig List new options\n"); printf(" --helpnewconfig List new options and help text\n"); printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); @@ -497,6 +727,7 @@ static void conf_usage(const char *progname) 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"); + printf(" (If none of the above is given, --oldaskconfig is the default)\n"); } int main(int ac, char **av) @@ -509,84 +740,56 @@ int main(int ac, char **av) tty_stdio = isatty(0) && isatty(1); - while ((opt = getopt_long(ac, av, "r:w:s", long_opts, NULL)) != -1) { - if (opt == 's') { - conf_set_message_callback(NULL); - continue; - } + while ((opt = getopt_long(ac, av, "hr:sw:", long_opts, NULL)) != -1) { switch (opt) { - case syncconfig: - /* - * syncconfig is invoked during the build stage. - * Suppress distracting "configuration written to ..." - */ + case 'h': + conf_usage(progname); + exit(1); + break; + case 's': conf_set_message_callback(NULL); - sync_kconfig = 1; - break; - case defconfig: - case savedefconfig: - defconfig_file = optarg; - break; - case randconfig: - { - struct timeval now; - unsigned int seed; - char *seed_env; - - /* - * Use microseconds derived seed, - * compensate for systems where it may be zero - */ - gettimeofday(&now, NULL); - seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); - - seed_env = getenv("KCONFIG_SEED"); - if( seed_env && *seed_env ) { - char *endp; - int tmp = (int)strtol(seed_env, &endp, 0); - if (*endp == '\0') { - seed = tmp; - } - } - fprintf( stderr, "KCONFIG_SEED=0x%X\n", seed ); - srand(seed); - break; - } - case oldaskconfig: - case oldconfig: - case allnoconfig: - case allyesconfig: - case allmodconfig: - case alldefconfig: - case listnewconfig: - case helpnewconfig: - case olddefconfig: - case yes2modconfig: - case mod2yesconfig: break; case fatalrecursive: recursive_is_error = 1; continue; case 'r': input_file = optarg; - continue; + break; case 'w': output_file = optarg; - continue; - case '?': - conf_usage(progname); - exit(1); + break; + case 0: + input_mode = input_mode_opt; + switch (input_mode) { + case syncconfig: + /* + * syncconfig is invoked during the build stage. + * Suppress distracting + * "configuration written to ..." + */ + conf_set_message_callback(NULL); + sync_kconfig = 1; + break; + case defconfig: + case savedefconfig: + defconfig_file = optarg; + break; + case randconfig: + set_randconfig_seed(); + break; + default: + break; + } + default: break; } - input_mode = (enum input_mode)opt; } if (ac == optind) { fprintf(stderr, "%s: Kconfig file missing\n", av[0]); conf_usage(progname); exit(1); } - name = av[optind]; - conf_parse(name); + conf_parse(av[optind]); //zconfdump(stdout); switch (input_mode) { diff --git a/scripts/config/confdata.c b/scripts/config/confdata.c index b696dda5e0..0ed9617391 100644 --- a/scripts/config/confdata.c +++ b/scripts/config/confdata.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -32,7 +33,7 @@ static bool is_dir(const char *path) struct stat st; if (stat(path, &st)) - return 0; + return false; return S_ISDIR(st.st_mode); } @@ -129,19 +130,14 @@ static size_t depfile_prefix_len; static int conf_touch_dep(const char *name) { int fd, ret; - const char *s; - char *d, c; + char *d; - /* check overflow: prefix + name + ".h" + '\0' must fit in buffer. */ - if (depfile_prefix_len + strlen(name) + 3 > sizeof(depfile_path)) + /* check overflow: prefix + name + '\0' must fit in buffer. */ + if (depfile_prefix_len + strlen(name) + 1 > sizeof(depfile_path)) return -1; d = depfile_path + depfile_prefix_len; - s = name; - - while ((c = *s++)) - *d++ = (c == '_') ? '/' : tolower(c); - strcpy(d, ".h"); + strcpy(d, name); /* Assume directory path already exists. */ fd = open(depfile_path, O_WRONLY | O_CREAT | O_TRUNC, 0644); @@ -384,28 +380,46 @@ int conf_read_simple(const char *name, int def) if (name) { in = zconf_fopen(name); } else { - struct property *prop; + char *env; name = conf_get_configname(); in = zconf_fopen(name); if (in) goto load; - sym_add_change_count(1); - if (!sym_defconfig_list) + conf_set_changed(true); + + env = getenv("KCONFIG_DEFCONFIG_LIST"); + if (!env) return 1; - for_all_defaults(sym_defconfig_list, prop) { - if (expr_calc_value(prop->visible.expr) == no || - prop->expr->type != E_SYMBOL) - continue; - sym_calc_value(prop->expr->left.sym); - name = sym_get_string_value(prop->expr->left.sym); - in = zconf_fopen(name); + while (1) { + bool is_last; + + while (isspace(*env)) + env++; + + if (!*env) + break; + + p = env; + while (*p && !isspace(*p)) + p++; + + is_last = (*p == '\0'); + + *p = '\0'; + + in = zconf_fopen(env); if (in) { conf_message("using defaults found in %s", - name); + env); goto load; } + + if (is_last) + break; + + env = p + 1; } } if (!in) @@ -434,7 +448,7 @@ load: if (def == S_DEF_USER) { sym = sym_find(line + 2 + strlen(CONFIG_)); if (!sym) { - sym_add_change_count(1); + conf_set_changed(true); continue; } } else { @@ -470,11 +484,11 @@ load: * Reading from include/config/auto.conf * If CONFIG_FOO previously existed in * auto.conf but it is missing now, - * include/config/foo.h must be touched. + * include/config/FOO must be touched. */ conf_touch_dep(line + strlen(CONFIG_)); else - sym_add_change_count(1); + conf_set_changed(true); continue; } @@ -519,7 +533,7 @@ int conf_read(const char *name) int conf_unsaved = 0; int i; - sym_set_change_count(0); + conf_set_changed(false); if (conf_read_simple(name, S_DEF_USER)) { sym_calc_value(modules_sym); @@ -577,7 +591,8 @@ int conf_read(const char *name) } } - sym_add_change_count(conf_warnings || conf_unsaved); + if (conf_warnings || conf_unsaved) + conf_set_changed(true); return 0; } @@ -922,7 +937,7 @@ next: if (is_same(name, tmpname)) { conf_message("No change to %s", name); unlink(tmpname); - sym_set_change_count(0); + conf_set_changed(false); return 0; } @@ -934,7 +949,7 @@ next: conf_message("configuration written to %s", name); - sym_set_change_count(0); + conf_set_changed(false); return 0; } @@ -1105,26 +1120,20 @@ int conf_write_autoconf(int overwrite) return 0; } -static int sym_change_count; +static bool conf_changed; static void (*conf_changed_callback)(void); -void sym_set_change_count(int count) +void conf_set_changed(bool val) { - int _sym_change_count = sym_change_count; - sym_change_count = count; - if (conf_changed_callback && - (bool)_sym_change_count != (bool)count) + if (conf_changed_callback && conf_changed != val) conf_changed_callback(); -} -void sym_add_change_count(int count) -{ - sym_set_change_count(count + sym_change_count); + conf_changed = val; } bool conf_get_changed(void) { - return sym_change_count; + return conf_changed; } void conf_set_changed_callback(void (*fn)(void)) @@ -1132,54 +1141,6 @@ void conf_set_changed_callback(void (*fn)(void)) conf_changed_callback = fn; } -static bool randomize_choice_values(struct symbol *csym) -{ - struct property *prop; - struct symbol *sym; - struct expr *e; - int cnt, def; - - /* - * If choice is mod then we may have more items selected - * and if no then no-one. - * In both cases stop. - */ - if (csym->curr.tri != yes) - return false; - - prop = sym_get_choice_prop(csym); - - /* count entries in choice block */ - cnt = 0; - expr_list_for_each_sym(prop->expr, e, sym) - cnt++; - - /* - * find a random value and set it to yes, - * set the rest to no so we have only one set - */ - def = (rand() % cnt); - - cnt = 0; - expr_list_for_each_sym(prop->expr, e, sym) { - if (def == cnt++) { - sym->def[S_DEF_USER].tri = yes; - csym->def[S_DEF_USER].val = sym; - } - else { - sym->def[S_DEF_USER].tri = no; - } - sym->flags |= SYMBOL_DEF_USER; - /* clear VALID to get value calculated */ - sym->flags &= ~SYMBOL_VALID; - } - csym->flags |= SYMBOL_DEF_USER; - /* clear VALID to get value calculated */ - csym->flags &= ~(SYMBOL_VALID); - - return true; -} - void set_all_choice_values(struct symbol *csym) { struct property *prop; @@ -1199,147 +1160,3 @@ void set_all_choice_values(struct symbol *csym) /* clear VALID to get value calculated */ csym->flags &= ~(SYMBOL_VALID | SYMBOL_NEED_SET_CHOICE_VALUES); } - -bool conf_set_all_new_symbols(enum conf_def_mode mode) -{ - struct symbol *sym, *csym; - int i, cnt, pby, pty, ptm; /* pby: probability of bool = y - * pty: probability of tristate = y - * ptm: probability of tristate = m - */ - - pby = 50; pty = ptm = 33; /* can't go as the default in switch-case - * below, otherwise gcc whines about - * -Wmaybe-uninitialized */ - if (mode == def_random) { - int n, p[3]; - char *env = getenv("KCONFIG_PROBABILITY"); - n = 0; - while( env && *env ) { - char *endp; - int tmp = strtol( env, &endp, 10 ); - if( tmp >= 0 && tmp <= 100 ) { - p[n++] = tmp; - } else { - errno = ERANGE; - perror( "KCONFIG_PROBABILITY" ); - exit( 1 ); - } - env = (*endp == ':') ? endp+1 : endp; - if( n >=3 ) { - break; - } - } - switch( n ) { - case 1: - pby = p[0]; ptm = pby/2; pty = pby-ptm; - break; - case 2: - pty = p[0]; ptm = p[1]; pby = pty + ptm; - break; - case 3: - pby = p[0]; pty = p[1]; ptm = p[2]; - break; - } - - if( pty+ptm > 100 ) { - errno = ERANGE; - perror( "KCONFIG_PROBABILITY" ); - exit( 1 ); - } - } - bool has_changed = false; - - sym_clear_all_valid(); - - for_all_symbols(i, sym) { - if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID)) - continue; - switch (sym_get_type(sym)) { - case S_BOOLEAN: - case S_TRISTATE: - has_changed = true; - switch (mode) { - case def_yes: - sym->def[S_DEF_USER].tri = yes; - break; - case def_mod: - sym->def[S_DEF_USER].tri = mod; - break; - case def_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; - cnt = rand() % 100; - if (sym->type == S_TRISTATE) { - if (cnt < pty) - sym->def[S_DEF_USER].tri = yes; - else if (cnt < (pty+ptm)) - sym->def[S_DEF_USER].tri = mod; - } else if (cnt < pby) - sym->def[S_DEF_USER].tri = yes; - break; - default: - continue; - } - if (!(sym_is_choice(sym) && mode == def_random)) - sym->flags |= SYMBOL_DEF_USER; - break; - default: - break; - } - - } - - /* - * We have different type of choice blocks. - * If curr.tri equals to mod then we can select several - * choice symbols in one block. - * In this case we do nothing. - * If curr.tri equals yes then only one symbol can be - * selected in a choice block and we set it to yes, - * and the rest to no. - */ - if (mode != def_random) { - for_all_symbols(i, csym) { - if ((sym_is_choice(csym) && !sym_has_value(csym)) || - sym_is_choice_value(csym)) - csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES; - } - } - - for_all_symbols(i, csym) { - if (sym_has_value(csym) || !sym_is_choice(csym)) - continue; - - sym_calc_value(csym); - if (mode == def_random) - has_changed = randomize_choice_values(csym); - else { - set_all_choice_values(csym); - has_changed = true; - } - } - - return has_changed; -} - -void conf_rewrite_mod_or_yes(enum conf_def_mode mode) -{ - struct symbol *sym; - int i; - tristate old_val = (mode == def_y2m) ? yes : mod; - tristate new_val = (mode == def_y2m) ? mod : yes; - - for_all_symbols(i, sym) { - if (sym_get_type(sym) == S_TRISTATE && - sym->def[S_DEF_USER].tri == old_val) { - sym->def[S_DEF_USER].tri = new_val; - sym_add_change_count(1); - } - } -} diff --git a/scripts/config/expr.h b/scripts/config/expr.h index bbd516bdf5..262ca24fe3 100644 --- a/scripts/config/expr.h +++ b/scripts/config/expr.h @@ -156,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 @@ -282,15 +279,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); diff --git a/scripts/config/images.c b/scripts/config/images.c index b4fa0e4a63..2f9afffa5d 100644 --- a/scripts/config/images.c +++ b/scripts/config/images.c @@ -5,7 +5,7 @@ #include "images.h" -const char *xpm_load[] = { +const char * const xpm_load[] = { "22 22 5 1", ". c None", "# c #000000", @@ -35,7 +35,7 @@ const char *xpm_load[] = { "###############.......", "......................"}; -const char *xpm_save[] = { +const char * const xpm_save[] = { "22 22 5 1", ". c None", "# c #000000", @@ -65,7 +65,7 @@ const char *xpm_save[] = { "..##################..", "......................"}; -const char *xpm_back[] = { +const char * const xpm_back[] = { "22 22 3 1", ". c None", "# c #000083", @@ -93,7 +93,7 @@ const char *xpm_back[] = { "......................", "......................"}; -const char *xpm_tree_view[] = { +const char * const xpm_tree_view[] = { "22 22 2 1", ". c None", "# c #000000", @@ -120,7 +120,7 @@ const char *xpm_tree_view[] = { "......................", "......................"}; -const char *xpm_single_view[] = { +const char * const xpm_single_view[] = { "22 22 2 1", ". c None", "# c #000000", @@ -147,7 +147,7 @@ const char *xpm_single_view[] = { "......................", "......................"}; -const char *xpm_split_view[] = { +const char * const xpm_split_view[] = { "22 22 2 1", ". c None", "# c #000000", @@ -174,7 +174,7 @@ const char *xpm_split_view[] = { "......................", "......................"}; -const char *xpm_symbol_no[] = { +const char * const xpm_symbol_no[] = { "12 12 2 1", " c white", ". c black", @@ -191,7 +191,7 @@ const char *xpm_symbol_no[] = { " .......... ", " "}; -const char *xpm_symbol_mod[] = { +const char * const xpm_symbol_mod[] = { "12 12 2 1", " c white", ". c black", @@ -208,7 +208,7 @@ const char *xpm_symbol_mod[] = { " .......... ", " "}; -const char *xpm_symbol_yes[] = { +const char * const xpm_symbol_yes[] = { "12 12 2 1", " c white", ". c black", @@ -225,7 +225,7 @@ const char *xpm_symbol_yes[] = { " .......... ", " "}; -const char *xpm_choice_no[] = { +const char * const xpm_choice_no[] = { "12 12 2 1", " c white", ". c black", @@ -242,7 +242,7 @@ const char *xpm_choice_no[] = { " .... ", " "}; -const char *xpm_choice_yes[] = { +const char * const xpm_choice_yes[] = { "12 12 2 1", " c white", ". c black", @@ -259,7 +259,7 @@ const char *xpm_choice_yes[] = { " .... ", " "}; -const char *xpm_menu[] = { +const char * const xpm_menu[] = { "12 12 2 1", " c white", ". c black", @@ -276,7 +276,7 @@ const char *xpm_menu[] = { " .......... ", " "}; -const char *xpm_menu_inv[] = { +const char * const xpm_menu_inv[] = { "12 12 2 1", " c white", ". c black", @@ -293,7 +293,7 @@ const char *xpm_menu_inv[] = { " .......... ", " "}; -const char *xpm_menuback[] = { +const char * const xpm_menuback[] = { "12 12 2 1", " c white", ". c black", @@ -310,7 +310,7 @@ const char *xpm_menuback[] = { " .......... ", " "}; -const char *xpm_void[] = { +const char * const xpm_void[] = { "12 12 2 1", " c white", ". c black", diff --git a/scripts/config/images.h b/scripts/config/images.h index d8ff614bd0..7212dec200 100644 --- a/scripts/config/images.h +++ b/scripts/config/images.h @@ -10,21 +10,21 @@ extern "C" { #endif -extern const char *xpm_load[]; -extern const char *xpm_save[]; -extern const char *xpm_back[]; -extern const char *xpm_tree_view[]; -extern const char *xpm_single_view[]; -extern const char *xpm_split_view[]; -extern const char *xpm_symbol_no[]; -extern const char *xpm_symbol_mod[]; -extern const char *xpm_symbol_yes[]; -extern const char *xpm_choice_no[]; -extern const char *xpm_choice_yes[]; -extern const char *xpm_menu[]; -extern const char *xpm_menu_inv[]; -extern const char *xpm_menuback[]; -extern const char *xpm_void[]; +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 } diff --git a/scripts/config/internal.h b/scripts/config/internal.h new file mode 100644 index 0000000000..2f7298c21b --- /dev/null +++ b/scripts/config/internal.h @@ -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 */ diff --git a/scripts/config/lexer.l b/scripts/config/lexer.l index 83995662d1..0d3c7efb7e 100644 --- a/scripts/config/lexer.l +++ b/scripts/config/lexer.l @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -38,7 +37,7 @@ struct buffer { YY_BUFFER_STATE state; }; -struct buffer *current_buf; +static struct buffer *current_buf; static int last_ts, first_ts; @@ -94,7 +93,6 @@ n [A-Za-z0-9_-] [ \t]* /* whitespaces */ \\\n /* escaped new line */ \n return T_EOL; -"allnoconfig_y" return T_ALLNOCONFIG_Y; "bool" return T_BOOL; "choice" return T_CHOICE; "comment" return T_COMMENT; @@ -102,12 +100,11 @@ n [A-Za-z0-9_-] "def_bool" return T_DEF_BOOL; "def_tristate" return T_DEF_TRISTATE; "default" return T_DEFAULT; -"defconfig_list" return T_DEFCONFIG_LIST; "depends" return T_DEPENDS; "endchoice" return T_ENDCHOICE; "endif" return T_ENDIF; "endmenu" return T_ENDMENU; -"help"|"---help---" return T_HELP; +"help" return T_HELP; "hex" return T_HEX; "if" return T_IF; "imply" return T_IMPLY; @@ -117,7 +114,6 @@ n [A-Za-z0-9_-] "menuconfig" return T_MENUCONFIG; "modules" return T_MODULES; "on" return T_ON; -"option" return T_OPTION; "optional" return T_OPTIONAL; "prompt" return T_PROMPT; "range" return T_RANGE; diff --git a/scripts/config/lexer.lex.c b/scripts/config/lexer.lex.c index 98b3aa16e3..1b2c0b5a51 100644 --- a/scripts/config/lexer.lex.c +++ b/scripts/config/lexer.lex.c @@ -357,82 +357,82 @@ extern char *yytext; #endif #define yytext_ptr yytext -static const flex_int16_t yy_nxt[][44] = +static const flex_int16_t yy_nxt[][43] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0 + 0, 0, 0 }, { 9, 10, 11, 12, 13, 14, 15, 16, 17, 14, - 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, - 27, 22, 28, 29, 30, 31, 32, 22, 22, 33, - 34, 22, 35, 22, 36, 37, 38, 39, 40, 22, - 41, 22, 22, 42 + 18, 19, 20, 21, 21, 22, 23, 24, 25, 26, + 21, 21, 27, 28, 29, 30, 21, 21, 31, 32, + 21, 33, 21, 34, 35, 36, 37, 38, 21, 39, + 21, 21, 40 }, { 9, 10, 11, 12, 13, 14, 15, 16, 17, 14, - 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, - 27, 22, 28, 29, 30, 31, 32, 22, 22, 33, - 34, 22, 35, 22, 36, 37, 38, 39, 40, 22, - 41, 22, 22, 42 + 18, 19, 20, 21, 21, 22, 23, 24, 25, 26, + 21, 21, 27, 28, 29, 30, 21, 21, 31, 32, + 21, 33, 21, 34, 35, 36, 37, 38, 21, 39, + 21, 21, 40 }, { - 9, 43, 44, 45, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43 + 9, 41, 42, 43, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41 }, { - 9, 43, 44, 45, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43 + 9, 41, 42, 43, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41 }, { - 9, 46, 47, 48, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46 + 9, 44, 45, 46, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44 }, { - 9, 46, 47, 48, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46 + 9, 44, 45, 46, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44 }, { - 9, 49, 49, 50, 49, 51, 49, 52, 49, 51, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 53, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49 + 9, 47, 47, 48, 47, 49, 47, 50, 47, 49, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 51, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47 }, { - 9, 49, 49, 50, 49, 51, 49, 52, 49, 51, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 53, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49 + 9, 47, 47, 48, 47, 49, 47, 50, 47, 49, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 51, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47 }, { @@ -440,7 +440,7 @@ static const flex_int16_t yy_nxt[][44] = -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9 + -9, -9, -9 }, @@ -449,15 +449,15 @@ static const flex_int16_t yy_nxt[][44] = -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10 + -10, -10, -10 }, { - 9, -11, 54, -11, -11, -11, -11, -11, -11, -11, + 9, -11, 52, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11 + -11, -11, -11 }, @@ -466,15 +466,15 @@ static const flex_int16_t yy_nxt[][44] = -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12 + -12, -12, -12 }, { 9, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, 55, -13, + -13, -13, -13, -13, -13, -13, -13, 53, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13 + -13, -13, -13 }, @@ -483,32 +483,32 @@ static const flex_int16_t yy_nxt[][44] = -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14 + -14, -14, -14 }, { - 9, 56, 56, -15, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56 + 9, 54, 54, -15, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54 }, { - 9, -16, -16, -16, -16, -16, -16, 57, -16, -16, - -16, -16, -16, 57, 57, 57, -16, -16, -16, -16, - -16, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, -16 + 9, -16, -16, -16, -16, -16, -16, 55, -16, -16, + -16, -16, -16, 55, 55, -16, -16, -16, -16, -16, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, -16 }, { - 9, -17, -17, -17, -17, -17, -17, -17, 58, -17, + 9, -17, -17, -17, -17, -17, -17, -17, 56, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17 + -17, -17, -17 }, @@ -517,7 +517,7 @@ static const flex_int16_t yy_nxt[][44] = -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18 + -18, -18, -18 }, { @@ -525,194 +525,194 @@ static const flex_int16_t yy_nxt[][44] = -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19 + -19, -19, -19 }, { 9, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20, 59, -20, + -20, -20, -20, -20, -20, -20, -20, 57, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20 + -20, -20, -20 }, { - 9, -21, -21, -21, -21, -21, -21, 57, -21, -21, - -21, -21, -21, 60, 61, 61, -21, -21, -21, -21, - -21, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -21 + 9, -21, -21, -21, -21, -21, -21, 55, -21, -21, + -21, -21, -21, 58, 58, -21, -21, -21, -21, -21, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -21 }, { - 9, -22, -22, -22, -22, -22, -22, 57, -22, -22, - -22, -22, -22, 61, 61, 61, -22, -22, -22, -22, - -22, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -22 + 9, -22, -22, -22, -22, -22, -22, -22, -22, -22, + -22, -22, -22, -22, -22, -22, -22, 59, -22, -22, + -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, + -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, + -22, -22, -22 }, { 9, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23, 62, -23, + -23, -23, -23, -23, -23, -23, -23, 60, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23 + -23, -23, -23 }, { 9, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, -24, -24, 63, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24 + -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, + -24, -24, -24 }, { 9, -25, -25, -25, -25, -25, -25, -25, -25, -25, + -25, -25, -25, -25, -25, -25, -25, 61, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25 + -25, -25, -25 }, { - 9, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26, -26, -26, -26, -26, 64, -26, + 9, -26, -26, 62, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26 + -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, + -26, -26, -26 }, { - 9, -27, -27, 65, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27 + 9, -27, -27, -27, -27, -27, -27, 55, -27, -27, + -27, -27, -27, 58, 58, -27, -27, -27, -27, -27, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 63, 58, 58, 58, 58, 58, 58, + 58, 58, -27 }, { - 9, -28, -28, -28, -28, -28, -28, 57, -28, -28, - -28, -28, -28, 61, 61, 61, -28, -28, -28, -28, - -28, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 66, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -28 + 9, -28, -28, -28, -28, -28, -28, 55, -28, -28, + -28, -28, -28, 58, 58, -28, -28, -28, -28, -28, + 58, 58, 58, 58, 58, 58, 58, 58, 64, 58, + 58, 58, 58, 65, 58, 58, 58, 58, 58, 58, + 58, 58, -28 }, { - 9, -29, -29, -29, -29, -29, -29, 57, -29, -29, - -29, -29, -29, 61, 61, 61, -29, -29, -29, -29, - -29, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 67, 61, 61, 61, 61, 61, - 61, 61, 61, -29 + 9, -29, -29, -29, -29, -29, -29, 55, -29, -29, + -29, -29, -29, 58, 58, -29, -29, -29, -29, -29, + 58, 58, 58, 58, 58, 66, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -29 }, { - 9, -30, -30, -30, -30, -30, -30, 57, -30, -30, - -30, -30, -30, 61, 61, 61, -30, -30, -30, -30, - -30, 61, 61, 61, 61, 61, 61, 61, 61, 68, - 61, 61, 61, 61, 69, 61, 61, 61, 61, 61, - 61, 61, 61, -30 + 9, -30, -30, -30, -30, -30, -30, 55, -30, -30, + -30, -30, -30, 58, 58, -30, -30, -30, -30, -30, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 67, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -30 }, { - 9, -31, -31, -31, -31, -31, -31, 57, -31, -31, - -31, -31, -31, 61, 61, 61, -31, -31, -31, -31, - -31, 61, 61, 61, 61, 61, 70, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -31 + 9, -31, -31, -31, -31, -31, -31, 55, -31, -31, + -31, -31, -31, 58, 58, -31, -31, -31, -31, -31, + 58, 58, 58, 58, 58, 68, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -31 }, { - 9, -32, -32, -32, -32, -32, -32, 57, -32, -32, - -32, -32, -32, 61, 61, 61, -32, -32, -32, -32, - -32, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 71, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -32 + 9, -32, -32, -32, -32, -32, -32, 55, -32, -32, + -32, -32, -32, 58, 58, -32, -32, -32, -32, -32, + 58, 58, 58, 58, 58, 58, 69, 58, 58, 58, + 58, 70, 71, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -32 }, { - 9, -33, -33, -33, -33, -33, -33, 57, -33, -33, - -33, -33, -33, 61, 61, 61, -33, -33, -33, -33, - -33, 61, 61, 61, 61, 61, 72, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -33 + 9, -33, -33, -33, -33, -33, -33, 55, -33, -33, + -33, -33, -33, 58, 58, -33, -33, -33, -33, -33, + 58, 72, 58, 58, 58, 73, 58, 58, 58, 58, + 58, 58, 58, 74, 58, 58, 58, 58, 58, 58, + 58, 58, -33 }, { - 9, -34, -34, -34, -34, -34, -34, 57, -34, -34, - -34, -34, -34, 61, 61, 61, -34, -34, -34, -34, - -34, 61, 61, 61, 61, 61, 61, 73, 61, 61, - 61, 61, 74, 75, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -34 + 9, -34, -34, -34, -34, -34, -34, 55, -34, -34, + -34, -34, -34, 58, 58, -34, -34, -34, -34, -34, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 75, 58, 76, 58, 58, 58, 58, 58, + 58, 58, -34 }, { - 9, -35, -35, -35, -35, -35, -35, 57, -35, -35, - -35, -35, -35, 61, 61, 61, -35, -35, -35, -35, - -35, 61, 76, 61, 61, 61, 77, 61, 61, 61, - 61, 61, 61, 61, 78, 61, 61, 61, 61, 61, - 61, 61, 61, -35 + 9, -35, -35, -35, -35, -35, -35, 55, -35, -35, + -35, -35, -35, 58, 58, -35, -35, -35, -35, -35, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 77, 58, 58, 58, 58, + 58, 58, -35 }, { - 9, -36, -36, -36, -36, -36, -36, 57, -36, -36, - -36, -36, -36, 61, 61, 61, -36, -36, -36, -36, - -36, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 79, 61, 80, 61, 61, 61, 61, - 61, 61, 61, -36 + 9, -36, -36, -36, -36, -36, -36, 55, -36, -36, + -36, -36, -36, 58, 58, -36, -36, -36, -36, -36, + 58, 78, 58, 58, 58, 79, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -36 }, { - 9, -37, -37, -37, -37, -37, -37, 57, -37, -37, - -37, -37, -37, 61, 61, 61, -37, -37, -37, -37, - -37, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 81, 61, 61, 61, - 61, 61, 61, -37 + 9, -37, -37, -37, -37, -37, -37, 55, -37, -37, + -37, -37, -37, 58, 58, -37, -37, -37, -37, -37, + 58, 58, 58, 58, 58, 80, 58, 58, 58, 58, + 58, 58, 58, 81, 58, 58, 58, 82, 58, 58, + 58, 58, -37 }, { - 9, -38, -38, -38, -38, -38, -38, 57, -38, -38, - -38, -38, -38, 61, 61, 61, -38, -38, -38, -38, - -38, 61, 82, 61, 61, 61, 83, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -38 + 9, -38, -38, -38, -38, -38, -38, 55, -38, -38, + -38, -38, -38, 58, 58, -38, -38, -38, -38, -38, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 83, 58, 58, 58, 58, + 58, 58, -38 }, { - 9, -39, -39, -39, -39, -39, -39, 57, -39, -39, - -39, -39, -39, 61, 61, 61, -39, -39, -39, -39, - -39, 61, 61, 61, 61, 61, 84, 61, 61, 61, - 61, 61, 61, 61, 85, 61, 61, 61, 86, 61, - 61, 61, 61, -39 + 9, -39, -39, -39, -39, -39, -39, 55, -39, -39, + -39, -39, -39, 58, 58, -39, -39, -39, -39, -39, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 84, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -39 }, { - 9, -40, -40, -40, -40, -40, -40, 57, -40, -40, - -40, -40, -40, 61, 61, 61, -40, -40, -40, -40, - -40, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 87, 61, 61, 61, - 61, 61, 61, -40 + 9, -40, -40, -40, -40, -40, -40, -40, -40, -40, + -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, + -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, + -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, + -40, -40, 85 }, { - 9, -41, -41, -41, -41, -41, -41, 57, -41, -41, - -41, -41, -41, 61, 61, 61, -41, -41, -41, -41, - -41, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 88, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -41 + 9, 86, 87, -41, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86 }, @@ -721,143 +721,143 @@ static const flex_int16_t yy_nxt[][44] = -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, 89 + -42, -42, -42 }, { - 9, 90, 91, -43, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90 + 9, -43, -43, -43, -43, -43, -43, -43, -43, -43, + -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, + -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, + -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, + -43, -43, -43 }, { - 9, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44 + 9, 88, 88, -44, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88 }, { - 9, -45, -45, -45, -45, -45, -45, -45, -45, -45, + 9, -45, 89, 90, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45 + -45, -45, -45 }, { - 9, 92, 92, -46, 92, 92, 92, 92, 92, 92, + 9, 91, -46, -46, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91 + }, + + { + 9, 92, 92, -47, 92, -47, 92, -47, 92, -47, + 92, 92, 92, 92, 92, 92, 92, 92, 92, -47, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92 - }, - - { - 9, -47, 93, 94, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47 + 92, 92, 92 }, { - 9, 95, -48, -48, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95 + 9, -48, -48, -48, -48, -48, -48, -48, -48, -48, + -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, + -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, + -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, + -48, -48, -48 }, { - 9, 96, 96, -49, 96, -49, 96, -49, 96, -49, - 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, - -49, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96 + 9, -49, -49, -49, -49, -49, -49, -49, -49, -49, + -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, + -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, + -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, + -49, -49, -49 }, { - 9, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50 + 9, 93, 93, -50, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93 }, { - 9, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51 + 9, 94, 94, -51, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 94 }, { - 9, 97, 97, -52, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97 + 9, -52, 52, -52, -52, -52, -52, -52, -52, -52, + -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, + -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, + -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, + -52, -52, -52 }, { - 9, 98, 98, -53, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98 + 9, -53, -53, -53, -53, -53, -53, -53, -53, -53, + -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, + -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, + -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, + -53, -53, -53 }, { - 9, -54, 54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54 + 9, 54, 54, -54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54 }, { - 9, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55 + 9, -55, -55, -55, -55, -55, -55, 55, -55, -55, + -55, -55, -55, 55, 55, -55, -55, -55, -55, -55, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, -55 }, { - 9, 56, 56, -56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56 + 9, -56, -56, -56, -56, -56, -56, -56, -56, -56, + -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, + -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, + -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, + -56, -56, -56 }, { - 9, -57, -57, -57, -57, -57, -57, 57, -57, -57, - -57, -57, -57, 57, 57, 57, -57, -57, -57, -57, - -57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, -57 + 9, -57, -57, -57, -57, -57, -57, -57, -57, -57, + -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, + -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, + -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, + -57, -57, -57 }, { - 9, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58 + 9, -58, -58, -58, -58, -58, -58, 55, -58, -58, + -58, -58, -58, 58, 58, -58, -58, -58, -58, -58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -58 }, { @@ -865,24 +865,24 @@ static const flex_int16_t yy_nxt[][44] = -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59 + -59, -59, -59 }, { - 9, -60, -60, -60, -60, -60, -60, 57, -60, -60, - -60, -60, -60, 99, 61, 61, -60, -60, -60, -60, - -60, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -60 + 9, -60, -60, -60, -60, -60, -60, -60, -60, -60, + -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, + -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, + -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, + -60, -60, -60 }, { - 9, -61, -61, -61, -61, -61, -61, 57, -61, -61, - -61, -61, -61, 61, 61, 61, -61, -61, -61, -61, - -61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -61 + 9, -61, -61, -61, -61, -61, -61, -61, -61, -61, + -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, + -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, + -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, + -61, -61, -61 }, @@ -891,1546 +891,1265 @@ static const flex_int16_t yy_nxt[][44] = -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62 + -62, -62, -62 }, { - 9, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63 + 9, -63, -63, -63, -63, -63, -63, 55, -63, -63, + -63, -63, -63, 58, 58, -63, -63, -63, -63, -63, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 95, 58, 58, 58, 58, 58, 58, + 58, 58, -63 }, { - 9, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64 + 9, -64, -64, -64, -64, -64, -64, 55, -64, -64, + -64, -64, -64, 58, 58, -64, -64, -64, -64, -64, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 96, 58, 58, 58, 58, 58, 58, + 58, 58, -64 }, { - 9, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65 + 9, -65, -65, -65, -65, -65, -65, 55, -65, -65, + -65, -65, -65, 58, 58, -65, -65, -65, -65, -65, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 97, 98, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -65 }, { - 9, -66, -66, -66, -66, -66, -66, 57, -66, -66, - -66, -66, -66, 61, 61, 61, -66, -66, -66, -66, - -66, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 100, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -66 + 9, -66, -66, -66, -66, -66, -66, 55, -66, -66, + -66, -66, -66, 58, 58, -66, -66, -66, -66, -66, + 58, 58, 58, 58, 58, 58, 99, 58, 58, 58, + 58, 58, 58, 58, 100, 58, 58, 58, 58, 58, + 58, 58, -66 }, { - 9, -67, -67, -67, -67, -67, -67, 57, -67, -67, - -67, -67, -67, 61, 61, 61, -67, -67, -67, -67, - -67, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 101, 61, 61, 61, 61, 61, - 61, 61, 61, -67 + 9, -67, -67, -67, -67, -67, -67, 55, -67, -67, + -67, -67, -67, 58, 58, -67, -67, -67, -67, -67, + 58, 58, 58, 58, 101, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -67 }, { - 9, -68, -68, -68, -68, -68, -68, 57, -68, -68, - -68, -68, -68, 61, 61, 61, -68, -68, -68, -68, - -68, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 102, 61, 61, 61, 61, 61, - 61, 61, 61, -68 + 9, -68, -68, -68, -68, -68, -68, 55, -68, -68, + -68, -68, -68, 58, 58, -68, -68, -68, -68, -68, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 102, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 103, 58, -68 }, { - 9, -69, -69, -69, -69, -69, -69, 57, -69, -69, - -69, -69, -69, 61, 61, 61, -69, -69, -69, -69, - -69, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 103, 104, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -69 + 9, -69, -69, -69, -69, -69, -69, 55, -69, -69, + -69, -69, -69, 58, 58, -69, -69, -69, -69, -69, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -69 }, { - 9, -70, -70, -70, -70, -70, -70, 57, -70, -70, - -70, -70, -70, 61, 61, 61, -70, -70, -70, -70, - -70, 61, 61, 61, 61, 61, 61, 105, 61, 61, - 61, 61, 61, 61, 61, 106, 61, 61, 61, 61, - 61, 61, 61, -70 + 9, -70, -70, -70, -70, -70, -70, 55, -70, -70, + -70, -70, -70, 58, 58, -70, -70, -70, -70, -70, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 104, 58, 58, 58, 58, 58, + 58, 58, -70 }, { - 9, -71, -71, -71, -71, -71, -71, 57, -71, -71, - -71, -71, -71, 61, 61, 61, -71, -71, -71, -71, - -71, 61, 61, 61, 61, 107, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -71 + 9, -71, -71, -71, -71, -71, -71, 55, -71, -71, + -71, -71, -71, 58, 58, -71, -71, -71, -71, -71, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 105, 58, 58, + 58, 58, -71 }, { - 9, -72, -72, -72, -72, -72, -72, 57, -72, -72, - -72, -72, -72, 61, 61, 61, -72, -72, -72, -72, - -72, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 108, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 109, 61, -72 + 9, -72, -72, -72, -72, -72, -72, 55, -72, -72, + -72, -72, -72, 58, 58, -72, -72, -72, -72, -72, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 106, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -72 }, { - 9, -73, -73, -73, -73, -73, -73, 57, -73, -73, - -73, -73, -73, 61, 61, 61, -73, -73, -73, -73, - -73, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -73 + 9, -73, -73, -73, -73, -73, -73, 55, -73, -73, + -73, -73, -73, 58, 58, -73, -73, -73, -73, -73, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 107, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -73 }, { - 9, -74, -74, -74, -74, -74, -74, 57, -74, -74, - -74, -74, -74, 61, 61, 61, -74, -74, -74, -74, - -74, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 110, 61, 61, 61, 61, - 61, 61, 61, -74 + 9, -74, -74, -74, -74, -74, -74, 55, -74, -74, + -74, -74, -74, 58, 58, -74, -74, -74, -74, -74, + 58, 58, 58, 58, 108, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -74 }, { - 9, -75, -75, -75, -75, -75, -75, 57, -75, -75, - -75, -75, -75, 61, 61, 61, -75, -75, -75, -75, - -75, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 111, 61, - 61, 61, 61, -75 + 9, -75, -75, -75, -75, -75, -75, 55, -75, -75, + -75, -75, -75, 58, 58, -75, -75, -75, -75, -75, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -75 }, { - 9, -76, -76, -76, -76, -76, -76, 57, -76, -76, - -76, -76, -76, 61, 61, 61, -76, -76, -76, -76, - -76, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 112, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -76 + 9, -76, -76, -76, -76, -76, -76, 55, -76, -76, + -76, -76, -76, 58, 58, -76, -76, -76, -76, -76, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 109, 58, 58, + 58, 58, -76 }, { - 9, -77, -77, -77, -77, -77, -77, 57, -77, -77, - -77, -77, -77, 61, 61, 61, -77, -77, -77, -77, - -77, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 113, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -77 + 9, -77, -77, -77, -77, -77, -77, 55, -77, -77, + -77, -77, -77, 58, 58, -77, -77, -77, -77, -77, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 110, 58, 58, 58, 58, 58, 58, + 58, 58, -77 }, { - 9, -78, -78, -78, -78, -78, -78, 57, -78, -78, - -78, -78, -78, 61, 61, 61, -78, -78, -78, -78, - -78, 61, 61, 61, 61, 114, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -78 + 9, -78, -78, -78, -78, -78, -78, 55, -78, -78, + -78, -78, -78, 58, 58, -78, -78, -78, -78, -78, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 111, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -78 }, { - 9, -79, -79, -79, -79, -79, -79, 57, -79, -79, - -79, -79, -79, 61, 61, 61, -79, -79, -79, -79, - -79, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -79 + 9, -79, -79, -79, -79, -79, -79, 55, -79, -79, + -79, -79, -79, 58, 58, -79, -79, -79, -79, -79, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 112, 58, 58, 58, + 58, 58, -79 }, { - 9, -80, -80, -80, -80, -80, -80, 57, -80, -80, - -80, -80, -80, 61, 61, 61, -80, -80, -80, -80, - -80, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 115, 61, - 61, 61, 61, -80 + 9, -80, -80, -80, -80, -80, -80, 55, -80, -80, + -80, -80, -80, 58, 58, -80, -80, -80, -80, -80, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 113, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -80 }, { - 9, -81, -81, -81, -81, -81, -81, 57, -81, -81, - -81, -81, -81, 61, 61, 61, -81, -81, -81, -81, - -81, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 116, 61, 61, 61, 61, 61, - 61, 61, 61, -81 + 9, -81, -81, -81, -81, -81, -81, 55, -81, -81, + -81, -81, -81, 58, 58, -81, -81, -81, -81, -81, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 114, 58, + 58, 58, -81 }, { - 9, -82, -82, -82, -82, -82, -82, 57, -82, -82, - -82, -82, -82, 61, 61, 61, -82, -82, -82, -82, - -82, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 117, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -82 + 9, -82, -82, -82, -82, -82, -82, 55, -82, -82, + -82, -82, -82, 58, 58, -82, -82, -82, -82, -82, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 115, 58, 58, 58, 58, + 58, 58, -82 }, { - 9, -83, -83, -83, -83, -83, -83, 57, -83, -83, - -83, -83, -83, 61, 61, 61, -83, -83, -83, -83, - -83, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 118, 61, 61, - 61, 61, 61, -83 + 9, -83, -83, -83, -83, -83, -83, 55, -83, -83, + -83, -83, -83, 58, 58, -83, -83, -83, -83, -83, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 116, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -83 }, { - 9, -84, -84, -84, -84, -84, -84, 57, -84, -84, - -84, -84, -84, 61, 61, 61, -84, -84, -84, -84, - -84, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 119, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -84 + 9, -84, -84, -84, -84, -84, -84, 55, -84, -84, + -84, -84, -84, 58, 58, -84, -84, -84, -84, -84, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 117, 58, 58, 58, + 58, 58, -84 }, { - 9, -85, -85, -85, -85, -85, -85, 57, -85, -85, - -85, -85, -85, 61, 61, 61, -85, -85, -85, -85, - -85, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 120, - 61, 61, 61, -85 + 9, -85, -85, -85, -85, -85, -85, -85, -85, -85, + -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, + -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, + -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, + -85, -85, -85 }, { - 9, -86, -86, -86, -86, -86, -86, 57, -86, -86, - -86, -86, -86, 61, 61, 61, -86, -86, -86, -86, - -86, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 121, 61, 61, 61, - 61, 61, 61, -86 + 9, 86, 87, -86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86 }, { - 9, -87, -87, -87, -87, -87, -87, 57, -87, -87, - -87, -87, -87, 61, 61, 61, -87, -87, -87, -87, - -87, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 122, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -87 + 9, 87, 87, -87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87 }, { - 9, -88, -88, -88, -88, -88, -88, 57, -88, -88, - -88, -88, -88, 61, 61, 61, -88, -88, -88, -88, - -88, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 123, 61, 61, - 61, 61, 61, -88 + 9, 88, 88, -88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88 }, { - 9, -89, -89, -89, -89, -89, -89, -89, -89, -89, + 9, -89, 89, 90, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89 + -89, -89, -89 }, { - 9, 90, 91, -90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90 - }, - - { - 9, 91, 91, -91, 91, 91, 91, 91, 91, 91, + 9, 91, -90, -90, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91 + 91, 91, 91 + }, + + { + 9, -91, -91, -91, -91, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, + -91, -91, -91 }, { - 9, 92, 92, -92, 92, 92, 92, 92, 92, 92, + 9, 92, 92, -92, 92, -92, 92, -92, 92, -92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, -92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92 + 92, 92, 92 }, { - 9, -93, 93, 94, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93 + 9, 93, 93, -93, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93 }, { - 9, 95, -94, -94, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95 + 9, -94, -94, -94, -94, -94, -94, -94, -94, -94, + -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, + -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, + -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, + -94, -94, -94 }, { - 9, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95 + 9, -95, -95, -95, -95, -95, -95, 55, -95, -95, + -95, -95, -95, 58, 58, -95, -95, -95, -95, -95, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 118, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -95 }, { - 9, 96, 96, -96, 96, -96, 96, -96, 96, -96, - 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, - -96, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96 + 9, -96, -96, -96, -96, -96, -96, 55, -96, -96, + -96, -96, -96, 58, 58, -96, -96, -96, -96, -96, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 119, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -96 }, { - 9, 97, 97, -97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97 + 9, -97, -97, -97, -97, -97, -97, 55, -97, -97, + -97, -97, -97, 58, 58, -97, -97, -97, -97, -97, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 120, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -97 }, { - 9, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98 + 9, -98, -98, -98, -98, -98, -98, 55, -98, -98, + -98, -98, -98, 58, 58, -98, -98, -98, -98, -98, + 58, 58, 58, 58, 58, 58, 121, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -98 }, { - 9, -99, -99, -99, -99, -99, -99, 57, -99, -99, - -99, -99, -99, 61, 61, 61, -99, -99, -99, -99, - -99, 61, 61, 61, 61, 61, 61, 61, 61, 124, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -99 + 9, -99, -99, -99, -99, -99, -99, 55, -99, -99, + -99, -99, -99, 58, 58, -99, -99, -99, -99, -99, + 122, 123, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -99 }, { - 9, -100, -100, -100, -100, -100, -100, 57, -100, -100, - -100, -100, -100, 61, 61, 61, -100, -100, -100, -100, - -100, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 125, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -100 + 9, -100, -100, -100, -100, -100, -100, 55, -100, -100, + -100, -100, -100, 58, 58, -100, -100, -100, -100, -100, + 58, 58, 58, 58, 58, 124, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -100 }, { - 9, -101, -101, -101, -101, -101, -101, 57, -101, -101, - -101, -101, -101, 61, 61, 61, -101, -101, -101, -101, - -101, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 126, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -101 + 9, -101, -101, -101, -101, -101, -101, 55, -101, -101, + -101, -101, -101, 58, 58, -101, -101, -101, -101, -101, + 58, 58, 58, 125, 58, 58, 58, 58, 58, 126, + 58, 127, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -101 }, { - 9, -102, -102, -102, -102, -102, -102, 57, -102, -102, - -102, -102, -102, 61, 61, 61, -102, -102, -102, -102, - -102, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 127, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -102 + 9, -102, -102, -102, -102, -102, -102, 55, -102, -102, + -102, -102, -102, 58, 58, -102, -102, -102, -102, -102, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 128, 58, 58, 58, 58, 58, + 58, 58, -102 }, { - 9, -103, -103, -103, -103, -103, -103, 57, -103, -103, - -103, -103, -103, 61, 61, 61, -103, -103, -103, -103, - -103, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 128, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -103 + 9, -103, -103, -103, -103, -103, -103, 55, -103, -103, + -103, -103, -103, 58, 58, -103, -103, -103, -103, -103, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -103 }, { - 9, -104, -104, -104, -104, -104, -104, 57, -104, -104, - -104, -104, -104, 61, 61, 61, -104, -104, -104, -104, - -104, 61, 61, 61, 61, 61, 61, 129, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -104 + 9, -104, -104, -104, -104, -104, -104, 55, -104, -104, + -104, -104, -104, 58, 58, -104, -104, -104, -104, -104, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 129, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -104 }, { - 9, -105, -105, -105, -105, -105, -105, 57, -105, -105, - -105, -105, -105, 61, 61, 61, -105, -105, -105, -105, - -105, 130, 131, 61, 132, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -105 + 9, -105, -105, -105, -105, -105, -105, 55, -105, -105, + -105, -105, -105, 58, 58, -105, -105, -105, -105, -105, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -105 }, { - 9, -106, -106, -106, -106, -106, -106, 57, -106, -106, - -106, -106, -106, 61, 61, 61, -106, -106, -106, -106, - -106, 61, 61, 61, 61, 61, 133, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -106 + 9, -106, -106, -106, -106, -106, -106, 55, -106, -106, + -106, -106, -106, 58, 58, -106, -106, -106, -106, -106, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 130, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -106 }, { - 9, -107, -107, -107, -107, -107, -107, 57, -107, -107, - -107, -107, -107, 61, 61, 61, -107, -107, -107, -107, - -107, 61, 61, 61, 134, 61, 61, 61, 61, 61, - 135, 61, 136, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -107 + 9, -107, -107, -107, -107, -107, -107, 55, -107, -107, + -107, -107, -107, 58, 58, -107, -107, -107, -107, -107, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 131, 58, + 58, 58, -107 }, { - 9, -108, -108, -108, -108, -108, -108, 57, -108, -108, - -108, -108, -108, 61, 61, 61, -108, -108, -108, -108, - -108, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 137, 61, 61, 61, 61, - 61, 61, 61, -108 + 9, -108, -108, -108, -108, -108, -108, 55, -108, -108, + -108, -108, -108, 58, 58, -108, -108, -108, -108, -108, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 132, 58, + 58, 58, -108 }, { - 9, -109, -109, -109, -109, -109, -109, 57, -109, -109, - -109, -109, -109, 61, 61, 61, -109, -109, -109, -109, - -109, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -109 + 9, -109, -109, -109, -109, -109, -109, 55, -109, -109, + -109, -109, -109, 58, 58, -109, -109, -109, -109, -109, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 133, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -109 }, { - 9, -110, -110, -110, -110, -110, -110, 57, -110, -110, - -110, -110, -110, 61, 61, 61, -110, -110, -110, -110, - -110, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 138, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -110 + 9, -110, -110, -110, -110, -110, -110, 55, -110, -110, + -110, -110, -110, 58, 58, -110, -110, -110, -110, -110, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 134, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -110 }, { - 9, -111, -111, -111, -111, -111, -111, 57, -111, -111, - -111, -111, -111, 61, 61, 61, -111, -111, -111, -111, - -111, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -111 + 9, -111, -111, -111, -111, -111, -111, 55, -111, -111, + -111, -111, -111, 58, 58, -111, -111, -111, -111, -111, + 58, 58, 58, 58, 58, 58, 58, 135, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -111 }, { - 9, -112, -112, -112, -112, -112, -112, 57, -112, -112, - -112, -112, -112, 61, 61, 61, -112, -112, -112, -112, - -112, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 139, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -112 + 9, -112, -112, -112, -112, -112, -112, 55, -112, -112, + -112, -112, -112, 58, 58, -112, -112, -112, -112, -112, + 58, 58, 58, 58, 58, 136, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -112 }, { - 9, -113, -113, -113, -113, -113, -113, 57, -113, -113, - -113, -113, -113, 61, 61, 61, -113, -113, -113, -113, - -113, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 140, - 61, 61, 61, -113 + 9, -113, -113, -113, -113, -113, -113, 55, -113, -113, + -113, -113, -113, 58, 58, -113, -113, -113, -113, -113, + 58, 58, 58, 58, 58, 137, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -113 }, { - 9, -114, -114, -114, -114, -114, -114, 57, -114, -114, - -114, -114, -114, 61, 61, 61, -114, -114, -114, -114, - -114, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 141, - 61, 61, 61, -114 + 9, -114, -114, -114, -114, -114, -114, 55, -114, -114, + -114, -114, -114, 58, 58, -114, -114, -114, -114, -114, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 138, 58, 58, 58, 58, + 58, 58, -114 }, { - 9, -115, -115, -115, -115, -115, -115, 57, -115, -115, - -115, -115, -115, 61, 61, 61, -115, -115, -115, -115, - -115, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 142, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -115 + 9, -115, -115, -115, -115, -115, -115, 55, -115, -115, + -115, -115, -115, 58, 58, -115, -115, -115, -115, -115, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 139, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -115 }, { - 9, -116, -116, -116, -116, -116, -116, 57, -116, -116, - -116, -116, -116, 61, 61, 61, -116, -116, -116, -116, - -116, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 143, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -116 + 9, -116, -116, -116, -116, -116, -116, 55, -116, -116, + -116, -116, -116, 58, 58, -116, -116, -116, -116, -116, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 140, 58, 58, 58, + 58, 58, -116 }, { - 9, -117, -117, -117, -117, -117, -117, 57, -117, -117, - -117, -117, -117, 61, 61, 61, -117, -117, -117, -117, - -117, 61, 61, 61, 61, 61, 61, 61, 144, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -117 + 9, -117, -117, -117, -117, -117, -117, 55, -117, -117, + -117, -117, -117, 58, 58, -117, -117, -117, -117, -117, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 141, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -117 }, { - 9, -118, -118, -118, -118, -118, -118, 57, -118, -118, - -118, -118, -118, 61, 61, 61, -118, -118, -118, -118, - -118, 61, 61, 61, 61, 61, 145, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -118 + 9, -118, -118, -118, -118, -118, -118, 55, -118, -118, + -118, -118, -118, 58, 58, -118, -118, -118, -118, -118, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -118 }, { - 9, -119, -119, -119, -119, -119, -119, 57, -119, -119, - -119, -119, -119, 61, 61, 61, -119, -119, -119, -119, - -119, 61, 61, 61, 61, 61, 146, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -119 + 9, -119, -119, -119, -119, -119, -119, 55, -119, -119, + -119, -119, -119, 58, 58, -119, -119, -119, -119, -119, + 58, 58, 58, 142, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -119 }, { - 9, -120, -120, -120, -120, -120, -120, 57, -120, -120, - -120, -120, -120, 61, 61, 61, -120, -120, -120, -120, - -120, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 147, 61, 61, 61, - 61, 61, 61, -120 + 9, -120, -120, -120, -120, -120, -120, 55, -120, -120, + -120, -120, -120, 58, 58, -120, -120, -120, -120, -120, + 58, 58, 58, 58, 58, 143, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -120 }, { - 9, -121, -121, -121, -121, -121, -121, 57, -121, -121, - -121, -121, -121, 61, 61, 61, -121, -121, -121, -121, - -121, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 148, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -121 + 9, -121, -121, -121, -121, -121, -121, 55, -121, -121, + -121, -121, -121, 58, 58, -121, -121, -121, -121, -121, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 144, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -121 }, { - 9, -122, -122, -122, -122, -122, -122, 57, -122, -122, - -122, -122, -122, 61, 61, 61, -122, -122, -122, -122, - -122, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 149, 61, 61, - 61, 61, 61, -122 + 9, -122, -122, -122, -122, -122, -122, 55, -122, -122, + -122, -122, -122, 58, 58, -122, -122, -122, -122, -122, + 58, 58, 145, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 146, 58, 58, + 58, 58, -122 }, { - 9, -123, -123, -123, -123, -123, -123, 57, -123, -123, - -123, -123, -123, 61, 61, 61, -123, -123, -123, -123, - -123, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 150, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -123 + 9, -123, -123, -123, -123, -123, -123, 55, -123, -123, + -123, -123, -123, 58, 58, -123, -123, -123, -123, -123, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 147, 58, + 58, 58, -123 }, { - 9, -124, -124, -124, -124, -124, -124, 57, -124, -124, - -124, -124, -124, 61, 61, 61, -124, -124, -124, -124, - -124, 61, 61, 61, 61, 61, 151, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -124 + 9, -124, -124, -124, -124, -124, -124, 55, -124, -124, + -124, -124, -124, 58, 58, -124, -124, -124, -124, -124, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 148, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -124 }, { - 9, -125, -125, -125, -125, -125, -125, 57, -125, -125, - -125, -125, -125, 61, 61, 61, -125, -125, -125, -125, - -125, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 152, 61, 61, 61, 61, 61, - 61, 61, 61, -125 + 9, -125, -125, -125, -125, -125, -125, 55, -125, -125, + -125, -125, -125, 58, 58, -125, -125, -125, -125, -125, + 58, 58, 58, 58, 58, 58, 58, 58, 149, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -125 }, { - 9, -126, -126, -126, -126, -126, -126, 57, -126, -126, - -126, -126, -126, 61, 61, 61, -126, -126, -126, -126, - -126, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -126 + 9, -126, -126, -126, -126, -126, -126, 55, -126, -126, + -126, -126, -126, 58, 58, -126, -126, -126, -126, -126, + 58, 58, 58, 58, 58, 58, 150, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -126 }, { - 9, -127, -127, -127, -127, -127, -127, 57, -127, -127, - -127, -127, -127, 61, 61, 61, -127, -127, -127, -127, - -127, 61, 61, 61, 153, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -127 + 9, -127, -127, -127, -127, -127, -127, 55, -127, -127, + -127, -127, -127, 58, 58, -127, -127, -127, -127, -127, + 58, 58, 58, 58, 58, 151, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -127 }, { - 9, -128, -128, -128, -128, -128, -128, 57, -128, -128, - -128, -128, -128, 61, 61, 61, -128, -128, -128, -128, - -128, 61, 61, 61, 61, 61, 154, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -128 + 9, -128, -128, -128, -128, -128, -128, 55, -128, -128, + -128, -128, -128, 58, 58, -128, -128, -128, -128, -128, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -128 }, { - 9, -129, -129, -129, -129, -129, -129, 57, -129, -129, - -129, -129, -129, 61, 61, 61, -129, -129, -129, -129, - -129, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 155, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -129 + 9, -129, -129, -129, -129, -129, -129, 55, -129, -129, + -129, -129, -129, 58, 58, -129, -129, -129, -129, -129, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 152, -129 }, { - 9, -130, -130, -130, -130, -130, -130, 57, -130, -130, - -130, -130, -130, 61, 61, 61, -130, -130, -130, -130, - -130, 61, 61, 156, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 157, 61, - 61, 61, 61, -130 + 9, -130, -130, -130, -130, -130, -130, 55, -130, -130, + -130, -130, -130, 58, 58, -130, -130, -130, -130, -130, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 153, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -130 }, { - 9, -131, -131, -131, -131, -131, -131, 57, -131, -131, - -131, -131, -131, 61, 61, 61, -131, -131, -131, -131, - -131, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 158, - 61, 61, 61, -131 + 9, -131, -131, -131, -131, -131, -131, 55, -131, -131, + -131, -131, -131, 58, 58, -131, -131, -131, -131, -131, + 58, 58, 58, 154, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -131 }, { - 9, -132, -132, -132, -132, -132, -132, 57, -132, -132, - -132, -132, -132, 61, 61, 61, -132, -132, -132, -132, - -132, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 159, 61, 61, 61, 61, 61, - 61, 61, 61, -132 + 9, -132, -132, -132, -132, -132, -132, 55, -132, -132, + -132, -132, -132, 58, 58, -132, -132, -132, -132, -132, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 155, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -132 }, { - 9, -133, -133, -133, -133, -133, -133, 57, -133, -133, - -133, -133, -133, 61, 61, 61, -133, -133, -133, -133, - -133, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 160, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -133 + 9, -133, -133, -133, -133, -133, -133, 55, -133, -133, + -133, -133, -133, 58, 58, -133, -133, -133, -133, -133, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 156, 58, 58, 58, 58, 58, 58, + 58, 58, -133 }, { - 9, -134, -134, -134, -134, -134, -134, 57, -134, -134, - -134, -134, -134, 61, 61, 61, -134, -134, -134, -134, - -134, 61, 61, 61, 61, 61, 61, 61, 61, 161, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -134 + 9, -134, -134, -134, -134, -134, -134, 55, -134, -134, + -134, -134, -134, 58, 58, -134, -134, -134, -134, -134, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 157, 58, 58, 58, 58, 58, + 58, 58, -134 }, { - 9, -135, -135, -135, -135, -135, -135, 57, -135, -135, - -135, -135, -135, 61, 61, 61, -135, -135, -135, -135, - -135, 61, 61, 61, 61, 61, 61, 162, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -135 + 9, -135, -135, -135, -135, -135, -135, 55, -135, -135, + -135, -135, -135, 58, 58, -135, -135, -135, -135, -135, + 58, 58, 58, 58, 58, 158, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -135 }, { - 9, -136, -136, -136, -136, -136, -136, 57, -136, -136, - -136, -136, -136, 61, 61, 61, -136, -136, -136, -136, - -136, 61, 61, 61, 61, 61, 163, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -136 + 9, -136, -136, -136, -136, -136, -136, 55, -136, -136, + -136, -136, -136, 58, 58, -136, -136, -136, -136, -136, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 159, 58, 58, + 58, 58, -136 }, { - 9, -137, -137, -137, -137, -137, -137, 57, -137, -137, - -137, -137, -137, 61, 61, 61, -137, -137, -137, -137, - -137, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -137 + 9, -137, -137, -137, -137, -137, -137, 55, -137, -137, + -137, -137, -137, 58, 58, -137, -137, -137, -137, -137, + 58, 58, 58, 160, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -137 }, { - 9, -138, -138, -138, -138, -138, -138, 57, -138, -138, - -138, -138, -138, 61, 61, 61, -138, -138, -138, -138, - -138, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 164, -138 + 9, -138, -138, -138, -138, -138, -138, 55, -138, -138, + -138, -138, -138, 58, 58, -138, -138, -138, -138, -138, + 58, 58, 58, 161, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -138 }, { - 9, -139, -139, -139, -139, -139, -139, 57, -139, -139, - -139, -139, -139, 61, 61, 61, -139, -139, -139, -139, - -139, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 165, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -139 + 9, -139, -139, -139, -139, -139, -139, 55, -139, -139, + -139, -139, -139, 58, 58, -139, -139, -139, -139, -139, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 162, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -139 }, { - 9, -140, -140, -140, -140, -140, -140, 57, -140, -140, - -140, -140, -140, 61, 61, 61, -140, -140, -140, -140, - -140, 61, 61, 61, 166, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -140 + 9, -140, -140, -140, -140, -140, -140, 55, -140, -140, + -140, -140, -140, 58, 58, -140, -140, -140, -140, -140, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 163, 58, 58, + 58, 58, -140 }, { - 9, -141, -141, -141, -141, -141, -141, 57, -141, -141, - -141, -141, -141, 61, 61, 61, -141, -141, -141, -141, - -141, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 167, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -141 + 9, -141, -141, -141, -141, -141, -141, 55, -141, -141, + -141, -141, -141, 58, 58, -141, -141, -141, -141, -141, + 58, 58, 164, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -141 }, { - 9, -142, -142, -142, -142, -142, -142, 57, -142, -142, - -142, -142, -142, 61, 61, 61, -142, -142, -142, -142, - -142, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 168, 61, 61, 61, 61, 61, - 61, 61, 61, -142 + 9, -142, -142, -142, -142, -142, -142, 55, -142, -142, + -142, -142, -142, 58, 58, -142, -142, -142, -142, -142, + 58, 58, 58, 58, 58, 165, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -142 }, { - 9, -143, -143, -143, -143, -143, -143, 57, -143, -143, - -143, -143, -143, 61, 61, 61, -143, -143, -143, -143, - -143, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 169, 61, 61, 61, 61, - 61, 61, 61, -143 + 9, -143, -143, -143, -143, -143, -143, 55, -143, -143, + -143, -143, -143, 58, 58, -143, -143, -143, -143, -143, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 166, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -143 }, { - 9, -144, -144, -144, -144, -144, -144, 57, -144, -144, - -144, -144, -144, 61, 61, 61, -144, -144, -144, -144, - -144, 61, 61, 61, 61, 61, 170, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -144 + 9, -144, -144, -144, -144, -144, -144, 55, -144, -144, + -144, -144, -144, 58, 58, -144, -144, -144, -144, -144, + 58, 58, 58, 58, 58, 58, 58, 167, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -144 }, { - 9, -145, -145, -145, -145, -145, -145, 57, -145, -145, - -145, -145, -145, 61, 61, 61, -145, -145, -145, -145, - -145, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 171, 61, - 61, 61, 61, -145 + 9, -145, -145, -145, -145, -145, -145, 55, -145, -145, + -145, -145, -145, 58, 58, -145, -145, -145, -145, -145, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 168, 58, 58, 58, 58, 58, 58, + 58, 58, -145 }, { - 9, -146, -146, -146, -146, -146, -146, 57, -146, -146, - -146, -146, -146, 61, 61, 61, -146, -146, -146, -146, - -146, 61, 61, 61, 172, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -146 + 9, -146, -146, -146, -146, -146, -146, 55, -146, -146, + -146, -146, -146, 58, 58, -146, -146, -146, -146, -146, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 169, 58, 58, 58, 58, + 58, 58, -146 }, { - 9, -147, -147, -147, -147, -147, -147, 57, -147, -147, - -147, -147, -147, 61, 61, 61, -147, -147, -147, -147, - -147, 61, 61, 61, 173, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -147 + 9, -147, -147, -147, -147, -147, -147, 55, -147, -147, + -147, -147, -147, 58, 58, -147, -147, -147, -147, -147, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 170, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -147 }, { - 9, -148, -148, -148, -148, -148, -148, 57, -148, -148, - -148, -148, -148, 61, 61, 61, -148, -148, -148, -148, - -148, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 174, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -148 + 9, -148, -148, -148, -148, -148, -148, 55, -148, -148, + -148, -148, -148, 58, 58, -148, -148, -148, -148, -148, + 58, 58, 58, 58, 171, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -148 }, { - 9, -149, -149, -149, -149, -149, -149, 57, -149, -149, - -149, -149, -149, 61, 61, 61, -149, -149, -149, -149, - -149, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 175, 61, - 61, 61, 61, -149 + 9, -149, -149, -149, -149, -149, -149, 55, -149, -149, + -149, -149, -149, 58, 58, -149, -149, -149, -149, -149, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 172, 58, 58, 58, 58, 58, 58, + 58, 58, -149 }, { - 9, -150, -150, -150, -150, -150, -150, 57, -150, -150, - -150, -150, -150, 61, 61, 61, -150, -150, -150, -150, - -150, 61, 61, 176, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -150 + 9, -150, -150, -150, -150, -150, -150, 55, -150, -150, + -150, -150, -150, 58, 58, -150, -150, -150, -150, -150, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -150 }, { - 9, -151, -151, -151, -151, -151, -151, 57, -151, -151, - -151, -151, -151, 61, 61, 61, -151, -151, -151, -151, - -151, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 177, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -151 + 9, -151, -151, -151, -151, -151, -151, 55, -151, -151, + -151, -151, -151, 58, 58, -151, -151, -151, -151, -151, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 173, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -151 }, { - 9, -152, -152, -152, -152, -152, -152, 57, -152, -152, - -152, -152, -152, 61, 61, 61, -152, -152, -152, -152, - -152, 61, 61, 61, 178, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -152 + 9, -152, -152, -152, -152, -152, -152, 55, -152, -152, + -152, -152, -152, 58, 58, -152, -152, -152, -152, -152, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -152 }, { - 9, -153, -153, -153, -153, -153, -153, 57, -153, -153, - -153, -153, -153, 61, 61, 61, -153, -153, -153, -153, - -153, 61, 61, 61, 61, 61, 179, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -153 + 9, -153, -153, -153, -153, -153, -153, 55, -153, -153, + -153, -153, -153, 58, 58, -153, -153, -153, -153, -153, + 58, 58, 58, 58, 58, 174, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -153 }, { - 9, -154, -154, -154, -154, -154, -154, 57, -154, -154, - -154, -154, -154, 61, 61, 61, -154, -154, -154, -154, - -154, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 180, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -154 + 9, -154, -154, -154, -154, -154, -154, 55, -154, -154, + -154, -154, -154, 58, 58, -154, -154, -154, -154, -154, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 175, 58, 58, 58, 58, 58, 58, + 58, 58, -154 }, { - 9, -155, -155, -155, -155, -155, -155, 57, -155, -155, - -155, -155, -155, 61, 61, 61, -155, -155, -155, -155, - -155, 61, 61, 61, 61, 61, 61, 61, 181, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -155 + 9, -155, -155, -155, -155, -155, -155, 55, -155, -155, + -155, -155, -155, 58, 58, -155, -155, -155, -155, -155, + 58, 58, 58, 58, 58, 176, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -155 }, { - 9, -156, -156, -156, -156, -156, -156, 57, -156, -156, - -156, -156, -156, 61, 61, 61, -156, -156, -156, -156, - -156, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 182, 61, 61, 61, 61, 61, - 61, 61, 61, -156 + 9, -156, -156, -156, -156, -156, -156, 55, -156, -156, + -156, -156, -156, 58, 58, -156, -156, -156, -156, -156, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 177, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -156 }, { - 9, -157, -157, -157, -157, -157, -157, 57, -157, -157, - -157, -157, -157, 61, 61, 61, -157, -157, -157, -157, - -157, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 183, 61, 61, 61, - 61, 61, 61, -157 + 9, -157, -157, -157, -157, -157, -157, 55, -157, -157, + -157, -157, -157, 58, 58, -157, -157, -157, -157, -157, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 178, 58, 58, + 58, 58, -157 }, { - 9, -158, -158, -158, -158, -158, -158, 57, -158, -158, - -158, -158, -158, 61, 61, 61, -158, -158, -158, -158, - -158, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 184, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -158 + 9, -158, -158, -158, -158, -158, -158, 55, -158, -158, + -158, -158, -158, 58, 58, -158, -158, -158, -158, -158, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -158 }, { - 9, -159, -159, -159, -159, -159, -159, 57, -159, -159, - -159, -159, -159, 61, 61, 61, -159, -159, -159, -159, - -159, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 185, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -159 + 9, -159, -159, -159, -159, -159, -159, 55, -159, -159, + -159, -159, -159, 58, 58, -159, -159, -159, -159, -159, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -159 }, { - 9, -160, -160, -160, -160, -160, -160, 57, -160, -160, - -160, -160, -160, 61, 61, 61, -160, -160, -160, -160, - -160, 61, 61, 61, 61, 186, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -160 + 9, -160, -160, -160, -160, -160, -160, 55, -160, -160, + -160, -160, -160, 58, 58, -160, -160, -160, -160, -160, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 179, 58, 58, + 58, 58, -160 }, { - 9, -161, -161, -161, -161, -161, -161, 57, -161, -161, - -161, -161, -161, 61, 61, 61, -161, -161, -161, -161, - -161, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 187, 61, 61, 61, 61, 61, - 61, 61, 61, -161 + 9, -161, -161, -161, -161, -161, -161, 55, -161, -161, + -161, -161, -161, 58, 58, -161, -161, -161, -161, -161, + 58, 58, 58, 58, 58, 180, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -161 }, { - 9, -162, -162, -162, -162, -162, -162, 57, -162, -162, - -162, -162, -162, 61, 61, 61, -162, -162, -162, -162, - -162, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -162 + 9, -162, -162, -162, -162, -162, -162, 55, -162, -162, + -162, -162, -162, 58, 58, -162, -162, -162, -162, -162, + 58, 58, 58, 58, 58, 58, 58, 181, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -162 }, { - 9, -163, -163, -163, -163, -163, -163, 57, -163, -163, - -163, -163, -163, 61, 61, 61, -163, -163, -163, -163, - -163, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 188, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -163 + 9, -163, -163, -163, -163, -163, -163, 55, -163, -163, + -163, -163, -163, 58, 58, -163, -163, -163, -163, -163, + 58, 182, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -163 }, { - 9, -164, -164, -164, -164, -164, -164, 57, -164, -164, - -164, -164, -164, 61, 61, 61, -164, -164, -164, -164, - -164, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -164 + 9, -164, -164, -164, -164, -164, -164, 55, -164, -164, + -164, -164, -164, 58, 58, -164, -164, -164, -164, -164, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 183, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -164 }, { - 9, -165, -165, -165, -165, -165, -165, 57, -165, -165, - -165, -165, -165, 61, 61, 61, -165, -165, -165, -165, - -165, 61, 61, 61, 61, 61, 189, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -165 + 9, -165, -165, -165, -165, -165, -165, 55, -165, -165, + -165, -165, -165, 58, 58, -165, -165, -165, -165, -165, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -165 }, { - 9, -166, -166, -166, -166, -166, -166, 57, -166, -166, - -166, -166, -166, 61, 61, 61, -166, -166, -166, -166, - -166, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 190, 61, 61, 61, 61, 61, - 61, 61, 61, -166 + 9, -166, -166, -166, -166, -166, -166, 55, -166, -166, + -166, -166, -166, 58, 58, -166, -166, -166, -166, -166, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 184, 58, 58, + 58, 58, -166 }, { - 9, -167, -167, -167, -167, -167, -167, 57, -167, -167, - -167, -167, -167, 61, 61, 61, -167, -167, -167, -167, - -167, 61, 61, 61, 61, 61, 191, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -167 + 9, -167, -167, -167, -167, -167, -167, 55, -167, -167, + -167, -167, -167, 58, 58, -167, -167, -167, -167, -167, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -167 }, { - 9, -168, -168, -168, -168, -168, -168, 57, -168, -168, - -168, -168, -168, 61, 61, 61, -168, -168, -168, -168, - -168, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 192, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -168 + 9, -168, -168, -168, -168, -168, -168, 55, -168, -168, + -168, -168, -168, 58, 58, -168, -168, -168, -168, -168, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 185, 58, 58, 58, 58, 58, 58, + 58, 58, -168 }, { - 9, -169, -169, -169, -169, -169, -169, 57, -169, -169, - -169, -169, -169, 61, 61, 61, -169, -169, -169, -169, - -169, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 193, 61, - 61, 61, 61, -169 + 9, -169, -169, -169, -169, -169, -169, 55, -169, -169, + -169, -169, -169, 58, 58, -169, -169, -169, -169, -169, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 186, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -169 }, { - 9, -170, -170, -170, -170, -170, -170, 57, -170, -170, - -170, -170, -170, 61, 61, 61, -170, -170, -170, -170, - -170, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -170 + 9, -170, -170, -170, -170, -170, -170, 55, -170, -170, + -170, -170, -170, 58, 58, -170, -170, -170, -170, -170, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 187, 58, 58, + 58, 58, -170 }, { - 9, -171, -171, -171, -171, -171, -171, 57, -171, -171, - -171, -171, -171, 61, 61, 61, -171, -171, -171, -171, - -171, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -171 + 9, -171, -171, -171, -171, -171, -171, 55, -171, -171, + -171, -171, -171, 58, 58, -171, -171, -171, -171, -171, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 188, 58, 58, 58, + 58, 58, -171 }, { - 9, -172, -172, -172, -172, -172, -172, 57, -172, -172, - -172, -172, -172, 61, 61, 61, -172, -172, -172, -172, - -172, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 194, 61, - 61, 61, 61, -172 + 9, -172, -172, -172, -172, -172, -172, 55, -172, -172, + -172, -172, -172, 58, 58, -172, -172, -172, -172, -172, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 189, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -172 }, { - 9, -173, -173, -173, -173, -173, -173, 57, -173, -173, - -173, -173, -173, 61, 61, 61, -173, -173, -173, -173, - -173, 61, 61, 61, 61, 61, 195, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -173 + 9, -173, -173, -173, -173, -173, -173, 55, -173, -173, + -173, -173, -173, 58, 58, -173, -173, -173, -173, -173, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 190, 58, + 58, 58, -173 }, { - 9, -174, -174, -174, -174, -174, -174, 57, -174, -174, - -174, -174, -174, 61, 61, 61, -174, -174, -174, -174, - -174, 61, 61, 61, 61, 61, 61, 61, 196, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -174 + 9, -174, -174, -174, -174, -174, -174, 55, -174, -174, + -174, -174, -174, 58, 58, -174, -174, -174, -174, -174, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 191, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -174 }, { - 9, -175, -175, -175, -175, -175, -175, 57, -175, -175, - -175, -175, -175, 61, 61, 61, -175, -175, -175, -175, - -175, 61, 197, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -175 + 9, -175, -175, -175, -175, -175, -175, 55, -175, -175, + -175, -175, -175, 58, 58, -175, -175, -175, -175, -175, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 192, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -175 }, { - 9, -176, -176, -176, -176, -176, -176, 57, -176, -176, - -176, -176, -176, 61, 61, 61, -176, -176, -176, -176, - -176, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 198, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -176 + 9, -176, -176, -176, -176, -176, -176, 55, -176, -176, + -176, -176, -176, 58, 58, -176, -176, -176, -176, -176, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 193, 58, 58, 58, + 58, 58, -176 }, { - 9, -177, -177, -177, -177, -177, -177, 57, -177, -177, - -177, -177, -177, 61, 61, 61, -177, -177, -177, -177, - -177, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 199, 61, 61, 61, 61, - 61, 61, 61, -177 + 9, -177, -177, -177, -177, -177, -177, 55, -177, -177, + -177, -177, -177, 58, 58, -177, -177, -177, -177, -177, + 58, 194, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -177 }, { - 9, -178, -178, -178, -178, -178, -178, 57, -178, -178, - -178, -178, -178, 61, 61, 61, -178, -178, -178, -178, - -178, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 200, 61, 61, 61, 61, 61, - 61, 61, 61, -178 + 9, -178, -178, -178, -178, -178, -178, 55, -178, -178, + -178, -178, -178, 58, 58, -178, -178, -178, -178, -178, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -178 }, { - 9, -179, -179, -179, -179, -179, -179, 57, -179, -179, - -179, -179, -179, 61, 61, 61, -179, -179, -179, -179, - -179, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -179 + 9, -179, -179, -179, -179, -179, -179, 55, -179, -179, + -179, -179, -179, 58, 58, -179, -179, -179, -179, -179, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -179 }, { - 9, -180, -180, -180, -180, -180, -180, 57, -180, -180, - -180, -180, -180, 61, 61, 61, -180, -180, -180, -180, - -180, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 201, 61, - 61, 61, 61, -180 + 9, -180, -180, -180, -180, -180, -180, 55, -180, -180, + -180, -180, -180, 58, 58, -180, -180, -180, -180, -180, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -180 }, { - 9, -181, -181, -181, -181, -181, -181, 57, -181, -181, - -181, -181, -181, 61, 61, 61, -181, -181, -181, -181, - -181, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -181 + 9, -181, -181, -181, -181, -181, -181, 55, -181, -181, + -181, -181, -181, 58, 58, -181, -181, -181, -181, -181, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -181 }, { - 9, -182, -182, -182, -182, -182, -182, 57, -182, -182, - -182, -182, -182, 61, 61, 61, -182, -182, -182, -182, - -182, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 202, 61, 61, 61, 61, 61, - 61, 61, 61, -182 + 9, -182, -182, -182, -182, -182, -182, 55, -182, -182, + -182, -182, -182, 58, 58, -182, -182, -182, -182, -182, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 195, 58, 58, + 58, 58, -182 }, { - 9, -183, -183, -183, -183, -183, -183, 57, -183, -183, - -183, -183, -183, 61, 61, 61, -183, -183, -183, -183, - -183, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 203, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -183 + 9, -183, -183, -183, -183, -183, -183, 55, -183, -183, + -183, -183, -183, 58, 58, -183, -183, -183, -183, -183, + 58, 58, 58, 58, 58, 196, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -183 }, { - 9, -184, -184, -184, -184, -184, -184, 57, -184, -184, - -184, -184, -184, 61, 61, 61, -184, -184, -184, -184, - -184, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 204, 61, - 61, 61, 61, -184 + 9, -184, -184, -184, -184, -184, -184, 55, -184, -184, + -184, -184, -184, 58, 58, -184, -184, -184, -184, -184, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -184 }, { - 9, -185, -185, -185, -185, -185, -185, 57, -185, -185, - -185, -185, -185, 61, 61, 61, -185, -185, -185, -185, - -185, 61, 61, 61, 61, 61, 61, 205, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -185 + 9, -185, -185, -185, -185, -185, -185, 55, -185, -185, + -185, -185, -185, 58, 58, -185, -185, -185, -185, -185, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 197, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -185 }, { - 9, -186, -186, -186, -186, -186, -186, 57, -186, -186, - -186, -186, -186, 61, 61, 61, -186, -186, -186, -186, - -186, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 206, 61, 61, - 61, 61, 61, -186 + 9, -186, -186, -186, -186, -186, -186, 55, -186, -186, + -186, -186, -186, 58, 58, -186, -186, -186, -186, -186, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 198, 58, 58, 58, + 58, 58, -186 }, { - 9, -187, -187, -187, -187, -187, -187, 57, -187, -187, - -187, -187, -187, 61, 61, 61, -187, -187, -187, -187, - -187, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 207, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -187 + 9, -187, -187, -187, -187, -187, -187, 55, -187, -187, + -187, -187, -187, 58, 58, -187, -187, -187, -187, -187, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -187 }, { - 9, -188, -188, -188, -188, -188, -188, 57, -188, -188, - -188, -188, -188, 61, 61, 61, -188, -188, -188, -188, - -188, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 208, - 61, 61, 61, -188 + 9, -188, -188, -188, -188, -188, -188, 55, -188, -188, + -188, -188, -188, 58, 58, -188, -188, -188, -188, -188, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -188 }, { - 9, -189, -189, -189, -189, -189, -189, 57, -189, -189, - -189, -189, -189, 61, 61, 61, -189, -189, -189, -189, - -189, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 209, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -189 + 9, -189, -189, -189, -189, -189, -189, 55, -189, -189, + -189, -189, -189, 58, 58, -189, -189, -189, -189, -189, + 58, 58, 58, 199, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -189 }, { - 9, -190, -190, -190, -190, -190, -190, 57, -190, -190, - -190, -190, -190, 61, 61, 61, -190, -190, -190, -190, - -190, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 210, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -190 + 9, -190, -190, -190, -190, -190, -190, 55, -190, -190, + -190, -190, -190, 58, 58, -190, -190, -190, -190, -190, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -190 }, { - 9, -191, -191, -191, -191, -191, -191, 57, -191, -191, - -191, -191, -191, 61, 61, 61, -191, -191, -191, -191, - -191, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 211, 61, 61, - 61, 61, 61, -191 + 9, -191, -191, -191, -191, -191, -191, 55, -191, -191, + -191, -191, -191, 58, 58, -191, -191, -191, -191, -191, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 200, 58, + 58, 58, -191 }, { - 9, -192, -192, -192, -192, -192, -192, 57, -192, -192, - -192, -192, -192, 61, 61, 61, -192, -192, -192, -192, - -192, 61, 212, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -192 + 9, -192, -192, -192, -192, -192, -192, 55, -192, -192, + -192, -192, -192, 58, 58, -192, -192, -192, -192, -192, + 58, 58, 58, 58, 58, 58, 201, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -192 }, { - 9, -193, -193, -193, -193, -193, -193, 57, -193, -193, - -193, -193, -193, 61, 61, 61, -193, -193, -193, -193, - -193, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -193 + 9, -193, -193, -193, -193, -193, -193, 55, -193, -193, + -193, -193, -193, 58, 58, -193, -193, -193, -193, -193, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -193 }, { - 9, -194, -194, -194, -194, -194, -194, 57, -194, -194, - -194, -194, -194, 61, 61, 61, -194, -194, -194, -194, - -194, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -194 + 9, -194, -194, -194, -194, -194, -194, 55, -194, -194, + -194, -194, -194, 58, 58, -194, -194, -194, -194, -194, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 202, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -194 }, { - 9, -195, -195, -195, -195, -195, -195, 57, -195, -195, - -195, -195, -195, 61, 61, 61, -195, -195, -195, -195, - -195, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -195 + 9, -195, -195, -195, -195, -195, -195, 55, -195, -195, + -195, -195, -195, 58, 58, -195, -195, -195, -195, -195, + 58, 58, 58, 58, 58, 203, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -195 }, { - 9, -196, -196, -196, -196, -196, -196, 57, -196, -196, - -196, -196, -196, 61, 61, 61, -196, -196, -196, -196, - -196, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -196 + 9, -196, -196, -196, -196, -196, -196, 55, -196, -196, + -196, -196, -196, 58, 58, -196, -196, -196, -196, -196, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -196 }, { - 9, -197, -197, -197, -197, -197, -197, 57, -197, -197, - -197, -197, -197, 61, 61, 61, -197, -197, -197, -197, - -197, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 213, 61, - 61, 61, 61, -197 + 9, -197, -197, -197, -197, -197, -197, 55, -197, -197, + -197, -197, -197, 58, 58, -197, -197, -197, -197, -197, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -197 }, { - 9, -198, -198, -198, -198, -198, -198, 57, -198, -198, - -198, -198, -198, 61, 61, 61, -198, -198, -198, -198, - -198, 61, 61, 61, 61, 61, 214, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -198 + 9, -198, -198, -198, -198, -198, -198, 55, -198, -198, + -198, -198, -198, 58, 58, -198, -198, -198, -198, -198, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 204, 58, 58, + 58, 58, -198 }, { - 9, -199, -199, -199, -199, -199, -199, 57, -199, -199, - -199, -199, -199, 215, 61, 61, -199, -199, -199, -199, - -199, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -199 + 9, -199, -199, -199, -199, -199, -199, 55, -199, -199, + -199, -199, -199, 58, 58, -199, -199, -199, -199, -199, + 58, 58, 58, 58, 58, 205, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -199 }, { - 9, -200, -200, -200, -200, -200, -200, 57, -200, -200, - -200, -200, -200, 61, 61, 61, -200, -200, -200, -200, - -200, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 216, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -200 + 9, -200, -200, -200, -200, -200, -200, 55, -200, -200, + -200, -200, -200, 58, 58, -200, -200, -200, -200, -200, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -200 }, { - 9, -201, -201, -201, -201, -201, -201, 57, -201, -201, - -201, -201, -201, 61, 61, 61, -201, -201, -201, -201, - -201, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -201 + 9, -201, -201, -201, -201, -201, -201, 55, -201, -201, + -201, -201, -201, 58, 58, -201, -201, -201, -201, -201, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 206, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -201 }, { - 9, -202, -202, -202, -202, -202, -202, 57, -202, -202, - -202, -202, -202, 61, 61, 61, -202, -202, -202, -202, - -202, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 217, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -202 + 9, -202, -202, -202, -202, -202, -202, 55, -202, -202, + -202, -202, -202, 58, 58, -202, -202, -202, -202, -202, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -202 }, { - 9, -203, -203, -203, -203, -203, -203, 57, -203, -203, - -203, -203, -203, 61, 61, 61, -203, -203, -203, -203, - -203, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 218, 61, 61, - 61, 61, 61, -203 + 9, -203, -203, -203, -203, -203, -203, 55, -203, -203, + -203, -203, -203, 58, 58, -203, -203, -203, -203, -203, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -203 }, { - 9, -204, -204, -204, -204, -204, -204, 57, -204, -204, - -204, -204, -204, 61, 61, 61, -204, -204, -204, -204, - -204, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -204 + 9, -204, -204, -204, -204, -204, -204, 55, -204, -204, + -204, -204, -204, 58, 58, -204, -204, -204, -204, -204, + 58, 207, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -204 }, { - 9, -205, -205, -205, -205, -205, -205, 57, -205, -205, - -205, -205, -205, 61, 61, 61, -205, -205, -205, -205, - -205, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 219, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -205 + 9, -205, -205, -205, -205, -205, -205, 55, -205, -205, + -205, -205, -205, 58, 58, -205, -205, -205, -205, -205, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -205 }, { - 9, -206, -206, -206, -206, -206, -206, 57, -206, -206, - -206, -206, -206, 61, 61, 61, -206, -206, -206, -206, - -206, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -206 + 9, -206, -206, -206, -206, -206, -206, 55, -206, -206, + -206, -206, -206, 58, 58, -206, -206, -206, -206, -206, + 58, 58, 58, 58, 58, 58, 58, 208, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -206 }, { - 9, -207, -207, -207, -207, -207, -207, 57, -207, -207, - -207, -207, -207, 61, 61, 61, -207, -207, -207, -207, - -207, 61, 61, 61, 220, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -207 + 9, -207, -207, -207, -207, -207, -207, 55, -207, -207, + -207, -207, -207, 58, 58, -207, -207, -207, -207, -207, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 209, 58, 58, + 58, 58, -207 }, { - 9, -208, -208, -208, -208, -208, -208, 57, -208, -208, - -208, -208, -208, 61, 61, 61, -208, -208, -208, -208, - -208, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -208 + 9, -208, -208, -208, -208, -208, -208, 55, -208, -208, + -208, -208, -208, 58, 58, -208, -208, -208, -208, -208, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -208 }, { - 9, -209, -209, -209, -209, -209, -209, 57, -209, -209, - -209, -209, -209, 61, 61, 61, -209, -209, -209, -209, - -209, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 221, - 61, 61, 61, -209 + 9, -209, -209, -209, -209, -209, -209, 55, -209, -209, + -209, -209, -209, 58, 58, -209, -209, -209, -209, -209, + 58, 58, 58, 58, 58, 210, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -209 }, { - 9, -210, -210, -210, -210, -210, -210, 57, -210, -210, - -210, -210, -210, 61, 61, 61, -210, -210, -210, -210, - -210, 61, 61, 61, 61, 61, 61, 222, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -210 - }, - - { - 9, -211, -211, -211, -211, -211, -211, 57, -211, -211, - -211, -211, -211, 61, 61, 61, -211, -211, -211, -211, - -211, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -211 - - }, - - { - 9, -212, -212, -212, -212, -212, -212, 57, -212, -212, - -212, -212, -212, 61, 61, 61, -212, -212, -212, -212, - -212, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 223, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -212 - }, - - { - 9, -213, -213, -213, -213, -213, -213, 57, -213, -213, - -213, -213, -213, 61, 61, 61, -213, -213, -213, -213, - -213, 61, 61, 61, 61, 61, 224, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -213 - - }, - - { - 9, -214, -214, -214, -214, -214, -214, 57, -214, -214, - -214, -214, -214, 61, 61, 61, -214, -214, -214, -214, - -214, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -214 - }, - - { - 9, -215, -215, -215, -215, -215, -215, 57, -215, -215, - -215, -215, -215, 225, 61, 61, -215, -215, -215, -215, - -215, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -215 - - }, - - { - 9, -216, -216, -216, -216, -216, -216, 57, -216, -216, - -216, -216, -216, 61, 61, 61, -216, -216, -216, -216, - -216, 61, 61, 61, 61, 61, 61, 226, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -216 - }, - - { - 9, -217, -217, -217, -217, -217, -217, 57, -217, -217, - -217, -217, -217, 61, 61, 61, -217, -217, -217, -217, - -217, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -217 - - }, - - { - 9, -218, -218, -218, -218, -218, -218, 57, -218, -218, - -218, -218, -218, 61, 61, 61, -218, -218, -218, -218, - -218, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 227, 61, - 61, 61, 61, -218 - }, - - { - 9, -219, -219, -219, -219, -219, -219, 57, -219, -219, - -219, -219, -219, 61, 61, 61, -219, -219, -219, -219, - -219, 61, 61, 61, 61, 61, 61, 61, 228, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -219 - - }, - - { - 9, -220, -220, -220, -220, -220, -220, 57, -220, -220, - -220, -220, -220, 61, 61, 61, -220, -220, -220, -220, - -220, 61, 61, 61, 61, 61, 229, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -220 - }, - - { - 9, -221, -221, -221, -221, -221, -221, 57, -221, -221, - -221, -221, -221, 61, 61, 61, -221, -221, -221, -221, - -221, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -221 - - }, - - { - 9, -222, -222, -222, -222, -222, -222, 57, -222, -222, - -222, -222, -222, 61, 61, 61, -222, -222, -222, -222, - -222, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 230, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -222 - }, - - { - 9, -223, -223, -223, -223, -223, -223, 57, -223, -223, - -223, -223, -223, 61, 61, 61, -223, -223, -223, -223, - -223, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -223 - - }, - - { - 9, -224, -224, -224, -224, -224, -224, 57, -224, -224, - -224, -224, -224, 61, 61, 61, -224, -224, -224, -224, - -224, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -224 - }, - - { - 9, -225, -225, -225, -225, -225, -225, 57, -225, -225, - -225, -225, -225, 137, 61, 61, -225, -225, -225, -225, - -225, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -225 - - }, - - { - 9, -226, -226, -226, -226, -226, -226, 57, -226, -226, - -226, -226, -226, 61, 61, 61, -226, -226, -226, -226, - -226, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 231, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -226 - }, - - { - 9, -227, -227, -227, -227, -227, -227, 57, -227, -227, - -227, -227, -227, 61, 61, 61, -227, -227, -227, -227, - -227, 61, 232, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -227 - - }, - - { - 9, -228, -228, -228, -228, -228, -228, 57, -228, -228, - -228, -228, -228, 61, 61, 61, -228, -228, -228, -228, - -228, 233, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -228 - }, - - { - 9, -229, -229, -229, -229, -229, -229, 57, -229, -229, - -229, -229, -229, 61, 61, 61, -229, -229, -229, -229, - -229, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -229 - - }, - - { - 9, -230, -230, -230, -230, -230, -230, 57, -230, -230, - -230, -230, -230, 61, 61, 61, -230, -230, -230, -230, - -230, 61, 61, 61, 61, 61, 61, 61, 234, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -230 - }, - - { - 9, -231, -231, -231, -231, -231, -231, 57, -231, -231, - -231, -231, -231, 61, 61, 61, -231, -231, -231, -231, - -231, 61, 61, 61, 61, 61, 61, 61, 235, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -231 - - }, - - { - 9, -232, -232, -232, -232, -232, -232, 57, -232, -232, - -232, -232, -232, 61, 61, 61, -232, -232, -232, -232, - -232, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 236, 61, - 61, 61, 61, -232 - }, - - { - 9, -233, -233, -233, -233, -233, -233, 57, -233, -233, - -233, -233, -233, 61, 61, 61, -233, -233, -233, -233, - -233, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 237, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -233 - - }, - - { - 9, -234, -234, -234, -234, -234, -234, 57, -234, -234, - -234, -234, -234, 61, 61, 61, -234, -234, -234, -234, - -234, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -234 - }, - - { - 9, -235, -235, -235, -235, -235, -235, 57, -235, -235, - -235, -235, -235, 61, 61, 61, -235, -235, -235, -235, - -235, 238, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -235 - - }, - - { - 9, -236, -236, -236, -236, -236, -236, 57, -236, -236, - -236, -236, -236, 61, 61, 61, -236, -236, -236, -236, - -236, 61, 61, 61, 61, 61, 239, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -236 - }, - - { - 9, -237, -237, -237, -237, -237, -237, 57, -237, -237, - -237, -237, -237, 61, 61, 61, -237, -237, -237, -237, - -237, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 240, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -237 - - }, - - { - 9, -238, -238, -238, -238, -238, -238, 57, -238, -238, - -238, -238, -238, 61, 61, 61, -238, -238, -238, -238, - -238, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 241, -238 - }, - - { - 9, -239, -239, -239, -239, -239, -239, 57, -239, -239, - -239, -239, -239, 61, 61, 61, -239, -239, -239, -239, - -239, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -239 - - }, - - { - 9, -240, -240, -240, -240, -240, -240, 57, -240, -240, - -240, -240, -240, 61, 61, 61, -240, -240, -240, -240, - -240, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 242, 61, 61, - 61, 61, 61, -240 - }, - - { - 9, -241, -241, -241, -241, -241, -241, 57, -241, -241, - -241, -241, -241, 61, 61, 61, -241, -241, -241, -241, - -241, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -241 - - }, - - { - 9, -242, -242, -242, -242, -242, -242, 57, -242, -242, - -242, -242, -242, 61, 61, 61, -242, -242, -242, -242, - -242, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 243, 61, - 61, 61, 61, -242 - }, - - { - 9, -243, -243, -243, -243, -243, -243, 57, -243, -243, - -243, -243, -243, 61, 61, 61, -243, -243, -243, -243, - -243, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, -243 - + 9, -210, -210, -210, -210, -210, -210, 55, -210, -210, + -210, -210, -210, 58, 58, -210, -210, -210, -210, -210, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, -210 }, } ; @@ -2449,8 +2168,8 @@ static void yynoreturn yy_fatal_error ( const char* msg ); (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 67 -#define YY_END_OF_BUFFER 68 +#define YY_NUM_RULES 64 +#define YY_END_OF_BUFFER 65 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -2458,35 +2177,31 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[244] = +static const flex_int16_t yy_accept[211] = { 0, - 2, 2, 0, 0, 0, 0, 0, 0, 68, 54, - 2, 4, 46, 51, 1, 53, 54, 47, 48, 54, - 52, 52, 54, 42, 40, 44, 54, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 54, 55, 57, 56, 66, 63, 65, 59, 62, - 61, 58, 60, 2, 41, 1, 53, 39, 50, 52, - 52, 49, 43, 45, 3, 52, 52, 52, 52, 52, - 52, 52, 20, 52, 52, 52, 52, 52, 27, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 38, 55, - 55, 66, 63, 65, 64, 59, 58, 60, 52, 52, + 2, 2, 0, 0, 0, 0, 0, 0, 65, 51, + 2, 4, 43, 48, 1, 50, 51, 44, 45, 51, + 49, 51, 39, 37, 41, 51, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 51, + 52, 54, 53, 63, 60, 62, 56, 59, 58, 55, + 57, 2, 38, 1, 50, 36, 47, 49, 46, 40, + 42, 3, 49, 49, 49, 49, 49, 49, 18, 49, + 49, 49, 49, 49, 25, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 35, 52, 52, 63, 60, 62, + 61, 56, 55, 57, 49, 49, 49, 49, 49, 49, - 52, 52, 52, 52, 52, 52, 52, 52, 19, 52, - 22, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 6, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 18, 52, 52, 24, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 16, 52, 21, 52, 52, 52, 52, 52, 31, - 32, 52, 52, 52, 52, 52, 52, 52, 7, 52, - 9, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 28, 30, 33, 34, 35, 52, 52, 52, 52, + 49, 49, 17, 49, 20, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 5, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 16, 49, 49, + 22, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 14, + 49, 19, 49, 49, 49, 49, 49, 28, 29, 49, + 49, 49, 49, 49, 6, 49, 8, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 27, 30, 31, + 32, 49, 49, 7, 49, 49, 11, 12, 49, 15, + 49, 49, 24, 49, 49, 34, 9, 49, 49, 21, - 8, 52, 52, 12, 52, 14, 52, 17, 52, 52, - 26, 52, 52, 37, 52, 52, 10, 52, 52, 52, - 23, 52, 29, 36, 52, 52, 52, 52, 15, 52, - 52, 52, 52, 25, 52, 52, 52, 52, 11, 52, - 5, 52, 13 + 49, 26, 33, 49, 13, 49, 49, 23, 49, 10 } ; static const YY_CHAR yy_ec[256] = @@ -2495,16 +2210,16 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 6, 7, 1, 8, 9, 10, - 11, 1, 12, 1, 13, 14, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 16, 1, 17, - 18, 19, 1, 1, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 1, 20, 1, 1, 21, 1, 22, 23, 24, 25, + 11, 1, 12, 1, 13, 14, 14, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 15, 1, 16, + 17, 18, 1, 1, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 1, 19, 1, 1, 20, 1, 21, 22, 23, 24, - 26, 27, 28, 29, 30, 15, 15, 31, 32, 33, - 34, 35, 15, 36, 37, 38, 39, 40, 15, 41, - 42, 15, 1, 43, 1, 1, 1, 1, 1, 1, + 25, 26, 27, 28, 29, 13, 13, 30, 31, 32, + 33, 34, 13, 35, 36, 37, 38, 39, 13, 40, + 41, 13, 1, 42, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -2522,12 +2237,12 @@ static const YY_CHAR yy_ec[256] = } ; /* Table of booleans, true if rule could match eol. */ -static const flex_int32_t yy_rule_can_match_eol[68] = +static const flex_int32_t yy_rule_can_match_eol[65] = { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 1, 0, 1, 1, 0, 0, }; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 1, 1, 0, 0, }; extern int yy_flex_debug; int yy_flex_debug = 0; @@ -2550,7 +2265,6 @@ char *yytext; #include #include #include -#include #include #include @@ -2576,7 +2290,7 @@ struct buffer { YY_BUFFER_STATE state; }; -struct buffer *current_buf; +static struct buffer *current_buf; static int last_ts, first_ts; @@ -2885,189 +2599,177 @@ return T_EOL; YY_BREAK case 5: YY_RULE_SETUP -return T_ALLNOCONFIG_Y; +return T_BOOL; YY_BREAK case 6: YY_RULE_SETUP -return T_BOOL; +return T_CHOICE; YY_BREAK case 7: YY_RULE_SETUP -return T_CHOICE; +return T_COMMENT; YY_BREAK case 8: YY_RULE_SETUP -return T_COMMENT; +return T_CONFIG; YY_BREAK case 9: YY_RULE_SETUP -return T_CONFIG; +return T_DEF_BOOL; YY_BREAK case 10: YY_RULE_SETUP -return T_DEF_BOOL; +return T_DEF_TRISTATE; YY_BREAK case 11: YY_RULE_SETUP -return T_DEF_TRISTATE; +return T_DEFAULT; YY_BREAK case 12: YY_RULE_SETUP -return T_DEFAULT; +return T_DEPENDS; YY_BREAK case 13: YY_RULE_SETUP -return T_DEFCONFIG_LIST; +return T_ENDCHOICE; YY_BREAK case 14: YY_RULE_SETUP -return T_DEPENDS; +return T_ENDIF; YY_BREAK case 15: YY_RULE_SETUP -return T_ENDCHOICE; +return T_ENDMENU; YY_BREAK case 16: YY_RULE_SETUP -return T_ENDIF; +return T_HELP; YY_BREAK case 17: YY_RULE_SETUP -return T_ENDMENU; +return T_HEX; YY_BREAK case 18: YY_RULE_SETUP -return T_HELP; +return T_IF; YY_BREAK case 19: YY_RULE_SETUP -return T_HEX; +return T_IMPLY; YY_BREAK case 20: YY_RULE_SETUP -return T_IF; +return T_INT; YY_BREAK case 21: YY_RULE_SETUP -return T_IMPLY; +return T_MAINMENU; YY_BREAK case 22: YY_RULE_SETUP -return T_INT; +return T_MENU; YY_BREAK case 23: YY_RULE_SETUP -return T_MAINMENU; +return T_MENUCONFIG; YY_BREAK case 24: YY_RULE_SETUP -return T_MENU; +return T_MODULES; YY_BREAK case 25: YY_RULE_SETUP -return T_MENUCONFIG; +return T_ON; YY_BREAK case 26: YY_RULE_SETUP -return T_MODULES; +return T_OPTIONAL; YY_BREAK case 27: YY_RULE_SETUP -return T_ON; +return T_PROMPT; YY_BREAK case 28: YY_RULE_SETUP -return T_OPTION; +return T_RANGE; YY_BREAK case 29: YY_RULE_SETUP -return T_OPTIONAL; +return T_RESET; YY_BREAK case 30: YY_RULE_SETUP -return T_PROMPT; +return T_SELECT; YY_BREAK case 31: YY_RULE_SETUP -return T_RANGE; +return T_SOURCE; YY_BREAK case 32: YY_RULE_SETUP -return T_RESET; +return T_STRING; YY_BREAK case 33: YY_RULE_SETUP -return T_SELECT; +return T_TRISTATE; YY_BREAK case 34: YY_RULE_SETUP -return T_SOURCE; +return T_VISIBLE; YY_BREAK case 35: YY_RULE_SETUP -return T_STRING; +return T_OR; YY_BREAK case 36: YY_RULE_SETUP -return T_TRISTATE; +return T_AND; YY_BREAK case 37: YY_RULE_SETUP -return T_VISIBLE; +return T_EQUAL; YY_BREAK case 38: YY_RULE_SETUP -return T_OR; +return T_UNEQUAL; YY_BREAK case 39: YY_RULE_SETUP -return T_AND; +return T_LESS; YY_BREAK case 40: YY_RULE_SETUP -return T_EQUAL; +return T_LESS_EQUAL; YY_BREAK case 41: YY_RULE_SETUP -return T_UNEQUAL; +return T_GREATER; YY_BREAK case 42: YY_RULE_SETUP -return T_LESS; +return T_GREATER_EQUAL; YY_BREAK case 43: YY_RULE_SETUP -return T_LESS_EQUAL; +return T_NOT; YY_BREAK case 44: YY_RULE_SETUP -return T_GREATER; +return T_OPEN_PAREN; YY_BREAK case 45: YY_RULE_SETUP -return T_GREATER_EQUAL; +return T_CLOSE_PAREN; YY_BREAK case 46: YY_RULE_SETUP -return T_NOT; +return T_COLON_EQUAL; YY_BREAK case 47: YY_RULE_SETUP -return T_OPEN_PAREN; - YY_BREAK -case 48: -YY_RULE_SETUP -return T_CLOSE_PAREN; - YY_BREAK -case 49: -YY_RULE_SETUP -return T_COLON_EQUAL; - YY_BREAK -case 50: -YY_RULE_SETUP return T_PLUS_EQUAL; YY_BREAK -case 51: +case 48: YY_RULE_SETUP { str = yytext[0]; @@ -3075,7 +2777,7 @@ YY_RULE_SETUP BEGIN(STRING); } YY_BREAK -case 52: +case 49: YY_RULE_SETUP { alloc_string(yytext, yyleng); @@ -3083,7 +2785,7 @@ YY_RULE_SETUP return T_WORD; } YY_BREAK -case 53: +case 50: YY_RULE_SETUP { /* this token includes at least one '$' */ @@ -3093,12 +2795,12 @@ YY_RULE_SETUP free(yylval.string); } YY_BREAK -case 54: +case 51: YY_RULE_SETUP warn_ignored_character(*yytext); YY_BREAK -case 55: +case 52: YY_RULE_SETUP { alloc_string(yytext, yyleng); @@ -3106,33 +2808,33 @@ YY_RULE_SETUP return T_ASSIGN_VAL; } YY_BREAK -case 56: -/* rule 56 can match eol */ +case 53: +/* rule 53 can match eol */ YY_RULE_SETUP { BEGIN(INITIAL); return T_EOL; } YY_BREAK -case 57: +case 54: YY_RULE_SETUP YY_BREAK -case 58: +case 55: YY_RULE_SETUP append_expanded_string(yytext); YY_BREAK -case 59: +case 56: YY_RULE_SETUP { append_string(yytext, yyleng); } YY_BREAK -case 60: +case 57: YY_RULE_SETUP { append_string(yytext + 1, yyleng - 1); } YY_BREAK -case 61: +case 58: YY_RULE_SETUP { if (str == yytext[0]) { @@ -3143,8 +2845,8 @@ YY_RULE_SETUP append_string(yytext, 1); } YY_BREAK -case 62: -/* rule 62 can match eol */ +case 59: +/* rule 59 can match eol */ YY_RULE_SETUP { fprintf(stderr, @@ -3164,7 +2866,7 @@ case YY_STATE_EOF(STRING): } YY_BREAK -case 63: +case 60: YY_RULE_SETUP { ts = 0; @@ -3189,8 +2891,8 @@ YY_RULE_SETUP } } YY_BREAK -case 64: -/* rule 64 can match eol */ +case 61: +/* rule 61 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; @@ -3201,14 +2903,14 @@ YY_RULE_SETUP return T_HELPTEXT; } YY_BREAK -case 65: -/* rule 65 can match eol */ +case 62: +/* rule 62 can match eol */ YY_RULE_SETUP { append_string("\n", 1); } YY_BREAK -case 66: +case 63: YY_RULE_SETUP { while (yyleng) { @@ -3245,7 +2947,7 @@ case YY_STATE_EOF(ASSIGN_VAL): yyterminate(); } YY_BREAK -case 67: +case 64: YY_RULE_SETUP YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK diff --git a/scripts/config/lkc.h b/scripts/config/lkc.h index cf0f086d57..29c6b0a249 100644 --- a/scripts/config/lkc.h +++ b/scripts/config/lkc.h @@ -6,6 +6,10 @@ #ifndef LKC_H #define LKC_H +#include +#include +#include + #include "expr.h" #ifdef __cplusplus @@ -16,10 +20,6 @@ extern "C" { #define SRCTREE "srctree" -#ifndef PACKAGE -#define PACKAGE "linux" -#endif - #ifndef CONFIG_ #define CONFIG_ "CONFIG_" #endif @@ -30,16 +30,6 @@ static inline const char *CONFIG_prefix(void) #undef CONFIG_ #define CONFIG_ CONFIG_prefix() -enum conf_def_mode { - def_default, - def_yes, - def_mod, - def_y2m, - def_m2y, - def_no, - def_random -}; - extern int yylineno; void zconfdump(FILE *out); void zconf_starthelp(void); @@ -52,10 +42,6 @@ extern int recursive_is_error; /* confdata.c */ 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 */ @@ -67,24 +53,6 @@ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) fprintf(stderr, "Error in writing or end of file.\n"); } -/* menu.c */ -void _menu_init(void); -void menu_warn(struct menu *menu, const char *fmt, ...); -struct menu *menu_add_menu(void); -void menu_end_menu(void); -void menu_add_entry(struct symbol *sym); -void menu_add_dep(struct expr *dep); -void menu_add_visibility(struct expr *dep); -struct property *menu_add_prop(enum prop_type type, 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); -void menu_add_option_modules(void); -void menu_add_option_defconfig_list(void); -void menu_add_option_allnoconfig_y(void); -void menu_finalize(struct menu *parent); -void menu_set_type(int type); - /* util.c */ struct file *file_lookup(const char *name); void *xmalloc(size_t size); @@ -111,6 +79,34 @@ void str_append(struct gstr *gs, const char *s); void str_printf(struct gstr *gs, const char *fmt, ...); const char *str_get(struct gstr *gs); +/* menu.c */ +void _menu_init(void); +void menu_warn(struct menu *menu, const char *fmt, ...); +struct menu *menu_add_menu(void); +void menu_end_menu(void); +void menu_add_entry(struct symbol *sym); +void menu_add_dep(struct expr *dep); +void menu_add_visibility(struct expr *dep); +struct property *menu_add_prop(enum prop_type type, 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); +void menu_finalize(struct menu *parent); +void menu_set_type(int type); + +extern struct menu rootmenu; + +bool menu_is_empty(struct menu *menu); +bool menu_is_visible(struct menu *menu); +bool menu_has_prompt(struct menu *menu); +const char *menu_get_prompt(struct menu *menu); +struct menu *menu_get_root_menu(struct menu *menu); +struct menu *menu_get_parent_menu(struct menu *menu); +bool menu_has_help(struct menu *menu); +const char *menu_get_help(struct menu *menu); +struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head); +void menu_get_ext_help(struct menu *menu, struct gstr *help); + /* symbol.c */ void sym_clear_all_valid(void); struct symbol *sym_choice_default(struct symbol *sym); diff --git a/scripts/config/lkc_proto.h b/scripts/config/lkc_proto.h index ac777dd56a..fbb27de10a 100644 --- a/scripts/config/lkc_proto.h +++ b/scripts/config/lkc_proto.h @@ -9,24 +9,11 @@ void conf_reset(int def); int conf_write_defconfig(const char *name); int conf_write(const char *name); int conf_write_autoconf(int overwrite); +void conf_set_changed(bool val); bool conf_get_changed(void); void conf_set_changed_callback(void (*fn)(void)); void conf_set_message_callback(void (*fn)(const char *s)); -/* menu.c */ -extern struct menu rootmenu; - -bool menu_is_empty(struct menu *menu); -bool menu_is_visible(struct menu *menu); -bool menu_has_prompt(struct menu *menu); -const char * menu_get_prompt(struct menu *menu); -struct menu * menu_get_root_menu(struct menu *menu); -struct menu * menu_get_parent_menu(struct menu *menu); -bool menu_has_help(struct menu *menu); -const char * menu_get_help(struct menu *menu); -struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head); -void menu_get_ext_help(struct menu *menu, struct gstr *help); - /* symbol.c */ extern struct symbol * symbol_hash[SYMBOL_HASHSIZE]; diff --git a/scripts/config/lxdialog/util.c b/scripts/config/lxdialog/util.c index 1b490d4af0..3f78fb2651 100644 --- a/scripts/config/lxdialog/util.c +++ b/scripts/config/lxdialog/util.c @@ -363,7 +363,7 @@ void print_title(WINDOW *dialog, const char *title, int width) /* * Print a string of text in a window, automatically wrap around to the * next line if the string is too long to fit on one line. Newline - * characters '\n' are propperly processed. We start on a new line + * characters '\n' are properly processed. We start on a new line * if there is no room for at least 4 nonblanks following a double-space. */ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) @@ -541,7 +541,7 @@ int first_alpha(const char *string, const char *exempt) * lxdialog suggest which is correctly translated to two * times esc. But then we need to ignore the second esc to avoid stepping * out one menu too much. Filter away all escaped key sequences since - * keypad(FALSE) turn off ncurses support for escape sequences - and thats + * keypad(FALSE) turn off ncurses support for escape sequences - and that's * needed to make notimeout() do as expected. */ int on_key_esc(WINDOW *win) diff --git a/scripts/config/mconf-cfg.sh b/scripts/config/mconf-cfg.sh index aa68ec9562..b520e407a8 100755 --- a/scripts/config/mconf-cfg.sh +++ b/scripts/config/mconf-cfg.sh @@ -33,7 +33,9 @@ if [ -f /usr/include/ncurses/ncurses.h ]; then exit 0 fi -if [ -f /usr/include/ncurses.h ]; then +# As a final fallback before giving up, check if $HOSTCC knows of a default +# ncurses installation (e.g. from a vendor-specific sysroot). +if echo '#include ' | ${HOSTCC} -E - >/dev/null 2>&1; then echo cflags=\"-D_GNU_SOURCE\" echo libs=\"-lncurses\" exit 0 diff --git a/scripts/config/mconf.c b/scripts/config/mconf.c index 9ea7945675..8821344061 100644 --- a/scripts/config/mconf.c +++ b/scripts/config/mconf.c @@ -22,6 +22,8 @@ #include "lkc.h" #include "lxdialog/dialog.h" +#define JUMP_NB 9 + static const char mconf_readme[] = "OpenWrt config is based on Kernel kconfig\n" "so ipkg packages are referred here as modules.\n" @@ -300,17 +302,12 @@ static char filename[PATH_MAX+1]; static void set_config_filename(const char *config_filename) { static char menu_backtitle[PATH_MAX+128]; - int size; - size = snprintf(menu_backtitle, sizeof(menu_backtitle), - "%s - %s", config_filename, rootmenu.prompt->text); - if (size >= sizeof(menu_backtitle)) - menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; + snprintf(menu_backtitle, sizeof(menu_backtitle), "%s - %s", + config_filename, rootmenu.prompt->text); set_dialog_backtitle(menu_backtitle); - size = snprintf(filename, sizeof(filename), "%s", config_filename); - if (size >= sizeof(filename)) - filename[sizeof(filename)-1] = '\0'; + snprintf(filename, sizeof(filename), "%s", config_filename); } struct subtitle_part { @@ -921,7 +918,7 @@ static void conf_load(void) return; if (!conf_read(dialog_input_result)) { set_config_filename(dialog_input_result); - sym_set_change_count(1); + conf_set_changed(true); return; } show_textbox(NULL, "File does not exist!", 5, 38); diff --git a/scripts/config/menu.c b/scripts/config/menu.c index 1df87dd3a5..704ce54d6d 100644 --- a/scripts/config/menu.c +++ b/scripts/config/menu.c @@ -9,6 +9,7 @@ #include #include "lkc.h" +#include "internal.h" static const char nohelp_text[] = "There is no help available for this option."; @@ -65,7 +66,8 @@ void menu_add_entry(struct symbol *sym) struct menu *menu_add_menu(void) { last_entry_ptr = ¤t_entry->list; - return current_menu = current_entry; + current_menu = current_entry; + return current_menu; } void menu_end_menu(void) @@ -210,28 +212,6 @@ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) menu_add_prop(type, expr_alloc_symbol(sym), dep); } -void menu_add_option_modules(void) -{ - if (modules_sym) - zconf_error("symbol '%s' redefines option 'modules' already defined by symbol '%s'", - current_entry->sym->name, modules_sym->name); - modules_sym = current_entry->sym; -} - -void menu_add_option_defconfig_list(void) -{ - if (!sym_defconfig_list) - sym_defconfig_list = current_entry->sym; - else if (sym_defconfig_list != current_entry->sym) - zconf_error("trying to redefine defconfig symbol"); - sym_defconfig_list->flags |= SYMBOL_NO_WRITE; -} - -void menu_add_option_allnoconfig_y(void) -{ - current_entry->sym->flags |= SYMBOL_ALLNOCONFIG_Y; -} - static int menu_validate_number(struct symbol *sym, struct symbol *sym2) { return sym2->type == S_INT || sym2->type == S_HEX || diff --git a/scripts/config/nconf.c b/scripts/config/nconf.c index 82ab7e3004..3fdf3d25b7 100644 --- a/scripts/config/nconf.c +++ b/scripts/config/nconf.c @@ -271,7 +271,7 @@ static int mwin_max_cols; static MENU *curses_menu; static ITEM *curses_menu_items[MAX_MENU_ITEMS]; static struct mitem k_menu_items[MAX_MENU_ITEMS]; -static int items_num; +static unsigned int items_num; static int global_exit; /* the currently selected button */ static const char *current_instructions = menu_instructions; @@ -373,18 +373,18 @@ static void print_function_line(void) int lines = getmaxy(stdscr); for (i = 0; i < function_keys_num; i++) { - (void) wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); + wattrset(main_window, attr_function_highlight); mvwprintw(main_window, lines-3, offset, "%s", function_keys[i].key_str); - (void) wattrset(main_window, attributes[FUNCTION_TEXT]); + wattrset(main_window, attr_function_text); offset += strlen(function_keys[i].key_str); mvwprintw(main_window, lines-3, offset, "%s", function_keys[i].func); offset += strlen(function_keys[i].func) + skip; } - (void) wattrset(main_window, attributes[NORMAL]); + wattrset(main_window, attr_normal); } /* help */ @@ -499,16 +499,20 @@ typedef enum {MATCH_TINKER_PATTERN_UP, MATCH_TINKER_PATTERN_DOWN, /* return the index of the matched item, or -1 if no such item exists */ static int get_mext_match(const char *match_str, match_f flag) { - int match_start = item_index(current_item(curses_menu)); - int index; + int match_start, index; + + /* Do not search if the menu is empty (i.e. items_num == 0) */ + match_start = item_index(current_item(curses_menu)); + if (match_start == ERR) + return -1; if (flag == FIND_NEXT_MATCH_DOWN) ++match_start; else if (flag == FIND_NEXT_MATCH_UP) --match_start; + match_start = (match_start + items_num) % items_num; index = match_start; - index = (index + items_num) % items_num; while (true) { char *str = k_menu_items[index].str; if (strcasestr(str, match_str) != NULL) @@ -630,19 +634,12 @@ static int item_is_tag(char tag) static char filename[PATH_MAX+1]; static char menu_backtitle[PATH_MAX+128]; -static const char *set_config_filename(const char *config_filename) +static void set_config_filename(const char *config_filename) { - int size; + snprintf(menu_backtitle, sizeof(menu_backtitle), "%s - %s", + config_filename, rootmenu.prompt->text); - size = snprintf(menu_backtitle, sizeof(menu_backtitle), - "%s - %s", config_filename, rootmenu.prompt->text); - if (size >= sizeof(menu_backtitle)) - menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; - - size = snprintf(filename, sizeof(filename), "%s", config_filename); - if (size >= sizeof(filename)) - filename[sizeof(filename)-1] = '\0'; - return menu_backtitle; + snprintf(filename, sizeof(filename), "%s", config_filename); } /* return = 0 means we are successful. @@ -758,7 +755,6 @@ static void build_conf(struct menu *menu) switch (ptype) { case P_MENU: child_count++; - prompt = prompt; if (single_menu_mode) { item_make(menu, 'm', "%s%*c%s", @@ -960,16 +956,15 @@ static void show_menu(const char *prompt, const char *instructions, current_instructions = instructions; clear(); - (void) wattrset(main_window, attributes[NORMAL]); - print_in_middle(stdscr, 1, 0, getmaxx(stdscr), + print_in_middle(stdscr, 1, getmaxx(stdscr), menu_backtitle, - attributes[MAIN_HEADING]); + attr_main_heading); - (void) wattrset(main_window, attributes[MAIN_MENU_BOX]); + wattrset(main_window, attr_main_menu_box); box(main_window, 0, 0); - (void) wattrset(main_window, attributes[MAIN_MENU_HEADING]); + wattrset(main_window, attr_main_menu_heading); mvwprintw(main_window, 0, 3, " %s ", prompt); - (void) wattrset(main_window, attributes[NORMAL]); + wattrset(main_window, attr_normal); set_menu_items(curses_menu, curses_menu_items); @@ -1072,7 +1067,6 @@ static int do_match(int key, struct match_state *state, int *ans) static void conf(struct menu *menu) { struct menu *submenu = NULL; - const char *prompt = menu_get_prompt(menu); struct symbol *sym; int res; int current_index = 0; @@ -1090,9 +1084,8 @@ static void conf(struct menu *menu) if (!child_count) break; - show_menu(prompt ? prompt : "Main Menu", - menu_instructions, - current_index, &last_top_row); + show_menu(menu_get_prompt(menu), menu_instructions, + current_index, &last_top_row); keypad((menu_win(curses_menu)), TRUE); while (!global_exit) { if (match_state.in_search) { @@ -1418,7 +1411,7 @@ static void conf_load(void) return; if (!conf_read(dialog_input_result)) { set_config_filename(dialog_input_result); - sym_set_change_count(1); + conf_set_changed(true); return; } btn_dialog(main_window, "File does not exist!", 0); @@ -1537,9 +1530,9 @@ int main(int ac, char **av) menu_opts_on(curses_menu, O_NONCYCLIC); menu_opts_on(curses_menu, O_IGNORECASE); set_menu_mark(curses_menu, " "); - set_menu_fore(curses_menu, attributes[MAIN_MENU_FORE]); - set_menu_back(curses_menu, attributes[MAIN_MENU_BACK]); - set_menu_grey(curses_menu, attributes[MAIN_MENU_GREY]); + set_menu_fore(curses_menu, attr_main_menu_fore); + set_menu_back(curses_menu, attr_main_menu_back); + set_menu_grey(curses_menu, attr_main_menu_grey); set_config_filename(conf_get_configname()); setup_windows(); diff --git a/scripts/config/nconf.gui.c b/scripts/config/nconf.gui.c index 77f525a861..9aedf40f1d 100644 --- a/scripts/config/nconf.gui.c +++ b/scripts/config/nconf.gui.c @@ -7,169 +7,120 @@ #include "nconf.h" #include "lkc.h" -/* a list of all the different widgets we use */ -attributes_t attributes[ATTR_MAX+1] = {0}; +int attr_normal; +int attr_main_heading; +int attr_main_menu_box; +int attr_main_menu_fore; +int attr_main_menu_back; +int attr_main_menu_grey; +int attr_main_menu_heading; +int attr_scrollwin_text; +int attr_scrollwin_heading; +int attr_scrollwin_box; +int attr_dialog_text; +int attr_dialog_menu_fore; +int attr_dialog_menu_back; +int attr_dialog_box; +int attr_input_box; +int attr_input_heading; +int attr_input_text; +int attr_input_field; +int attr_function_text; +int attr_function_highlight; -/* available colors: - COLOR_BLACK 0 - COLOR_RED 1 - COLOR_GREEN 2 - COLOR_YELLOW 3 - COLOR_BLUE 4 - COLOR_MAGENTA 5 - COLOR_CYAN 6 - COLOR_WHITE 7 - */ -static void set_normal_colors(void) -{ - init_pair(NORMAL, -1, -1); - init_pair(MAIN_HEADING, COLOR_MAGENTA, -1); +#define COLOR_ATTR(_at, _fg, _bg, _hl) \ + { .attr = &(_at), .has_color = true, .color_fg = _fg, .color_bg = _bg, .highlight = _hl } +#define NO_COLOR_ATTR(_at, _hl) \ + { .attr = &(_at), .has_color = false, .highlight = _hl } +#define COLOR_DEFAULT -1 - /* FORE is for the selected item */ - init_pair(MAIN_MENU_FORE, -1, -1); - /* BACK for all the rest */ - init_pair(MAIN_MENU_BACK, -1, -1); - init_pair(MAIN_MENU_GREY, -1, -1); - init_pair(MAIN_MENU_HEADING, COLOR_GREEN, -1); - init_pair(MAIN_MENU_BOX, COLOR_YELLOW, -1); +struct nconf_attr_param { + int *attr; + bool has_color; + int color_fg; + int color_bg; + int highlight; +}; - init_pair(SCROLLWIN_TEXT, -1, -1); - init_pair(SCROLLWIN_HEADING, COLOR_GREEN, -1); - init_pair(SCROLLWIN_BOX, COLOR_YELLOW, -1); +static const struct nconf_attr_param color_theme_params[] = { + COLOR_ATTR(attr_normal, COLOR_DEFAULT, COLOR_DEFAULT, A_NORMAL), + COLOR_ATTR(attr_main_heading, COLOR_MAGENTA, COLOR_DEFAULT, A_BOLD | A_UNDERLINE), + COLOR_ATTR(attr_main_menu_box, COLOR_YELLOW, COLOR_DEFAULT, A_NORMAL), + COLOR_ATTR(attr_main_menu_fore, COLOR_DEFAULT, COLOR_DEFAULT, A_REVERSE), + COLOR_ATTR(attr_main_menu_back, COLOR_DEFAULT, COLOR_DEFAULT, A_NORMAL), + COLOR_ATTR(attr_main_menu_grey, COLOR_DEFAULT, COLOR_DEFAULT, A_NORMAL), + COLOR_ATTR(attr_main_menu_heading, COLOR_GREEN, COLOR_DEFAULT, A_BOLD), + COLOR_ATTR(attr_scrollwin_text, COLOR_DEFAULT, COLOR_DEFAULT, A_NORMAL), + COLOR_ATTR(attr_scrollwin_heading, COLOR_GREEN, COLOR_DEFAULT, A_BOLD), + COLOR_ATTR(attr_scrollwin_box, COLOR_YELLOW, COLOR_DEFAULT, A_BOLD), + COLOR_ATTR(attr_dialog_text, COLOR_DEFAULT, COLOR_DEFAULT, A_BOLD), + COLOR_ATTR(attr_dialog_menu_fore, COLOR_RED, COLOR_DEFAULT, A_STANDOUT), + COLOR_ATTR(attr_dialog_menu_back, COLOR_YELLOW, COLOR_DEFAULT, A_NORMAL), + COLOR_ATTR(attr_dialog_box, COLOR_YELLOW, COLOR_DEFAULT, A_BOLD), + COLOR_ATTR(attr_input_box, COLOR_YELLOW, COLOR_DEFAULT, A_NORMAL), + COLOR_ATTR(attr_input_heading, COLOR_GREEN, COLOR_DEFAULT, A_BOLD), + COLOR_ATTR(attr_input_text, COLOR_DEFAULT, COLOR_DEFAULT, A_NORMAL), + COLOR_ATTR(attr_input_field, COLOR_DEFAULT, COLOR_DEFAULT, A_UNDERLINE), + COLOR_ATTR(attr_function_text, COLOR_YELLOW, COLOR_DEFAULT, A_REVERSE), + COLOR_ATTR(attr_function_highlight, COLOR_DEFAULT, COLOR_DEFAULT, A_BOLD), + { /* sentinel */ } +}; - init_pair(DIALOG_TEXT, -1, -1); - init_pair(DIALOG_BOX, COLOR_YELLOW, -1); - init_pair(DIALOG_MENU_BACK, COLOR_YELLOW, -1); - init_pair(DIALOG_MENU_FORE, COLOR_RED, -1); - - init_pair(INPUT_BOX, COLOR_YELLOW, -1); - init_pair(INPUT_HEADING, COLOR_GREEN, -1); - init_pair(INPUT_TEXT, -1, -1); - init_pair(INPUT_FIELD, -1, -1); - - init_pair(FUNCTION_HIGHLIGHT, -1, -1); - init_pair(FUNCTION_TEXT, COLOR_YELLOW, -1); -} - -/* available attributes: - A_NORMAL Normal display (no highlight) - A_STANDOUT Best highlighting mode of the terminal. - A_UNDERLINE Underlining - A_REVERSE Reverse video - A_BLINK Blinking - A_DIM Half bright - A_BOLD Extra bright or bold - A_PROTECT Protected mode - A_INVIS Invisible or blank mode - A_ALTCHARSET Alternate character set - A_CHARTEXT Bit-mask to extract a character - COLOR_PAIR(n) Color-pair number n - */ -static void normal_color_theme(void) -{ - /* automatically add color... */ -#define mkattr(name, attr) do { \ -attributes[name] = attr | COLOR_PAIR(name); } while (0) - mkattr(NORMAL, NORMAL); - mkattr(MAIN_HEADING, A_BOLD | A_UNDERLINE); - - mkattr(MAIN_MENU_FORE, A_REVERSE); - mkattr(MAIN_MENU_BACK, A_NORMAL); - mkattr(MAIN_MENU_GREY, A_NORMAL); - mkattr(MAIN_MENU_HEADING, A_BOLD); - mkattr(MAIN_MENU_BOX, A_NORMAL); - - mkattr(SCROLLWIN_TEXT, A_NORMAL); - mkattr(SCROLLWIN_HEADING, A_BOLD); - mkattr(SCROLLWIN_BOX, A_BOLD); - - mkattr(DIALOG_TEXT, A_BOLD); - mkattr(DIALOG_BOX, A_BOLD); - mkattr(DIALOG_MENU_FORE, A_STANDOUT); - mkattr(DIALOG_MENU_BACK, A_NORMAL); - - mkattr(INPUT_BOX, A_NORMAL); - mkattr(INPUT_HEADING, A_BOLD); - mkattr(INPUT_TEXT, A_NORMAL); - mkattr(INPUT_FIELD, A_UNDERLINE); - - mkattr(FUNCTION_HIGHLIGHT, A_BOLD); - mkattr(FUNCTION_TEXT, A_REVERSE); -} - -static void no_colors_theme(void) -{ - /* automatically add highlight, no color */ -#define mkattrn(name, attr) { attributes[name] = attr; } - - mkattrn(NORMAL, NORMAL); - mkattrn(MAIN_HEADING, A_BOLD | A_UNDERLINE); - - mkattrn(MAIN_MENU_FORE, A_STANDOUT); - mkattrn(MAIN_MENU_BACK, A_NORMAL); - mkattrn(MAIN_MENU_GREY, A_NORMAL); - mkattrn(MAIN_MENU_HEADING, A_BOLD); - mkattrn(MAIN_MENU_BOX, A_NORMAL); - - mkattrn(SCROLLWIN_TEXT, A_NORMAL); - mkattrn(SCROLLWIN_HEADING, A_BOLD); - mkattrn(SCROLLWIN_BOX, A_BOLD); - - mkattrn(DIALOG_TEXT, A_NORMAL); - mkattrn(DIALOG_BOX, A_BOLD); - mkattrn(DIALOG_MENU_FORE, A_STANDOUT); - mkattrn(DIALOG_MENU_BACK, A_NORMAL); - - mkattrn(INPUT_BOX, A_BOLD); - mkattrn(INPUT_HEADING, A_BOLD); - mkattrn(INPUT_TEXT, A_NORMAL); - mkattrn(INPUT_FIELD, A_UNDERLINE); - - mkattrn(FUNCTION_HIGHLIGHT, A_BOLD); - mkattrn(FUNCTION_TEXT, A_REVERSE); -} +static const struct nconf_attr_param no_color_theme_params[] = { + NO_COLOR_ATTR(attr_normal, A_NORMAL), + NO_COLOR_ATTR(attr_main_heading, A_BOLD | A_UNDERLINE), + NO_COLOR_ATTR(attr_main_menu_box, A_NORMAL), + NO_COLOR_ATTR(attr_main_menu_fore, A_STANDOUT), + NO_COLOR_ATTR(attr_main_menu_back, A_NORMAL), + NO_COLOR_ATTR(attr_main_menu_grey, A_NORMAL), + NO_COLOR_ATTR(attr_main_menu_heading, A_BOLD), + NO_COLOR_ATTR(attr_scrollwin_text, A_NORMAL), + NO_COLOR_ATTR(attr_scrollwin_heading, A_BOLD), + NO_COLOR_ATTR(attr_scrollwin_box, A_BOLD), + NO_COLOR_ATTR(attr_dialog_text, A_NORMAL), + NO_COLOR_ATTR(attr_dialog_menu_fore, A_STANDOUT), + NO_COLOR_ATTR(attr_dialog_menu_back, A_NORMAL), + NO_COLOR_ATTR(attr_dialog_box, A_BOLD), + NO_COLOR_ATTR(attr_input_box, A_BOLD), + NO_COLOR_ATTR(attr_input_heading, A_BOLD), + NO_COLOR_ATTR(attr_input_text, A_NORMAL), + NO_COLOR_ATTR(attr_input_field, A_UNDERLINE), + NO_COLOR_ATTR(attr_function_text, A_REVERSE), + NO_COLOR_ATTR(attr_function_highlight, A_BOLD), + { /* sentinel */ } +}; void set_colors(void) { - start_color(); - use_default_colors(); - set_normal_colors(); + const struct nconf_attr_param *p; + int pair = 0; + if (has_colors()) { - normal_color_theme(); + start_color(); + use_default_colors(); + p = color_theme_params; } else { - /* give defaults */ - no_colors_theme(); + p = no_color_theme_params; + } + + for (; p->attr; p++) { + int attr = p->highlight; + + if (p->has_color) { + pair++; + init_pair(pair, p->color_fg, p->color_bg); + attr |= COLOR_PAIR(pair); + } + + *p->attr = attr; } } - /* this changes the windows attributes !!! */ -void print_in_middle(WINDOW *win, - int starty, - int startx, - int width, - const char *string, - chtype color) -{ int length, x, y; - float temp; - - - if (win == NULL) - win = stdscr; - getyx(win, y, x); - if (startx != 0) - x = startx; - if (starty != 0) - y = starty; - if (width == 0) - width = 80; - - length = strlen(string); - temp = (width - length) / 2; - x = startx + (int)temp; - (void) wattrset(win, color); - mvwprintw(win, y, x, "%s", string); - refresh(); +void print_in_middle(WINDOW *win, int y, int width, const char *str, int attrs) +{ + wattrset(win, attrs); + mvwprintw(win, y, (width - strlen(str)) / 2, "%s", str); } int get_line_no(const char *text) @@ -294,14 +245,14 @@ int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...) msg_win = derwin(win, win_rows-2, msg_width, 1, 1+(total_width+2-msg_width)/2); - set_menu_fore(menu, attributes[DIALOG_MENU_FORE]); - set_menu_back(menu, attributes[DIALOG_MENU_BACK]); + set_menu_fore(menu, attr_dialog_menu_fore); + set_menu_back(menu, attr_dialog_menu_back); - (void) wattrset(win, attributes[DIALOG_BOX]); + wattrset(win, attr_dialog_box); box(win, 0, 0); /* print message */ - (void) wattrset(msg_win, attributes[DIALOG_TEXT]); + wattrset(msg_win, attr_dialog_text); fill_window(msg_win, msg); set_menu_win(menu, win); @@ -405,16 +356,16 @@ int dialog_inputbox(WINDOW *main_window, form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2); keypad(form_win, TRUE); - (void) wattrset(form_win, attributes[INPUT_FIELD]); + wattrset(form_win, attr_input_field); - (void) wattrset(win, attributes[INPUT_BOX]); + wattrset(win, attr_input_box); box(win, 0, 0); - (void) wattrset(win, attributes[INPUT_HEADING]); + wattrset(win, attr_input_heading); if (title) mvwprintw(win, 0, 3, "%s", title); /* print message */ - (void) wattrset(prompt_win, attributes[INPUT_TEXT]); + wattrset(prompt_win, attr_input_text); fill_window(prompt_win, prompt); mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); @@ -576,7 +527,7 @@ void show_scroll_win(WINDOW *main_window, /* create the pad */ pad = newpad(total_lines+10, total_cols+10); - (void) wattrset(pad, attributes[SCROLLWIN_TEXT]); + wattrset(pad, attr_scrollwin_text); fill_window(pad, text); win_lines = min(total_lines+4, lines-2); @@ -591,9 +542,9 @@ void show_scroll_win(WINDOW *main_window, win = newwin(win_lines, win_cols, y, x); keypad(win, TRUE); /* show the help in the help window, and show the help panel */ - (void) wattrset(win, attributes[SCROLLWIN_BOX]); + wattrset(win, attr_scrollwin_box); box(win, 0, 0); - (void) wattrset(win, attributes[SCROLLWIN_HEADING]); + wattrset(win, attr_scrollwin_heading); mvwprintw(win, 0, 3, " %s ", title); panel = new_panel(win); @@ -604,10 +555,9 @@ void show_scroll_win(WINDOW *main_window, text_cols, 0); print_in_middle(win, text_lines+2, - 0, text_cols, "", - attributes[DIALOG_MENU_FORE]); + attr_dialog_menu_fore); wrefresh(win); res = wgetch(win); diff --git a/scripts/config/nconf.h b/scripts/config/nconf.h index fa5245eb93..6f925bc74e 100644 --- a/scripts/config/nconf.h +++ b/scripts/config/nconf.h @@ -32,30 +32,26 @@ typeof(b) _b = b;\ _a < _b ? _a : _b; }) -typedef enum { - NORMAL = 1, - MAIN_HEADING, - MAIN_MENU_BOX, - MAIN_MENU_FORE, - MAIN_MENU_BACK, - MAIN_MENU_GREY, - MAIN_MENU_HEADING, - SCROLLWIN_TEXT, - SCROLLWIN_HEADING, - SCROLLWIN_BOX, - DIALOG_TEXT, - DIALOG_MENU_FORE, - DIALOG_MENU_BACK, - DIALOG_BOX, - INPUT_BOX, - INPUT_HEADING, - INPUT_TEXT, - INPUT_FIELD, - FUNCTION_TEXT, - FUNCTION_HIGHLIGHT, - ATTR_MAX -} attributes_t; -extern attributes_t attributes[]; +extern int attr_normal; +extern int attr_main_heading; +extern int attr_main_menu_box; +extern int attr_main_menu_fore; +extern int attr_main_menu_back; +extern int attr_main_menu_grey; +extern int attr_main_menu_heading; +extern int attr_scrollwin_text; +extern int attr_scrollwin_heading; +extern int attr_scrollwin_box; +extern int attr_dialog_text; +extern int attr_dialog_menu_fore; +extern int attr_dialog_menu_back; +extern int attr_dialog_box; +extern int attr_input_box; +extern int attr_input_heading; +extern int attr_input_text; +extern int attr_input_field; +extern int attr_function_text; +extern int attr_function_highlight; typedef enum { F_HELP = 1, @@ -72,12 +68,7 @@ typedef enum { void set_colors(void); /* this changes the windows attributes !!! */ -void print_in_middle(WINDOW *win, - int starty, - int startx, - int width, - const char *string, - chtype color); +void print_in_middle(WINDOW *win, int y, int width, const char *str, int attrs); int get_line_length(const char *line); int get_line_no(const char *text); const char *get_line(const char *text, int line_no); diff --git a/scripts/config/parser.tab.c b/scripts/config/parser.tab.c index 1b291145a1..18137050a9 100644 --- a/scripts/config/parser.tab.c +++ b/scripts/config/parser.tab.c @@ -1,8 +1,9 @@ -/* A Bison parser, made by GNU Bison 3.1. */ +/* A Bison parser, made by GNU Bison 3.7.6. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -33,6 +34,10 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -40,11 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30706 -/* Bison version. */ -#define YYBISON_VERSION "3.1" +/* Bison version string. */ +#define YYBISON_VERSION "3.7.6" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -61,8 +66,7 @@ -/* Copy the first part of user declarations. */ - +/* First part of user prologue. */ #include @@ -73,6 +77,7 @@ #include #include "lkc.h" +#include "internal.h" #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) @@ -89,128 +94,137 @@ static bool zconf_endtoken(const char *tokenname, struct symbol *symbol_hash[SYMBOL_HASHSIZE]; -static struct menu *current_menu, *current_entry; +struct menu *current_menu, *current_entry; - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) # else -# define YY_NULLPTR 0 +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) # endif # endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "parser.tab.h". */ -#ifndef YY_YY_PARSER_TAB_H_INCLUDED -# define YY_YY_PARSER_TAB_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - T_HELPTEXT = 258, - T_WORD = 259, - T_WORD_QUOTE = 260, - T_ALLNOCONFIG_Y = 261, - T_BOOL = 262, - T_CHOICE = 263, - T_CLOSE_PAREN = 264, - T_COLON_EQUAL = 265, - T_COMMENT = 266, - T_CONFIG = 267, - T_DEFAULT = 268, - T_DEFCONFIG_LIST = 269, - T_DEF_BOOL = 270, - T_DEF_TRISTATE = 271, - T_DEPENDS = 272, - T_ENDCHOICE = 273, - T_ENDIF = 274, - T_ENDMENU = 275, - T_HELP = 276, - T_HEX = 277, - T_IF = 278, - T_IMPLY = 279, - T_INT = 280, - T_MAINMENU = 281, - T_MENU = 282, - T_MENUCONFIG = 283, - T_MODULES = 284, - T_ON = 285, - T_OPEN_PAREN = 286, - T_OPTION = 287, - T_OPTIONAL = 288, - T_PLUS_EQUAL = 289, - T_PROMPT = 290, - T_RANGE = 291, - T_RESET = 292, - T_SELECT = 293, - T_SOURCE = 294, - T_STRING = 295, - T_TRISTATE = 296, - T_VISIBLE = 297, - T_EOL = 298, - T_ASSIGN_VAL = 299, - T_OR = 300, - T_AND = 301, - T_EQUAL = 302, - T_UNEQUAL = 303, - T_LESS = 304, - T_LESS_EQUAL = 305, - T_GREATER = 306, - T_GREATER_EQUAL = 307, - T_NOT = 308 - }; -#endif - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE +#include "parser.tab.h" +/* Symbol kind. */ +enum yysymbol_kind_t { - - - char *string; - struct symbol *symbol; - struct expr *expr; - struct menu *menu; - enum symbol_type type; - enum variable_flavor flavor; - - + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_T_HELPTEXT = 3, /* T_HELPTEXT */ + YYSYMBOL_T_WORD = 4, /* T_WORD */ + YYSYMBOL_T_WORD_QUOTE = 5, /* T_WORD_QUOTE */ + YYSYMBOL_T_BOOL = 6, /* T_BOOL */ + YYSYMBOL_T_CHOICE = 7, /* T_CHOICE */ + YYSYMBOL_T_CLOSE_PAREN = 8, /* T_CLOSE_PAREN */ + YYSYMBOL_T_COLON_EQUAL = 9, /* T_COLON_EQUAL */ + YYSYMBOL_T_COMMENT = 10, /* T_COMMENT */ + YYSYMBOL_T_CONFIG = 11, /* T_CONFIG */ + YYSYMBOL_T_DEFAULT = 12, /* T_DEFAULT */ + YYSYMBOL_T_DEF_BOOL = 13, /* T_DEF_BOOL */ + YYSYMBOL_T_DEF_TRISTATE = 14, /* T_DEF_TRISTATE */ + YYSYMBOL_T_DEPENDS = 15, /* T_DEPENDS */ + YYSYMBOL_T_ENDCHOICE = 16, /* T_ENDCHOICE */ + YYSYMBOL_T_ENDIF = 17, /* T_ENDIF */ + YYSYMBOL_T_ENDMENU = 18, /* T_ENDMENU */ + YYSYMBOL_T_HELP = 19, /* T_HELP */ + YYSYMBOL_T_HEX = 20, /* T_HEX */ + YYSYMBOL_T_IF = 21, /* T_IF */ + YYSYMBOL_T_IMPLY = 22, /* T_IMPLY */ + YYSYMBOL_T_INT = 23, /* T_INT */ + YYSYMBOL_T_MAINMENU = 24, /* T_MAINMENU */ + YYSYMBOL_T_MENU = 25, /* T_MENU */ + YYSYMBOL_T_MENUCONFIG = 26, /* T_MENUCONFIG */ + YYSYMBOL_T_MODULES = 27, /* T_MODULES */ + YYSYMBOL_T_ON = 28, /* T_ON */ + YYSYMBOL_T_OPEN_PAREN = 29, /* T_OPEN_PAREN */ + YYSYMBOL_T_OPTIONAL = 30, /* T_OPTIONAL */ + YYSYMBOL_T_PLUS_EQUAL = 31, /* T_PLUS_EQUAL */ + YYSYMBOL_T_PROMPT = 32, /* T_PROMPT */ + YYSYMBOL_T_RANGE = 33, /* T_RANGE */ + YYSYMBOL_T_RESET = 34, /* T_RESET */ + YYSYMBOL_T_SELECT = 35, /* T_SELECT */ + YYSYMBOL_T_SOURCE = 36, /* T_SOURCE */ + YYSYMBOL_T_STRING = 37, /* T_STRING */ + YYSYMBOL_T_TRISTATE = 38, /* T_TRISTATE */ + YYSYMBOL_T_VISIBLE = 39, /* T_VISIBLE */ + YYSYMBOL_T_EOL = 40, /* T_EOL */ + YYSYMBOL_T_ASSIGN_VAL = 41, /* T_ASSIGN_VAL */ + YYSYMBOL_T_OR = 42, /* T_OR */ + YYSYMBOL_T_AND = 43, /* T_AND */ + YYSYMBOL_T_EQUAL = 44, /* T_EQUAL */ + YYSYMBOL_T_UNEQUAL = 45, /* T_UNEQUAL */ + YYSYMBOL_T_LESS = 46, /* T_LESS */ + YYSYMBOL_T_LESS_EQUAL = 47, /* T_LESS_EQUAL */ + YYSYMBOL_T_GREATER = 48, /* T_GREATER */ + YYSYMBOL_T_GREATER_EQUAL = 49, /* T_GREATER_EQUAL */ + YYSYMBOL_T_NOT = 50, /* T_NOT */ + YYSYMBOL_YYACCEPT = 51, /* $accept */ + YYSYMBOL_input = 52, /* input */ + YYSYMBOL_mainmenu_stmt = 53, /* mainmenu_stmt */ + YYSYMBOL_stmt_list = 54, /* stmt_list */ + YYSYMBOL_stmt_list_in_choice = 55, /* stmt_list_in_choice */ + YYSYMBOL_config_entry_start = 56, /* config_entry_start */ + YYSYMBOL_config_stmt = 57, /* config_stmt */ + YYSYMBOL_menuconfig_entry_start = 58, /* menuconfig_entry_start */ + YYSYMBOL_menuconfig_stmt = 59, /* menuconfig_stmt */ + YYSYMBOL_config_option_list = 60, /* config_option_list */ + YYSYMBOL_config_option = 61, /* config_option */ + YYSYMBOL_choice = 62, /* choice */ + YYSYMBOL_choice_entry = 63, /* choice_entry */ + YYSYMBOL_choice_end = 64, /* choice_end */ + YYSYMBOL_choice_stmt = 65, /* choice_stmt */ + YYSYMBOL_choice_option_list = 66, /* choice_option_list */ + YYSYMBOL_choice_option = 67, /* choice_option */ + YYSYMBOL_type = 68, /* type */ + YYSYMBOL_logic_type = 69, /* logic_type */ + YYSYMBOL_default = 70, /* default */ + YYSYMBOL_if_entry = 71, /* if_entry */ + YYSYMBOL_if_end = 72, /* if_end */ + YYSYMBOL_if_stmt = 73, /* if_stmt */ + YYSYMBOL_if_stmt_in_choice = 74, /* if_stmt_in_choice */ + YYSYMBOL_menu = 75, /* menu */ + YYSYMBOL_menu_entry = 76, /* menu_entry */ + YYSYMBOL_menu_end = 77, /* menu_end */ + YYSYMBOL_menu_stmt = 78, /* menu_stmt */ + YYSYMBOL_menu_option_list = 79, /* menu_option_list */ + YYSYMBOL_source_stmt = 80, /* source_stmt */ + YYSYMBOL_comment = 81, /* comment */ + YYSYMBOL_comment_stmt = 82, /* comment_stmt */ + YYSYMBOL_comment_option_list = 83, /* comment_option_list */ + YYSYMBOL_help_start = 84, /* help_start */ + YYSYMBOL_help = 85, /* help */ + YYSYMBOL_depends = 86, /* depends */ + YYSYMBOL_visible = 87, /* visible */ + YYSYMBOL_prompt_stmt_opt = 88, /* prompt_stmt_opt */ + YYSYMBOL_end = 89, /* end */ + YYSYMBOL_if_expr = 90, /* if_expr */ + YYSYMBOL_expr = 91, /* expr */ + YYSYMBOL_nonconst_symbol = 92, /* nonconst_symbol */ + YYSYMBOL_symbol = 93, /* symbol */ + YYSYMBOL_word_opt = 94, /* word_opt */ + YYSYMBOL_assignment_stmt = 95, /* assignment_stmt */ + YYSYMBOL_assign_op = 96, /* assign_op */ + YYSYMBOL_assign_val = 97 /* assign_val */ }; +typedef enum yysymbol_kind_t yysymbol_kind_t; -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - -extern YYSTYPE yylval; - -int yyparse (void); - -#endif /* !YY_YY_PARSER_TAB_H_INCLUDED */ - -/* Copy the second part of user declarations. */ @@ -218,36 +232,95 @@ int yyparse (void); # undef short #endif -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + and (if available) are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else typedef short yytype_int16; #endif +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; +#else +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif +#endif + #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -255,7 +328,20 @@ typedef short yytype_int16; # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_uint8 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS @@ -269,47 +355,37 @@ typedef short yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else -# define YY_ATTRIBUTE(Spec) /* empty */ +# define YY_ATTRIBUTE_PURE # endif #endif -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# define YY_ATTRIBUTE_UNUSED # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -322,8 +398,22 @@ typedef short yytype_int16; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif -#if ! defined yyoverflow || YYERROR_VERBOSE + +#define YY_ASSERT(E) ((void) (0 && (E))) + +#if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -388,8 +478,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -398,17 +487,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 @@ -421,11 +510,11 @@ union yyalloc # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ - YYSIZE_T yynewbytes; \ + YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) @@ -437,12 +526,12 @@ union yyalloc # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ - YYSIZE_T yyi; \ + YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ @@ -457,25 +546,28 @@ union yyalloc #define YYLAST 194 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 54 +#define YYNTOKENS 51 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 47 /* YYNRULES -- Number of rules. */ -#define YYNRULES 105 +#define YYNRULES 106 /* YYNSTATES -- Number of states. */ #define YYNSTATES 187 -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 308 +/* YYMAXUTOK -- Last valid token kind. */ +#define YYMAXUTOK 305 -#define YYTRANSLATE(YYX) \ - ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = + as returned by yylex. */ +static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -507,149 +599,161 @@ static const yytype_uint8 yytranslate[] = 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53 + 45, 46, 47, 48, 49, 50 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const yytype_int16 yyrline[] = { - 0, 112, 112, 112, 116, 121, 123, 124, 125, 126, - 127, 131, 132, 133, 134, 135, 136, 141, 148, 153, - 160, 169, 171, 172, 173, 176, 184, 190, 200, 206, - 212, 218, 223, 228, 235, 245, 250, 258, 261, 263, - 264, 265, 268, 274, 281, 287, 292, 300, 301, 302, - 303, 306, 307, 310, 311, 312, 314, 316, 321, 329, - 337, 342, 349, 354, 362, 365, 367, 368, 371, 380, - 387, 390, 392, 397, 403, 415, 422, 429, 431, 436, - 437, 438, 441, 442, 445, 446, 447, 448, 449, 450, - 451, 452, 453, 454, 455, 459, 461, 462, 465, 466, - 470, 473, 474, 475, 479, 480 + 0, 110, 110, 110, 114, 119, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 133, 135, 136, 137, + 138, 143, 150, 155, 162, 171, 173, 174, 175, 178, + 186, 192, 202, 208, 214, 220, 230, 240, 245, 253, + 256, 258, 259, 260, 263, 269, 276, 282, 287, 295, + 296, 297, 298, 301, 302, 305, 306, 307, 311, 319, + 327, 330, 335, 342, 347, 355, 358, 360, 361, 364, + 373, 380, 383, 385, 390, 396, 408, 415, 422, 424, + 429, 430, 431, 434, 435, 438, 439, 440, 441, 442, + 443, 444, 445, 446, 447, 448, 452, 454, 455, 458, + 459, 463, 466, 467, 468, 472, 473 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "T_HELPTEXT", "T_WORD", "T_WORD_QUOTE", - "T_ALLNOCONFIG_Y", "T_BOOL", "T_CHOICE", "T_CLOSE_PAREN", - "T_COLON_EQUAL", "T_COMMENT", "T_CONFIG", "T_DEFAULT", - "T_DEFCONFIG_LIST", "T_DEF_BOOL", "T_DEF_TRISTATE", "T_DEPENDS", - "T_ENDCHOICE", "T_ENDIF", "T_ENDMENU", "T_HELP", "T_HEX", "T_IF", - "T_IMPLY", "T_INT", "T_MAINMENU", "T_MENU", "T_MENUCONFIG", "T_MODULES", - "T_ON", "T_OPEN_PAREN", "T_OPTION", "T_OPTIONAL", "T_PLUS_EQUAL", + "\"end of file\"", "error", "\"invalid token\"", "T_HELPTEXT", "T_WORD", + "T_WORD_QUOTE", "T_BOOL", "T_CHOICE", "T_CLOSE_PAREN", "T_COLON_EQUAL", + "T_COMMENT", "T_CONFIG", "T_DEFAULT", "T_DEF_BOOL", "T_DEF_TRISTATE", + "T_DEPENDS", "T_ENDCHOICE", "T_ENDIF", "T_ENDMENU", "T_HELP", "T_HEX", + "T_IF", "T_IMPLY", "T_INT", "T_MAINMENU", "T_MENU", "T_MENUCONFIG", + "T_MODULES", "T_ON", "T_OPEN_PAREN", "T_OPTIONAL", "T_PLUS_EQUAL", "T_PROMPT", "T_RANGE", "T_RESET", "T_SELECT", "T_SOURCE", "T_STRING", "T_TRISTATE", "T_VISIBLE", "T_EOL", "T_ASSIGN_VAL", "T_OR", "T_AND", "T_EQUAL", "T_UNEQUAL", "T_LESS", "T_LESS_EQUAL", "T_GREATER", "T_GREATER_EQUAL", "T_NOT", "$accept", "input", "mainmenu_stmt", - "stmt_list", "common_stmt", "config_entry_start", "config_stmt", + "stmt_list", "stmt_list_in_choice", "config_entry_start", "config_stmt", "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", "choice_option_list", "choice_option", "type", "logic_type", "default", - "choice_block", "if_entry", "if_end", "if_stmt", "menu", "menu_entry", - "menu_end", "menu_stmt", "menu_option_list", "source_stmt", "comment", - "comment_stmt", "comment_option_list", "help_start", "help", "depends", - "visible", "prompt_stmt_opt", "end", "if_expr", "expr", + "if_entry", "if_end", "if_stmt", "if_stmt_in_choice", "menu", + "menu_entry", "menu_end", "menu_stmt", "menu_option_list", "source_stmt", + "comment", "comment_stmt", "comment_option_list", "help_start", "help", + "depends", "visible", "prompt_stmt_opt", "end", "if_expr", "expr", "nonconst_symbol", "symbol", "word_opt", "assignment_stmt", "assign_op", "assign_val", YY_NULLPTR }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# ifdef YYPRINT +#ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = +static const yytype_int16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308 + 305 }; -# endif +#endif -#define YYPACT_NINF -107 +#define YYPACT_NINF (-105) -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-107))) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF -4 +#define YYTABLE_NINF (-4) -#define yytable_value_is_error(Yytable_value) \ +#define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { - -6, 24, 33, -107, 65, -7, -107, 71, -4, 12, - 49, 53, 63, -1, 69, 63, 76, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, 25, -107, -107, -107, - 26, -107, 46, 47, -107, 54, -107, -1, -1, -22, - -107, 142, 58, 60, 68, 134, 134, 147, 114, 101, - 2, 101, 67, -107, -107, 72, -107, -107, -107, 5, - -107, -107, -1, -1, 44, 44, 44, 44, 44, 44, - -107, -107, -107, -107, -107, -107, -107, 66, 73, -107, - 63, -107, 94, 109, 44, 63, -107, -107, -107, 112, - -107, -1, 103, -107, -107, 63, 79, 122, 107, -107, - 112, -107, -107, 8, 88, 92, 93, -107, -107, -107, - -107, -107, 107, -107, -107, -107, -107, -107, -107, -107, - 97, -107, -107, -107, -107, -107, -107, -107, -1, -107, - 107, 95, 96, 102, 107, 44, 107, 107, 105, 41, - -107, 107, -107, 107, -1, 118, 119, -107, -107, -107, - 120, 17, 124, -107, -107, -107, 128, 107, 130, -107, - -107, 133, 135, 136, 11, -107, -107, -107, -107, -107, - -107, 138, -107, -107, -107, -107, -107 + -5, 17, 37, -105, 57, 8, -105, 91, 39, 15, + 46, 72, 80, 10, 82, 80, 83, -105, -105, -105, + -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, + -105, -105, -105, -105, -105, 45, -105, -105, -105, 48, + -105, 50, 59, -105, 60, -105, 10, 10, -7, -105, + 25, 63, 64, 65, 132, 132, 156, 162, 114, 14, + 114, 95, -105, -105, 71, -105, -105, -105, 9, -105, + -105, 10, 10, 27, 27, 27, 27, 27, 27, -105, + -105, -105, -105, -105, -105, -105, 69, 73, -105, 80, + -105, 74, 115, 27, 80, -105, -105, -105, 117, -105, + 10, 116, -105, -105, 80, 86, 118, 107, -105, 117, + -105, -105, 89, 93, 94, 96, -105, -105, -105, -105, + -105, -105, -105, -105, 107, -105, -105, -105, -105, -105, + -105, -105, 98, -105, -105, -105, -105, -105, -105, -105, + 10, -105, 107, -105, 107, 27, 107, 107, 97, 13, + -105, 107, -105, 107, 10, 102, 103, -105, -105, -105, + -105, 162, 108, 23, 109, 113, 107, 120, -105, -105, + 121, 126, 134, 33, -105, -105, -105, -105, -105, -105, + -105, 136, -105, -105, -105, -105, -105 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = +static const yytype_int8 yydefact[] = { 5, 0, 0, 5, 0, 0, 1, 0, 0, 0, - 98, 0, 0, 0, 0, 0, 0, 6, 21, 13, - 21, 14, 38, 56, 7, 5, 11, 65, 5, 8, - 15, 71, 12, 16, 4, 10, 0, 102, 103, 101, - 104, 99, 0, 0, 95, 0, 97, 0, 0, 0, - 96, 84, 0, 0, 0, 18, 20, 35, 0, 0, - 62, 0, 70, 9, 105, 0, 34, 69, 17, 0, - 92, 58, 0, 0, 0, 0, 0, 0, 0, 0, - 61, 19, 68, 51, 53, 54, 55, 0, 0, 49, - 0, 48, 0, 0, 0, 0, 50, 52, 22, 77, - 47, 0, 0, 24, 23, 0, 0, 0, 82, 39, - 77, 41, 40, 0, 0, 0, 0, 57, 37, 36, - 60, 59, 82, 67, 66, 64, 63, 72, 100, 91, - 93, 94, 89, 90, 85, 86, 87, 88, 0, 73, - 82, 0, 0, 0, 82, 0, 82, 82, 0, 82, - 74, 82, 44, 82, 0, 0, 0, 80, 81, 79, - 0, 0, 0, 33, 32, 31, 0, 82, 0, 78, - 25, 0, 0, 0, 83, 45, 43, 76, 75, 29, - 26, 0, 28, 27, 46, 42, 30 + 99, 0, 0, 0, 0, 0, 0, 25, 9, 25, + 12, 40, 16, 7, 5, 10, 66, 5, 11, 13, + 72, 8, 6, 4, 15, 0, 103, 104, 102, 105, + 100, 0, 0, 96, 0, 98, 0, 0, 0, 97, + 85, 0, 0, 0, 22, 24, 37, 0, 0, 63, + 0, 71, 14, 106, 0, 36, 70, 21, 0, 93, + 58, 0, 0, 0, 0, 0, 0, 0, 0, 62, + 23, 69, 53, 55, 56, 57, 0, 0, 51, 0, + 50, 0, 0, 0, 0, 52, 54, 26, 78, 49, + 0, 0, 28, 27, 0, 0, 0, 83, 41, 78, + 43, 42, 0, 0, 0, 0, 18, 39, 16, 19, + 17, 38, 60, 59, 83, 68, 67, 65, 64, 73, + 101, 92, 94, 95, 90, 91, 86, 87, 88, 89, + 0, 74, 83, 35, 83, 0, 83, 83, 0, 83, + 75, 83, 46, 83, 0, 0, 0, 20, 81, 82, + 80, 0, 0, 0, 0, 0, 83, 0, 79, 29, + 0, 0, 0, 84, 47, 45, 61, 77, 76, 33, + 30, 0, 32, 31, 48, 44, 34 }; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = +static const yytype_int16 yypgoto[] = { - -107, -107, -107, 3, 86, -107, -107, -107, -107, 126, - -107, -107, -107, -107, -107, -107, -107, -107, 100, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, 108, -25, -107, 42, -44, -106, - -47, -10, -67, -107, -107, -107, -107 + -105, -105, -105, 3, 38, -105, -55, -105, -105, 138, + -105, -105, -105, -105, -105, -105, -105, -105, 125, -105, + -54, -3, -105, -105, -105, -105, -105, -105, -105, -105, + -105, -52, -105, -105, 128, -38, -105, 68, -16, -104, + -46, -8, -65, -105, -105, -105, -105 }; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = +static const yytype_uint8 yydefgoto[] = { - -1, 2, 3, 4, 17, 18, 19, 20, 21, 55, - 98, 22, 23, 118, 24, 57, 109, 99, 100, 101, - 58, 25, 120, 26, 27, 28, 125, 29, 60, 30, - 31, 32, 62, 102, 103, 104, 124, 148, 119, 155, - 49, 50, 51, 42, 33, 40, 65 + 0, 2, 3, 4, 57, 17, 18, 19, 20, 54, + 97, 21, 22, 117, 23, 56, 108, 98, 99, 100, + 24, 122, 25, 119, 26, 27, 127, 28, 59, 29, + 30, 31, 61, 101, 102, 103, 126, 148, 123, 155, + 48, 49, 50, 41, 32, 39, 64 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -657,114 +761,114 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 69, 70, 45, 44, 46, 53, 7, 132, 133, 134, - 135, 136, 137, 36, 129, 121, 160, 126, 37, 87, - 1, 71, 37, 72, 73, 130, 131, 145, 59, 5, - 47, 61, 112, 6, 162, 123, 34, 127, 166, 35, - 168, 169, 38, 171, 122, 172, 38, 173, 44, 46, - 72, 73, 48, 41, 149, 39, 72, 73, 43, 39, - 178, 181, 72, 73, 154, -3, 8, 44, 63, 9, - 64, -2, 8, 10, 52, 9, 11, 12, 167, 10, - 140, 54, 11, 12, 87, 146, 72, 73, 13, 66, - 67, 161, 14, 15, 13, 151, 138, 68, 14, 15, - 141, 80, 8, 81, 16, 9, 150, 174, 142, 10, - 16, 82, 11, 12, 144, 128, 139, 147, 113, 114, - 115, 116, 152, 143, 13, 11, 12, 153, 14, 15, - 154, 157, 114, 115, 116, 158, 159, 13, 163, 164, - 16, 83, 15, 73, 117, 165, 56, 84, 170, 85, - 86, 87, 156, 16, 83, 88, 89, 110, 90, 91, - 105, 175, 176, 177, 87, 111, 92, 179, 88, 93, - 94, 180, 95, 182, 96, 97, 183, 0, 184, 185, - 106, 186, 107, 0, 108, 0, 0, 0, 97, 74, - 75, 76, 77, 78, 79 + 68, 69, 116, 118, 44, 120, 7, 52, 134, 135, + 136, 137, 138, 139, 43, 45, 35, 131, 111, 1, + 162, 125, 5, 129, 36, 132, 133, 58, 145, 86, + 60, 43, 45, 70, 154, 71, 72, 6, 164, 46, + 165, 121, 167, 168, 128, 170, 37, 171, 33, 172, + 40, 71, 72, 124, 149, 71, 72, -3, 8, 38, + 47, 9, 181, 178, 10, 71, 72, 11, 12, 73, + 74, 75, 76, 77, 78, 71, 72, 42, 13, 34, + 166, 142, 14, 15, 43, 62, 146, 51, 53, 63, + 65, -2, 8, 16, 163, 9, 151, 140, 10, 66, + 67, 11, 12, 79, 80, 81, 116, 118, 173, 120, + 86, 130, 13, 141, 143, 8, 14, 15, 9, 150, + 144, 10, 147, 153, 11, 12, 152, 16, 154, 157, + 113, 114, 115, 158, 159, 13, 160, 169, 82, 14, + 15, 72, 174, 175, 83, 84, 85, 86, 177, 179, + 16, 87, 88, 180, 89, 90, 161, 55, 176, 91, + 182, 183, 82, 112, 92, 93, 184, 94, 104, 95, + 96, 86, 11, 12, 185, 87, 186, 156, 113, 114, + 115, 109, 0, 13, 110, 0, 105, 0, 106, 0, + 107, 0, 0, 0, 96 }; static const yytype_int16 yycheck[] = { - 47, 48, 12, 4, 5, 15, 3, 74, 75, 76, - 77, 78, 79, 1, 9, 59, 122, 61, 10, 17, - 26, 43, 10, 45, 46, 72, 73, 94, 25, 5, - 31, 28, 57, 0, 140, 60, 43, 62, 144, 43, - 146, 147, 34, 149, 42, 151, 34, 153, 4, 5, - 45, 46, 53, 4, 101, 47, 45, 46, 5, 47, - 43, 167, 45, 46, 23, 0, 1, 4, 43, 4, - 44, 0, 1, 8, 5, 4, 11, 12, 145, 8, - 90, 5, 11, 12, 17, 95, 45, 46, 23, 43, - 43, 138, 27, 28, 23, 105, 30, 43, 27, 28, - 6, 43, 1, 43, 39, 4, 3, 154, 14, 8, - 39, 43, 11, 12, 5, 43, 43, 5, 4, 18, - 19, 20, 43, 29, 23, 11, 12, 5, 27, 28, - 23, 43, 18, 19, 20, 43, 43, 23, 43, 43, - 39, 7, 28, 46, 58, 43, 20, 13, 43, 15, - 16, 17, 110, 39, 7, 21, 22, 57, 24, 25, - 13, 43, 43, 43, 17, 57, 32, 43, 21, 35, - 36, 43, 38, 43, 40, 41, 43, -1, 43, 43, - 33, 43, 35, -1, 37, -1, -1, -1, 41, 47, - 48, 49, 50, 51, 52 + 46, 47, 57, 57, 12, 57, 3, 15, 73, 74, + 75, 76, 77, 78, 4, 5, 1, 8, 56, 24, + 124, 59, 5, 61, 9, 71, 72, 24, 93, 15, + 27, 4, 5, 40, 21, 42, 43, 0, 142, 29, + 144, 57, 146, 147, 60, 149, 31, 151, 40, 153, + 4, 42, 43, 39, 100, 42, 43, 0, 1, 44, + 50, 4, 166, 40, 7, 42, 43, 10, 11, 44, + 45, 46, 47, 48, 49, 42, 43, 5, 21, 40, + 145, 89, 25, 26, 4, 40, 94, 5, 5, 41, + 40, 0, 1, 36, 140, 4, 104, 28, 7, 40, + 40, 10, 11, 40, 40, 40, 161, 161, 154, 161, + 15, 40, 21, 40, 40, 1, 25, 26, 4, 3, + 5, 7, 5, 5, 10, 11, 40, 36, 21, 40, + 16, 17, 18, 40, 40, 21, 40, 40, 6, 25, + 26, 43, 40, 40, 12, 13, 14, 15, 40, 40, + 36, 19, 20, 40, 22, 23, 118, 19, 161, 27, + 40, 40, 6, 1, 32, 33, 40, 35, 12, 37, + 38, 15, 10, 11, 40, 19, 40, 109, 16, 17, + 18, 56, -1, 21, 56, -1, 30, -1, 32, -1, + 34, -1, -1, -1, 38 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +static const yytype_int8 yystos[] = { - 0, 26, 55, 56, 57, 5, 0, 57, 1, 4, - 8, 11, 12, 23, 27, 28, 39, 58, 59, 60, - 61, 62, 65, 66, 68, 75, 77, 78, 79, 81, - 83, 84, 85, 98, 43, 43, 1, 10, 34, 47, - 99, 4, 97, 5, 4, 95, 5, 31, 53, 94, - 95, 96, 5, 95, 5, 63, 63, 69, 74, 57, - 82, 57, 86, 43, 44, 100, 43, 43, 43, 94, - 94, 43, 45, 46, 47, 48, 49, 50, 51, 52, - 43, 43, 43, 7, 13, 15, 16, 17, 21, 22, - 24, 25, 32, 35, 36, 38, 40, 41, 64, 71, - 72, 73, 87, 88, 89, 13, 33, 35, 37, 70, - 72, 88, 89, 4, 18, 19, 20, 58, 67, 92, - 76, 92, 42, 89, 90, 80, 92, 89, 43, 9, - 94, 94, 96, 96, 96, 96, 96, 96, 30, 43, - 95, 6, 14, 29, 5, 96, 95, 5, 91, 94, - 3, 95, 43, 5, 23, 93, 91, 43, 43, 43, - 93, 94, 93, 43, 43, 43, 93, 96, 93, 93, - 43, 93, 93, 93, 94, 43, 43, 43, 43, 43, - 43, 93, 43, 43, 43, 43, 43 + 0, 24, 52, 53, 54, 5, 0, 54, 1, 4, + 7, 10, 11, 21, 25, 26, 36, 56, 57, 58, + 59, 62, 63, 65, 71, 73, 75, 76, 78, 80, + 81, 82, 95, 40, 40, 1, 9, 31, 44, 96, + 4, 94, 5, 4, 92, 5, 29, 50, 91, 92, + 93, 5, 92, 5, 60, 60, 66, 55, 54, 79, + 54, 83, 40, 41, 97, 40, 40, 40, 91, 91, + 40, 42, 43, 44, 45, 46, 47, 48, 49, 40, + 40, 40, 6, 12, 13, 14, 15, 19, 20, 22, + 23, 27, 32, 33, 35, 37, 38, 61, 68, 69, + 70, 84, 85, 86, 12, 30, 32, 34, 67, 69, + 85, 86, 1, 16, 17, 18, 57, 64, 71, 74, + 82, 89, 72, 89, 39, 86, 87, 77, 89, 86, + 40, 8, 91, 91, 93, 93, 93, 93, 93, 93, + 28, 40, 92, 40, 5, 93, 92, 5, 88, 91, + 3, 92, 40, 5, 21, 90, 88, 40, 40, 40, + 40, 55, 90, 91, 90, 90, 93, 90, 90, 40, + 90, 90, 90, 91, 40, 40, 72, 40, 40, 40, + 40, 90, 40, 40, 40, 40, 40 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +static const yytype_int8 yyr1[] = { - 0, 54, 55, 55, 56, 57, 57, 57, 57, 57, - 57, 58, 58, 58, 58, 58, 58, 59, 60, 61, - 62, 63, 63, 63, 63, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 65, 66, 67, 68, 69, 69, - 69, 69, 70, 70, 70, 70, 70, 71, 71, 71, - 71, 72, 72, 73, 73, 73, 74, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 82, 82, 83, 84, - 85, 86, 86, 87, 88, 89, 90, 91, 91, 92, - 92, 92, 93, 93, 94, 94, 94, 94, 94, 94, - 94, 94, 94, 94, 94, 95, 96, 96, 97, 97, - 98, 99, 99, 99, 100, 100 + 0, 51, 52, 52, 53, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, + 55, 56, 57, 58, 59, 60, 60, 60, 60, 61, + 61, 61, 61, 61, 61, 61, 62, 63, 64, 65, + 66, 66, 66, 66, 67, 67, 67, 67, 67, 68, + 68, 68, 68, 69, 69, 70, 70, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 79, 79, 80, + 81, 82, 83, 83, 84, 85, 86, 87, 88, 88, + 89, 89, 89, 90, 90, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 92, 93, 93, 94, + 94, 95, 96, 96, 96, 97, 97 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const yytype_int8 yyr2[] = { - 0, 2, 2, 1, 3, 0, 2, 2, 2, 4, - 3, 1, 1, 1, 1, 1, 1, 3, 2, 3, - 2, 0, 2, 2, 2, 3, 4, 4, 4, 4, - 5, 3, 3, 3, 3, 2, 1, 3, 0, 2, - 2, 2, 4, 3, 2, 3, 4, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 2, 3, 1, - 3, 3, 2, 1, 3, 0, 2, 2, 3, 3, - 2, 0, 2, 2, 2, 4, 3, 0, 2, 2, - 2, 2, 0, 2, 1, 3, 3, 3, 3, 3, - 3, 3, 2, 3, 3, 1, 1, 1, 0, 1, - 4, 1, 1, 1, 0, 1 + 0, 2, 2, 1, 3, 0, 2, 2, 2, 2, + 2, 2, 2, 2, 4, 3, 0, 2, 2, 2, + 3, 3, 2, 3, 2, 0, 2, 2, 2, 3, + 4, 4, 4, 4, 5, 2, 3, 2, 1, 3, + 0, 2, 2, 2, 4, 3, 2, 3, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 3, 3, 3, 2, 1, 3, 0, 2, 2, 3, + 3, 2, 0, 2, 2, 2, 4, 3, 0, 2, + 2, 2, 2, 0, 2, 1, 3, 3, 3, 3, + 3, 3, 3, 2, 3, 3, 1, 1, 1, 0, + 1, 4, 1, 1, 1, 0, 1 }; +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -773,27 +877,26 @@ static const yytype_uint8 yyr2[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ + while (0) +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF /* Enable debugging if requested. */ @@ -811,54 +914,58 @@ do { \ } while (0) /* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value); \ + Kind, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { - FILE *yyo = yyoutput; - YYUSE (yyo); + FILE *yyoutput = yyo; + YY_USE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif - YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); + yy_symbol_value_print (yyo, yykind, yyvaluep); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -867,7 +974,7 @@ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) `------------------------------------------------------------------*/ static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -890,21 +997,21 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule) { - unsigned long yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)]); YYFPRINTF (stderr, "\n"); } } @@ -919,8 +1026,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -943,278 +1050,53 @@ int yydebug; #endif -#if YYERROR_VERBOSE -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YYUSE (yyvaluep); + YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - switch (yytype) + switch (yykind) { - case 66: /* choice_entry */ - - { + case YYSYMBOL_choice_entry: /* choice_entry */ + { fprintf(stderr, "%s:%d: missing end statement for this entry\n", ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno); if (current_menu == ((*yyvaluep).menu)) menu_end_menu(); } - break; - case 75: /* if_entry */ - - { + case YYSYMBOL_if_entry: /* if_entry */ + { fprintf(stderr, "%s:%d: missing end statement for this entry\n", ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno); if (current_menu == ((*yyvaluep).menu)) menu_end_menu(); } - break; - case 79: /* menu_entry */ - - { + case YYSYMBOL_menu_entry: /* menu_entry */ + { fprintf(stderr, "%s:%d: missing end statement for this entry\n", ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno); if (current_menu == ((*yyvaluep).menu)) menu_end_menu(); } - break; - default: break; } @@ -1222,9 +1104,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) } - - -/* The lookahead symbol. */ +/* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ @@ -1233,6 +1113,8 @@ YYSTYPE yylval; int yynerrs; + + /*----------. | yyparse. | `----------*/ @@ -1240,43 +1122,36 @@ int yynerrs; int yyparse (void) { - int yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + int yyerrstatus = 0; - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack. */ + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1284,58 +1159,60 @@ yyparse (void) Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; + /*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | +| yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ - yynewstate: +yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - yysetstate: - *yyssp = yystate; + +/*--------------------------------------------------------------------. +| yysetstate -- set current state (the top of the stack) to yystate. | +`--------------------------------------------------------------------*/ +yysetstate: + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + goto yyexhaustedlab; +#else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYPTRDIFF_T yysize = yyssp - yyss + 1; -#ifdef yyoverflow +# if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ + yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); - yyss = yyss1; yyvs = yyvs1; } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else +# else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; @@ -1344,9 +1221,10 @@ yyparse (void) yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + yy_state_t *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); @@ -1356,30 +1234,30 @@ yyparse (void) YYSTACK_FREE (yyss1); } # endif -#endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); +#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ yybackup: - /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ @@ -1390,18 +1268,29 @@ yybackup: /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); + YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } else { yytoken = YYTRANSLATE (yychar); @@ -1429,15 +1318,13 @@ yybackup: /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END + /* Discard the shifted token. */ + yychar = YYEMPTY; goto yynewstate; @@ -1452,7 +1339,7 @@ yydefault: /*-----------------------------. -| yyreduce -- Do a reduction. | +| yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ @@ -1472,89 +1359,74 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 4: - - { + case 4: /* mainmenu_stmt: T_MAINMENU T_WORD_QUOTE T_EOL */ +{ menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); } - break; - case 9: - - { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); } - + case 14: /* stmt_list: stmt_list T_WORD error T_EOL */ + { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); } break; - case 10: - - { zconf_error("invalid statement"); } - + case 15: /* stmt_list: stmt_list error T_EOL */ + { zconf_error("invalid statement"); } break; - case 17: + case 20: /* stmt_list_in_choice: stmt_list_in_choice error T_EOL */ + { zconf_error("invalid statement"); } + break; - { + case 21: /* config_entry_start: T_CONFIG nonconst_symbol T_EOL */ +{ (yyvsp[-1].symbol)->flags |= SYMBOL_OPTIONAL; menu_add_entry((yyvsp[-1].symbol)); printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].symbol)->name); } - break; - case 18: - - { + case 22: /* config_stmt: config_entry_start config_option_list */ +{ printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); } - break; - case 19: - - { + case 23: /* menuconfig_entry_start: T_MENUCONFIG nonconst_symbol T_EOL */ +{ (yyvsp[-1].symbol)->flags |= SYMBOL_OPTIONAL; menu_add_entry((yyvsp[-1].symbol)); printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].symbol)->name); } - break; - case 20: - - { + case 24: /* menuconfig_stmt: menuconfig_entry_start config_option_list */ +{ if (current_entry->prompt) current_entry->prompt->type = P_MENU; else zconfprint("warning: menuconfig statement without prompt"); printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); } - break; - case 25: - - { + case 29: /* config_option: type prompt_stmt_opt T_EOL */ +{ menu_set_type((yyvsp[-2].type)); printd(DEBUG_PARSE, "%s:%d:type(%u)\n", zconf_curname(), zconf_lineno(), (yyvsp[-2].type)); } - break; - case 26: - - { + case 30: /* config_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL */ +{ menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); } - break; - case 27: - - { + case 31: /* config_option: default expr if_expr T_EOL */ +{ menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr)); if ((yyvsp[-3].type) != S_UNKNOWN) menu_set_type((yyvsp[-3].type)); @@ -1562,63 +1434,40 @@ yyreduce: zconf_curname(), zconf_lineno(), (yyvsp[-3].type)); } - break; - case 28: - - { + case 32: /* config_option: T_SELECT nonconst_symbol if_expr T_EOL */ +{ menu_add_symbol(P_SELECT, (yyvsp[-2].symbol), (yyvsp[-1].expr)); printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); } - break; - case 29: - - { + case 33: /* config_option: T_IMPLY nonconst_symbol if_expr T_EOL */ +{ menu_add_symbol(P_IMPLY, (yyvsp[-2].symbol), (yyvsp[-1].expr)); printd(DEBUG_PARSE, "%s:%d:imply\n", zconf_curname(), zconf_lineno()); } - break; - case 30: - - { + case 34: /* config_option: T_RANGE symbol symbol if_expr T_EOL */ +{ menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr)); printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); } - break; - case 31: - - { - menu_add_option_modules(); + case 35: /* config_option: T_MODULES T_EOL */ +{ + if (modules_sym) + zconf_error("symbol '%s' redefines option 'modules' already defined by symbol '%s'", + current_entry->sym->name, modules_sym->name); + modules_sym = current_entry->sym; } - break; - case 32: - - { - menu_add_option_defconfig_list(); -} - - break; - - case 33: - - { - menu_add_option_allnoconfig_y(); -} - - break; - - case 34: - - { + case 36: /* choice: T_CHOICE word_opt T_EOL */ +{ struct symbol *sym = sym_lookup((yyvsp[-1].string), SYMBOL_CHOICE); sym->flags |= SYMBOL_NO_WRITE; menu_add_entry(sym); @@ -1626,205 +1475,157 @@ yyreduce: free((yyvsp[-1].string)); printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); } - break; - case 35: - - { + case 37: /* choice_entry: choice choice_option_list */ +{ (yyval.menu) = menu_add_menu(); } - break; - case 36: - - { + case 38: /* choice_end: end */ +{ if (zconf_endtoken((yyvsp[0].string), "choice")) { menu_end_menu(); printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); } } - break; - case 42: - - { + case 44: /* choice_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL */ +{ menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); } - break; - case 43: - - { + case 45: /* choice_option: logic_type prompt_stmt_opt T_EOL */ +{ menu_set_type((yyvsp[-2].type)); printd(DEBUG_PARSE, "%s:%d:type(%u)\n", zconf_curname(), zconf_lineno(), (yyvsp[-2].type)); } - break; - case 44: - - { + case 46: /* choice_option: T_OPTIONAL T_EOL */ +{ current_entry->sym->flags |= SYMBOL_OPTIONAL; printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); } - break; - case 45: - - { + case 47: /* choice_option: T_RESET if_expr T_EOL */ +{ menu_add_prop(P_RESET, NULL, (yyvsp[-1].expr)); } - break; - case 46: - - { + case 48: /* choice_option: T_DEFAULT nonconst_symbol if_expr T_EOL */ +{ menu_add_symbol(P_DEFAULT, (yyvsp[-2].symbol), (yyvsp[-1].expr)); printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); } - break; - case 48: - - { (yyval.type) = S_INT; } - + case 50: /* type: T_INT */ + { (yyval.type) = S_INT; } break; - case 49: - - { (yyval.type) = S_HEX; } - + case 51: /* type: T_HEX */ + { (yyval.type) = S_HEX; } break; - case 50: - - { (yyval.type) = S_STRING; } - + case 52: /* type: T_STRING */ + { (yyval.type) = S_STRING; } break; - case 51: - - { (yyval.type) = S_BOOLEAN; } - + case 53: /* logic_type: T_BOOL */ + { (yyval.type) = S_BOOLEAN; } break; - case 52: - - { (yyval.type) = S_TRISTATE; } - + case 54: /* logic_type: T_TRISTATE */ + { (yyval.type) = S_TRISTATE; } break; - case 53: - - { (yyval.type) = S_UNKNOWN; } - + case 55: /* default: T_DEFAULT */ + { (yyval.type) = S_UNKNOWN; } break; - case 54: - - { (yyval.type) = S_BOOLEAN; } - + case 56: /* default: T_DEF_BOOL */ + { (yyval.type) = S_BOOLEAN; } break; - case 55: - - { (yyval.type) = S_TRISTATE; } - + case 57: /* default: T_DEF_TRISTATE */ + { (yyval.type) = S_TRISTATE; } break; - case 58: - - { + case 58: /* if_entry: T_IF expr T_EOL */ +{ printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); menu_add_entry(NULL); menu_add_dep((yyvsp[-1].expr)); (yyval.menu) = menu_add_menu(); } - break; - case 59: - - { + case 59: /* if_end: end */ +{ if (zconf_endtoken((yyvsp[0].string), "if")) { menu_end_menu(); printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); } } - break; - case 61: - - { + case 62: /* menu: T_MENU T_WORD_QUOTE T_EOL */ +{ menu_add_entry(NULL); menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); } - break; - case 62: - - { + case 63: /* menu_entry: menu menu_option_list */ +{ (yyval.menu) = menu_add_menu(); } - break; - case 63: - - { + case 64: /* menu_end: end */ +{ if (zconf_endtoken((yyvsp[0].string), "menu")) { menu_end_menu(); printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); } } - break; - case 68: - - { + case 69: /* source_stmt: T_SOURCE T_WORD_QUOTE T_EOL */ +{ printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); zconf_nextfile((yyvsp[-1].string)); free((yyvsp[-1].string)); } - break; - case 69: - - { + case 70: /* comment: T_COMMENT T_WORD_QUOTE T_EOL */ +{ menu_add_entry(NULL); menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL); printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); } - break; - case 73: - - { + case 74: /* help_start: T_HELP T_EOL */ +{ printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); zconf_starthelp(); } - break; - case 74: - - { + case 75: /* help: help_start T_HELPTEXT */ +{ /* Is the help text empty or all whitespace? */ if ((yyvsp[0].string)[strspn((yyvsp[0].string), " \f\n\r\t\v")] == '\0') zconfprint("warning: '%s' defined with blank help text", @@ -1832,176 +1633,121 @@ yyreduce: current_entry->help = (yyvsp[0].string); } - break; - case 75: - - { + case 76: /* depends: T_DEPENDS T_ON expr T_EOL */ +{ menu_add_dep((yyvsp[-1].expr)); printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); } - break; - case 76: - - { + case 77: /* visible: T_VISIBLE if_expr T_EOL */ +{ menu_add_visibility((yyvsp[-1].expr)); } - break; - case 78: - - { + case 79: /* prompt_stmt_opt: T_WORD_QUOTE if_expr */ +{ menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr)); } - break; - case 79: - - { (yyval.string) = "menu"; } - + case 80: /* end: T_ENDMENU T_EOL */ + { (yyval.string) = "menu"; } break; - case 80: - - { (yyval.string) = "choice"; } - + case 81: /* end: T_ENDCHOICE T_EOL */ + { (yyval.string) = "choice"; } break; - case 81: - - { (yyval.string) = "if"; } - + case 82: /* end: T_ENDIF T_EOL */ + { (yyval.string) = "if"; } break; - case 82: - - { (yyval.expr) = NULL; } - + case 83: /* if_expr: %empty */ + { (yyval.expr) = NULL; } break; - case 83: - - { (yyval.expr) = (yyvsp[0].expr); } - + case 84: /* if_expr: T_IF expr */ + { (yyval.expr) = (yyvsp[0].expr); } break; - case 84: - - { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); } - + case 85: /* expr: symbol */ + { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); } break; - case 85: - - { (yyval.expr) = expr_alloc_comp(E_LTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } - + case 86: /* expr: symbol T_LESS symbol */ + { (yyval.expr) = expr_alloc_comp(E_LTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } break; - case 86: - - { (yyval.expr) = expr_alloc_comp(E_LEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } - + case 87: /* expr: symbol T_LESS_EQUAL symbol */ + { (yyval.expr) = expr_alloc_comp(E_LEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } break; - case 87: - - { (yyval.expr) = expr_alloc_comp(E_GTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } - + case 88: /* expr: symbol T_GREATER symbol */ + { (yyval.expr) = expr_alloc_comp(E_GTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } break; - case 88: - - { (yyval.expr) = expr_alloc_comp(E_GEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } - + case 89: /* expr: symbol T_GREATER_EQUAL symbol */ + { (yyval.expr) = expr_alloc_comp(E_GEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } break; - case 89: - - { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } - + case 90: /* expr: symbol T_EQUAL symbol */ + { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } break; - case 90: - - { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } - + case 91: /* expr: symbol T_UNEQUAL symbol */ + { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } break; - case 91: - - { (yyval.expr) = (yyvsp[-1].expr); } - + case 92: /* expr: T_OPEN_PAREN expr T_CLOSE_PAREN */ + { (yyval.expr) = (yyvsp[-1].expr); } break; - case 92: - - { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); } - + case 93: /* expr: T_NOT expr */ + { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); } break; - case 93: - - { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); } - + case 94: /* expr: expr T_OR expr */ + { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); } break; - case 94: - - { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); } - + case 95: /* expr: expr T_AND expr */ + { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); } break; - case 95: - - { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); } - + case 96: /* nonconst_symbol: T_WORD */ + { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); } break; - case 97: - - { (yyval.symbol) = sym_lookup((yyvsp[0].string), SYMBOL_CONST); free((yyvsp[0].string)); } - + case 98: /* symbol: T_WORD_QUOTE */ + { (yyval.symbol) = sym_lookup((yyvsp[0].string), SYMBOL_CONST); free((yyvsp[0].string)); } break; - case 98: - - { (yyval.string) = NULL; } - + case 99: /* word_opt: %empty */ + { (yyval.string) = NULL; } break; - case 100: - - { variable_add((yyvsp[-3].string), (yyvsp[-1].string), (yyvsp[-2].flavor)); free((yyvsp[-3].string)); free((yyvsp[-1].string)); } - + case 101: /* assignment_stmt: T_WORD assign_op assign_val T_EOL */ + { variable_add((yyvsp[-3].string), (yyvsp[-1].string), (yyvsp[-2].flavor)); free((yyvsp[-3].string)); free((yyvsp[-1].string)); } break; - case 101: - - { (yyval.flavor) = VAR_RECURSIVE; } - + case 102: /* assign_op: T_EQUAL */ + { (yyval.flavor) = VAR_RECURSIVE; } break; - case 102: - - { (yyval.flavor) = VAR_SIMPLE; } - + case 103: /* assign_op: T_COLON_EQUAL */ + { (yyval.flavor) = VAR_SIMPLE; } break; - case 103: - - { (yyval.flavor) = VAR_APPEND; } - + case 104: /* assign_op: T_PLUS_EQUAL */ + { (yyval.flavor) = VAR_APPEND; } break; - case 104: - - { (yyval.string) = xstrdup(""); } - + case 105: /* assign_val: %empty */ + { (yyval.string) = xstrdup(""); } break; @@ -2019,25 +1765,23 @@ yyreduce: case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; + { + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); + } goto yynewstate; @@ -2048,50 +1792,14 @@ yyreduce: yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif } - - if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -2120,12 +1828,10 @@ yyerrlab: | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; + /* Pacify compilers when the user code never invokes YYERROR and the + label yyerrorlab therefore never appears in user code. */ + if (0) + YYERROR; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -2142,13 +1848,14 @@ yyerrorlab: yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -2162,7 +1869,7 @@ yyerrlab1: yydestruct ("Error: popping", - yystos[yystate], yyvsp); + YY_ACCESSING_SYMBOL (yystate), yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2174,7 +1881,7 @@ yyerrlab1: /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -2187,6 +1894,7 @@ yyacceptlab: yyresult = 0; goto yyreturn; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -2194,16 +1902,21 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE + +#if !defined yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ + goto yyreturn; #endif + +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -2220,17 +1933,14 @@ yyreturn: while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif + return yyresult; } @@ -2271,7 +1981,7 @@ void conf_parse(const char *name) } if (yynerrs) exit(1); - sym_set_change_count(1); + conf_set_changed(true); } static bool zconf_endtoken(const char *tokenname, @@ -2477,5 +2187,3 @@ void zconfdump(FILE *out) } } } - -#include "menu.c" diff --git a/scripts/config/parser.tab.h b/scripts/config/parser.tab.h index d26b8bdccb..aac457ce39 100644 --- a/scripts/config/parser.tab.h +++ b/scripts/config/parser.tab.h @@ -1,8 +1,9 @@ -/* A Bison parser, made by GNU Bison 3.1. */ +/* A Bison parser, made by GNU Bison 3.7.6. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -30,6 +31,10 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + #ifndef YY_YY_PARSER_TAB_H_INCLUDED # define YY_YY_PARSER_TAB_H_INCLUDED /* Debug traces. */ @@ -40,72 +45,72 @@ extern int yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - T_HELPTEXT = 258, - T_WORD = 259, - T_WORD_QUOTE = 260, - T_ALLNOCONFIG_Y = 261, - T_BOOL = 262, - T_CHOICE = 263, - T_CLOSE_PAREN = 264, - T_COLON_EQUAL = 265, - T_COMMENT = 266, - T_CONFIG = 267, - T_DEFAULT = 268, - T_DEFCONFIG_LIST = 269, - T_DEF_BOOL = 270, - T_DEF_TRISTATE = 271, - T_DEPENDS = 272, - T_ENDCHOICE = 273, - T_ENDIF = 274, - T_ENDMENU = 275, - T_HELP = 276, - T_HEX = 277, - T_IF = 278, - T_IMPLY = 279, - T_INT = 280, - T_MAINMENU = 281, - T_MENU = 282, - T_MENUCONFIG = 283, - T_MODULES = 284, - T_ON = 285, - T_OPEN_PAREN = 286, - T_OPTION = 287, - T_OPTIONAL = 288, - T_PLUS_EQUAL = 289, - T_PROMPT = 290, - T_RANGE = 291, - T_RESET = 292, - T_SELECT = 293, - T_SOURCE = 294, - T_STRING = 295, - T_TRISTATE = 296, - T_VISIBLE = 297, - T_EOL = 298, - T_ASSIGN_VAL = 299, - T_OR = 300, - T_AND = 301, - T_EQUAL = 302, - T_UNEQUAL = 303, - T_LESS = 304, - T_LESS_EQUAL = 305, - T_GREATER = 306, - T_GREATER_EQUAL = 307, - T_NOT = 308 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + T_HELPTEXT = 258, /* T_HELPTEXT */ + T_WORD = 259, /* T_WORD */ + T_WORD_QUOTE = 260, /* T_WORD_QUOTE */ + T_BOOL = 261, /* T_BOOL */ + T_CHOICE = 262, /* T_CHOICE */ + T_CLOSE_PAREN = 263, /* T_CLOSE_PAREN */ + T_COLON_EQUAL = 264, /* T_COLON_EQUAL */ + T_COMMENT = 265, /* T_COMMENT */ + T_CONFIG = 266, /* T_CONFIG */ + T_DEFAULT = 267, /* T_DEFAULT */ + T_DEF_BOOL = 268, /* T_DEF_BOOL */ + T_DEF_TRISTATE = 269, /* T_DEF_TRISTATE */ + T_DEPENDS = 270, /* T_DEPENDS */ + T_ENDCHOICE = 271, /* T_ENDCHOICE */ + T_ENDIF = 272, /* T_ENDIF */ + T_ENDMENU = 273, /* T_ENDMENU */ + T_HELP = 274, /* T_HELP */ + T_HEX = 275, /* T_HEX */ + T_IF = 276, /* T_IF */ + T_IMPLY = 277, /* T_IMPLY */ + T_INT = 278, /* T_INT */ + T_MAINMENU = 279, /* T_MAINMENU */ + T_MENU = 280, /* T_MENU */ + T_MENUCONFIG = 281, /* T_MENUCONFIG */ + T_MODULES = 282, /* T_MODULES */ + T_ON = 283, /* T_ON */ + T_OPEN_PAREN = 284, /* T_OPEN_PAREN */ + T_OPTIONAL = 285, /* T_OPTIONAL */ + T_PLUS_EQUAL = 286, /* T_PLUS_EQUAL */ + T_PROMPT = 287, /* T_PROMPT */ + T_RANGE = 288, /* T_RANGE */ + T_RESET = 289, /* T_RESET */ + T_SELECT = 290, /* T_SELECT */ + T_SOURCE = 291, /* T_SOURCE */ + T_STRING = 292, /* T_STRING */ + T_TRISTATE = 293, /* T_TRISTATE */ + T_VISIBLE = 294, /* T_VISIBLE */ + T_EOL = 295, /* T_EOL */ + T_ASSIGN_VAL = 296, /* T_ASSIGN_VAL */ + T_OR = 297, /* T_OR */ + T_AND = 298, /* T_AND */ + T_EQUAL = 299, /* T_EQUAL */ + T_UNEQUAL = 300, /* T_UNEQUAL */ + T_LESS = 301, /* T_LESS */ + T_LESS_EQUAL = 302, /* T_LESS_EQUAL */ + T_GREATER = 303, /* T_GREATER */ + T_GREATER_EQUAL = 304, /* T_GREATER_EQUAL */ + T_NOT = 305 /* T_NOT */ }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - union YYSTYPE { - char *string; struct symbol *symbol; struct expr *expr; @@ -115,7 +120,6 @@ union YYSTYPE }; - typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 diff --git a/scripts/config/parser.y b/scripts/config/parser.y index e26dbc3095..4994246b2f 100644 --- a/scripts/config/parser.y +++ b/scripts/config/parser.y @@ -12,6 +12,7 @@ #include #include "lkc.h" +#include "internal.h" #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) @@ -28,7 +29,7 @@ static bool zconf_endtoken(const char *tokenname, struct symbol *symbol_hash[SYMBOL_HASHSIZE]; -static struct menu *current_menu, *current_entry; +struct menu *current_menu, *current_entry; %} @@ -45,7 +46,6 @@ static struct menu *current_menu, *current_entry; %token T_HELPTEXT %token T_WORD %token T_WORD_QUOTE -%token T_ALLNOCONFIG_Y %token T_BOOL %token T_CHOICE %token T_CLOSE_PAREN @@ -53,7 +53,6 @@ static struct menu *current_menu, *current_entry; %token T_COMMENT %token T_CONFIG %token T_DEFAULT -%token T_DEFCONFIG_LIST %token T_DEF_BOOL %token T_DEF_TRISTATE %token T_DEPENDS @@ -71,7 +70,6 @@ static struct menu *current_menu, *current_entry; %token T_MODULES %token T_ON %token T_OPEN_PAREN -%token T_OPTION %token T_OPTIONAL %token T_PLUS_EQUAL %token T_PROMPT @@ -120,20 +118,24 @@ mainmenu_stmt: T_MAINMENU T_WORD_QUOTE T_EOL stmt_list: /* empty */ - | stmt_list common_stmt + | stmt_list assignment_stmt | stmt_list choice_stmt + | stmt_list comment_stmt + | stmt_list config_stmt + | stmt_list if_stmt | stmt_list menu_stmt + | stmt_list menuconfig_stmt + | stmt_list source_stmt | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } | stmt_list error T_EOL { zconf_error("invalid statement"); } ; -common_stmt: - if_stmt - | comment_stmt - | config_stmt - | menuconfig_stmt - | source_stmt - | assignment_stmt +stmt_list_in_choice: + /* empty */ + | stmt_list_in_choice comment_stmt + | stmt_list_in_choice config_stmt + | stmt_list_in_choice if_stmt_in_choice + | stmt_list_in_choice error T_EOL { zconf_error("invalid statement"); } ; /* config/menuconfig entry */ @@ -215,19 +217,12 @@ config_option: T_RANGE symbol symbol if_expr T_EOL printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); }; -config_option: T_OPTION T_MODULES T_EOL +config_option: T_MODULES T_EOL { - menu_add_option_modules(); -}; - -config_option: T_OPTION T_DEFCONFIG_LIST T_EOL -{ - menu_add_option_defconfig_list(); -}; - -config_option: T_OPTION T_ALLNOCONFIG_Y T_EOL -{ - menu_add_option_allnoconfig_y(); + if (modules_sym) + zconf_error("symbol '%s' redefines option 'modules' already defined by symbol '%s'", + current_entry->sym->name, modules_sym->name); + modules_sym = current_entry->sym; }; /* choice entry */ @@ -255,7 +250,7 @@ choice_end: end } }; -choice_stmt: choice_entry choice_block choice_end +choice_stmt: choice_entry stmt_list_in_choice choice_end ; choice_option_list: @@ -311,11 +306,6 @@ default: | T_DEF_BOOL { $$ = S_BOOLEAN; } | T_DEF_TRISTATE { $$ = S_TRISTATE; } -choice_block: - /* empty */ - | choice_block common_stmt -; - /* if entry */ if_entry: T_IF expr T_EOL @@ -337,6 +327,9 @@ if_end: end if_stmt: if_entry stmt_list if_end ; +if_stmt_in_choice: if_entry stmt_list_in_choice if_end +; + /* menu entry */ menu: T_MENU T_WORD_QUOTE T_EOL @@ -517,7 +510,7 @@ void conf_parse(const char *name) } if (yynerrs) exit(1); - sym_set_change_count(1); + conf_set_changed(true); } static bool zconf_endtoken(const char *tokenname, @@ -723,5 +716,3 @@ void zconfdump(FILE *out) } } } - -#include "menu.c" diff --git a/scripts/config/preprocess.c b/scripts/config/preprocess.c index dcc07c45eb..62d7e47547 100644 --- a/scripts/config/preprocess.c +++ b/scripts/config/preprocess.c @@ -114,7 +114,7 @@ static char *do_error_if(int argc, char *argv[]) if (!strcmp(argv[0], "y")) pperror("%s", argv[1]); - return NULL; + return xstrdup(""); } static char *do_filename(int argc, char *argv[]) diff --git a/scripts/config/qconf-cfg.sh b/scripts/config/qconf-cfg.sh index 02ccc0ae10..fa564cd795 100755 --- a/scripts/config/qconf-cfg.sh +++ b/scripts/config/qconf-cfg.sh @@ -2,7 +2,6 @@ # SPDX-License-Identifier: GPL-2.0 PKG="Qt5Core Qt5Gui Qt5Widgets" -PKG2="QtCore QtGui" if [ -z "$(command -v pkg-config)" ]; then echo >&2 "*" @@ -12,21 +11,14 @@ if [ -z "$(command -v pkg-config)" ]; then fi if pkg-config --exists $PKG; then - echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)\" + echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags $PKG)\" echo libs=\"$(pkg-config --libs $PKG)\" echo moc=\"$(pkg-config --variable=host_bins Qt5Core)/moc\" exit 0 fi -if pkg-config --exists $PKG2; then - echo cflags=\"$(pkg-config --cflags $PKG2)\" - echo libs=\"$(pkg-config --libs $PKG2)\" - echo moc=\"$(pkg-config --variable=moc_location QtCore)\" - exit 0 -fi - echo >&2 "*" -echo >&2 "* Could not find Qt via pkg-config." -echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH" +echo >&2 "* Could not find Qt5 via pkg-config." +echo >&2 "* Please install Qt5 and make sure it's in PKG_CONFIG_PATH" echo >&2 "*" exit 1 diff --git a/scripts/config/qconf.cc b/scripts/config/qconf.cc index 82773cc35d..78087b2d9a 100644 --- a/scripts/config/qconf.cc +++ b/scripts/config/qconf.cc @@ -4,34 +4,25 @@ * Copyright (C) 2015 Boris Barbulovski */ -#include - -#include -#include -#include #include +#include +#include +#include +#include #include +#include +#include +#include #include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include #include "lkc.h" #include "qconf.h" -#include "qconf.moc" #include "images.h" @@ -40,11 +31,6 @@ static ConfigSettings *configSettings; QAction *ConfigMainWindow::saveAction; -static inline QString qgettext(const char* str) -{ - return QString::fromLocal8Bit(str); -} - ConfigSettings::ConfigSettings() : QSettings("kernel.org", "qconf") { @@ -88,14 +74,13 @@ bool ConfigSettings::writeSizes(const QString& key, const QList& value) return true; } - -/* - * set the new data - * TODO check the value - */ -void ConfigItem::okRename(int col) -{ -} +QIcon ConfigItem::symbolYesIcon; +QIcon ConfigItem::symbolModIcon; +QIcon ConfigItem::symbolNoIcon; +QIcon ConfigItem::choiceYesIcon; +QIcon ConfigItem::choiceNoIcon; +QIcon ConfigItem::menuIcon; +QIcon ConfigItem::menubackIcon; /* * update the displayed of a menu entry @@ -111,14 +96,14 @@ void ConfigItem::updateMenu(void) list = listView(); if (goParent) { - setPixmap(promptColIdx, list->menuBackPix); + setIcon(promptColIdx, menubackIcon); prompt = ".."; goto set_prompt; } sym = menu->sym; prop = menu->prompt; - prompt = qgettext(menu_get_prompt(menu)); + prompt = menu_get_prompt(menu); if (prop) switch (prop->type) { case P_MENU: @@ -128,15 +113,16 @@ void ConfigItem::updateMenu(void) */ if (sym && list->rootEntry == menu) break; - setPixmap(promptColIdx, list->menuPix); + setIcon(promptColIdx, menuIcon); } else { if (sym) break; - setPixmap(promptColIdx, QIcon()); + setIcon(promptColIdx, QIcon()); } goto set_prompt; case P_COMMENT: - setPixmap(promptColIdx, QIcon()); + setIcon(promptColIdx, QIcon()); + prompt = "*** " + prompt + " ***"; goto set_prompt; default: ; @@ -144,7 +130,7 @@ void ConfigItem::updateMenu(void) if (!sym) goto set_prompt; - setText(nameColIdx, QString::fromLocal8Bit(sym->name)); + setText(nameColIdx, sym->name); type = sym_get_type(sym); switch (type) { @@ -153,57 +139,37 @@ void ConfigItem::updateMenu(void) char ch; if (!sym_is_changeable(sym) && list->optMode == normalOpt) { - setPixmap(promptColIdx, QIcon()); - setText(noColIdx, QString::null); - setText(modColIdx, QString::null); - setText(yesColIdx, QString::null); + setIcon(promptColIdx, QIcon()); break; } expr = sym_get_tristate_value(sym); switch (expr) { case yes: if (sym_is_choice_value(sym) && type == S_BOOLEAN) - setPixmap(promptColIdx, list->choiceYesPix); + setIcon(promptColIdx, choiceYesIcon); else - setPixmap(promptColIdx, list->symbolYesPix); - setText(yesColIdx, "Y"); + setIcon(promptColIdx, symbolYesIcon); ch = 'Y'; break; case mod: - setPixmap(promptColIdx, list->symbolModPix); - setText(modColIdx, "M"); + setIcon(promptColIdx, symbolModIcon); ch = 'M'; break; default: if (sym_is_choice_value(sym) && type == S_BOOLEAN) - setPixmap(promptColIdx, list->choiceNoPix); + setIcon(promptColIdx, choiceNoIcon); else - setPixmap(promptColIdx, list->symbolNoPix); - setText(noColIdx, "N"); + setIcon(promptColIdx, symbolNoIcon); ch = 'N'; break; } - if (expr != no) - setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0); - if (expr != mod) - setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0); - if (expr != yes) - setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0); setText(dataColIdx, QChar(ch)); break; case S_INT: case S_HEX: case S_STRING: - const char* data; - - data = sym_get_string_value(sym); - - setText(dataColIdx, data); - if (type == S_STRING) - prompt = QString("%1: %2").arg(prompt).arg(data); - else - prompt = QString("(%2) %1").arg(prompt).arg(data); + setText(dataColIdx, sym_get_string_value(sym)); break; } if (!sym_has_value(sym) && visible) @@ -244,6 +210,17 @@ void ConfigItem::init(void) if (list->mode != fullMode) setExpanded(true); sym_calc_value(menu->sym); + + if (menu->sym) { + enum symbol_type type = menu->sym->type; + + // Allow to edit "int", "hex", and "string" in-place in + // the data column. Unfortunately, you cannot specify + // the flags per column. Set ItemIsEditable for all + // columns here, and check the column in createEditor(). + if (type == S_INT || type == S_HEX || type == S_STRING) + setFlags(flags() | Qt::ItemIsEditable); + } } updateMenu(); } @@ -264,53 +241,67 @@ ConfigItem::~ConfigItem(void) } } -ConfigLineEdit::ConfigLineEdit(ConfigView* parent) - : Parent(parent) +QWidget *ConfigItemDelegate::createEditor(QWidget *parent, + const QStyleOptionViewItem &option, + const QModelIndex &index) const { - connect(this, SIGNAL(editingFinished()), SLOT(hide())); + ConfigItem *item; + + // Only the data column is editable + if (index.column() != dataColIdx) + return nullptr; + + // You cannot edit invisible menus + item = static_cast(index.internalPointer()); + if (!item || !item->menu || !menu_is_visible(item->menu)) + return nullptr; + + return QStyledItemDelegate::createEditor(parent, option, index); } -void ConfigLineEdit::show(ConfigItem* i) +void ConfigItemDelegate::setModelData(QWidget *editor, + QAbstractItemModel *model, + const QModelIndex &index) const { - item = i; - if (sym_get_string_value(item->menu->sym)) - setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); - else - setText(QString::null); - Parent::show(); - setFocus(); -} + QLineEdit *lineEdit; + ConfigItem *item; + struct symbol *sym; + bool success; -void ConfigLineEdit::keyPressEvent(QKeyEvent* e) -{ - switch (e->key()) { - case Qt::Key_Escape: - break; - case Qt::Key_Return: - case Qt::Key_Enter: - sym_set_string_value(item->menu->sym, text().toLatin1()); - parent()->updateList(item); - break; - default: - Parent::keyPressEvent(e); - return; + lineEdit = qobject_cast(editor); + // If this is not a QLineEdit, use the parent's default. + // (does this happen?) + if (!lineEdit) + goto parent; + + item = static_cast(index.internalPointer()); + if (!item || !item->menu) + goto parent; + + sym = item->menu->sym; + if (!sym) + goto parent; + + success = sym_set_string_value(sym, lineEdit->text().toUtf8().data()); + if (success) { + ConfigList::updateListForAll(); + } else { + QMessageBox::information(editor, "qconf", + "Cannot set the data (maybe due to out of range).\n" + "Setting the old value."); + lineEdit->setText(sym_get_string_value(sym)); } - e->accept(); - parent()->list->setFocus(); - hide(); + +parent: + QStyledItemDelegate::setModelData(editor, model, index); } -ConfigList::ConfigList(ConfigView* p, const char *name) - : Parent(p), +ConfigList::ConfigList(QWidget *parent, const char *name) + : QTreeWidget(parent), updateAll(false), - symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no), - choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), - menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void), - showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt), + showName(false), mode(singleMode), optMode(normalOpt), rootEntry(0), headerPopup(0) { - int i; - setObjectName(name); setSortingEnabled(false); setRootIsDecorated(true); @@ -318,26 +309,34 @@ ConfigList::ConfigList(ConfigView* p, const char *name) setVerticalScrollMode(ScrollPerPixel); setHorizontalScrollMode(ScrollPerPixel); - setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value"); + setHeaderLabels(QStringList() << "Option" << "Name" << "Value"); - connect(this, SIGNAL(itemSelectionChanged(void)), - SLOT(updateSelection(void))); + connect(this, &ConfigList::itemSelectionChanged, + this, &ConfigList::updateSelection); if (name) { configSettings->beginGroup(name); showName = configSettings->value("/showName", false).toBool(); - showRange = configSettings->value("/showRange", false).toBool(); - showData = configSettings->value("/showData", false).toBool(); optMode = (enum optionMode)configSettings->value("/optionMode", 0).toInt(); configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + connect(configApp, &QApplication::aboutToQuit, + this, &ConfigList::saveSettings); } - addColumn(promptColIdx); + showColumn(promptColIdx); + + setItemDelegate(new ConfigItemDelegate(this)); + + allLists.append(this); reinit(); } +ConfigList::~ConfigList() +{ + allLists.removeOne(this); +} + bool ConfigList::menuSkip(struct menu *menu) { if (optMode == normalOpt && menu_is_visible(menu)) @@ -351,21 +350,22 @@ bool ConfigList::menuSkip(struct menu *menu) void ConfigList::reinit(void) { - removeColumn(dataColIdx); - removeColumn(yesColIdx); - removeColumn(modColIdx); - removeColumn(noColIdx); - removeColumn(nameColIdx); + hideColumn(nameColIdx); if (showName) - addColumn(nameColIdx); - if (showRange) { - addColumn(noColIdx); - addColumn(modColIdx); - addColumn(yesColIdx); - } - if (showData) - addColumn(dataColIdx); + showColumn(nameColIdx); + + updateListAll(); +} + +void ConfigList::setOptionMode(QAction *action) +{ + if (action == showNormalAction) + optMode = normalOpt; + else if (action == showAllAction) + optMode = allOpt; + else + optMode = promptOpt; updateListAll(); } @@ -375,8 +375,6 @@ void ConfigList::saveSettings(void) if (!objectName().isEmpty()) { configSettings->beginGroup(objectName()); configSettings->setValue("/showName", showName); - configSettings->setValue("/showRange", showRange); - configSettings->setValue("/showData", showData); configSettings->setValue("/optionMode", (int)optMode); configSettings->endGroup(); } @@ -415,15 +413,15 @@ void ConfigList::updateSelection(void) emit menuSelected(menu); } -void ConfigList::updateList(ConfigItem* item) +void ConfigList::updateList() { ConfigItem* last = 0; + ConfigItem *item; if (!rootEntry) { if (mode != listMode) goto update; QTreeWidgetItemIterator it(this); - ConfigItem* item; while (*it) { item = (ConfigItem*)(*it); @@ -445,7 +443,7 @@ void ConfigList::updateList(ConfigItem* item) } if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) && rootEntry->sym && rootEntry->prompt) { - item = last ? last->nextSibling() : firstChild(); + item = last ? last->nextSibling() : nullptr; if (!item) item = new ConfigItem(this, last, rootEntry, true); else @@ -457,11 +455,33 @@ void ConfigList::updateList(ConfigItem* item) return; } update: - updateMenuList(this, rootEntry); + updateMenuList(rootEntry); update(); resizeColumnToContents(0); } +void ConfigList::updateListForAll() +{ + QListIterator it(allLists); + + while (it.hasNext()) { + ConfigList *list = it.next(); + + list->updateList(); + } +} + +void ConfigList::updateListAllForAll() +{ + QListIterator it(allLists); + + while (it.hasNext()) { + ConfigList *list = it.next(); + + list->updateList(); + } +} + void ConfigList::setValue(ConfigItem* item, tristate val) { struct symbol* sym; @@ -482,7 +502,7 @@ void ConfigList::setValue(ConfigItem* item, tristate val) return; if (oldval == no && item->menu->list) item->setExpanded(true); - parent()->updateList(item); + ConfigList::updateListForAll(); break; } } @@ -516,12 +536,9 @@ void ConfigList::changeValue(ConfigItem* item) item->setExpanded(true); } if (oldexpr != newexpr) - parent()->updateList(item); + ConfigList::updateListForAll(); break; - case S_INT: - case S_HEX: - case S_STRING: - parent()->lineEdit->show(item); + default: break; } } @@ -535,11 +552,11 @@ void ConfigList::setRootMenu(struct menu *menu) type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; if (type != P_MENU) return; - updateMenuList(this, 0); + updateMenuList(0); rootEntry = menu; updateListAll(); if (currentItem()) { - currentItem()->setSelected(hasFocus()); + setSelected(currentItem(), hasFocus()); scrollToItem(currentItem()); } } @@ -627,7 +644,7 @@ void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu) last = item; continue; } - hide: +hide: if (item && item->menu == child) { last = parent->firstChild(); if (last == item) @@ -639,7 +656,7 @@ void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu) } } -void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) +void ConfigList::updateMenuList(struct menu *menu) { struct menu* child; ConfigItem* item; @@ -648,19 +665,19 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) enum prop_type type; if (!menu) { - while (parent->topLevelItemCount() > 0) + while (topLevelItemCount() > 0) { - delete parent->takeTopLevelItem(0); + delete takeTopLevelItem(0); } return; } - last = (ConfigItem*)parent->topLevelItem(0); + last = (ConfigItem *)topLevelItem(0); if (last && !last->goParent) last = 0; for (child = menu->list; child; child = child->next) { - item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0); + item = last ? last->nextSibling() : (ConfigItem *)topLevelItem(0); type = child->prompt ? child->prompt->type : P_UNKNOWN; switch (mode) { @@ -681,7 +698,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) if (!child->sym && !child->list && !child->prompt) continue; if (!item || item->menu != child) - item = new ConfigItem(parent, last, child, visible); + item = new ConfigItem(this, last, child, visible); else item->testUpdateMenu(visible); @@ -692,9 +709,9 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) last = item; continue; } - hide: +hide: if (item && item->menu == child) { - last = (ConfigItem*)parent->topLevelItem(0); + last = (ConfigItem *)topLevelItem(0); if (last == item) last = 0; else while (last->nextSibling() != item) @@ -736,7 +753,10 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) type = menu->prompt ? menu->prompt->type : P_UNKNOWN; if (type == P_MENU && rootEntry != menu && mode != fullMode && mode != menuMode) { - emit menuSelected(menu); + if (mode == menuMode) + emit menuSelected(menu); + else + emit itemSelected(menu); break; } case Qt::Key_Space: @@ -782,7 +802,7 @@ void ConfigList::mouseReleaseEvent(QMouseEvent* e) idx = header()->logicalIndexAt(x); switch (idx) { case promptColIdx: - icon = item->pixmap(promptColIdx); + icon = item->icon(promptColIdx); if (!icon.isNull()) { int off = header()->sectionPosition(0) + visualRect(indexAt(p)).x() + 4; // 4 is Hardcoded image offset. There might be a way to do it properly. if (x >= off && x < off + icon.availableSizes().first().width()) { @@ -793,22 +813,14 @@ void ConfigList::mouseReleaseEvent(QMouseEvent* e) break; ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; if (ptype == P_MENU && rootEntry != menu && - mode != fullMode && mode != menuMode) + mode != fullMode && mode != menuMode && + mode != listMode) emit menuSelected(menu); else changeValue(item); } } break; - case noColIdx: - setValue(item, no); - break; - case modColIdx: - setValue(item, mod); - break; - case yesColIdx: - setValue(item, yes); - break; case dataColIdx: changeValue(item); break; @@ -828,7 +840,7 @@ void ConfigList::mouseMoveEvent(QMouseEvent* e) void ConfigList::mouseDoubleClickEvent(QMouseEvent* e) { - QPoint p = e->pos(); // TODO: Check if this works(was contentsToViewport). + QPoint p = e->pos(); ConfigItem* item = (ConfigItem*)itemAt(p); struct menu *menu; enum prop_type ptype; @@ -843,9 +855,12 @@ void ConfigList::mouseDoubleClickEvent(QMouseEvent* e) if (!menu) goto skip; ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; - if (ptype == P_MENU && (mode == singleMode || mode == symbolMode)) - emit menuSelected(menu); - else if (menu->sym) + if (ptype == P_MENU && mode != listMode) { + if (mode == singleMode) + emit itemSelected(menu); + else if (mode == symbolMode) + emit menuSelected(menu); + } else if (menu->sym) changeValue(item); skip: @@ -861,7 +876,7 @@ void ConfigList::focusInEvent(QFocusEvent *e) ConfigItem* item = (ConfigItem *)currentItem(); if (item) { - item->setSelected(true); + setSelected(item, true); menu = item->menu; } emit gotFocus(menu); @@ -869,114 +884,38 @@ void ConfigList::focusInEvent(QFocusEvent *e) void ConfigList::contextMenuEvent(QContextMenuEvent *e) { - if (e->y() <= header()->geometry().bottom()) { - if (!headerPopup) { - QAction *action; + if (!headerPopup) { + QAction *action; - headerPopup = new QMenu(this); - action = new QAction("Show Name", this); - action->setCheckable(true); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowName(bool))); - connect(parent(), SIGNAL(showNameChanged(bool)), - action, SLOT(setOn(bool))); - action->setChecked(showName); - headerPopup->addAction(action); - action = new QAction("Show Range", this); - action->setCheckable(true); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowRange(bool))); - connect(parent(), SIGNAL(showRangeChanged(bool)), - action, SLOT(setOn(bool))); - action->setChecked(showRange); - headerPopup->addAction(action); - action = new QAction("Show Data", this); - action->setCheckable(true); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowData(bool))); - connect(parent(), SIGNAL(showDataChanged(bool)), - action, SLOT(setOn(bool))); - action->setChecked(showData); - headerPopup->addAction(action); - } - headerPopup->exec(e->globalPos()); - e->accept(); - } else - e->ignore(); -} - -ConfigView*ConfigView::viewList; -QAction *ConfigView::showNormalAction; -QAction *ConfigView::showAllAction; -QAction *ConfigView::showPromptAction; - -ConfigView::ConfigView(QWidget* parent, const char *name) - : Parent(parent) -{ - setObjectName(name); - QVBoxLayout *verticalLayout = new QVBoxLayout(this); - verticalLayout->setContentsMargins(0, 0, 0, 0); - - list = new ConfigList(this); - verticalLayout->addWidget(list); - lineEdit = new ConfigLineEdit(this); - lineEdit->hide(); - verticalLayout->addWidget(lineEdit); - - this->nextView = viewList; - viewList = this; -} - -ConfigView::~ConfigView(void) -{ - ConfigView** vp; - - for (vp = &viewList; *vp; vp = &(*vp)->nextView) { - if (*vp == this) { - *vp = nextView; - break; - } + headerPopup = new QMenu(this); + action = new QAction("Show Name", this); + action->setCheckable(true); + connect(action, &QAction::toggled, + this, &ConfigList::setShowName); + connect(this, &ConfigList::showNameChanged, + action, &QAction::setChecked); + action->setChecked(showName); + headerPopup->addAction(action); } + + headerPopup->exec(e->globalPos()); + e->accept(); } -void ConfigView::setOptionMode(QAction *act) +void ConfigList::setShowName(bool on) { - if (act == showNormalAction) - list->optMode = normalOpt; - else if (act == showAllAction) - list->optMode = allOpt; - else - list->optMode = promptOpt; + if (showName == on) + return; - list->updateListAll(); + showName = on; + reinit(); + emit showNameChanged(on); } -void ConfigView::setShowName(bool b) -{ - if (list->showName != b) { - list->showName = b; - list->reinit(); - emit showNameChanged(b); - } -} - -void ConfigView::setShowRange(bool b) -{ - if (list->showRange != b) { - list->showRange = b; - list->reinit(); - emit showRangeChanged(b); - } -} - -void ConfigView::setShowData(bool b) -{ - if (list->showData != b) { - list->showData = b; - list->reinit(); - emit showDataChanged(b); - } -} +QList ConfigList::allLists; +QAction *ConfigList::showNormalAction; +QAction *ConfigList::showAllAction; +QAction *ConfigList::showPromptAction; void ConfigList::setAllOpen(bool open) { @@ -989,34 +928,31 @@ void ConfigList::setAllOpen(bool open) } } -void ConfigView::updateList(ConfigItem* item) -{ - ConfigView* v; - - for (v = viewList; v; v = v->nextView) - v->list->updateList(item); -} - -void ConfigView::updateListAll(void) -{ - ConfigView* v; - - for (v = viewList; v; v = v->nextView) - v->list->updateListAll(); -} - ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) : Parent(parent), sym(0), _menu(0) { setObjectName(name); - + setOpenLinks(false); if (!objectName().isEmpty()) { configSettings->beginGroup(objectName()); setShowDebug(configSettings->value("/showDebug", false).toBool()); configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + connect(configApp, &QApplication::aboutToQuit, + this, &ConfigInfoView::saveSettings); } + + contextMenu = createStandardContextMenu(); + QAction *action = new QAction("Show Debug Info", contextMenu); + + action->setCheckable(true); + connect(action, &QAction::toggled, + this, &ConfigInfoView::setShowDebug); + connect(this, &ConfigInfoView::showDebugChanged, + action, &QAction::setChecked); + action->setChecked(showDebug()); + contextMenu->addSeparator(); + contextMenu->addAction(action); } void ConfigInfoView::saveSettings(void) @@ -1071,108 +1007,119 @@ void ConfigInfoView::symbolInfo(void) void ConfigInfoView::menuInfo(void) { struct symbol* sym; - QString head, debug, help; + QString info; + QTextStream stream(&info); sym = _menu->sym; if (sym) { if (_menu->prompt) { - head += ""; - head += print_filter(_menu->prompt->text); - head += ""; + stream << ""; + stream << print_filter(_menu->prompt->text); + stream << ""; if (sym->name) { - head += " ("; + stream << " ("; if (showDebug()) - head += QString().sprintf("", sym); - head += print_filter(sym->name); + stream << "name << "\">"; + stream << print_filter(sym->name); if (showDebug()) - head += ""; - head += ")"; + stream << ""; + stream << ")"; } } else if (sym->name) { - head += ""; + stream << ""; if (showDebug()) - head += QString().sprintf("", sym); - head += print_filter(sym->name); + stream << "name << "\">"; + stream << print_filter(sym->name); if (showDebug()) - head += ""; - head += ""; + stream << ""; + stream << ""; } - head += "

"; + stream << "

"; if (showDebug()) - debug = debug_info(sym); + stream << debug_info(sym); struct gstr help_gstr = str_new(); + menu_get_ext_help(_menu, &help_gstr); - help = print_filter(str_get(&help_gstr)); + stream << print_filter(str_get(&help_gstr)); str_free(&help_gstr); } else if (_menu->prompt) { - head += ""; - head += print_filter(_menu->prompt->text); - head += "

"; + stream << ""; + stream << print_filter(_menu->prompt->text); + stream << "

"; if (showDebug()) { if (_menu->prompt->visible.expr) { - debug += "  dep: "; - expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE); - debug += "

"; + stream << "  dep: "; + expr_print(_menu->prompt->visible.expr, + expr_print_help, &stream, E_NONE); + stream << "

"; } + + stream << "defined at " << _menu->file->name << ":" + << _menu->lineno << "

"; } } - if (showDebug()) - debug += QString().sprintf("defined at %s:%d

", _menu->file->name, _menu->lineno); - setText(head + debug + help); + setText(info); } QString ConfigInfoView::debug_info(struct symbol *sym) { QString debug; + QTextStream stream(&debug); - debug += "type: "; - debug += print_filter(sym_type_name(sym->type)); + stream << "type: "; + stream << print_filter(sym_type_name(sym->type)); if (sym_is_choice(sym)) - debug += " (choice)"; + stream << " (choice)"; debug += "
"; if (sym->rev_dep.expr) { - debug += "reverse dep: "; - expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE); - debug += "
"; + stream << "reverse dep: "; + expr_print(sym->rev_dep.expr, expr_print_help, &stream, E_NONE); + stream << "
"; } for (struct property *prop = sym->prop; prop; prop = prop->next) { switch (prop->type) { case P_PROMPT: case P_MENU: - debug += QString().sprintf("prompt: ", prop->menu); - debug += print_filter(prop->text); - debug += "
"; + stream << "prompt: name << "\">"; + stream << print_filter(prop->text); + stream << "
"; break; case P_DEFAULT: case P_SELECT: case P_RANGE: - debug += prop_get_type_name(prop->type); - debug += ": "; - expr_print(prop->expr, expr_print_help, &debug, E_NONE); - debug += "
"; + case P_COMMENT: + case P_IMPLY: + case P_SYMBOL: + stream << prop_get_type_name(prop->type); + stream << ": "; + expr_print(prop->expr, expr_print_help, + &stream, E_NONE); + stream << "
"; break; case P_CHOICE: if (sym_is_choice(sym)) { - debug += "choice: "; - expr_print(prop->expr, expr_print_help, &debug, E_NONE); - debug += "
"; + stream << "choice: "; + expr_print(prop->expr, expr_print_help, + &stream, E_NONE); + stream << "
"; } break; default: - debug += "unknown property: "; - debug += prop_get_type_name(prop->type); - debug += "
"; + stream << "unknown property: "; + stream << prop_get_type_name(prop->type); + stream << "
"; } if (prop->visible.expr) { - debug += "    dep: "; - expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE); - debug += "
"; + stream << "    dep: "; + expr_print(prop->visible.expr, expr_print_help, + &stream, E_NONE); + stream << "
"; } } - debug += "
"; + stream << "
"; return debug; } @@ -1210,88 +1157,125 @@ QString ConfigInfoView::print_filter(const QString &str) void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str) { - QString* text = reinterpret_cast(data); - QString str2 = print_filter(str); + QTextStream *stream = reinterpret_cast(data); if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { - *text += QString().sprintf("", sym); - *text += str2; - *text += ""; - } else - *text += str2; + *stream << "name << "\">"; + *stream << print_filter(str); + *stream << ""; + } else { + *stream << print_filter(str); + } } -QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos) +void ConfigInfoView::clicked(const QUrl &url) { - QMenu* popup = Parent::createStandardContextMenu(pos); - QAction* action = new QAction("Show Debug Info", popup); - action->setCheckable(true); - connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); - connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); - action->setChecked(showDebug()); - popup->addSeparator(); - popup->addAction(action); - return popup; + QByteArray str = url.toEncoded(); + const std::size_t count = str.size(); + char *data = new char[count + 1]; + struct symbol **result; + struct menu *m = NULL; + + if (count < 1) { + delete[] data; + return; + } + + memcpy(data, str.constData(), count); + data[count] = '\0'; + + /* Seek for exact match */ + data[0] = '^'; + strcat(data, "$"); + result = sym_re_search(data); + if (!result) { + delete[] data; + return; + } + + sym = *result; + + /* Seek for the menu which holds the symbol */ + for (struct property *prop = sym->prop; prop; prop = prop->next) { + if (prop->type != P_PROMPT && prop->type != P_MENU) + continue; + m = prop->menu; + break; + } + + if (!m) { + /* Symbol is not visible as a menu */ + symbolInfo(); + emit showDebugChanged(true); + } else { + emit menuSelected(m); + } + + free(result); + delete[] data; } -void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e) +void ConfigInfoView::contextMenuEvent(QContextMenuEvent *event) { - Parent::contextMenuEvent(e); + contextMenu->popup(event->globalPos()); + event->accept(); } -ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name) +ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow *parent) : Parent(parent), result(NULL) { - setObjectName(name); + setObjectName("search"); setWindowTitle("Search Config"); QVBoxLayout* layout1 = new QVBoxLayout(this); layout1->setContentsMargins(11, 11, 11, 11); layout1->setSpacing(6); - QHBoxLayout* layout2 = new QHBoxLayout(0); + + QHBoxLayout* layout2 = new QHBoxLayout(); layout2->setContentsMargins(0, 0, 0, 0); layout2->setSpacing(6); layout2->addWidget(new QLabel("Find:", this)); editField = new QLineEdit(this); - connect(editField, SIGNAL(returnPressed()), SLOT(search())); + connect(editField, &QLineEdit::returnPressed, + this, &ConfigSearchWindow::search); layout2->addWidget(editField); searchButton = new QPushButton("Search", this); searchButton->setAutoDefault(false); - connect(searchButton, SIGNAL(clicked()), SLOT(search())); + connect(searchButton, &QPushButton::clicked, + this, &ConfigSearchWindow::search); layout2->addWidget(searchButton); layout1->addLayout(layout2); split = new QSplitter(this); split->setOrientation(Qt::Vertical); - list = new ConfigView(split, name); - list->list->mode = listMode; - info = new ConfigInfoView(split, name); - connect(list->list, SIGNAL(menuChanged(struct menu *)), - info, SLOT(setInfo(struct menu *))); - connect(list->list, SIGNAL(menuChanged(struct menu *)), - parent, SLOT(setMenuLink(struct menu *))); + list = new ConfigList(split, "search"); + list->mode = listMode; + info = new ConfigInfoView(split, "search"); + connect(list, &ConfigList::menuChanged, + info, &ConfigInfoView::setInfo); + connect(list, &ConfigList::menuChanged, + parent, &ConfigMainWindow::setMenuLink); layout1->addWidget(split); - if (name) { - QVariant x, y; - int width, height; - bool ok; + QVariant x, y; + int width, height; + bool ok; - configSettings->beginGroup(name); - width = configSettings->value("/window width", parent->width() / 2).toInt(); - height = configSettings->value("/window height", parent->height() / 2).toInt(); - resize(width, height); - x = configSettings->value("/window x"); - y = configSettings->value("/window y"); - if ((x.isValid())&&(y.isValid())) - move(x.toInt(), y.toInt()); - QList sizes = configSettings->readSizes("/split", &ok); - if (ok) - split->setSizes(sizes); - configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); - } + configSettings->beginGroup("search"); + width = configSettings->value("/window width", parent->width() / 2).toInt(); + height = configSettings->value("/window height", parent->height() / 2).toInt(); + resize(width, height); + x = configSettings->value("/window x"); + y = configSettings->value("/window y"); + if (x.isValid() && y.isValid()) + move(x.toInt(), y.toInt()); + QList sizes = configSettings->readSizes("/split", &ok); + if (ok) + split->setSizes(sizes); + configSettings->endGroup(); + connect(configApp, &QApplication::aboutToQuit, + this, &ConfigSearchWindow::saveSettings); } void ConfigSearchWindow::saveSettings(void) @@ -1314,7 +1298,7 @@ void ConfigSearchWindow::search(void) ConfigItem *lastItem = NULL; free(result); - list->list->clear(); + list->clear(); info->clear(); result = sym_re_search(editField->text().toLatin1()); @@ -1322,7 +1306,7 @@ void ConfigSearchWindow::search(void) return; for (p = result; *p; p++) { for_all_prompts((*p), prop) - lastItem = new ConfigItem(list->list, lastItem, prop->menu, + lastItem = new ConfigItem(list, lastItem, prop->menu, menu_is_visible(prop->menu)); } } @@ -1333,7 +1317,6 @@ void ConfigSearchWindow::search(void) ConfigMainWindow::ConfigMainWindow(void) : searchWindow(0) { - QMenuBar* menu; bool ok = true; QVariant x, y; int width, height; @@ -1354,97 +1337,123 @@ ConfigMainWindow::ConfigMainWindow(void) if ((x.isValid())&&(y.isValid())) move(x.toInt(), y.toInt()); - split1 = new QSplitter(this); + // set up icons + ConfigItem::symbolYesIcon = QIcon(QPixmap(xpm_symbol_yes)); + ConfigItem::symbolModIcon = QIcon(QPixmap(xpm_symbol_mod)); + ConfigItem::symbolNoIcon = QIcon(QPixmap(xpm_symbol_no)); + ConfigItem::choiceYesIcon = QIcon(QPixmap(xpm_choice_yes)); + ConfigItem::choiceNoIcon = QIcon(QPixmap(xpm_choice_no)); + ConfigItem::menuIcon = QIcon(QPixmap(xpm_menu)); + ConfigItem::menubackIcon = QIcon(QPixmap(xpm_menuback)); + + QWidget *widget = new QWidget(this); + QVBoxLayout *layout = new QVBoxLayout(widget); + setCentralWidget(widget); + + split1 = new QSplitter(widget); split1->setOrientation(Qt::Horizontal); - setCentralWidget(split1); + split1->setChildrenCollapsible(false); - menuView = new ConfigView(split1, "menu"); - menuList = menuView->list; + menuList = new ConfigList(widget, "menu"); - split2 = new QSplitter(split1); + split2 = new QSplitter(widget); + split2->setChildrenCollapsible(false); split2->setOrientation(Qt::Vertical); // create config tree - configView = new ConfigView(split2, "config"); - configList = configView->list; + configList = new ConfigList(widget, "config"); - helpText = new ConfigInfoView(split2, "help"); + helpText = new ConfigInfoView(widget, "help"); + + layout->addWidget(split2); + split2->addWidget(split1); + split1->addWidget(configList); + split1->addWidget(menuList); + split2->addWidget(helpText); setTabOrder(configList, helpText); configList->setFocus(); - menu = menuBar(); - toolBar = new QToolBar("Tools", this); - addToolBar(toolBar); - backAction = new QAction(QPixmap(xpm_back), "Back", this); - connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); - backAction->setEnabled(false); + connect(backAction, &QAction::triggered, + this, &ConfigMainWindow::goBack); + QAction *quitAction = new QAction("&Quit", this); quitAction->setShortcut(Qt::CTRL + Qt::Key_Q); - connect(quitAction, SIGNAL(triggered(bool)), SLOT(close())); + connect(quitAction, &QAction::triggered, + this, &ConfigMainWindow::close); + QAction *loadAction = new QAction(QPixmap(xpm_load), "&Load", this); loadAction->setShortcut(Qt::CTRL + Qt::Key_L); - connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig())); + connect(loadAction, &QAction::triggered, + this, &ConfigMainWindow::loadConfig); + saveAction = new QAction(QPixmap(xpm_save), "&Save", this); saveAction->setShortcut(Qt::CTRL + Qt::Key_S); - connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig())); + connect(saveAction, &QAction::triggered, + this, &ConfigMainWindow::saveConfig); + conf_set_changed_callback(conf_changed); + // Set saveAction's initial state conf_changed(); configname = xstrdup(conf_get_configname()); QAction *saveAsAction = new QAction("Save &As...", this); - connect(saveAsAction, SIGNAL(triggered(bool)), SLOT(saveConfigAs())); + connect(saveAsAction, &QAction::triggered, + this, &ConfigMainWindow::saveConfigAs); QAction *searchAction = new QAction("&Find", this); searchAction->setShortcut(Qt::CTRL + Qt::Key_F); - connect(searchAction, SIGNAL(triggered(bool)), SLOT(searchConfig())); + connect(searchAction, &QAction::triggered, + this, &ConfigMainWindow::searchConfig); singleViewAction = new QAction(QPixmap(xpm_single_view), "Single View", this); singleViewAction->setCheckable(true); - connect(singleViewAction, SIGNAL(triggered(bool)), SLOT(showSingleView())); + connect(singleViewAction, &QAction::triggered, + this, &ConfigMainWindow::showSingleView); splitViewAction = new QAction(QPixmap(xpm_split_view), "Split View", this); splitViewAction->setCheckable(true); - connect(splitViewAction, SIGNAL(triggered(bool)), SLOT(showSplitView())); + connect(splitViewAction, &QAction::triggered, + this, &ConfigMainWindow::showSplitView); fullViewAction = new QAction(QPixmap(xpm_tree_view), "Full View", this); fullViewAction->setCheckable(true); - connect(fullViewAction, SIGNAL(triggered(bool)), SLOT(showFullView())); + connect(fullViewAction, &QAction::triggered, + this, &ConfigMainWindow::showFullView); QAction *showNameAction = new QAction("Show Name", this); showNameAction->setCheckable(true); - connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool))); - showNameAction->setChecked(configView->showName()); - QAction *showRangeAction = new QAction("Show Range", this); - showRangeAction->setCheckable(true); - connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool))); - QAction *showDataAction = new QAction("Show Data", this); - showDataAction->setCheckable(true); - connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool))); + connect(showNameAction, &QAction::toggled, + configList, &ConfigList::setShowName); + showNameAction->setChecked(configList->showName); QActionGroup *optGroup = new QActionGroup(this); optGroup->setExclusive(true); - connect(optGroup, SIGNAL(triggered(QAction*)), configView, - SLOT(setOptionMode(QAction *))); - connect(optGroup, SIGNAL(triggered(QAction *)), menuView, - SLOT(setOptionMode(QAction *))); + connect(optGroup, &QActionGroup::triggered, + configList, &ConfigList::setOptionMode); + connect(optGroup, &QActionGroup::triggered, + menuList, &ConfigList::setOptionMode); - configView->showNormalAction = new QAction("Show Normal Options", optGroup); - configView->showAllAction = new QAction("Show All Options", optGroup); - configView->showPromptAction = new QAction("Show Prompt Options", optGroup); - configView->showNormalAction->setCheckable(true); - configView->showAllAction->setCheckable(true); - configView->showPromptAction->setCheckable(true); + ConfigList::showNormalAction = new QAction("Show Normal Options", optGroup); + ConfigList::showNormalAction->setCheckable(true); + ConfigList::showAllAction = new QAction("Show All Options", optGroup); + ConfigList::showAllAction->setCheckable(true); + ConfigList::showPromptAction = new QAction("Show Prompt Options", optGroup); + ConfigList::showPromptAction->setCheckable(true); QAction *showDebugAction = new QAction("Show Debug Info", this); showDebugAction->setCheckable(true); - connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool))); + connect(showDebugAction, &QAction::toggled, + helpText, &ConfigInfoView::setShowDebug); showDebugAction->setChecked(helpText->showDebug()); QAction *showIntroAction = new QAction("Introduction", this); - connect(showIntroAction, SIGNAL(triggered(bool)), SLOT(showIntro())); + connect(showIntroAction, &QAction::triggered, + this, &ConfigMainWindow::showIntro); QAction *showAboutAction = new QAction("About", this); - connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout())); + connect(showAboutAction, &QAction::triggered, + this, &ConfigMainWindow::showAbout); // init tool bar + QToolBar *toolBar = addToolBar("Tools"); toolBar->addAction(backAction); toolBar->addSeparator(); toolBar->addAction(loadAction); @@ -1454,53 +1463,55 @@ ConfigMainWindow::ConfigMainWindow(void) toolBar->addAction(splitViewAction); toolBar->addAction(fullViewAction); - // create config menu - QMenu* config = menu->addMenu("&File"); - config->addAction(loadAction); - config->addAction(saveAction); - config->addAction(saveAsAction); - config->addSeparator(); - config->addAction(quitAction); + // create file menu + QMenu *menu = menuBar()->addMenu("&File"); + menu->addAction(loadAction); + menu->addAction(saveAction); + menu->addAction(saveAsAction); + menu->addSeparator(); + menu->addAction(quitAction); // create edit menu - QMenu* editMenu = menu->addMenu("&Edit"); - editMenu->addAction(searchAction); + menu = menuBar()->addMenu("&Edit"); + menu->addAction(searchAction); // create options menu - QMenu* optionMenu = menu->addMenu("&Option"); - optionMenu->addAction(showNameAction); - optionMenu->addAction(showRangeAction); - optionMenu->addAction(showDataAction); - optionMenu->addSeparator(); - optionMenu->addActions(optGroup->actions()); - optionMenu->addSeparator(); - optionMenu->addAction(showDebugAction); + menu = menuBar()->addMenu("&Option"); + menu->addAction(showNameAction); + menu->addSeparator(); + menu->addActions(optGroup->actions()); + menu->addSeparator(); + menu->addAction(showDebugAction); // create help menu - menu->addSeparator(); - QMenu* helpMenu = menu->addMenu("&Help"); - helpMenu->addAction(showIntroAction); - helpMenu->addAction(showAboutAction); + menu = menuBar()->addMenu("&Help"); + menu->addAction(showIntroAction); + menu->addAction(showAboutAction); - connect(configList, SIGNAL(menuChanged(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(configList, SIGNAL(menuSelected(struct menu *)), - SLOT(changeMenu(struct menu *))); - connect(configList, SIGNAL(parentSelected()), - SLOT(goBack())); - connect(menuList, SIGNAL(menuChanged(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(menuList, SIGNAL(menuSelected(struct menu *)), - SLOT(changeMenu(struct menu *))); + connect(helpText, &ConfigInfoView::anchorClicked, + helpText, &ConfigInfoView::clicked); - connect(configList, SIGNAL(gotFocus(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(menuList, SIGNAL(gotFocus(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(menuList, SIGNAL(gotFocus(struct menu *)), - SLOT(listFocusChanged(void))); - connect(helpText, SIGNAL(menuSelected(struct menu *)), - SLOT(setMenuLink(struct menu *))); + connect(configList, &ConfigList::menuChanged, + helpText, &ConfigInfoView::setInfo); + connect(configList, &ConfigList::menuSelected, + this, &ConfigMainWindow::changeMenu); + connect(configList, &ConfigList::itemSelected, + this, &ConfigMainWindow::changeItens); + connect(configList, &ConfigList::parentSelected, + this, &ConfigMainWindow::goBack); + connect(menuList, &ConfigList::menuChanged, + helpText, &ConfigInfoView::setInfo); + connect(menuList, &ConfigList::menuSelected, + this, &ConfigMainWindow::changeMenu); + + connect(configList, &ConfigList::gotFocus, + helpText, &ConfigInfoView::setInfo); + connect(menuList, &ConfigList::gotFocus, + helpText, &ConfigInfoView::setInfo); + connect(menuList, &ConfigList::gotFocus, + this, &ConfigMainWindow::listFocusChanged); + connect(helpText, &ConfigInfoView::menuSelected, + this, &ConfigMainWindow::setMenuLink); QString listMode = configSettings->value("/listMode", "symbol").toString(); if (listMode == "single") @@ -1539,7 +1550,7 @@ void ConfigMainWindow::loadConfig(void) free(configname); configname = xstrdup(name); - ConfigView::updateListAll(); + ConfigList::updateListAllForAll(); } bool ConfigMainWindow::saveConfig(void) @@ -1578,17 +1589,18 @@ void ConfigMainWindow::saveConfigAs(void) void ConfigMainWindow::searchConfig(void) { if (!searchWindow) - searchWindow = new ConfigSearchWindow(this, "search"); + searchWindow = new ConfigSearchWindow(this); searchWindow->show(); } +void ConfigMainWindow::changeItens(struct menu *menu) +{ + configList->setRootMenu(menu); +} + void ConfigMainWindow::changeMenu(struct menu *menu) { - configList->setRootMenu(menu); - if (configList->rootEntry->parent == &rootmenu) - backAction->setEnabled(false); - else - backAction->setEnabled(true); + menuList->setRootMenu(menu); } void ConfigMainWindow::setMenuLink(struct menu *menu) @@ -1608,22 +1620,26 @@ void ConfigMainWindow::setMenuLink(struct menu *menu) return; list->setRootMenu(parent); break; - case symbolMode: + case menuMode: if (menu->flags & MENU_ROOT) { - configList->setRootMenu(menu); + menuList->setRootMenu(menu); configList->clearSelection(); - list = menuList; - } else { list = configList; + } else { parent = menu_get_parent_menu(menu->parent); if (!parent) return; - item = menuList->findConfigItem(parent); + + /* Select the config view */ + item = configList->findConfigItem(parent); if (item) { - item->setSelected(true); - menuList->scrollToItem(item); + configList->setSelected(item, true); + configList->scrollToItem(item); } - list->setRootMenu(parent); + + menuList->setRootMenu(parent); + menuList->clearSelection(); + list = menuList; } break; case fullMode: @@ -1636,9 +1652,10 @@ void ConfigMainWindow::setMenuLink(struct menu *menu) if (list) { item = list->findConfigItem(menu); if (item) { - item->setSelected(true); + list->setSelected(item, true); list->scrollToItem(item); list->setFocus(); + helpText->setInfo(menu); } } } @@ -1651,25 +1668,10 @@ void ConfigMainWindow::listFocusChanged(void) void ConfigMainWindow::goBack(void) { - ConfigItem* item, *oldSelection; - - configList->setParentMenu(); if (configList->rootEntry == &rootmenu) - backAction->setEnabled(false); - - if (menuList->selectedItems().count() == 0) return; - item = (ConfigItem*)menuList->selectedItems().first(); - oldSelection = item; - while (item) { - if (item->menu == configList->rootEntry) { - oldSelection->setSelected(false); - item->setSelected(true); - break; - } - item = (ConfigItem*)item->parent(); - } + configList->setParentMenu(); } void ConfigMainWindow::showSingleView(void) @@ -1681,7 +1683,9 @@ void ConfigMainWindow::showSingleView(void) fullViewAction->setEnabled(true); fullViewAction->setChecked(false); - menuView->hide(); + backAction->setEnabled(true); + + menuList->hide(); menuList->setRootMenu(0); configList->mode = singleMode; if (configList->rootEntry == &rootmenu) @@ -1700,17 +1704,19 @@ void ConfigMainWindow::showSplitView(void) fullViewAction->setEnabled(true); fullViewAction->setChecked(false); - configList->mode = symbolMode; + backAction->setEnabled(false); + + configList->mode = menuMode; if (configList->rootEntry == &rootmenu) configList->updateListAll(); else configList->setRootMenu(&rootmenu); configList->setAllOpen(true); configApp->processEvents(); - menuList->mode = menuMode; + menuList->mode = symbolMode; menuList->setRootMenu(&rootmenu); menuList->setAllOpen(true); - menuView->show(); + menuList->show(); menuList->setFocus(); } @@ -1723,7 +1729,9 @@ void ConfigMainWindow::showFullView(void) fullViewAction->setEnabled(false); fullViewAction->setChecked(true); - menuView->hide(); + backAction->setEnabled(false); + + menuList->hide(); menuList->setRootMenu(0); configList->mode = fullMode; if (configList->rootEntry == &rootmenu) @@ -1735,7 +1743,6 @@ void ConfigMainWindow::showFullView(void) /* * ask for saving configuration before quitting - * TODO ask only when something changed */ void ConfigMainWindow::closeEvent(QCloseEvent* e) { @@ -1766,17 +1773,26 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) void ConfigMainWindow::showIntro(void) { - static const QString str = "Welcome to the qconf graphical configuration tool.\n\n" - "For each option, a blank box indicates the feature is disabled, a check\n" - "indicates it is enabled, and a dot indicates that it is to be compiled\n" - "as a module. Clicking on the box will cycle through the three states.\n\n" - "If you do not see an option (e.g., a device driver) that you believe\n" - "should be present, try turning on Show All Options under the Options menu.\n" - "Although there is no cross reference yet to help you figure out what other\n" - "options must be enabled to support the option you are interested in, you can\n" - "still view the help of a grayed-out option.\n\n" - "Toggling Show Debug Info under the Options menu will show the dependencies,\n" - "which you can then match by examining other options.\n\n"; + static const QString str = + "Welcome to the qconf graphical configuration tool.\n" + "\n" + "For bool and tristate options, a blank box indicates the " + "feature is disabled, a check indicates it is enabled, and a " + "dot indicates that it is to be compiled as a module. Clicking " + "on the box will cycle through the three states. For int, hex, " + "and string options, double-clicking or pressing F2 on the " + "Value cell will allow you to edit the value.\n" + "\n" + "If you do not see an option (e.g., a device driver) that you " + "believe should be present, try turning on Show All Options " + "under the Options menu. Enabling Show Debug Info will help you" + "figure out what other options must be enabled to support the " + "option you are interested in, and hyperlinks will navigate to " + "them.\n" + "\n" + "Toggling Show Debug Info under the Options menu will show the " + "dependencies, which you can then match by examining other " + "options.\n"; QMessageBox::information(this, "qconf", str); } @@ -1784,10 +1800,13 @@ void ConfigMainWindow::showIntro(void) void ConfigMainWindow::showAbout(void) { static const QString str = "qconf is Copyright (C) 2002 Roman Zippel .\n" - "Copyright (C) 2015 Boris Barbulovski .\n\n" - "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n"; + "Copyright (C) 2015 Boris Barbulovski .\n" + "\n" + "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n" + "\n" + "Qt Version: "; - QMessageBox::information(this, "qconf", str); + QMessageBox::information(this, "qconf", str + qVersion()); } void ConfigMainWindow::saveSettings(void) @@ -1856,7 +1875,6 @@ int main(int ac, char** av) const char *name; progname = av[0]; - configApp = new QApplication(ac, av); if (ac > 1 && av[1][0] == '-') { switch (av[1][1]) { case 's': @@ -1877,6 +1895,8 @@ int main(int ac, char** av) conf_read(NULL); //zconfdump(stdout); + configApp = new QApplication(ac, av); + configSettings = new ConfigSettings(); configSettings->beginGroup("/kconfig/qconf"); v = new ConfigMainWindow(); diff --git a/scripts/config/qconf.h b/scripts/config/qconf.h index 45bfe9b2b9..78b0a1dfcd 100644 --- a/scripts/config/qconf.h +++ b/scripts/config/qconf.h @@ -3,23 +3,22 @@ * Copyright (C) 2002 Roman Zippel */ -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "expr.h" -class ConfigView; class ConfigList; class ConfigItem; -class ConfigLineEdit; class ConfigMainWindow; class ConfigSettings : public QSettings { @@ -30,7 +29,7 @@ public: }; enum colIdx { - promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr + promptColIdx, nameColIdx, dataColIdx }; enum listMode { singleMode, menuMode, symbolMode, fullMode, listMode @@ -43,13 +42,16 @@ class ConfigList : public QTreeWidget { Q_OBJECT typedef class QTreeWidget Parent; public: - ConfigList(ConfigView* p, const char *name = 0); + ConfigList(QWidget *parent, const char *name = 0); + ~ConfigList(); void reinit(void); - ConfigView* parent(void) const - { - return (ConfigView*)Parent::parent(); - } ConfigItem* findConfigItem(struct menu *); + void setSelected(QTreeWidgetItem *item, bool enable) { + for (int i = 0; i < selectedItems().size(); i++) + selectedItems().at(i)->setSelected(false); + + item->setSelected(enable); + } protected: void keyPressEvent(QKeyEvent *e); @@ -63,61 +65,52 @@ protected: public slots: void setRootMenu(struct menu *menu); - void updateList(ConfigItem *item); + void updateList(); void setValue(ConfigItem* item, tristate val); void changeValue(ConfigItem* item); void updateSelection(void); void saveSettings(void); + void setOptionMode(QAction *action); + void setShowName(bool on); + signals: void menuChanged(struct menu *menu); void menuSelected(struct menu *menu); + void itemSelected(struct menu *menu); void parentSelected(void); void gotFocus(struct menu *); + void showNameChanged(bool on); public: void updateListAll(void) { updateAll = true; - updateList(NULL); + updateList(); updateAll = false; } - ConfigList* listView() - { - return this; - } - ConfigItem* firstChild() const - { - return (ConfigItem *)children().first(); - } - void addColumn(colIdx idx) - { - showColumn(idx); - } - void removeColumn(colIdx idx) - { - hideColumn(idx); - } void setAllOpen(bool open); void setParentMenu(void); bool menuSkip(struct menu *); void updateMenuList(ConfigItem *parent, struct menu*); - void updateMenuList(ConfigList *parent, struct menu*); + void updateMenuList(struct menu *menu); bool updateAll; - QPixmap symbolYesPix, symbolModPix, symbolNoPix; - QPixmap choiceYesPix, choiceNoPix; - QPixmap menuPix, menuInvPix, menuBackPix, voidPix; - - bool showName, showRange, showData; + bool showName; enum listMode mode; enum optionMode optMode; struct menu *rootEntry; QPalette disabledColorGroup; QPalette inactivedColorGroup; QMenu* headerPopup; + + static QList allLists; + static void updateListForAll(); + static void updateListAllForAll(); + + static QAction *showNormalAction, *showAllAction, *showPromptAction; }; class ConfigItem : public QTreeWidgetItem { @@ -140,7 +133,6 @@ public: } ~ConfigItem(void); void init(void); - void okRename(int col); void updateMenu(void); void testUpdateMenu(bool v); ConfigList* listView() const @@ -165,82 +157,36 @@ public: return ret; } - void setText(colIdx idx, const QString& text) - { - Parent::setText(idx, text); - } - QString text(colIdx idx) const - { - return Parent::text(idx); - } - void setPixmap(colIdx idx, const QIcon &icon) - { - Parent::setIcon(idx, icon); - } - const QIcon pixmap(colIdx idx) const - { - return icon(idx); - } // TODO: Implement paintCell ConfigItem* nextItem; struct menu *menu; bool visible; bool goParent; + + static QIcon symbolYesIcon, symbolModIcon, symbolNoIcon; + static QIcon choiceYesIcon, choiceNoIcon; + static QIcon menuIcon, menubackIcon; }; -class ConfigLineEdit : public QLineEdit { - Q_OBJECT - typedef class QLineEdit Parent; +class ConfigItemDelegate : public QStyledItemDelegate +{ +private: + struct menu *menu; public: - ConfigLineEdit(ConfigView* parent); - ConfigView* parent(void) const - { - return (ConfigView*)Parent::parent(); - } - void show(ConfigItem *i); - void keyPressEvent(QKeyEvent *e); - -public: - ConfigItem *item; -}; - -class ConfigView : public QWidget { - Q_OBJECT - typedef class QWidget Parent; -public: - ConfigView(QWidget* parent, const char *name = 0); - ~ConfigView(void); - static void updateList(ConfigItem* item); - static void updateListAll(void); - - bool showName(void) const { return list->showName; } - bool showRange(void) const { return list->showRange; } - bool showData(void) const { return list->showData; } -public slots: - void setShowName(bool); - void setShowRange(bool); - void setShowData(bool); - void setOptionMode(QAction *); -signals: - void showNameChanged(bool); - void showRangeChanged(bool); - void showDataChanged(bool); -public: - ConfigList* list; - ConfigLineEdit* lineEdit; - - static ConfigView* viewList; - ConfigView* nextView; - - static QAction *showNormalAction; - static QAction *showAllAction; - static QAction *showPromptAction; + ConfigItemDelegate(QObject *parent = nullptr) + : QStyledItemDelegate(parent) {} + QWidget *createEditor(QWidget *parent, + const QStyleOptionViewItem &option, + const QModelIndex &index) const override; + void setModelData(QWidget *editor, QAbstractItemModel *model, + const QModelIndex &index) const override; }; class ConfigInfoView : public QTextBrowser { Q_OBJECT typedef class QTextBrowser Parent; + QMenu *contextMenu; public: ConfigInfoView(QWidget* parent, const char *name = 0); bool showDebug(void) const { return _showDebug; } @@ -249,6 +195,7 @@ public slots: void setInfo(struct menu *menu); void saveSettings(void); void setShowDebug(bool); + void clicked (const QUrl &url); signals: void showDebugChanged(bool); @@ -260,8 +207,7 @@ protected: QString debug_info(struct symbol *sym); static QString print_filter(const QString &str); static void expr_print_help(void *data, struct symbol *sym, const char *str); - QMenu *createStandardContextMenu(const QPoint & pos); - void contextMenuEvent(QContextMenuEvent *e); + void contextMenuEvent(QContextMenuEvent *event); struct symbol *sym; struct menu *_menu; @@ -272,7 +218,7 @@ class ConfigSearchWindow : public QDialog { Q_OBJECT typedef class QDialog Parent; public: - ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0); + ConfigSearchWindow(ConfigMainWindow *parent); public slots: void saveSettings(void); @@ -282,7 +228,7 @@ protected: QLineEdit* editField; QPushButton* searchButton; QSplitter* split; - ConfigView* list; + ConfigList *list; ConfigInfoView* info; struct symbol **result; @@ -298,6 +244,7 @@ public: ConfigMainWindow(void); public slots: void changeMenu(struct menu *); + void changeItens(struct menu *); void setMenuLink(struct menu *); void listFocusChanged(void); void goBack(void); @@ -316,12 +263,9 @@ protected: void closeEvent(QCloseEvent *e); ConfigSearchWindow *searchWindow; - ConfigView *menuView; ConfigList *menuList; - ConfigView *configView; ConfigList *configList; ConfigInfoView *helpText; - QToolBar *toolBar; QAction *backAction; QAction *singleViewAction; QAction *splitViewAction; diff --git a/scripts/config/symbol.c b/scripts/config/symbol.c index 2406a74ec3..1d12a0362b 100644 --- a/scripts/config/symbol.c +++ b/scripts/config/symbol.c @@ -3,11 +3,11 @@ * Copyright (C) 2002 Roman Zippel */ +#include #include #include #include #include -#include #include "lkc.h" @@ -15,23 +15,28 @@ struct symbol symbol_yes = { .name = "y", .curr = { "y", yes }, .flags = SYMBOL_CONST|SYMBOL_VALID, -}, symbol_mod = { +}; + +struct symbol symbol_mod = { .name = "m", .curr = { "m", mod }, .flags = SYMBOL_CONST|SYMBOL_VALID, -}, symbol_no = { +}; + +struct symbol symbol_no = { .name = "n", .curr = { "n", no }, .flags = SYMBOL_CONST|SYMBOL_VALID, -}, symbol_empty = { +}; + +static struct symbol symbol_empty = { .name = "", .curr = { "", no }, .flags = SYMBOL_VALID, }; -struct symbol *sym_defconfig_list; struct symbol *modules_sym; -tristate modules_val; +static tristate modules_val; int recursive_is_error; enum symbol_type sym_get_type(struct symbol *sym) @@ -222,7 +227,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; @@ -373,6 +378,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: @@ -381,8 +388,7 @@ void sym_calc_value(struct symbol *sym) else 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: @@ -446,7 +452,7 @@ void sym_clear_all_valid(void) for_all_symbols(i, sym) sym->flags &= ~SYMBOL_VALID; - sym_add_change_count(1); + conf_set_changed(true); sym_calc_value(modules_sym); } @@ -464,8 +470,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; @@ -812,7 +816,7 @@ struct symbol *sym_lookup(const char *name, int flags) memset(symbol, 0, sizeof(*symbol)); symbol->name = new_name; symbol->type = S_UNKNOWN; - symbol->flags |= flags; + symbol->flags = flags; symbol->next = symbol_hash[hash]; symbol_hash[hash] = symbol; diff --git a/target/sdk/files/Config.in b/target/sdk/files/Config.in index f687992497..aab6352118 100644 --- a/target/sdk/files/Config.in +++ b/target/sdk/files/Config.in @@ -130,7 +130,7 @@ config IN_SDK config MODULES bool default y - option modules + modules source "Config-build.in" source "tmp/.config-package.in" From 1be742a1db0c7080b2994e0209bfc3a0f2ebef67 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Sun, 20 Feb 2022 21:09:28 -0300 Subject: [PATCH 36/42] openssl: config engines in /etc/ssl/engines.cnf.d This changes the configuration of engines from the global openssl.cnf to files in the /etc/ssl/engines.cnf.d directory. The engines.cnf file has the list of enabled engines, while each engine has its own configuration file installed under /etc/ssl/engines.cnf.d. Patches were refreshed with --zero-commit. Signed-off-by: Eneas U de Queiroz --- package/libs/openssl/Makefile | 28 +++-- package/libs/openssl/files/afalg.cnf | 3 + package/libs/openssl/files/devcrypto.cnf | 31 ++++++ package/libs/openssl/files/engines.cnf | 7 ++ package/libs/openssl/files/padlock.cnf | 3 + .../patches/100-Configure-afalg-support.patch | 3 +- .../openssl/patches/110-openwrt_targets.patch | 3 +- .../120-strip-cflags-from-binary.patch | 3 +- .../patches/130-dont-build-tests-fuzz.patch | 3 +- .../patches/140-allow-prefer-chacha20.patch | 4 +- .../150-openssl.cnf-add-engines-conf.patch | 101 +++--------------- ...o-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch | 3 +- ...ypto-add-command-to-dump-driver-info.patch | 3 +- ...o-make-the-dev-crypto-engine-dynamic.patch | 4 - ...default-to-not-use-digests-in-engine.patch | 1 - ...to-ignore-error-when-closing-session.patch | 1 - 16 files changed, 82 insertions(+), 119 deletions(-) create mode 100644 package/libs/openssl/files/afalg.cnf create mode 100644 package/libs/openssl/files/devcrypto.cnf create mode 100644 package/libs/openssl/files/engines.cnf create mode 100644 package/libs/openssl/files/padlock.cnf diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 9a8b03d5fd..d8b77e7724 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -148,7 +148,7 @@ endef define Package/libopenssl-afalg/description This package adds an engine that enables hardware acceleration through the AF_ALG kernel interface. -To use it, you need to configure the engine in /etc/ssl/openssl.cnf +To use it, you need to enable the engine in /etc/ssl/engines.cnf.d/engines.cnf. See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators The engine_id is "afalg" @@ -165,7 +165,8 @@ endef define Package/libopenssl-devcrypto/description This package adds an engine that enables hardware acceleration through the /dev/crypto kernel interface. -To use it, you need to configure the engine in /etc/ssl/openssl.cnf +To use it, you need to enable the engine in /etc/ssl/engines.cnf.d/engines.cnf. You may +configure the engine by editing /etc/ssl/engines.cnf.d/devcrypto.cnf. See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators The engine_id is "devcrypto" @@ -181,7 +182,7 @@ endef define Package/libopenssl-padlock/description This package adds an engine that enables VIA Padlock hardware acceleration. -To use it, you need to configure it in /etc/ssl/openssl.cnf. +To use it, you need to enable the engine in /etc/ssl/engines.cnf.d/engines.cnf. See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators The engine_id is "padlock" @@ -378,8 +379,9 @@ define Package/libopenssl/install endef define Package/libopenssl-conf/install - $(INSTALL_DIR) $(1)/etc/ssl + $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d $(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(1)/etc/ssl/ + $(CP) ./files/engines.cnf $(1)/etc/ssl/engines.cnf.d/ endef define Package/openssl-util/install @@ -388,18 +390,24 @@ define Package/openssl-util/install endef define Package/libopenssl-afalg/install - $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/afalg.so $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d \ + $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/afalg.so $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_DATA) ./files/afalg.cnf $(1)/etc/ssl/engines.cnf.d/ endef define Package/libopenssl-devcrypto/install - $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/devcrypto.so $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d \ + $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/devcrypto.so $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_DATA) ./files/devcrypto.cnf $(1)/etc/ssl/engines.cnf.d/ endef define Package/libopenssl-padlock/install - $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/*padlock.so $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d \ + $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/*padlock.so $(1)/usr/lib/$(ENGINES_DIR) + $(INSTALL_DATA) ./files/padlock.cnf $(1)/etc/ssl/engines.cnf.d/ endef $(eval $(call BuildPackage,libopenssl)) diff --git a/package/libs/openssl/files/afalg.cnf b/package/libs/openssl/files/afalg.cnf new file mode 100644 index 0000000000..4f573d757c --- /dev/null +++ b/package/libs/openssl/files/afalg.cnf @@ -0,0 +1,3 @@ +[afalg] +default_algorithms = ALL + diff --git a/package/libs/openssl/files/devcrypto.cnf b/package/libs/openssl/files/devcrypto.cnf new file mode 100644 index 0000000000..549275600d --- /dev/null +++ b/package/libs/openssl/files/devcrypto.cnf @@ -0,0 +1,31 @@ +[devcrypto] +# Leave this alone and configure algorithms with CIPERS/DIGESTS below +default_algorithms = ALL + +# Configuration commands: +# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a +# list of supported algorithms, along with their driver, whether they +# are hw accelerated or not, and the engine's configuration commands. + +# USE_SOFTDRIVERS: specifies whether to use software (not accelerated) +# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use +# if acceleration can't be determined) [default=2] +#USE_SOFTDRIVERS = 2 + +# CIPHERS: either ALL, NONE, or a comma-separated list of ciphers to +# enable [default=ALL] +# It is recommended to disable the ECB ciphers; in most cases, it will +# only be used for PRNG, in small blocks, where performance is poor, +# and there may be problems with apps forking with open crypto +# contexts, leading to failures. The CBC ciphers work well: +#CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC + +# DIGESTS: either ALL, NONE, or a comma-separated list of digests to +# enable [default=NONE] +# It is strongly recommended not to enable digests; their performance +# is poor, and there are many cases in which they will not work, +# especially when calling fork with open crypto contexts. Openssh, +# for example, does this, and you may not be able to login. +#DIGESTS = NONE + + diff --git a/package/libs/openssl/files/engines.cnf b/package/libs/openssl/files/engines.cnf new file mode 100644 index 0000000000..d034ab5a30 --- /dev/null +++ b/package/libs/openssl/files/engines.cnf @@ -0,0 +1,7 @@ +[engines] +# To enable an engine, install the package, and uncomment it here: +#devcrypto=devcrypto +#afalg=afalg +#padlock=padlock +#gost=gost + diff --git a/package/libs/openssl/files/padlock.cnf b/package/libs/openssl/files/padlock.cnf new file mode 100644 index 0000000000..ef91079e5d --- /dev/null +++ b/package/libs/openssl/files/padlock.cnf @@ -0,0 +1,3 @@ +[padlock] +default_algorithms = ALL + diff --git a/package/libs/openssl/patches/100-Configure-afalg-support.patch b/package/libs/openssl/patches/100-Configure-afalg-support.patch index d8789f4b45..3125e37a94 100644 --- a/package/libs/openssl/patches/100-Configure-afalg-support.patch +++ b/package/libs/openssl/patches/100-Configure-afalg-support.patch @@ -1,4 +1,4 @@ -From 559fbff13af9ce2fbc0b9bc5727a7323e1db6217 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 27 Sep 2018 08:29:21 -0300 Subject: Do not use host kernel version to disable AFALG @@ -9,7 +9,6 @@ version to disable building the AFALG engine on openwrt targets. Signed-off-by: Eneas U de Queiroz diff --git a/Configure b/Configure -index 5a699836f3..74d057c219 100755 --- a/Configure +++ b/Configure @@ -1548,7 +1548,9 @@ unless ($disabled{"crypto-mdebug-backtrace"}) diff --git a/package/libs/openssl/patches/110-openwrt_targets.patch b/package/libs/openssl/patches/110-openwrt_targets.patch index d0530b4661..1022f27c62 100644 --- a/package/libs/openssl/patches/110-openwrt_targets.patch +++ b/package/libs/openssl/patches/110-openwrt_targets.patch @@ -1,4 +1,4 @@ -From 3d43acc6068f00dbfc0c9a06355e2c8f7d302d0f Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 27 Sep 2018 08:30:24 -0300 Subject: Add openwrt targets @@ -9,7 +9,6 @@ Signed-off-by: Eneas U de Queiroz diff --git a/Configurations/25-openwrt.conf b/Configurations/25-openwrt.conf new file mode 100644 -index 0000000000..86a86d31e4 --- /dev/null +++ b/Configurations/25-openwrt.conf @@ -0,0 +1,48 @@ diff --git a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch index 7faec9ab88..20fe21f2ac 100644 --- a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch +++ b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch @@ -1,4 +1,4 @@ -From 4ad8f2fe6bf3b91df7904fcbe960e5fdfca36336 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 27 Sep 2018 08:31:38 -0300 Subject: Avoid exposing build directories @@ -9,7 +9,6 @@ OpenSSL_version(OPENSSL_CFLAGS), or running openssl version -a Signed-off-by: Eneas U de Queiroz diff --git a/crypto/build.info b/crypto/build.info -index 2c619c62e8..893128345a 100644 --- a/crypto/build.info +++ b/crypto/build.info @@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \ diff --git a/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch b/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch index 7f33cb9dae..4707554d2d 100644 --- a/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch +++ b/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch @@ -1,4 +1,4 @@ -From ba2fe646f2d9104a18b066e43582154049e9ffcb Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 27 Sep 2018 08:34:38 -0300 Subject: Do not build tests and fuzz directories @@ -8,7 +8,6 @@ This shortens build time. Signed-off-by: Eneas U de Queiroz diff --git a/Configure b/Configure -index 74d057c219..5813e9f8fe 100755 --- a/Configure +++ b/Configure @@ -318,7 +318,7 @@ my $auto_threads=1; # enable threads automatically? true by default diff --git a/package/libs/openssl/patches/140-allow-prefer-chacha20.patch b/package/libs/openssl/patches/140-allow-prefer-chacha20.patch index b293db28f7..b2418006a9 100644 --- a/package/libs/openssl/patches/140-allow-prefer-chacha20.patch +++ b/package/libs/openssl/patches/140-allow-prefer-chacha20.patch @@ -1,4 +1,4 @@ -From 4f7ab2040bb71f03a8f8388911144559aa2a5b60 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 27 Sep 2018 08:44:39 -0300 Subject: Add OPENSSL_PREFER_CHACHA_OVER_GCM option @@ -15,7 +15,6 @@ when the client has it on top of its ciphersuite preference. Signed-off-by: Eneas U de Queiroz diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h -index 6724ccf2d2..96d959427e 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -173,9 +173,15 @@ extern "C" { @@ -38,7 +37,6 @@ index 6724ccf2d2..96d959427e 100644 # define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \ "TLS_AES_128_GCM_SHA256" diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c -index 27a1b2ec68..7039811323 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -1467,11 +1467,29 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, diff --git a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch index c90fce2442..387c3ce11e 100644 --- a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch +++ b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch @@ -1,6 +1,17 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Sat, 27 Mar 2021 17:43:25 -0300 +Subject: openssl.cnf: add engine configuration + +This adds configuration options for engines, loading all cnf files under +/etc/ssl/engines.d/. + +Signed-off-by: Eneas U de Queiroz + +diff --git a/apps/openssl.cnf b/apps/openssl.cnf --- a/apps/openssl.cnf +++ b/apps/openssl.cnf -@@ -22,6 +22,99 @@ oid_section = new_oids +@@ -22,6 +22,13 @@ oid_section = new_oids # (Alternatively, use a configuration file that has only # X.509v3 extensions in its main [= default] section.) @@ -9,93 +20,7 @@ +[openssl_conf] +engines=engines + -+[engines] -+# To enable an engine, install the package, and uncomment it here: -+#devcrypto=devcrypto -+#afalg=afalg -+#padlock=padlock -+##gost=gost -+ -+[afalg] -+# Leave this alone and configure algorithms with CIPERS/DIGESTS below -+default_algorithms = ALL -+ -+# The following commands are only available if using the alternative -+# (sync) AFALG engine -+# Configuration commands: -+# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a -+# list of supported algorithms, along with their driver, whether they -+# are hw accelerated or not, and the engine's configuration commands. -+ -+# USE_SOFTDRIVERS: specifies whether to use software (not accelerated) -+# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use -+# if acceleration can't be determined) [default=2] -+#USE_SOFTDRIVERS = 2 -+ -+# CIPHERS: either ALL, NONE, NO_ECB (all except ECB-mode) or a -+# comma-separated list of ciphers to enable [default=NO_ECB] -+# Starting in 1.2.0, if you use a cipher list, each cipher may be -+# followed by a colon (:) and the minimum request length to use -+# AF_ALG drivers for that cipher; smaller requests are processed by -+# softare; a negative value will use the default for that cipher -+#CIPHERS=AES-128-CBC:1024, AES-256-CBC:768, DES-EDE3-CBC:0 -+ -+# DIGESTS: either ALL, NONE, or a comma-separated list of digests to -+# enable [default=NONE] -+# It is strongly recommended not to enable digests; their performance -+# is poor, and there are many cases in which they will not work, -+# especially when calling fork with open crypto contexts. Openssh, -+# for example, does this, and you may not be able to login. -+#DIGESTS = NONE -+ -+[devcrypto] -+# Leave this alone and configure algorithms with CIPERS/DIGESTS below -+default_algorithms = ALL -+ -+# Configuration commands: -+# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a -+# list of supported algorithms, along with their driver, whether they -+# are hw accelerated or not, and the engine's configuration commands. -+ -+# USE_SOFTDRIVERS: specifies whether to use software (not accelerated) -+# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use -+# if acceleration can't be determined) [default=2] -+#USE_SOFTDRIVERS = 2 -+ -+# CIPHERS: either ALL, NONE, or a comma-separated list of ciphers to -+# enable [default=ALL] -+# It is recommended to disable the ECB ciphers; in most cases, it will -+# only be used for PRNG, in small blocks, where performance is poor, -+# and there may be problems with apps forking with open crypto -+# contexts, leading to failures. The CBC ciphers work well: -+#CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC -+ -+# DIGESTS: either ALL, NONE, or a comma-separated list of digests to -+# enable [default=NONE] -+# It is strongly recommended not to enable digests; their performance -+# is poor, and there are many cases in which they will not work, -+# especially when calling fork with open crypto contexts. Openssh, -+# for example, does this, and you may not be able to login. -+#DIGESTS = NONE -+ -+[padlock] -+default_algorithms = ALL -+ -+[gost] -+default_algorithms = ALL -+# CRYPT_PARAMS: OID of default GOST 28147-89 parameters It allows the -+# user to choose between different parameter sets of symmetric cipher -+# algorithm. RFC 4357 specifies several parameters for the -+# GOST 28147-89 algorithm, but OpenSSL doesn't provide user interface -+# to choose one when encrypting. So use engine configuration parameter -+# instead. -+# Value of this parameter can be either short name, defined in OpenSSL -+# obj_dat.h header file or numeric representation of OID, defined in -+# RFC 4357. Defaults to id-tc26-gost-28147-param-Z -+#CRYPT_PARAMS = id-tc26-gost-28147-param-Z -+ -+# PBE_PARAMS: Shortname of default digest alg for PBE -+#PBE_PARAMS = ++.include /etc/ssl/engines.cnf.d + [ new_oids ] diff --git a/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch b/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch index 84c68b16a2..71c9fdd438 100644 --- a/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch +++ b/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch @@ -1,4 +1,4 @@ -From f14345422747a495a52f9237a43b8be189f21912 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Mon, 5 Nov 2018 15:54:17 -0200 Subject: eng_devcrypto: save ioctl if EVP_MD_..FLAG_ONESHOT @@ -15,7 +15,6 @@ Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/7585) diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c -index a727c6f646..a2c9a966f7 100644 --- a/crypto/engine/eng_devcrypto.c +++ b/crypto/engine/eng_devcrypto.c @@ -461,6 +461,7 @@ struct digest_ctx { diff --git a/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch b/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch index ad83a51a10..83989a3625 100644 --- a/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch +++ b/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch @@ -1,4 +1,4 @@ -From 78e7b1cc7119622645bc5a8542c55b6c95dc7868 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Tue, 6 Nov 2018 22:54:07 -0200 Subject: eng_devcrypto: add command to dump driver info @@ -12,7 +12,6 @@ Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/7585) diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c -index 5ec38ca8f3..64dc6b891d 100644 --- a/crypto/engine/eng_devcrypto.c +++ b/crypto/engine/eng_devcrypto.c @@ -50,16 +50,20 @@ static int use_softdrivers = DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS; diff --git a/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch b/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch index ea3f8fb8a7..1298efe546 100644 --- a/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch +++ b/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch @@ -9,7 +9,6 @@ engines/e_devcrypto.c. Signed-off-by: Eneas U de Queiroz diff --git a/crypto/engine/build.info b/crypto/engine/build.info -index e00802a3fd..47fe948966 100644 --- a/crypto/engine/build.info +++ b/crypto/engine/build.info @@ -6,6 +6,3 @@ SOURCE[../../libcrypto]=\ @@ -20,7 +19,6 @@ index e00802a3fd..47fe948966 100644 - SOURCE[../../libcrypto]=eng_devcrypto.c -ENDIF diff --git a/crypto/init.c b/crypto/init.c -index 1b0d523bea..ee3e2eb075 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -329,18 +329,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl) @@ -86,7 +84,6 @@ index 1b0d523bea..ee3e2eb075 100644 if ((opts & OPENSSL_INIT_ENGINE_PADLOCK) && !RUN_ONCE(&engine_padlock, ossl_init_engine_padlock)) diff --git a/engines/build.info b/engines/build.info -index 1db771971c..33a25d7004 100644 --- a/engines/build.info +++ b/engines/build.info @@ -11,6 +11,9 @@ IF[{- !$disabled{"engine"} -}] @@ -116,7 +113,6 @@ diff --git a/crypto/engine/eng_devcrypto.c b/engines/e_devcrypto.c similarity index 95% rename from crypto/engine/eng_devcrypto.c rename to engines/e_devcrypto.c -index 2c1b52d572..eff1ed3a7d 100644 --- a/crypto/engine/eng_devcrypto.c +++ b/engines/e_devcrypto.c @@ -7,7 +7,7 @@ diff --git a/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch b/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch index 1f1cd7a582..fd4701307e 100644 --- a/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch +++ b/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch @@ -20,7 +20,6 @@ turn them on if it is safe and fast enough. Signed-off-by: Eneas U de Queiroz diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c -index 3fcd81de7a..d25230d366 100644 --- a/engines/e_devcrypto.c +++ b/engines/e_devcrypto.c @@ -852,7 +852,7 @@ static void prepare_digest_methods(void) diff --git a/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch b/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch index bc514b88c9..bf1c98b104 100644 --- a/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch +++ b/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch @@ -9,7 +9,6 @@ session. It may have been closed by another process after a fork. Signed-off-by: Eneas U de Queiroz diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c -index d25230d366..f4570f1666 100644 --- a/engines/e_devcrypto.c +++ b/engines/e_devcrypto.c @@ -195,9 +195,8 @@ static int cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key, From f700fead1409f177d7c7f11afac61678b7a8845e Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Sun, 20 Feb 2022 21:09:29 -0300 Subject: [PATCH 37/42] openssl: configure engine packages during install This enables an engine during its package's installation, by adding it to the engines list in /etc/ssl/engines.cnf.d/engines.cnf. The engine build system was reworked, with the addition of an engine.mk file that groups some of the engine packages' definitions, and could be used by out of tree engines as well. Signed-off-by: Eneas U de Queiroz --- package/libs/openssl/Makefile | 58 +++++-------- package/libs/openssl/engine.mk | 82 +++++++++++++++++++ package/libs/openssl/files/engines.cnf | 12 +-- .../150-openssl.cnf-add-engines-conf.patch | 2 +- 4 files changed, 111 insertions(+), 43 deletions(-) create mode 100644 package/libs/openssl/engine.mk diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index d8b77e7724..a096b9015e 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -11,9 +11,8 @@ PKG_NAME:=openssl PKG_BASE:=1.1.1 PKG_BUGFIX:=m PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_USE_MIPS16:=0 -ENGINES_DIR=engines-1.1 PKG_BUILD_PARALLEL:=1 @@ -67,6 +66,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_OPENSSL_WITH_WHIRLPOOL include $(INCLUDE_DIR)/package.mk +include engine.mk ifneq ($(CONFIG_CCACHE),) HOSTCC=$(HOSTCC_NOCACHE) @@ -130,6 +130,9 @@ endef define Package/libopenssl-conf/conffiles /etc/ssl/openssl.cnf +/etc/ssl/engines.cnf.d/engines.cnf +$(if CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO,/etc/ssl/engines.cnf.d/devcrypto.cnf) +$(if CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK,/etc/ssl/engines.cnf.d/padlock.cnf) endef define Package/libopenssl-conf/description @@ -137,52 +140,50 @@ $(call Package/openssl/Default/description) This package installs the OpenSSL configuration file /etc/ssl/openssl.cnf. endef +$(eval $(call Package/openssl/add-engine,afalg)) define Package/libopenssl-afalg $(call Package/openssl/Default) - SUBMENU:=SSL + $(call Package/openssl/engine/Default) TITLE:=AFALG hardware acceleration engine - DEPENDS:=libopenssl @OPENSSL_ENGINE @KERNEL_AIO \ - +PACKAGE_libopenssl-afalg:kmod-crypto-user +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN + DEPENDS += @KERNEL_AIO +PACKAGE_libopenssl-afalg:kmod-crypto-user \ + @!OPENSSL_ENGINE_BUILTIN endef define Package/libopenssl-afalg/description This package adds an engine that enables hardware acceleration through the AF_ALG kernel interface. -To use it, you need to enable the engine in /etc/ssl/engines.cnf.d/engines.cnf. See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators The engine_id is "afalg" endef +$(eval $(call Package/openssl/add-engine,devcrypto)) define Package/libopenssl-devcrypto $(call Package/openssl/Default) - SUBMENU:=SSL + $(call Package/openssl/engine/Default) TITLE:=/dev/crypto hardware acceleration engine - DEPENDS:=libopenssl @OPENSSL_ENGINE +PACKAGE_libopenssl-devcrypto:kmod-cryptodev +libopenssl-conf \ - @!OPENSSL_ENGINE_BUILTIN + DEPENDS += +PACKAGE_libopenssl-devcrypto:kmod-cryptodev @!OPENSSL_ENGINE_BUILTIN endef define Package/libopenssl-devcrypto/description This package adds an engine that enables hardware acceleration through the /dev/crypto kernel interface. -To use it, you need to enable the engine in /etc/ssl/engines.cnf.d/engines.cnf. You may -configure the engine by editing /etc/ssl/engines.cnf.d/devcrypto.cnf. See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators The engine_id is "devcrypto" endef +$(eval $(call Package/openssl/add-engine,padlock)) define Package/libopenssl-padlock $(call Package/openssl/Default) - SUBMENU:=SSL + $(call Package/openssl/engine/Default) TITLE:=VIA Padlock hardware acceleration engine - DEPENDS:=libopenssl @OPENSSL_ENGINE @TARGET_x86 +PACKAGE_libopenssl-padlock:kmod-crypto-hw-padlock \ - +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN + DEPENDS += @TARGET_x86 +PACKAGE_libopenssl-padlock:kmod-crypto-hw-padlock \ + @!OPENSSL_ENGINE_BUILTIN endef define Package/libopenssl-padlock/description This package adds an engine that enables VIA Padlock hardware acceleration. -To use it, you need to enable the engine in /etc/ssl/engines.cnf.d/engines.cnf. See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators The engine_id is "padlock" @@ -382,6 +383,12 @@ define Package/libopenssl-conf/install $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d $(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(1)/etc/ssl/ $(CP) ./files/engines.cnf $(1)/etc/ssl/engines.cnf.d/ + $(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO), + $(CP) ./files/devcrypto.cnf $(1)/etc/ssl/engines.cnf.d/ + echo devcrypto=devcrypto >> $(1)/etc/ssl/engines.cnf.d/engines.cnf) + $(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK), + $(CP) ./files/padlock.cnf $(1)/etc/ssl/engines.cnf.d/ + echo padlock=padlock >> $(1)/etc/ssl/engines.cnf.d/engines.cnf) endef define Package/openssl-util/install @@ -389,27 +396,6 @@ define Package/openssl-util/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openssl $(1)/usr/bin/ endef -define Package/libopenssl-afalg/install - $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d \ - $(1)/usr/lib/$(ENGINES_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/afalg.so $(1)/usr/lib/$(ENGINES_DIR) - $(INSTALL_DATA) ./files/afalg.cnf $(1)/etc/ssl/engines.cnf.d/ -endef - -define Package/libopenssl-devcrypto/install - $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d \ - $(1)/usr/lib/$(ENGINES_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/devcrypto.so $(1)/usr/lib/$(ENGINES_DIR) - $(INSTALL_DATA) ./files/devcrypto.cnf $(1)/etc/ssl/engines.cnf.d/ -endef - -define Package/libopenssl-padlock/install - $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d \ - $(1)/usr/lib/$(ENGINES_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/*padlock.so $(1)/usr/lib/$(ENGINES_DIR) - $(INSTALL_DATA) ./files/padlock.cnf $(1)/etc/ssl/engines.cnf.d/ -endef - $(eval $(call BuildPackage,libopenssl)) $(eval $(call BuildPackage,libopenssl-conf)) $(eval $(call BuildPackage,libopenssl-afalg)) diff --git a/package/libs/openssl/engine.mk b/package/libs/openssl/engine.mk new file mode 100644 index 0000000000..482b5ad5e8 --- /dev/null +++ b/package/libs/openssl/engine.mk @@ -0,0 +1,82 @@ +ENGINES_DIR=engines-1.1 + +define Package/openssl/engine/Default + SECTION:=libs + CATEGORY:=Libraries + SUBMENU:=SSL + DEPENDS:=libopenssl @OPENSSL_ENGINE +libopenssl-conf +endef + +# 1 = engine name +# 2 - package name, defaults to libopenssl-$(1) +define Package/openssl/add-engine + OSSL_ENG_PKG:=$(if $(2),$(2),libopenssl-$(1)) + Package/$$(OSSL_ENG_PKG)/conffiles:=/etc/ssl/engines.cnf.d/$(1).cnf + + define Package/$$(OSSL_ENG_PKG)/install + $$(INSTALL_DIR) $$(1)/usr/lib/$(ENGINES_DIR) + $$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/$(1).so \ + $$(1)/usr/lib/$(ENGINES_DIR) + $$(INSTALL_DIR) $$(1)/etc/ssl/engines.cnf.d + $$(INSTALL_DATA) ./files/$(1).cnf $$(1)/etc/ssl/engines.cnf.d/ + endef + + define Package/$$(OSSL_ENG_PKG)/postinst := +#!/bin/sh +# $$$$1 == non-empty: suggest reinstall +error_out() { + [ "$1" ] && cat <<- EOF + Reinstalling the libopenssl-conf package may fix this: + + opkg install --force-reinstall libopenssl-conf + EOF + cat <<- EOF + + Then, you will have to reinstall this package, and any other engine package you have + you have previously installed to ensure they are enabled: + + opkg install --force-reinstall $$(OSSL_ENG_PKG) [OTHER_ENGINE_PKG]... + + EOF + exit 1 +} +ENGINES_CNF="$$$${IPKG_INSTROOT}/etc/ssl/engines.cnf.d/engines.cnf" +OPENSSL_CNF="$$$${IPKG_INSTROOT}/etc/ssl/openssl.cnf" +if [ ! -f "$$$${OPENSSL_CNF}" ]; then + echo -e "ERROR: File $$$${OPENSSL_CNF} not found." + error_out reinstall +fi +if ! grep -q "^.include /etc/ssl/engines.cnf.d" "$$$${OPENSSL_CNF}"; then + cat <<- EOF + Your /etc/ssl/openssl.cnf file is not loading engine configuration files from + /etc/ssl/engines.cnf.d. You should consider start with a fresh, updated OpenSSL config by + running: + + opkg install --force-reinstall --force-maintainer libopenssl-conf + + The above command will overwrite any changes you may have made to both /etc/ssl/openssl.cnf + and /etc/ssl/engines.cnf.d/engines.cnf files, so back them up first! + EOF + error_out +fi +if [ ! -f "$$$${ENGINES_CNF}" ]; then + echo "Can't configure $$(OSSL_ENG_PKG): File $$$${ENGINES_CNF} not found." + error_out reinstall +fi +if grep -q "$(1)=$(1)" "$$$${ENGINES_CNF}"; then + echo "$$(OSSL_ENG_PKG): $(1) engine was already configured. Nothing to be done." +else + echo "$(1)=$(1)" >> "$$$${ENGINES_CNF}" + echo "$$(OSSL_ENG_PKG): $(1) engine enabled. All done!" +fi + endef + + define Package/$$(OSSL_ENG_PKG)/prerm := +#!/bin/sh +ENGINES_CNF="$$$${IPKG_INSTROOT}/etc/ssl/engines.cnf.d/engines.cnf" +[ -f "$$$${ENGINES_CNF}" ] || exit 0 +sed -e '/$(1)=$(1)/d' -i "$$$${ENGINES_CNF}" + endef +endef + + diff --git a/package/libs/openssl/files/engines.cnf b/package/libs/openssl/files/engines.cnf index d034ab5a30..333b1d6c25 100644 --- a/package/libs/openssl/files/engines.cnf +++ b/package/libs/openssl/files/engines.cnf @@ -1,7 +1,7 @@ -[engines] -# To enable an engine, install the package, and uncomment it here: -#devcrypto=devcrypto -#afalg=afalg -#padlock=padlock -#gost=gost +# This file should only contain the [engines] section +# It is subject to change by installing OpenSSL engine packages +# Any lines that have the sequence "engine-name=engine-name" will +# be removed when the respective engine gets uninstalled. +# You may avoid that by adding a space before/after the = sign. +[engines] diff --git a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch index 387c3ce11e..3db7a19212 100644 --- a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch +++ b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch @@ -4,7 +4,7 @@ Date: Sat, 27 Mar 2021 17:43:25 -0300 Subject: openssl.cnf: add engine configuration This adds configuration options for engines, loading all cnf files under -/etc/ssl/engines.d/. +/etc/ssl/engines.cnf.d/. Signed-off-by: Eneas U de Queiroz From 03ceba473f8d50b31ea94a75a85405cb28d7c475 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Sun, 20 Feb 2022 21:09:30 -0300 Subject: [PATCH 38/42] openssl: configure engines with uci This uses uci to configure engines, by generating a list of enabled engines in /var/etc/ssl/engines.cnf from engines configured in /etc/config/openssl: config engine 'devcrypto' option enabled '1' Currently the only options implemented are 'enabled', which defaults to true and enables the named engine, and the 'force' option, that enables the engine even if the init script thinks the engine does not exist. The existence test is to check for either a configuration file /etc/ssl/engines.cnf.d/%ENGINE%.cnf, or a shared object file /usr/lib/engines-1.1/%ENGINE%.so. The engine list is generated by an init script which is set to run after 'log' because it informs the engines being enabled or skipped. It should run before any service using OpenSSL as the crypto library, otherwise the service will not use any engine. Signed-off-by: Eneas U de Queiroz --- package/libs/openssl/Makefile | 13 ++-- package/libs/openssl/engine.mk | 60 ++++--------------- package/libs/openssl/files/engines.cnf | 7 --- package/libs/openssl/files/openssl.init | 31 ++++++++++ .../150-openssl.cnf-add-engines-conf.patch | 5 +- 5 files changed, 54 insertions(+), 62 deletions(-) delete mode 100644 package/libs/openssl/files/engines.cnf create mode 100755 package/libs/openssl/files/openssl.init diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index a096b9015e..d0af1c2ad5 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=openssl PKG_BASE:=1.1.1 PKG_BUGFIX:=m PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 @@ -130,7 +130,6 @@ endef define Package/libopenssl-conf/conffiles /etc/ssl/openssl.cnf -/etc/ssl/engines.cnf.d/engines.cnf $(if CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO,/etc/ssl/engines.cnf.d/devcrypto.cnf) $(if CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK,/etc/ssl/engines.cnf.d/padlock.cnf) endef @@ -380,15 +379,17 @@ define Package/libopenssl/install endef define Package/libopenssl-conf/install - $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d + $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d $(1)/etc/config $(1)/etc/init.d $(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(1)/etc/ssl/ - $(CP) ./files/engines.cnf $(1)/etc/ssl/engines.cnf.d/ + $(INSTALL_BIN) ./files/openssl.init $(1)/etc/init.d/openssl + $(SED) 's!%ENGINES_DIR%!/usr/lib/$(ENGINES_DIR)!' $(1)/etc/init.d/openssl + touch $(1)/etc/config/openssl $(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO), $(CP) ./files/devcrypto.cnf $(1)/etc/ssl/engines.cnf.d/ - echo devcrypto=devcrypto >> $(1)/etc/ssl/engines.cnf.d/engines.cnf) + echo -e "config engine 'devcrypto'\n\toption enabled '1'" >> $(1)/etc/config/openssl) $(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK), $(CP) ./files/padlock.cnf $(1)/etc/ssl/engines.cnf.d/ - echo padlock=padlock >> $(1)/etc/ssl/engines.cnf.d/engines.cnf) + echo -e "\nconfig engine 'padlock'\n\toption enabled '1'" >> $(1)/etc/config/openssl) endef define Package/openssl-util/install diff --git a/package/libs/openssl/engine.mk b/package/libs/openssl/engine.mk index 482b5ad5e8..973a989904 100644 --- a/package/libs/openssl/engine.mk +++ b/package/libs/openssl/engine.mk @@ -23,60 +23,24 @@ define Package/openssl/add-engine define Package/$$(OSSL_ENG_PKG)/postinst := #!/bin/sh -# $$$$1 == non-empty: suggest reinstall -error_out() { - [ "$1" ] && cat <<- EOF - Reinstalling the libopenssl-conf package may fix this: +OPENSSL_UCI="$$$${IPKG_INSTROOT}/etc/config/openssl" - opkg install --force-reinstall libopenssl-conf - EOF - cat <<- EOF +[ -z "$$$${IPKG_INSTROOT}" ] && uci -q get openssl.$(1) >/dev/null && exit 0 - Then, you will have to reinstall this package, and any other engine package you have - you have previously installed to ensure they are enabled: +cat << EOF >> "$$$${OPENSSL_UCI}" - opkg install --force-reinstall $$(OSSL_ENG_PKG) [OTHER_ENGINE_PKG]... +config engine '$(1)' + option enabled '1' +EOF - EOF - exit 1 -} -ENGINES_CNF="$$$${IPKG_INSTROOT}/etc/ssl/engines.cnf.d/engines.cnf" -OPENSSL_CNF="$$$${IPKG_INSTROOT}/etc/ssl/openssl.cnf" -if [ ! -f "$$$${OPENSSL_CNF}" ]; then - echo -e "ERROR: File $$$${OPENSSL_CNF} not found." - error_out reinstall -fi -if ! grep -q "^.include /etc/ssl/engines.cnf.d" "$$$${OPENSSL_CNF}"; then - cat <<- EOF - Your /etc/ssl/openssl.cnf file is not loading engine configuration files from - /etc/ssl/engines.cnf.d. You should consider start with a fresh, updated OpenSSL config by - running: - - opkg install --force-reinstall --force-maintainer libopenssl-conf - - The above command will overwrite any changes you may have made to both /etc/ssl/openssl.cnf - and /etc/ssl/engines.cnf.d/engines.cnf files, so back them up first! - EOF - error_out -fi -if [ ! -f "$$$${ENGINES_CNF}" ]; then - echo "Can't configure $$(OSSL_ENG_PKG): File $$$${ENGINES_CNF} not found." - error_out reinstall -fi -if grep -q "$(1)=$(1)" "$$$${ENGINES_CNF}"; then - echo "$$(OSSL_ENG_PKG): $(1) engine was already configured. Nothing to be done." -else - echo "$(1)=$(1)" >> "$$$${ENGINES_CNF}" - echo "$$(OSSL_ENG_PKG): $(1) engine enabled. All done!" -fi +[ -n "$$$${IPKG_INSTROOT}" ] || /etc/init.d/openssl reload endef - define Package/$$(OSSL_ENG_PKG)/prerm := + define Package/$$(OSSL_ENG_PKG)/postrm := #!/bin/sh -ENGINES_CNF="$$$${IPKG_INSTROOT}/etc/ssl/engines.cnf.d/engines.cnf" -[ -f "$$$${ENGINES_CNF}" ] || exit 0 -sed -e '/$(1)=$(1)/d' -i "$$$${ENGINES_CNF}" +[ -n "$$$${IPKG_INSTROOT}" ] && exit 0 +uci delete openssl.$(1) +uci commit openssl +/etc/init.d/openssl reload endef endef - - diff --git a/package/libs/openssl/files/engines.cnf b/package/libs/openssl/files/engines.cnf deleted file mode 100644 index 333b1d6c25..0000000000 --- a/package/libs/openssl/files/engines.cnf +++ /dev/null @@ -1,7 +0,0 @@ -# This file should only contain the [engines] section -# It is subject to change by installing OpenSSL engine packages -# Any lines that have the sequence "engine-name=engine-name" will -# be removed when the respective engine gets uninstalled. -# You may avoid that by adding a space before/after the = sign. - -[engines] diff --git a/package/libs/openssl/files/openssl.init b/package/libs/openssl/files/openssl.init new file mode 100755 index 0000000000..21e253e7a5 --- /dev/null +++ b/package/libs/openssl/files/openssl.init @@ -0,0 +1,31 @@ +#!/bin/sh /etc/rc.common + +START=13 +ENGINES_CNF_D="/etc/ssl/engines.cnf.d" +ENGINES_CNF="/var/etc/ssl/engines.cnf" +ENGINES_DIR="%ENGINES_DIR%" + +config_engine() { + local enabled force + config_get_bool enabled "$1" enabled 1 + config_get_bool force "$1" force 0 + [ "$enabled" = 0 ] && return + if [ "$force" = 0 ] && \ + [ ! -f "${ENGINES_CNF_D}/$1.cnf" ] && \ + [ ! -f "${ENGINES_DIR}/$1.so" ]; then + echo Skipping engine "$1": not installed + return + fi + echo Enabling engine "$1" + echo "$1=$1" >> "${ENGINES_CNF}" +} + +start() { + mkdir -p "$(dirname "${ENGINES_CNF}")" || exit 1 + echo Generating engines.cnf + echo "# This file is automatically generated from /etc/config/openssl." \ + > "${ENGINES_CNF}" || \ + { echo Error writing ${ENGINES_CNF} >&2; exit 1; } + config_load openssl + config_foreach config_engine engine +} diff --git a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch index 3db7a19212..8851116347 100644 --- a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch +++ b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch @@ -11,7 +11,7 @@ Signed-off-by: Eneas U de Queiroz diff --git a/apps/openssl.cnf b/apps/openssl.cnf --- a/apps/openssl.cnf +++ b/apps/openssl.cnf -@@ -22,6 +22,13 @@ oid_section = new_oids +@@ -22,6 +22,16 @@ oid_section = new_oids # (Alternatively, use a configuration file that has only # X.509v3 extensions in its main [= default] section.) @@ -20,6 +20,9 @@ diff --git a/apps/openssl.cnf b/apps/openssl.cnf +[openssl_conf] +engines=engines + ++[engines] ++.include /var/etc/ssl/engines.cnf ++ +.include /etc/ssl/engines.cnf.d + [ new_oids ] From a8a70464fa9a13bae3e33a2fe653b38597d2031b Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Mon, 21 Feb 2022 14:44:43 -0300 Subject: [PATCH 39/42] scripts/diffconfig.sh: ensure config/conf is built diffconfig.sh runs ./scripts/config/conf, but it does not get built with 'make {menu,x,n}config. Call 'make ./scripts/config/conf' to ensure it's been built befpre running it. Signed-off-by: Eneas U de Queiroz --- scripts/diffconfig.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/diffconfig.sh b/scripts/diffconfig.sh index 5f9fec5600..ba5d8e8712 100755 --- a/scripts/diffconfig.sh +++ b/scripts/diffconfig.sh @@ -8,6 +8,7 @@ grep '^CONFIG_DEVEL=y' .config >> tmp/.diffconfig.head grep '^CONFIG_TOOLCHAINOPTS=y' .config >> tmp/.diffconfig.head grep '^CONFIG_BUSYBOX_CUSTOM=y' .config >> tmp/.diffconfig.head grep '^CONFIG_TARGET_PER_DEVICE_ROOTFS=y' .config >> tmp/.diffconfig.head +make -s ./scripts/config/conf ./scripts/config/conf --defconfig=tmp/.diffconfig.head -w tmp/.diffconfig.stage1 Config.in >/dev/null ./scripts/kconfig.pl '>+' tmp/.diffconfig.stage1 .config >> tmp/.diffconfig.head ./scripts/config/conf --defconfig=tmp/.diffconfig.head -w tmp/.diffconfig.stage2 Config.in >/dev/null From f63af09f5bb72fb478e29c4aa41294b9ed5b06e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 21 Feb 2022 11:50:39 +0100 Subject: [PATCH 40/42] build: toplevel.mk: fix missing kconfig dependency tracking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Toplevel Make is not aware about changes in the `scripts/config/*conf` targets and this is causing issues for during update to that part of build tree, where one needs to handle this manually by either force rebuilding the targets or running `make config-clean`. Fix this by forcing the rebuild if necessary. Fixes: #9297 Signed-off-by: Petr Štetiar --- include/toplevel.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/toplevel.mk b/include/toplevel.mk index f5a2593a10..6362272929 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -101,7 +101,7 @@ ifneq ($(DISTRO_PKG_CONFIG),) scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH) endif scripts/config/%onf: CFLAGS+= -O2 -scripts/config/%onf: +scripts/config/%onf: FORCE @$(_SINGLE)$(SUBMAKE) $(if $(findstring s,$(OPENWRT_VERBOSE)),,-s) \ -C scripts/config $(notdir $@) From 8c0a0ad598ba09335c5c0475733c37b16370916b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 22 Feb 2022 20:00:28 +0100 Subject: [PATCH 41/42] wolfssl: fix API breakage of SSL_get_verify_result MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport fix for API breakage of SSL_get_verify_result() introduced in v5.1.1-stable. In v4.8.1-stable SSL_get_verify_result() used to return X509_V_OK when used on LE powered sites or other sites utilizing relaxed/alternative cert chain validation feature. After an update to v5.1.1-stable that API calls started returning X509_V_ERR_INVALID_CA error and thus rendered all such connection attempts imposible: $ docker run -it openwrt/rootfs:x86_64-21.02.2 sh -c "wget https://letsencrypt.org" Downloading 'https://letsencrypt.org' Connecting to 18.159.128.50:443 Connection error: Invalid SSL certificate Fixes: #9283 References: https://github.com/wolfSSL/wolfssl/issues/4879 Signed-off-by: Petr Štetiar --- ...fix-SSL_get_verify_result-regression.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 package/libs/wolfssl/patches/300-fix-SSL_get_verify_result-regression.patch diff --git a/package/libs/wolfssl/patches/300-fix-SSL_get_verify_result-regression.patch b/package/libs/wolfssl/patches/300-fix-SSL_get_verify_result-regression.patch new file mode 100644 index 0000000000..9651c03af6 --- /dev/null +++ b/package/libs/wolfssl/patches/300-fix-SSL_get_verify_result-regression.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Juliusz Sosinowicz +Date: Sat, 12 Feb 2022 00:34:24 +0100 +Subject: [PATCH] Reported in ZD13631 + +`ssl->peerVerifyRet` wasn't being cleared when retrying with an alternative cert chain + +References: https://github.com/wolfSSL/wolfssl/issues/4879 +--- + src/internal.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/internal.c b/src/internal.c +index 0dded42a76c4..f5814d30607c 100644 +--- a/src/internal.c ++++ b/src/internal.c +@@ -12372,6 +12372,9 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx, + } + + ret = 0; /* clear errors and continue */ ++ #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL) ++ ssl->peerVerifyRet = 0; ++ #endif + args->verifyErr = 0; + } + From 3ade45c5fa1148698556d46e4d195a561d8dd907 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Fri, 25 Feb 2022 05:03:08 +0800 Subject: [PATCH 42/42] kernel: bump to 4.9.303, 4.14.268, 4.19.231 Added new Kconfig. Manually rebased: - generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch Refreshed all patches. Signed-off-by: Tianling Shen --- include/kernel-version.mk | 12 +- ...cks-early-during-the-boot-process-so.patch | 4 +- ...Mark-used-PLLs-and-dividers-CRITICAL.patch | 2 +- ...lk-bcm2835-Add-claim-clocks-property.patch | 14 +-- ...35-Read-max-core-clock-from-firmware.patch | 8 +- ...-GPIO-clocks-enabled-at-boot-as-crit.patch | 2 +- ...1-Don-t-use-DT-aliases-for-numbering.patch | 2 +- ...0034-amba_pl011-Round-input-clock-up.patch | 6 +- ...Add-cts-event-workaround-DT-property.patch | 2 +- .../950-0039-Add-dwc_otg-driver.patch | 2 +- ...-bcm2835-Use-zd-when-printing-size_t.patch | 2 +- ...Better-coalescing-parameter-defaults.patch | 2 +- ...support-for-setting-leaf-clock-rates.patch | 4 +- ...w-reparenting-leaf-clocks-while-they.patch | 10 +- ...-for-updating-interrupt-endpoint-int.patch | 2 +- ...oduce-SoC-specific-clock-registratio.patch | 116 +++++++++--------- ...2835-Add-BCM2711_CLOCK_EMMC2-support.patch | 4 +- ...-bcm2711-Retain-support-for-old-dtbs.patch | 2 +- ...bcm2835-Avoid-null-pointer-exception.patch | 2 +- .../950-0762-clk-bcm2835-remove-pllb.patch | 2 +- ...0-0767-clk-bcm2835-Disable-v3d-clock.patch | 4 +- ...lise-rpi-firmware-before-clk-bcm2835.patch | 2 +- ...y-amba-pl011-Add-un-throttle-support.patch | 2 +- ...PS-BCM63XX-add-clkdev-lookup-support.patch | 4 +- ...vide-periph-clock-as-refclk-for-uart.patch | 16 +-- ...e-the-HSSPI-PLL-HZ-into-its-own-cloc.patch | 8 +- ...vide-enet-clocks-as-enet-to-the-ethe.patch | 10 +- ...M63XX-split-out-swpkt_sar-usb-clocks.patch | 2 +- ...IPS-BCM63XX-add-support-for-BCM63268.patch | 4 +- ...MIPS-BCM63XX-add-support-for-BCM6318.patch | 6 +- ...X-add-clkdev-lookups-for-device-tree.patch | 20 +-- ...IPS-BCM63XX-add-support-for-BCM63268.patch | 4 +- ...MIPS-BCM63XX-add-support-for-BCM6318.patch | 6 +- ...X-add-clkdev-lookups-for-device-tree.patch | 20 +-- ...ption-fix-dwm-158-3g-modem-interface.patch | 2 +- ...e-size-of-hook-entry-point-locations.patch | 2 +- ...ve-netdev-from-phylink-mii-ioctl-emu.patch | 8 +- ...link-support-for-link-gpio-interrupt.patch | 8 +- ...atory-attach-detach-methods-for-sfp-.patch | 4 +- ...et-sfp-remove-sfp-bus-use-of-netdevs.patch | 4 +- ...-phylink-avoid-reducing-support-mask.patch | 14 +-- ...t-start-and-stop-SGMII-PHYs-in-SFP-m.patch | 4 +- ...ve-fwnode-parsing-into-sfp-bus-layer.patch | 6 +- ....5-net-sfp-rework-upstream-interface.patch | 4 +- ...update-to-use-phy_support_asym_pause.patch | 4 +- ...x-link-mode-modification-in-PHY-mode.patch | 4 +- ...90-net-generalize-napi_complete_done.patch | 4 +- target/linux/generic/config-4.14 | 1 + target/linux/generic/config-4.19 | 1 + target/linux/generic/config-4.9 | 1 + .../generic/hack-4.14/204-module_strip.patch | 2 +- .../generic/hack-4.14/902-debloat_proc.patch | 6 +- .../998-usb-serial-option-add-u9300.patch | 2 +- .../generic/hack-4.19/204-module_strip.patch | 2 +- .../generic/hack-4.19/902-debloat_proc.patch | 6 +- .../998-usb-serial-option-add-u9300.patch | 2 +- .../generic/hack-4.9/204-module_strip.patch | 2 +- .../generic/hack-4.9/902-debloat_proc.patch | 6 +- .../601-add-kernel-imq-support.patch | 2 +- .../pending-4.14/630-packet_socket_type.patch | 16 +-- ...-support-hardware-flow-table-offload.patch | 2 +- .../pending-4.14/834-ledtrig-libata.patch | 8 +- .../pending-4.14/920-mangle_bootargs.patch | 2 +- .../601-add-kernel-imq-support.patch | 2 +- .../pending-4.19/630-packet_socket_type.patch | 16 +-- ...-support-hardware-flow-table-offload.patch | 2 +- ...nterface-mode-from-ethtool-link-mode.patch | 2 +- ...p-move-phy_start-phy_stop-to-phylink.patch | 4 +- ...ylink-re-split-__phylink_connect_phy.patch | 8 +- ...upport-Clause-45-PHYs-on-SFP-modules.patch | 12 +- ...t-link_an_mode-configured-and-curren.patch | 34 ++--- ...link-split-phylink_sfp_module_insert.patch | 10 +- ...y-MAC-configuration-for-copper-SFP-m.patch | 10 +- ...ke-Broadcom-BCM84881-based-SFPs-work.patch | 4 +- .../pending-4.19/834-ledtrig-libata.patch | 8 +- .../pending-4.19/920-mangle_bootargs.patch | 2 +- .../601-add-kernel-imq-support.patch | 2 +- .../pending-4.9/630-packet_socket_type.patch | 16 +-- .../pending-4.9/834-ledtrig-libata.patch | 8 +- .../pending-4.9/920-mangle_bootargs.patch | 2 +- ....11-encapusaltion-offloading-support.patch | 8 +- .../998-ignore-stats-debug-info.patch | 2 +- .../patches-4.9/160-delayed_uart_io.patch | 2 +- .../202-core-linux-support-layerscape.patch | 6 +- ...707-dpaa-ethernet-support-layerscape.patch | 48 ++++---- .../807-usb-support-layerscape.patch | 4 +- .../819-sdhc-support-layerscape.patch | 34 ++--- ...eeprom-ethtool-access-into-netdev-co.patch | 2 +- ...fp-use-netdev-sfp_bus-for-start-stop.patch | 4 +- .../oxnas/patches-4.14/999-libata-hacks.patch | 4 +- 90 files changed, 350 insertions(+), 343 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index c556d7e8ce..14db2a9693 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,13 +6,13 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-4.9 = .297 -LINUX_VERSION-4.14 = .262 -LINUX_VERSION-4.19 = .225 +LINUX_VERSION-4.9 = .303 +LINUX_VERSION-4.14 = .268 +LINUX_VERSION-4.19 = .231 -LINUX_KERNEL_HASH-4.9.297 = e43ba8cde809b3126a5192f5a8a83f47134a138955ce6811672f5f704db6d89f -LINUX_KERNEL_HASH-4.14.262 = 4cfd785381edbfcd86dfb1cd8d264d872643d71afd2b832fa2090f5b7228d417 -LINUX_KERNEL_HASH-4.19.225 = 4b9ab3979541cd436b7b7e8905c77ffcf594a9cf4ea3fb9474ef95fe09586796 +LINUX_KERNEL_HASH-4.9.303 = 45e9050fc13df0fe2fe291512d261a07a7649b82a00c134eda0abc3a19121ae5 +LINUX_KERNEL_HASH-4.14.268 = cf62422aaa7f5a888ed3e5baeb89b90ba697cb712e653e52fd7dd8220f11b6f5 +LINUX_KERNEL_HASH-4.19.231 = 673123b3b3b05e2d8586c82a342ff2556e0b1f2caaadd643fefb9d91d58d8131 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/bcm27xx/patches-4.19/950-0019-Register-the-clocks-early-during-the-boot-process-so.patch b/target/linux/bcm27xx/patches-4.19/950-0019-Register-the-clocks-early-during-the-boot-process-so.patch index e72dc2ddca..b33514ce89 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0019-Register-the-clocks-early-during-the-boot-process-so.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0019-Register-the-clocks-early-during-the-boot-process-so.patch @@ -13,7 +13,7 @@ Signed-off-by: Martin Sperl --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2186,8 +2186,15 @@ static int bcm2835_clk_probe(struct plat +@@ -2181,8 +2181,15 @@ static int bcm2835_clk_probe(struct plat if (ret) return ret; @@ -30,7 +30,7 @@ Signed-off-by: Martin Sperl } static const struct of_device_id bcm2835_clk_of_match[] = { -@@ -2204,7 +2211,11 @@ static struct platform_driver bcm2835_cl +@@ -2199,7 +2206,11 @@ static struct platform_driver bcm2835_cl .probe = bcm2835_clk_probe, }; diff --git a/target/linux/bcm27xx/patches-4.19/950-0022-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch b/target/linux/bcm27xx/patches-4.19/950-0022-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch index 28c4a450cc..6389927444 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0022-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0022-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1364,6 +1364,11 @@ bcm2835_register_pll_divider(struct bcm2 +@@ -1359,6 +1359,11 @@ bcm2835_register_pll_divider(struct bcm2 divider->div.hw.init = &init; divider->div.table = NULL; diff --git a/target/linux/bcm27xx/patches-4.19/950-0023-clk-bcm2835-Add-claim-clocks-property.patch b/target/linux/bcm27xx/patches-4.19/950-0023-clk-bcm2835-Add-claim-clocks-property.patch index e01da87358..d648da8c3f 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0023-clk-bcm2835-Add-claim-clocks-property.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0023-clk-bcm2835-Add-claim-clocks-property.patch @@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1294,6 +1294,8 @@ static const struct clk_ops bcm2835_vpu_ +@@ -1289,6 +1289,8 @@ static const struct clk_ops bcm2835_vpu_ .debug_init = bcm2835_clock_debug_init, }; @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman, const struct bcm2835_pll_data *data) { -@@ -1310,6 +1312,9 @@ static struct clk_hw *bcm2835_register_p +@@ -1305,6 +1307,9 @@ static struct clk_hw *bcm2835_register_p init.ops = &bcm2835_pll_clk_ops; init.flags = CLK_IGNORE_UNUSED; @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell pll = kzalloc(sizeof(*pll), GFP_KERNEL); if (!pll) return NULL; -@@ -1365,8 +1370,10 @@ bcm2835_register_pll_divider(struct bcm2 +@@ -1360,8 +1365,10 @@ bcm2835_register_pll_divider(struct bcm2 divider->div.table = NULL; if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) { @@ -49,7 +49,7 @@ Signed-off-by: Phil Elwell } divider->cprman = cprman; -@@ -2118,6 +2125,8 @@ static const struct bcm2835_clk_desc clk +@@ -2113,6 +2120,8 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_PERIICTL), }; @@ -58,7 +58,7 @@ Signed-off-by: Phil Elwell /* * Permanently take a reference on the parent of the SDRAM clock. * -@@ -2137,6 +2146,19 @@ static int bcm2835_mark_sdc_parent_criti +@@ -2132,6 +2141,19 @@ static int bcm2835_mark_sdc_parent_criti return clk_prepare_enable(parent); } @@ -78,7 +78,7 @@ Signed-off-by: Phil Elwell static int bcm2835_clk_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; -@@ -2146,6 +2168,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2141,6 +2163,7 @@ static int bcm2835_clk_probe(struct plat const struct bcm2835_clk_desc *desc; const size_t asize = ARRAY_SIZE(clk_desc_array); size_t i; @@ -86,7 +86,7 @@ Signed-off-by: Phil Elwell int ret; cprman = devm_kzalloc(dev, -@@ -2161,6 +2184,13 @@ static int bcm2835_clk_probe(struct plat +@@ -2156,6 +2179,13 @@ static int bcm2835_clk_probe(struct plat if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); diff --git a/target/linux/bcm27xx/patches-4.19/950-0024-clk-bcm2835-Read-max-core-clock-from-firmware.patch b/target/linux/bcm27xx/patches-4.19/950-0024-clk-bcm2835-Read-max-core-clock-from-firmware.patch index ae64fc3a81..957f51fbe6 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0024-clk-bcm2835-Read-max-core-clock-from-firmware.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0024-clk-bcm2835-Read-max-core-clock-from-firmware.patch @@ -50,7 +50,7 @@ Signed-off-by: Phil Elwell spinlock_t regs_lock; /* spinlock for all clocks */ /* -@@ -998,6 +1002,30 @@ static unsigned long bcm2835_clock_get_r +@@ -993,6 +997,30 @@ static unsigned long bcm2835_clock_get_r return bcm2835_clock_rate_from_divisor(clock, parent_rate, div); } @@ -81,7 +81,7 @@ Signed-off-by: Phil Elwell static void bcm2835_clock_wait_busy(struct bcm2835_clock *clock) { struct bcm2835_cprman *cprman = clock->cprman; -@@ -1286,7 +1314,7 @@ static int bcm2835_vpu_clock_is_on(struc +@@ -1281,7 +1309,7 @@ static int bcm2835_vpu_clock_is_on(struc */ static const struct clk_ops bcm2835_vpu_clock_clk_ops = { .is_prepared = bcm2835_vpu_clock_is_on, @@ -90,7 +90,7 @@ Signed-off-by: Phil Elwell .set_rate = bcm2835_clock_set_rate, .determine_rate = bcm2835_clock_determine_rate, .set_parent = bcm2835_clock_set_parent, -@@ -2167,6 +2195,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2162,6 +2190,7 @@ static int bcm2835_clk_probe(struct plat struct resource *res; const struct bcm2835_clk_desc *desc; const size_t asize = ARRAY_SIZE(clk_desc_array); @@ -98,7 +98,7 @@ Signed-off-by: Phil Elwell size_t i; u32 clk_id; int ret; -@@ -2184,6 +2213,14 @@ static int bcm2835_clk_probe(struct plat +@@ -2179,6 +2208,14 @@ static int bcm2835_clk_probe(struct plat if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); diff --git a/target/linux/bcm27xx/patches-4.19/950-0025-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch b/target/linux/bcm27xx/patches-4.19/950-0025-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch index 0cbfa5ec21..0f91be9a55 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0025-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0025-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch @@ -20,7 +20,7 @@ Signed-off-by: Eric Anholt --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1456,6 +1456,15 @@ static struct clk_hw *bcm2835_register_c +@@ -1451,6 +1451,15 @@ static struct clk_hw *bcm2835_register_c init.flags = data->flags | CLK_IGNORE_UNUSED; /* diff --git a/target/linux/bcm27xx/patches-4.19/950-0033-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch b/target/linux/bcm27xx/patches-4.19/950-0033-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch index 2e11030e98..661f3f79cb 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0033-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0033-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch @@ -14,7 +14,7 @@ use the same logic. --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2578,7 +2578,12 @@ static int pl011_setup_port(struct devic +@@ -2557,7 +2557,12 @@ static int pl011_setup_port(struct devic if (IS_ERR(base)) return PTR_ERR(base); diff --git a/target/linux/bcm27xx/patches-4.19/950-0034-amba_pl011-Round-input-clock-up.patch b/target/linux/bcm27xx/patches-4.19/950-0034-amba_pl011-Round-input-clock-up.patch index 15673384a6..777ebb8d3e 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0034-amba_pl011-Round-input-clock-up.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0034-amba_pl011-Round-input-clock-up.patch @@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell /* Clear pending error and receive interrupts */ pl011_write(UART011_OEIS | UART011_BEIS | UART011_PEIS | -@@ -2324,7 +2341,7 @@ static int pl011_console_setup(struct co +@@ -2303,7 +2320,7 @@ static int pl011_console_setup(struct co plat->init(); } @@ -68,7 +68,7 @@ Signed-off-by: Phil Elwell if (uap->vendor->fixed_options) { baud = uap->fixed_baud; -@@ -2509,6 +2526,7 @@ static struct uart_driver amba_reg = { +@@ -2488,6 +2505,7 @@ static struct uart_driver amba_reg = { .cons = AMBA_CONSOLE, }; @@ -76,7 +76,7 @@ Signed-off-by: Phil Elwell static int pl011_probe_dt_alias(int index, struct device *dev) { struct device_node *np; -@@ -2540,6 +2558,7 @@ static int pl011_probe_dt_alias(int inde +@@ -2519,6 +2537,7 @@ static int pl011_probe_dt_alias(int inde return ret; } diff --git a/target/linux/bcm27xx/patches-4.19/950-0036-amba_pl011-Add-cts-event-workaround-DT-property.patch b/target/linux/bcm27xx/patches-4.19/950-0036-amba_pl011-Add-cts-event-workaround-DT-property.patch index 241669a0ef..c2ac38884d 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0036-amba_pl011-Add-cts-event-workaround-DT-property.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0036-amba_pl011-Add-cts-event-workaround-DT-property.patch @@ -33,7 +33,7 @@ Signed-off-by: Phil Elwell --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2665,6 +2665,11 @@ static int pl011_probe(struct amba_devic +@@ -2644,6 +2644,11 @@ static int pl011_probe(struct amba_devic if (IS_ERR(uap->clk)) return PTR_ERR(uap->clk); diff --git a/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch index 564281f757..284569d379 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch @@ -917,7 +917,7 @@ Fixes https://github.com/raspberrypi/linux/issues/2408 } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5307,7 +5307,7 @@ static void port_event(struct usb_hub *h +@@ -5310,7 +5310,7 @@ static void port_event(struct usb_hub *h u16 status = 0, unused; port_dev->over_current_count++; diff --git a/target/linux/bcm27xx/patches-4.19/950-0276-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch b/target/linux/bcm27xx/patches-4.19/950-0276-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch index 68142efd55..3e86aa0fe8 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0276-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0276-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch @@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2273,7 +2273,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2268,7 +2268,7 @@ static int bcm2835_clk_probe(struct plat return ret; /* note that we have registered all the clocks */ diff --git a/target/linux/bcm27xx/patches-4.19/950-0470-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/bcm27xx/patches-4.19/950-0470-bcmgenet-Better-coalescing-parameter-defaults.patch index bf74fb6f15..a82ac5b1ba 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0470-bcmgenet-Better-coalescing-parameter-defaults.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0470-bcmgenet-Better-coalescing-parameter-defaults.patch @@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell /* Disable rate control for now */ bcmgenet_tdma_ring_writel(priv, index, flow_period_val, TDMA_FLOW_PERIOD); -@@ -3583,9 +3583,12 @@ static int bcmgenet_probe(struct platfor +@@ -3585,9 +3585,12 @@ static int bcmgenet_probe(struct platfor netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1); /* Set default coalescing parameters */ diff --git a/target/linux/bcm27xx/patches-4.19/950-0533-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch b/target/linux/bcm27xx/patches-4.19/950-0533-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch index bceee816a1..b0879eb8bd 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0533-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0533-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch @@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1097,15 +1097,19 @@ static int bcm2835_clock_set_rate(struct +@@ -1092,15 +1092,19 @@ static int bcm2835_clock_set_rate(struct spin_lock(&cprman->regs_lock); @@ -42,7 +42,7 @@ Signed-off-by: Eric Anholt ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0; cprman_write(cprman, data->ctl_reg, ctl); -@@ -1477,7 +1481,7 @@ static struct clk_hw *bcm2835_register_c +@@ -1472,7 +1476,7 @@ static struct clk_hw *bcm2835_register_c init.ops = &bcm2835_vpu_clock_clk_ops; } else { init.ops = &bcm2835_clock_clk_ops; diff --git a/target/linux/bcm27xx/patches-4.19/950-0534-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch b/target/linux/bcm27xx/patches-4.19/950-0534-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch index e6e2efd24d..736d501b2b 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0534-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0534-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch @@ -15,7 +15,7 @@ Signed-off-by: Eric Anholt --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1086,8 +1086,10 @@ static int bcm2835_clock_on(struct clk_h +@@ -1081,8 +1081,10 @@ static int bcm2835_clock_on(struct clk_h return 0; } @@ -28,7 +28,7 @@ Signed-off-by: Eric Anholt { struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); struct bcm2835_cprman *cprman = clock->cprman; -@@ -1109,6 +1111,11 @@ static int bcm2835_clock_set_rate(struct +@@ -1104,6 +1106,11 @@ static int bcm2835_clock_set_rate(struct bcm2835_clock_wait_busy(clock); } @@ -40,7 +40,7 @@ Signed-off-by: Eric Anholt ctl &= ~CM_FRAC; ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0; cprman_write(cprman, data->ctl_reg, ctl); -@@ -1120,6 +1127,12 @@ static int bcm2835_clock_set_rate(struct +@@ -1115,6 +1122,12 @@ static int bcm2835_clock_set_rate(struct return 0; } @@ -53,7 +53,7 @@ Signed-off-by: Eric Anholt static bool bcm2835_clk_is_pllc(struct clk_hw *hw) { -@@ -1303,6 +1316,7 @@ static const struct clk_ops bcm2835_cloc +@@ -1298,6 +1311,7 @@ static const struct clk_ops bcm2835_cloc .unprepare = bcm2835_clock_off, .recalc_rate = bcm2835_clock_get_rate, .set_rate = bcm2835_clock_set_rate, @@ -61,7 +61,7 @@ Signed-off-by: Eric Anholt .determine_rate = bcm2835_clock_determine_rate, .set_parent = bcm2835_clock_set_parent, .get_parent = bcm2835_clock_get_parent, -@@ -1481,7 +1495,6 @@ static struct clk_hw *bcm2835_register_c +@@ -1476,7 +1490,6 @@ static struct clk_hw *bcm2835_register_c init.ops = &bcm2835_vpu_clock_clk_ops; } else { init.ops = &bcm2835_clock_clk_ops; diff --git a/target/linux/bcm27xx/patches-4.19/950-0572-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch b/target/linux/bcm27xx/patches-4.19/950-0572-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch index 07e0fbd144..1b0c01659d 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0572-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0572-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch @@ -27,7 +27,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c -@@ -2071,6 +2071,16 @@ reset: +@@ -2092,6 +2092,16 @@ reset: return ret; } diff --git a/target/linux/bcm27xx/patches-4.19/950-0714-clk-bcm2835-Introduce-SoC-specific-clock-registratio.patch b/target/linux/bcm27xx/patches-4.19/950-0714-clk-bcm2835-Introduce-SoC-specific-clock-registratio.patch index 3fbfbd37af..ab92d131c7 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0714-clk-bcm2835-Introduce-SoC-specific-clock-registratio.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0714-clk-bcm2835-Introduce-SoC-specific-clock-registratio.patch @@ -52,7 +52,7 @@ Reviewed-by: Eric Anholt static inline void cprman_write(struct bcm2835_cprman *cprman, u32 reg, u32 val) { writel(CM_PASSWORD | val, cprman->regs + reg); -@@ -1530,22 +1537,28 @@ typedef struct clk_hw *(*bcm2835_clk_reg +@@ -1525,22 +1532,28 @@ typedef struct clk_hw *(*bcm2835_clk_reg const void *data); struct bcm2835_clk_desc { bcm2835_clk_register clk_register; @@ -89,7 +89,7 @@ Reviewed-by: Eric Anholt &(struct bcm2835_gate_data) \ {__VA_ARGS__}) -@@ -1559,7 +1572,8 @@ static const char *const bcm2835_clock_o +@@ -1554,7 +1567,8 @@ static const char *const bcm2835_clock_o "testdebug1" }; @@ -99,7 +99,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), \ .parents = bcm2835_clock_osc_parents, \ __VA_ARGS__) -@@ -1576,7 +1590,8 @@ static const char *const bcm2835_clock_p +@@ -1571,7 +1585,8 @@ static const char *const bcm2835_clock_p "pllh_aux", }; @@ -109,7 +109,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), \ .parents = bcm2835_clock_per_parents, \ __VA_ARGS__) -@@ -1601,7 +1616,8 @@ static const char *const bcm2835_pcm_per +@@ -1596,7 +1611,8 @@ static const char *const bcm2835_pcm_per "-", }; @@ -119,7 +119,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_pcm_per_parents), \ .parents = bcm2835_pcm_per_parents, \ __VA_ARGS__) -@@ -1620,7 +1636,8 @@ static const char *const bcm2835_clock_v +@@ -1615,7 +1631,8 @@ static const char *const bcm2835_clock_v "pllc_core2", }; @@ -129,7 +129,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), \ .parents = bcm2835_clock_vpu_parents, \ __VA_ARGS__) -@@ -1656,12 +1673,14 @@ static const char *const bcm2835_clock_d +@@ -1651,12 +1668,14 @@ static const char *const bcm2835_clock_d "dsi1_byte_inv", }; @@ -146,7 +146,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_clock_dsi1_parents), \ .parents = bcm2835_clock_dsi1_parents, \ __VA_ARGS__) -@@ -1681,6 +1700,7 @@ static const struct bcm2835_clk_desc clk +@@ -1676,6 +1695,7 @@ static const struct bcm2835_clk_desc clk * AUDIO domain is on. */ [BCM2835_PLLA] = REGISTER_PLL( @@ -154,7 +154,7 @@ Reviewed-by: Eric Anholt .name = "plla", .cm_ctrl_reg = CM_PLLA, .a2w_ctrl_reg = A2W_PLLA_CTRL, -@@ -1695,6 +1715,7 @@ static const struct bcm2835_clk_desc clk +@@ -1690,6 +1710,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 2400000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLA_CORE] = REGISTER_PLL_DIV( @@ -162,7 +162,7 @@ Reviewed-by: Eric Anholt .name = "plla_core", .source_pll = "plla", .cm_reg = CM_PLLA, -@@ -1704,6 +1725,7 @@ static const struct bcm2835_clk_desc clk +@@ -1699,6 +1720,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLA_PER] = REGISTER_PLL_DIV( @@ -170,7 +170,7 @@ Reviewed-by: Eric Anholt .name = "plla_per", .source_pll = "plla", .cm_reg = CM_PLLA, -@@ -1713,6 +1735,7 @@ static const struct bcm2835_clk_desc clk +@@ -1708,6 +1730,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV( @@ -178,7 +178,7 @@ Reviewed-by: Eric Anholt .name = "plla_dsi0", .source_pll = "plla", .cm_reg = CM_PLLA, -@@ -1721,6 +1744,7 @@ static const struct bcm2835_clk_desc clk +@@ -1716,6 +1739,7 @@ static const struct bcm2835_clk_desc clk .hold_mask = CM_PLLA_HOLDDSI0, .fixed_divider = 1), [BCM2835_PLLA_CCP2] = REGISTER_PLL_DIV( @@ -186,7 +186,7 @@ Reviewed-by: Eric Anholt .name = "plla_ccp2", .source_pll = "plla", .cm_reg = CM_PLLA, -@@ -1732,6 +1756,7 @@ static const struct bcm2835_clk_desc clk +@@ -1727,6 +1751,7 @@ static const struct bcm2835_clk_desc clk /* PLLB is used for the ARM's clock. */ [BCM2835_PLLB] = REGISTER_PLL( @@ -194,7 +194,7 @@ Reviewed-by: Eric Anholt .name = "pllb", .cm_ctrl_reg = CM_PLLB, .a2w_ctrl_reg = A2W_PLLB_CTRL, -@@ -1746,6 +1771,7 @@ static const struct bcm2835_clk_desc clk +@@ -1741,6 +1766,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 3000000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLB_ARM] = REGISTER_PLL_DIV( @@ -202,7 +202,7 @@ Reviewed-by: Eric Anholt .name = "pllb_arm", .source_pll = "pllb", .cm_reg = CM_PLLB, -@@ -1762,6 +1788,7 @@ static const struct bcm2835_clk_desc clk +@@ -1757,6 +1783,7 @@ static const struct bcm2835_clk_desc clk * AUDIO domain is on. */ [BCM2835_PLLC] = REGISTER_PLL( @@ -210,7 +210,7 @@ Reviewed-by: Eric Anholt .name = "pllc", .cm_ctrl_reg = CM_PLLC, .a2w_ctrl_reg = A2W_PLLC_CTRL, -@@ -1776,6 +1803,7 @@ static const struct bcm2835_clk_desc clk +@@ -1771,6 +1798,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 3000000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLC_CORE0] = REGISTER_PLL_DIV( @@ -218,7 +218,7 @@ Reviewed-by: Eric Anholt .name = "pllc_core0", .source_pll = "pllc", .cm_reg = CM_PLLC, -@@ -1785,6 +1813,7 @@ static const struct bcm2835_clk_desc clk +@@ -1780,6 +1808,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV( @@ -226,7 +226,7 @@ Reviewed-by: Eric Anholt .name = "pllc_core1", .source_pll = "pllc", .cm_reg = CM_PLLC, -@@ -1794,6 +1823,7 @@ static const struct bcm2835_clk_desc clk +@@ -1789,6 +1818,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV( @@ -234,7 +234,7 @@ Reviewed-by: Eric Anholt .name = "pllc_core2", .source_pll = "pllc", .cm_reg = CM_PLLC, -@@ -1803,6 +1833,7 @@ static const struct bcm2835_clk_desc clk +@@ -1798,6 +1828,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLC_PER] = REGISTER_PLL_DIV( @@ -242,7 +242,7 @@ Reviewed-by: Eric Anholt .name = "pllc_per", .source_pll = "pllc", .cm_reg = CM_PLLC, -@@ -1819,6 +1850,7 @@ static const struct bcm2835_clk_desc clk +@@ -1814,6 +1845,7 @@ static const struct bcm2835_clk_desc clk * AUDIO domain is on. */ [BCM2835_PLLD] = REGISTER_PLL( @@ -250,7 +250,7 @@ Reviewed-by: Eric Anholt .name = "plld", .cm_ctrl_reg = CM_PLLD, .a2w_ctrl_reg = A2W_PLLD_CTRL, -@@ -1833,6 +1865,7 @@ static const struct bcm2835_clk_desc clk +@@ -1828,6 +1860,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 2400000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLD_CORE] = REGISTER_PLL_DIV( @@ -258,7 +258,7 @@ Reviewed-by: Eric Anholt .name = "plld_core", .source_pll = "plld", .cm_reg = CM_PLLD, -@@ -1842,6 +1875,7 @@ static const struct bcm2835_clk_desc clk +@@ -1837,6 +1870,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLD_PER] = REGISTER_PLL_DIV( @@ -266,7 +266,7 @@ Reviewed-by: Eric Anholt .name = "plld_per", .source_pll = "plld", .cm_reg = CM_PLLD, -@@ -1851,6 +1885,7 @@ static const struct bcm2835_clk_desc clk +@@ -1846,6 +1880,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLD_DSI0] = REGISTER_PLL_DIV( @@ -274,7 +274,7 @@ Reviewed-by: Eric Anholt .name = "plld_dsi0", .source_pll = "plld", .cm_reg = CM_PLLD, -@@ -1859,6 +1894,7 @@ static const struct bcm2835_clk_desc clk +@@ -1854,6 +1889,7 @@ static const struct bcm2835_clk_desc clk .hold_mask = CM_PLLD_HOLDDSI0, .fixed_divider = 1), [BCM2835_PLLD_DSI1] = REGISTER_PLL_DIV( @@ -282,7 +282,7 @@ Reviewed-by: Eric Anholt .name = "plld_dsi1", .source_pll = "plld", .cm_reg = CM_PLLD, -@@ -1874,6 +1910,7 @@ static const struct bcm2835_clk_desc clk +@@ -1869,6 +1905,7 @@ static const struct bcm2835_clk_desc clk * It is in the HDMI power domain. */ [BCM2835_PLLH] = REGISTER_PLL( @@ -290,7 +290,7 @@ Reviewed-by: Eric Anholt "pllh", .cm_ctrl_reg = CM_PLLH, .a2w_ctrl_reg = A2W_PLLH_CTRL, -@@ -1888,6 +1925,7 @@ static const struct bcm2835_clk_desc clk +@@ -1883,6 +1920,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 3000000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLH_RCAL] = REGISTER_PLL_DIV( @@ -298,7 +298,7 @@ Reviewed-by: Eric Anholt .name = "pllh_rcal", .source_pll = "pllh", .cm_reg = CM_PLLH, -@@ -1897,6 +1935,7 @@ static const struct bcm2835_clk_desc clk +@@ -1892,6 +1930,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 10, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLH_AUX] = REGISTER_PLL_DIV( @@ -306,7 +306,7 @@ Reviewed-by: Eric Anholt .name = "pllh_aux", .source_pll = "pllh", .cm_reg = CM_PLLH, -@@ -1906,6 +1945,7 @@ static const struct bcm2835_clk_desc clk +@@ -1901,6 +1940,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV( @@ -314,7 +314,7 @@ Reviewed-by: Eric Anholt .name = "pllh_pix", .source_pll = "pllh", .cm_reg = CM_PLLH, -@@ -1921,6 +1961,7 @@ static const struct bcm2835_clk_desc clk +@@ -1916,6 +1956,7 @@ static const struct bcm2835_clk_desc clk /* One Time Programmable Memory clock. Maximum 10Mhz. */ [BCM2835_CLOCK_OTP] = REGISTER_OSC_CLK( @@ -322,7 +322,7 @@ Reviewed-by: Eric Anholt .name = "otp", .ctl_reg = CM_OTPCTL, .div_reg = CM_OTPDIV, -@@ -1932,6 +1973,7 @@ static const struct bcm2835_clk_desc clk +@@ -1927,6 +1968,7 @@ static const struct bcm2835_clk_desc clk * bythe watchdog timer and the camera pulse generator. */ [BCM2835_CLOCK_TIMER] = REGISTER_OSC_CLK( @@ -330,7 +330,7 @@ Reviewed-by: Eric Anholt .name = "timer", .ctl_reg = CM_TIMERCTL, .div_reg = CM_TIMERDIV, -@@ -1942,12 +1984,14 @@ static const struct bcm2835_clk_desc clk +@@ -1937,12 +1979,14 @@ static const struct bcm2835_clk_desc clk * Generally run at 2Mhz, max 5Mhz. */ [BCM2835_CLOCK_TSENS] = REGISTER_OSC_CLK( @@ -345,7 +345,7 @@ Reviewed-by: Eric Anholt .name = "tec", .ctl_reg = CM_TECCTL, .div_reg = CM_TECDIV, -@@ -1956,6 +2000,7 @@ static const struct bcm2835_clk_desc clk +@@ -1951,6 +1995,7 @@ static const struct bcm2835_clk_desc clk /* clocks with vpu parent mux */ [BCM2835_CLOCK_H264] = REGISTER_VPU_CLK( @@ -353,7 +353,7 @@ Reviewed-by: Eric Anholt .name = "h264", .ctl_reg = CM_H264CTL, .div_reg = CM_H264DIV, -@@ -1963,6 +2008,7 @@ static const struct bcm2835_clk_desc clk +@@ -1958,6 +2003,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 1), [BCM2835_CLOCK_ISP] = REGISTER_VPU_CLK( @@ -361,7 +361,7 @@ Reviewed-by: Eric Anholt .name = "isp", .ctl_reg = CM_ISPCTL, .div_reg = CM_ISPDIV, -@@ -1975,6 +2021,7 @@ static const struct bcm2835_clk_desc clk +@@ -1970,6 +2016,7 @@ static const struct bcm2835_clk_desc clk * in the SDRAM controller can't be used. */ [BCM2835_CLOCK_SDRAM] = REGISTER_VPU_CLK( @@ -369,7 +369,7 @@ Reviewed-by: Eric Anholt .name = "sdram", .ctl_reg = CM_SDCCTL, .div_reg = CM_SDCDIV, -@@ -1982,6 +2029,7 @@ static const struct bcm2835_clk_desc clk +@@ -1977,6 +2024,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 0, .tcnt_mux = 3), [BCM2835_CLOCK_V3D] = REGISTER_VPU_CLK( @@ -377,7 +377,7 @@ Reviewed-by: Eric Anholt .name = "v3d", .ctl_reg = CM_V3DCTL, .div_reg = CM_V3DDIV, -@@ -1995,6 +2043,7 @@ static const struct bcm2835_clk_desc clk +@@ -1990,6 +2038,7 @@ static const struct bcm2835_clk_desc clk * in various hardware documentation. */ [BCM2835_CLOCK_VPU] = REGISTER_VPU_CLK( @@ -385,7 +385,7 @@ Reviewed-by: Eric Anholt .name = "vpu", .ctl_reg = CM_VPUCTL, .div_reg = CM_VPUDIV, -@@ -2006,6 +2055,7 @@ static const struct bcm2835_clk_desc clk +@@ -2001,6 +2050,7 @@ static const struct bcm2835_clk_desc clk /* clocks with per parent mux */ [BCM2835_CLOCK_AVEO] = REGISTER_PER_CLK( @@ -393,7 +393,7 @@ Reviewed-by: Eric Anholt .name = "aveo", .ctl_reg = CM_AVEOCTL, .div_reg = CM_AVEODIV, -@@ -2013,6 +2063,7 @@ static const struct bcm2835_clk_desc clk +@@ -2008,6 +2058,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 0, .tcnt_mux = 38), [BCM2835_CLOCK_CAM0] = REGISTER_PER_CLK( @@ -401,7 +401,7 @@ Reviewed-by: Eric Anholt .name = "cam0", .ctl_reg = CM_CAM0CTL, .div_reg = CM_CAM0DIV, -@@ -2020,6 +2071,7 @@ static const struct bcm2835_clk_desc clk +@@ -2015,6 +2066,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 14), [BCM2835_CLOCK_CAM1] = REGISTER_PER_CLK( @@ -409,7 +409,7 @@ Reviewed-by: Eric Anholt .name = "cam1", .ctl_reg = CM_CAM1CTL, .div_reg = CM_CAM1DIV, -@@ -2027,12 +2079,14 @@ static const struct bcm2835_clk_desc clk +@@ -2022,12 +2074,14 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 15), [BCM2835_CLOCK_DFT] = REGISTER_PER_CLK( @@ -424,7 +424,7 @@ Reviewed-by: Eric Anholt .name = "dpi", .ctl_reg = CM_DPICTL, .div_reg = CM_DPIDIV, -@@ -2042,6 +2096,7 @@ static const struct bcm2835_clk_desc clk +@@ -2037,6 +2091,7 @@ static const struct bcm2835_clk_desc clk /* Arasan EMMC clock */ [BCM2835_CLOCK_EMMC] = REGISTER_PER_CLK( @@ -432,7 +432,7 @@ Reviewed-by: Eric Anholt .name = "emmc", .ctl_reg = CM_EMMCCTL, .div_reg = CM_EMMCDIV, -@@ -2051,6 +2106,7 @@ static const struct bcm2835_clk_desc clk +@@ -2046,6 +2101,7 @@ static const struct bcm2835_clk_desc clk /* General purpose (GPIO) clocks */ [BCM2835_CLOCK_GP0] = REGISTER_PER_CLK( @@ -440,7 +440,7 @@ Reviewed-by: Eric Anholt .name = "gp0", .ctl_reg = CM_GP0CTL, .div_reg = CM_GP0DIV, -@@ -2059,6 +2115,7 @@ static const struct bcm2835_clk_desc clk +@@ -2054,6 +2110,7 @@ static const struct bcm2835_clk_desc clk .is_mash_clock = true, .tcnt_mux = 20), [BCM2835_CLOCK_GP1] = REGISTER_PER_CLK( @@ -448,7 +448,7 @@ Reviewed-by: Eric Anholt .name = "gp1", .ctl_reg = CM_GP1CTL, .div_reg = CM_GP1DIV, -@@ -2068,6 +2125,7 @@ static const struct bcm2835_clk_desc clk +@@ -2063,6 +2120,7 @@ static const struct bcm2835_clk_desc clk .is_mash_clock = true, .tcnt_mux = 21), [BCM2835_CLOCK_GP2] = REGISTER_PER_CLK( @@ -456,7 +456,7 @@ Reviewed-by: Eric Anholt .name = "gp2", .ctl_reg = CM_GP2CTL, .div_reg = CM_GP2DIV, -@@ -2077,6 +2135,7 @@ static const struct bcm2835_clk_desc clk +@@ -2072,6 +2130,7 @@ static const struct bcm2835_clk_desc clk /* HDMI state machine */ [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( @@ -464,7 +464,7 @@ Reviewed-by: Eric Anholt .name = "hsm", .ctl_reg = CM_HSMCTL, .div_reg = CM_HSMDIV, -@@ -2084,6 +2143,7 @@ static const struct bcm2835_clk_desc clk +@@ -2079,6 +2138,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 22), [BCM2835_CLOCK_PCM] = REGISTER_PCM_CLK( @@ -472,7 +472,7 @@ Reviewed-by: Eric Anholt .name = "pcm", .ctl_reg = CM_PCMCTL, .div_reg = CM_PCMDIV, -@@ -2093,6 +2153,7 @@ static const struct bcm2835_clk_desc clk +@@ -2088,6 +2148,7 @@ static const struct bcm2835_clk_desc clk .low_jitter = true, .tcnt_mux = 23), [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( @@ -480,7 +480,7 @@ Reviewed-by: Eric Anholt .name = "pwm", .ctl_reg = CM_PWMCTL, .div_reg = CM_PWMDIV, -@@ -2101,6 +2162,7 @@ static const struct bcm2835_clk_desc clk +@@ -2096,6 +2157,7 @@ static const struct bcm2835_clk_desc clk .is_mash_clock = true, .tcnt_mux = 24), [BCM2835_CLOCK_SLIM] = REGISTER_PER_CLK( @@ -488,7 +488,7 @@ Reviewed-by: Eric Anholt .name = "slim", .ctl_reg = CM_SLIMCTL, .div_reg = CM_SLIMDIV, -@@ -2109,6 +2171,7 @@ static const struct bcm2835_clk_desc clk +@@ -2104,6 +2166,7 @@ static const struct bcm2835_clk_desc clk .is_mash_clock = true, .tcnt_mux = 25), [BCM2835_CLOCK_SMI] = REGISTER_PER_CLK( @@ -496,7 +496,7 @@ Reviewed-by: Eric Anholt .name = "smi", .ctl_reg = CM_SMICTL, .div_reg = CM_SMIDIV, -@@ -2116,6 +2179,7 @@ static const struct bcm2835_clk_desc clk +@@ -2111,6 +2174,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 27), [BCM2835_CLOCK_UART] = REGISTER_PER_CLK( @@ -504,7 +504,7 @@ Reviewed-by: Eric Anholt .name = "uart", .ctl_reg = CM_UARTCTL, .div_reg = CM_UARTDIV, -@@ -2125,6 +2189,7 @@ static const struct bcm2835_clk_desc clk +@@ -2120,6 +2184,7 @@ static const struct bcm2835_clk_desc clk /* TV encoder clock. Only operating frequency is 108Mhz. */ [BCM2835_CLOCK_VEC] = REGISTER_PER_CLK( @@ -512,7 +512,7 @@ Reviewed-by: Eric Anholt .name = "vec", .ctl_reg = CM_VECCTL, .div_reg = CM_VECDIV, -@@ -2139,6 +2204,7 @@ static const struct bcm2835_clk_desc clk +@@ -2134,6 +2199,7 @@ static const struct bcm2835_clk_desc clk /* dsi clocks */ [BCM2835_CLOCK_DSI0E] = REGISTER_PER_CLK( @@ -520,7 +520,7 @@ Reviewed-by: Eric Anholt .name = "dsi0e", .ctl_reg = CM_DSI0ECTL, .div_reg = CM_DSI0EDIV, -@@ -2146,6 +2212,7 @@ static const struct bcm2835_clk_desc clk +@@ -2141,6 +2207,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 18), [BCM2835_CLOCK_DSI1E] = REGISTER_PER_CLK( @@ -528,7 +528,7 @@ Reviewed-by: Eric Anholt .name = "dsi1e", .ctl_reg = CM_DSI1ECTL, .div_reg = CM_DSI1EDIV, -@@ -2153,6 +2220,7 @@ static const struct bcm2835_clk_desc clk +@@ -2148,6 +2215,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 19), [BCM2835_CLOCK_DSI0P] = REGISTER_DSI0_CLK( @@ -536,7 +536,7 @@ Reviewed-by: Eric Anholt .name = "dsi0p", .ctl_reg = CM_DSI0PCTL, .div_reg = CM_DSI0PDIV, -@@ -2160,6 +2228,7 @@ static const struct bcm2835_clk_desc clk +@@ -2155,6 +2223,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 0, .tcnt_mux = 12), [BCM2835_CLOCK_DSI1P] = REGISTER_DSI1_CLK( @@ -544,7 +544,7 @@ Reviewed-by: Eric Anholt .name = "dsi1p", .ctl_reg = CM_DSI1PCTL, .div_reg = CM_DSI1PDIV, -@@ -2176,6 +2245,7 @@ static const struct bcm2835_clk_desc clk +@@ -2171,6 +2240,7 @@ static const struct bcm2835_clk_desc clk * non-stop vpu clock. */ [BCM2835_CLOCK_PERI_IMAGE] = REGISTER_GATE( @@ -552,7 +552,7 @@ Reviewed-by: Eric Anholt .name = "peri_image", .parent = "vpu", .ctl_reg = CM_PERIICTL), -@@ -2223,11 +2293,16 @@ static int bcm2835_clk_probe(struct plat +@@ -2218,11 +2288,16 @@ static int bcm2835_clk_probe(struct plat struct resource *res; const struct bcm2835_clk_desc *desc; const size_t asize = ARRAY_SIZE(clk_desc_array); @@ -569,7 +569,7 @@ Reviewed-by: Eric Anholt cprman = devm_kzalloc(dev, struct_size(cprman, onecell.hws, asize), GFP_KERNEL); -@@ -2278,8 +2353,10 @@ static int bcm2835_clk_probe(struct plat +@@ -2273,8 +2348,10 @@ static int bcm2835_clk_probe(struct plat for (i = 0; i < asize; i++) { desc = &clk_desc_array[i]; @@ -581,7 +581,7 @@ Reviewed-by: Eric Anholt } ret = bcm2835_mark_sdc_parent_critical(hws[BCM2835_CLOCK_SDRAM]->clk); -@@ -2297,8 +2374,12 @@ static int bcm2835_clk_probe(struct plat +@@ -2292,8 +2369,12 @@ static int bcm2835_clk_probe(struct plat return 0; } diff --git a/target/linux/bcm27xx/patches-4.19/950-0715-clk-bcm2835-Add-BCM2711_CLOCK_EMMC2-support.patch b/target/linux/bcm27xx/patches-4.19/950-0715-clk-bcm2835-Add-BCM2711_CLOCK_EMMC2-support.patch index 6057304852..a431832229 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0715-clk-bcm2835-Add-BCM2711_CLOCK_EMMC2-support.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0715-clk-bcm2835-Add-BCM2711_CLOCK_EMMC2-support.patch @@ -50,7 +50,7 @@ Reviewed-by: Eric Anholt /* * Names of clocks used within the driver that need to be replaced -@@ -2104,6 +2107,16 @@ static const struct bcm2835_clk_desc clk +@@ -2099,6 +2102,16 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 39), @@ -67,7 +67,7 @@ Reviewed-by: Eric Anholt /* General purpose (GPIO) clocks */ [BCM2835_CLOCK_GP0] = REGISTER_PER_CLK( SOC_ALL, -@@ -2378,8 +2391,13 @@ static const struct cprman_plat_data cpr +@@ -2373,8 +2386,13 @@ static const struct cprman_plat_data cpr .soc = SOC_BCM2835, }; diff --git a/target/linux/bcm27xx/patches-4.19/950-0725-bcm2711-Retain-support-for-old-dtbs.patch b/target/linux/bcm27xx/patches-4.19/950-0725-bcm2711-Retain-support-for-old-dtbs.patch index 5b6625a8b3..7d2cad9f41 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0725-bcm2711-Retain-support-for-old-dtbs.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0725-bcm2711-Retain-support-for-old-dtbs.patch @@ -30,7 +30,7 @@ Signed-off-by: Phil Elwell }; --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2398,6 +2398,8 @@ static const struct cprman_plat_data cpr +@@ -2393,6 +2393,8 @@ static const struct cprman_plat_data cpr static const struct of_device_id bcm2835_clk_of_match[] = { { .compatible = "brcm,bcm2835-cprman", .data = &cprman_bcm2835_plat_data }, { .compatible = "brcm,bcm2711-cprman", .data = &cprman_bcm2711_plat_data }, diff --git a/target/linux/bcm27xx/patches-4.19/950-0755-clk-bcm2835-Avoid-null-pointer-exception.patch b/target/linux/bcm27xx/patches-4.19/950-0755-clk-bcm2835-Avoid-null-pointer-exception.patch index 8be224c7cf..2d1d963743 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0755-clk-bcm2835-Avoid-null-pointer-exception.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0755-clk-bcm2835-Avoid-null-pointer-exception.patch @@ -12,7 +12,7 @@ Signed-off-by: popcornmix --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2290,9 +2290,11 @@ static bool bcm2835_clk_is_claimed(const +@@ -2285,9 +2285,11 @@ static bool bcm2835_clk_is_claimed(const int i; for (i = 0; i < ARRAY_SIZE(clk_desc_array); i++) { diff --git a/target/linux/bcm27xx/patches-4.19/950-0762-clk-bcm2835-remove-pllb.patch b/target/linux/bcm27xx/patches-4.19/950-0762-clk-bcm2835-remove-pllb.patch index 5dcb2d28a0..ff84418b81 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0762-clk-bcm2835-remove-pllb.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0762-clk-bcm2835-remove-pllb.patch @@ -17,7 +17,7 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1757,32 +1757,10 @@ static const struct bcm2835_clk_desc clk +@@ -1752,32 +1752,10 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), diff --git a/target/linux/bcm27xx/patches-4.19/950-0767-clk-bcm2835-Disable-v3d-clock.patch b/target/linux/bcm27xx/patches-4.19/950-0767-clk-bcm2835-Disable-v3d-clock.patch index ee761c62f5..ec369f9453 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0767-clk-bcm2835-Disable-v3d-clock.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0767-clk-bcm2835-Disable-v3d-clock.patch @@ -12,7 +12,7 @@ Signed-off-by: popcornmix --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1727,16 +1727,12 @@ static const struct bcm2835_clk_desc clk +@@ -1722,16 +1722,12 @@ static const struct bcm2835_clk_desc clk .hold_mask = CM_PLLA_HOLDCORE, .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), @@ -35,7 +35,7 @@ Signed-off-by: popcornmix [BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV( SOC_ALL, .name = "plla_dsi0", -@@ -2009,14 +2005,12 @@ static const struct bcm2835_clk_desc clk +@@ -2004,14 +2000,12 @@ static const struct bcm2835_clk_desc clk .int_bits = 6, .frac_bits = 0, .tcnt_mux = 3), diff --git a/target/linux/bcm27xx/patches-4.19/950-0792-Initialise-rpi-firmware-before-clk-bcm2835.patch b/target/linux/bcm27xx/patches-4.19/950-0792-Initialise-rpi-firmware-before-clk-bcm2835.patch index a03ec0cab8..356c81ed41 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0792-Initialise-rpi-firmware-before-clk-bcm2835.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0792-Initialise-rpi-firmware-before-clk-bcm2835.patch @@ -25,7 +25,7 @@ Co-authored-by: Phil Elwell --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2390,7 +2390,7 @@ static int __init __bcm2835_clk_driver_i +@@ -2385,7 +2385,7 @@ static int __init __bcm2835_clk_driver_i { return platform_driver_register(&bcm2835_clk_driver); } diff --git a/target/linux/bcm27xx/patches-4.19/950-0795-tty-amba-pl011-Add-un-throttle-support.patch b/target/linux/bcm27xx/patches-4.19/950-0795-tty-amba-pl011-Add-un-throttle-support.patch index 43044de10e..fc47a833e9 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0795-tty-amba-pl011-Add-un-throttle-support.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0795-tty-amba-pl011-Add-un-throttle-support.patch @@ -50,7 +50,7 @@ Signed-off-by: Phil Elwell static void pl011_stop_rx(struct uart_port *port) { struct uart_amba_port *uap = -@@ -2168,6 +2194,8 @@ static const struct uart_ops amba_pl011_ +@@ -2151,6 +2177,8 @@ static const struct uart_ops amba_pl011_ .stop_tx = pl011_stop_tx, .start_tx = pl011_start_tx, .stop_rx = pl011_stop_rx, diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-01-MIPS-BCM63XX-add-clkdev-lookup-support.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-01-MIPS-BCM63XX-add-clkdev-lookup-support.patch index a20b9f1c9d..094eabdd68 100644 --- a/target/linux/brcm63xx/patches-4.14/001-4.15-01-MIPS-BCM63XX-add-clkdev-lookup-support.patch +++ b/target/linux/brcm63xx/patches-4.14/001-4.15-01-MIPS-BCM63XX-add-clkdev-lookup-support.patch @@ -34,7 +34,7 @@ Signed-off-by: Jonas Gorski #include #include #include -@@ -365,44 +366,103 @@ long clk_round_rate(struct clk *clk, uns +@@ -371,44 +372,103 @@ long clk_round_rate(struct clk *clk, uns } EXPORT_SYMBOL_GPL(clk_round_rate); @@ -176,7 +176,7 @@ Signed-off-by: Jonas Gorski #define HSSPI_PLL_HZ_6328 133333333 #define HSSPI_PLL_HZ_6362 400000000 -@@ -410,11 +470,31 @@ EXPORT_SYMBOL(clk_put); +@@ -416,11 +476,31 @@ EXPORT_SYMBOL(clk_put); static int __init bcm63xx_clk_init(void) { switch (bcm63xx_get_cpu_id()) { diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-02-MIPS-BCM63XX-provide-periph-clock-as-refclk-for-uart.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-02-MIPS-BCM63XX-provide-periph-clock-as-refclk-for-uart.patch index fa2b91180e..68a5704ff5 100644 --- a/target/linux/brcm63xx/patches-4.14/001-4.15-02-MIPS-BCM63XX-provide-periph-clock-as-refclk-for-uart.patch +++ b/target/linux/brcm63xx/patches-4.14/001-4.15-02-MIPS-BCM63XX-provide-periph-clock-as-refclk-for-uart.patch @@ -13,7 +13,7 @@ Signed-off-by: Jonas Gorski --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -369,6 +369,8 @@ EXPORT_SYMBOL_GPL(clk_round_rate); +@@ -375,6 +375,8 @@ EXPORT_SYMBOL_GPL(clk_round_rate); static struct clk_lookup bcm3368_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), @@ -22,7 +22,7 @@ Signed-off-by: Jonas Gorski /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -382,6 +384,8 @@ static struct clk_lookup bcm3368_clks[] +@@ -388,6 +390,8 @@ static struct clk_lookup bcm3368_clks[] static struct clk_lookup bcm6328_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), @@ -31,7 +31,7 @@ Signed-off-by: Jonas Gorski /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -393,6 +397,7 @@ static struct clk_lookup bcm6328_clks[] +@@ -399,6 +403,7 @@ static struct clk_lookup bcm6328_clks[] static struct clk_lookup bcm6338_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), @@ -39,7 +39,7 @@ Signed-off-by: Jonas Gorski /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -405,6 +410,7 @@ static struct clk_lookup bcm6338_clks[] +@@ -411,6 +416,7 @@ static struct clk_lookup bcm6338_clks[] static struct clk_lookup bcm6345_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), @@ -47,7 +47,7 @@ Signed-off-by: Jonas Gorski /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -417,6 +423,7 @@ static struct clk_lookup bcm6345_clks[] +@@ -423,6 +429,7 @@ static struct clk_lookup bcm6345_clks[] static struct clk_lookup bcm6348_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), @@ -55,7 +55,7 @@ Signed-off-by: Jonas Gorski /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -429,6 +436,8 @@ static struct clk_lookup bcm6348_clks[] +@@ -435,6 +442,8 @@ static struct clk_lookup bcm6348_clks[] static struct clk_lookup bcm6358_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), @@ -64,7 +64,7 @@ Signed-off-by: Jonas Gorski /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -442,6 +451,8 @@ static struct clk_lookup bcm6358_clks[] +@@ -448,6 +457,8 @@ static struct clk_lookup bcm6358_clks[] static struct clk_lookup bcm6362_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), @@ -73,7 +73,7 @@ Signed-off-by: Jonas Gorski /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -455,6 +466,8 @@ static struct clk_lookup bcm6362_clks[] +@@ -461,6 +472,8 @@ static struct clk_lookup bcm6362_clks[] static struct clk_lookup bcm6368_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-05-MIPS-BCM63XX-move-the-HSSPI-PLL-HZ-into-its-own-cloc.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-05-MIPS-BCM63XX-move-the-HSSPI-PLL-HZ-into-its-own-cloc.patch index 734fd7e500..582b91307b 100644 --- a/target/linux/brcm63xx/patches-4.14/001-4.15-05-MIPS-BCM63XX-move-the-HSSPI-PLL-HZ-into-its-own-cloc.patch +++ b/target/linux/brcm63xx/patches-4.14/001-4.15-05-MIPS-BCM63XX-move-the-HSSPI-PLL-HZ-into-its-own-cloc.patch @@ -26,7 +26,7 @@ Signed-off-by: Jonas Gorski /* * XTM clock -@@ -386,6 +390,7 @@ static struct clk_lookup bcm6328_clks[] +@@ -392,6 +396,7 @@ static struct clk_lookup bcm6328_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -34,7 +34,7 @@ Signed-off-by: Jonas Gorski /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -453,6 +458,7 @@ static struct clk_lookup bcm6362_clks[] +@@ -459,6 +464,7 @@ static struct clk_lookup bcm6362_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -42,7 +42,7 @@ Signed-off-by: Jonas Gorski /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -487,7 +493,7 @@ static int __init bcm63xx_clk_init(void) +@@ -493,7 +499,7 @@ static int __init bcm63xx_clk_init(void) clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks)); break; case BCM6328_CPU_ID: @@ -51,7 +51,7 @@ Signed-off-by: Jonas Gorski clkdev_add_table(bcm6328_clks, ARRAY_SIZE(bcm6328_clks)); break; case BCM6338_CPU_ID: -@@ -503,7 +509,7 @@ static int __init bcm63xx_clk_init(void) +@@ -509,7 +515,7 @@ static int __init bcm63xx_clk_init(void) clkdev_add_table(bcm6358_clks, ARRAY_SIZE(bcm6358_clks)); break; case BCM6362_CPU_ID: diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-06-MIPS-BCM63XX-provide-enet-clocks-as-enet-to-the-ethe.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-06-MIPS-BCM63XX-provide-enet-clocks-as-enet-to-the-ethe.patch index 39ce045f7c..339e9fa263 100644 --- a/target/linux/brcm63xx/patches-4.14/001-4.15-06-MIPS-BCM63XX-provide-enet-clocks-as-enet-to-the-ethe.patch +++ b/target/linux/brcm63xx/patches-4.14/001-4.15-06-MIPS-BCM63XX-provide-enet-clocks-as-enet-to-the-ethe.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonas Gorski --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -383,6 +383,8 @@ static struct clk_lookup bcm3368_clks[] +@@ -389,6 +389,8 @@ static struct clk_lookup bcm3368_clks[] CLKDEV_INIT(NULL, "usbd", &clk_usbd), CLKDEV_INIT(NULL, "spi", &clk_spi), CLKDEV_INIT(NULL, "pcm", &clk_pcm), @@ -24,7 +24,7 @@ Signed-off-by: Jonas Gorski }; static struct clk_lookup bcm6328_clks[] = { -@@ -410,6 +412,7 @@ static struct clk_lookup bcm6338_clks[] +@@ -416,6 +418,7 @@ static struct clk_lookup bcm6338_clks[] CLKDEV_INIT(NULL, "usbh", &clk_usbh), CLKDEV_INIT(NULL, "usbd", &clk_usbd), CLKDEV_INIT(NULL, "spi", &clk_spi), @@ -32,7 +32,7 @@ Signed-off-by: Jonas Gorski }; static struct clk_lookup bcm6345_clks[] = { -@@ -423,6 +426,7 @@ static struct clk_lookup bcm6345_clks[] +@@ -429,6 +432,7 @@ static struct clk_lookup bcm6345_clks[] CLKDEV_INIT(NULL, "usbh", &clk_usbh), CLKDEV_INIT(NULL, "usbd", &clk_usbd), CLKDEV_INIT(NULL, "spi", &clk_spi), @@ -40,7 +40,7 @@ Signed-off-by: Jonas Gorski }; static struct clk_lookup bcm6348_clks[] = { -@@ -436,6 +440,8 @@ static struct clk_lookup bcm6348_clks[] +@@ -442,6 +446,8 @@ static struct clk_lookup bcm6348_clks[] CLKDEV_INIT(NULL, "usbh", &clk_usbh), CLKDEV_INIT(NULL, "usbd", &clk_usbd), CLKDEV_INIT(NULL, "spi", &clk_spi), @@ -49,7 +49,7 @@ Signed-off-by: Jonas Gorski }; static struct clk_lookup bcm6358_clks[] = { -@@ -451,6 +457,8 @@ static struct clk_lookup bcm6358_clks[] +@@ -457,6 +463,8 @@ static struct clk_lookup bcm6358_clks[] CLKDEV_INIT(NULL, "usbd", &clk_usbd), CLKDEV_INIT(NULL, "spi", &clk_spi), CLKDEV_INIT(NULL, "pcm", &clk_pcm), diff --git a/target/linux/brcm63xx/patches-4.14/001-4.15-07-MIPS-BCM63XX-split-out-swpkt_sar-usb-clocks.patch b/target/linux/brcm63xx/patches-4.14/001-4.15-07-MIPS-BCM63XX-split-out-swpkt_sar-usb-clocks.patch index a59aedaf66..0b95e18814 100644 --- a/target/linux/brcm63xx/patches-4.14/001-4.15-07-MIPS-BCM63XX-split-out-swpkt_sar-usb-clocks.patch +++ b/target/linux/brcm63xx/patches-4.14/001-4.15-07-MIPS-BCM63XX-split-out-swpkt_sar-usb-clocks.patch @@ -94,7 +94,7 @@ Signed-off-by: Jonas Gorski if (enable) { /* reset sar core afer clock change */ -@@ -457,6 +496,8 @@ static struct clk_lookup bcm6358_clks[] +@@ -463,6 +502,8 @@ static struct clk_lookup bcm6358_clks[] CLKDEV_INIT(NULL, "usbd", &clk_usbd), CLKDEV_INIT(NULL, "spi", &clk_spi), CLKDEV_INIT(NULL, "pcm", &clk_pcm), diff --git a/target/linux/brcm63xx/patches-4.14/339-MIPS-BCM63XX-add-support-for-BCM63268.patch b/target/linux/brcm63xx/patches-4.14/339-MIPS-BCM63XX-add-support-for-BCM63268.patch index 8554976b6f..6a73e96a1d 100644 --- a/target/linux/brcm63xx/patches-4.14/339-MIPS-BCM63XX-add-support-for-BCM63268.patch +++ b/target/linux/brcm63xx/patches-4.14/339-MIPS-BCM63XX-add-support-for-BCM63268.patch @@ -107,7 +107,7 @@ Signed-off-by: Jonas Gorski } static struct clk clk_pcie = { -@@ -542,6 +556,21 @@ static struct clk_lookup bcm6368_clks[] +@@ -548,6 +562,21 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT(NULL, "ipsec", &clk_ipsec), }; @@ -129,7 +129,7 @@ Signed-off-by: Jonas Gorski #define HSSPI_PLL_HZ_6328 133333333 #define HSSPI_PLL_HZ_6362 400000000 -@@ -574,6 +603,10 @@ static int __init bcm63xx_clk_init(void) +@@ -580,6 +609,10 @@ static int __init bcm63xx_clk_init(void) case BCM6368_CPU_ID: clkdev_add_table(bcm6368_clks, ARRAY_SIZE(bcm6368_clks)); break; diff --git a/target/linux/brcm63xx/patches-4.14/341-MIPS-BCM63XX-add-support-for-BCM6318.patch b/target/linux/brcm63xx/patches-4.14/341-MIPS-BCM63XX-add-support-for-BCM6318.patch index 9d235f03f1..d155d91785 100644 --- a/target/linux/brcm63xx/patches-4.14/341-MIPS-BCM63XX-add-support-for-BCM6318.patch +++ b/target/linux/brcm63xx/patches-4.14/341-MIPS-BCM63XX-add-support-for-BCM6318.patch @@ -57,7 +57,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 mask = CKCTL_6328_HSSPI_EN; else if (BCMCPU_IS_6362()) mask = CKCTL_6362_HSSPI_EN; -@@ -450,6 +452,19 @@ static struct clk_lookup bcm3368_clks[] +@@ -456,6 +458,19 @@ static struct clk_lookup bcm3368_clks[] CLKDEV_INIT("bcm63xx_enet.1", "enet", &clk_enet1), }; @@ -77,7 +77,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 static struct clk_lookup bcm6328_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), -@@ -571,6 +586,7 @@ static struct clk_lookup bcm63268_clks[] +@@ -577,6 +592,7 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT(NULL, "pcie", &clk_pcie), }; @@ -85,7 +85,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 #define HSSPI_PLL_HZ_6328 133333333 #define HSSPI_PLL_HZ_6362 400000000 -@@ -580,6 +596,10 @@ static int __init bcm63xx_clk_init(void) +@@ -586,6 +602,10 @@ static int __init bcm63xx_clk_init(void) case BCM3368_CPU_ID: clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks)); break; diff --git a/target/linux/brcm63xx/patches-4.14/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch b/target/linux/brcm63xx/patches-4.14/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch index 45d4b8487c..d6b1190b9d 100644 --- a/target/linux/brcm63xx/patches-4.14/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch +++ b/target/linux/brcm63xx/patches-4.14/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch @@ -9,7 +9,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -495,6 +495,8 @@ static struct clk_lookup bcm3368_clks[] +@@ -501,6 +501,8 @@ static struct clk_lookup bcm3368_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -18,7 +18,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -511,7 +513,9 @@ static struct clk_lookup bcm6318_clks[] +@@ -517,7 +519,9 @@ static struct clk_lookup bcm6318_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -28,7 +28,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -525,7 +529,10 @@ static struct clk_lookup bcm6328_clks[] +@@ -531,7 +535,10 @@ static struct clk_lookup bcm6328_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -39,7 +39,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -538,6 +545,7 @@ static struct clk_lookup bcm6338_clks[] +@@ -544,6 +551,7 @@ static struct clk_lookup bcm6338_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -47,7 +47,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -552,6 +560,7 @@ static struct clk_lookup bcm6345_clks[] +@@ -558,6 +566,7 @@ static struct clk_lookup bcm6345_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -55,7 +55,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -566,6 +575,7 @@ static struct clk_lookup bcm6348_clks[] +@@ -572,6 +581,7 @@ static struct clk_lookup bcm6348_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -63,7 +63,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -582,6 +592,8 @@ static struct clk_lookup bcm6358_clks[] +@@ -588,6 +598,8 @@ static struct clk_lookup bcm6358_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -72,7 +72,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -601,7 +613,10 @@ static struct clk_lookup bcm6362_clks[] +@@ -607,7 +619,10 @@ static struct clk_lookup bcm6362_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -83,7 +83,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -617,6 +632,8 @@ static struct clk_lookup bcm6368_clks[] +@@ -623,6 +638,8 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -92,7 +92,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -631,7 +648,10 @@ static struct clk_lookup bcm63268_clks[] +@@ -637,7 +654,10 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), diff --git a/target/linux/brcm63xx/patches-4.19/339-MIPS-BCM63XX-add-support-for-BCM63268.patch b/target/linux/brcm63xx/patches-4.19/339-MIPS-BCM63XX-add-support-for-BCM63268.patch index eac753db58..32ce261b1e 100644 --- a/target/linux/brcm63xx/patches-4.19/339-MIPS-BCM63XX-add-support-for-BCM63268.patch +++ b/target/linux/brcm63xx/patches-4.19/339-MIPS-BCM63XX-add-support-for-BCM63268.patch @@ -107,7 +107,7 @@ Signed-off-by: Jonas Gorski } static struct clk clk_pcie = { -@@ -542,6 +556,21 @@ static struct clk_lookup bcm6368_clks[] +@@ -548,6 +562,21 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT(NULL, "ipsec", &clk_ipsec), }; @@ -129,7 +129,7 @@ Signed-off-by: Jonas Gorski #define HSSPI_PLL_HZ_6328 133333333 #define HSSPI_PLL_HZ_6362 400000000 -@@ -574,6 +603,10 @@ static int __init bcm63xx_clk_init(void) +@@ -580,6 +609,10 @@ static int __init bcm63xx_clk_init(void) case BCM6368_CPU_ID: clkdev_add_table(bcm6368_clks, ARRAY_SIZE(bcm6368_clks)); break; diff --git a/target/linux/brcm63xx/patches-4.19/341-MIPS-BCM63XX-add-support-for-BCM6318.patch b/target/linux/brcm63xx/patches-4.19/341-MIPS-BCM63XX-add-support-for-BCM6318.patch index f9368928b7..19c0acaaf1 100644 --- a/target/linux/brcm63xx/patches-4.19/341-MIPS-BCM63XX-add-support-for-BCM6318.patch +++ b/target/linux/brcm63xx/patches-4.19/341-MIPS-BCM63XX-add-support-for-BCM6318.patch @@ -57,7 +57,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 mask = CKCTL_6328_HSSPI_EN; else if (BCMCPU_IS_6362()) mask = CKCTL_6362_HSSPI_EN; -@@ -450,6 +452,19 @@ static struct clk_lookup bcm3368_clks[] +@@ -456,6 +458,19 @@ static struct clk_lookup bcm3368_clks[] CLKDEV_INIT("bcm63xx_enet.1", "enet", &clk_enet1), }; @@ -77,7 +77,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 static struct clk_lookup bcm6328_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), -@@ -571,6 +586,7 @@ static struct clk_lookup bcm63268_clks[] +@@ -577,6 +592,7 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT(NULL, "pcie", &clk_pcie), }; @@ -85,7 +85,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 #define HSSPI_PLL_HZ_6328 133333333 #define HSSPI_PLL_HZ_6362 400000000 -@@ -580,6 +596,10 @@ static int __init bcm63xx_clk_init(void) +@@ -586,6 +602,10 @@ static int __init bcm63xx_clk_init(void) case BCM3368_CPU_ID: clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks)); break; diff --git a/target/linux/brcm63xx/patches-4.19/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch b/target/linux/brcm63xx/patches-4.19/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch index 45d4b8487c..d6b1190b9d 100644 --- a/target/linux/brcm63xx/patches-4.19/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch +++ b/target/linux/brcm63xx/patches-4.19/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch @@ -9,7 +9,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -495,6 +495,8 @@ static struct clk_lookup bcm3368_clks[] +@@ -501,6 +501,8 @@ static struct clk_lookup bcm3368_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -18,7 +18,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -511,7 +513,9 @@ static struct clk_lookup bcm6318_clks[] +@@ -517,7 +519,9 @@ static struct clk_lookup bcm6318_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -28,7 +28,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -525,7 +529,10 @@ static struct clk_lookup bcm6328_clks[] +@@ -531,7 +535,10 @@ static struct clk_lookup bcm6328_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -39,7 +39,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -538,6 +545,7 @@ static struct clk_lookup bcm6338_clks[] +@@ -544,6 +551,7 @@ static struct clk_lookup bcm6338_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -47,7 +47,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -552,6 +560,7 @@ static struct clk_lookup bcm6345_clks[] +@@ -558,6 +566,7 @@ static struct clk_lookup bcm6345_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -55,7 +55,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -566,6 +575,7 @@ static struct clk_lookup bcm6348_clks[] +@@ -572,6 +581,7 @@ static struct clk_lookup bcm6348_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -63,7 +63,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -582,6 +592,8 @@ static struct clk_lookup bcm6358_clks[] +@@ -588,6 +598,8 @@ static struct clk_lookup bcm6358_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -72,7 +72,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -601,7 +613,10 @@ static struct clk_lookup bcm6362_clks[] +@@ -607,7 +619,10 @@ static struct clk_lookup bcm6362_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -83,7 +83,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -617,6 +632,8 @@ static struct clk_lookup bcm6368_clks[] +@@ -623,6 +638,8 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -92,7 +92,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -631,7 +648,10 @@ static struct clk_lookup bcm63268_clks[] +@@ -637,7 +654,10 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), diff --git a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch index d813aa42c9..7e96f20a51 100644 --- a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch +++ b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch @@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -2058,7 +2058,8 @@ static const struct usb_device_id option +@@ -2060,7 +2060,8 @@ static const struct usb_device_id option { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) }, diff --git a/target/linux/generic/backport-4.14/293-v4.16-netfilter-reduce-size-of-hook-entry-point-locations.patch b/target/linux/generic/backport-4.14/293-v4.16-netfilter-reduce-size-of-hook-entry-point-locations.patch index ed532a0ee0..90e3500f0e 100644 --- a/target/linux/generic/backport-4.14/293-v4.16-netfilter-reduce-size-of-hook-entry-point-locations.patch +++ b/target/linux/generic/backport-4.14/293-v4.16-netfilter-reduce-size-of-hook-entry-point-locations.patch @@ -92,7 +92,7 @@ Signed-off-by: Pablo Neira Ayuso #endif --- a/net/bridge/br_netfilter_hooks.c +++ b/net/bridge/br_netfilter_hooks.c -@@ -994,7 +994,7 @@ int br_nf_hook_thresh(unsigned int hook, +@@ -993,7 +993,7 @@ int br_nf_hook_thresh(unsigned int hook, unsigned int i; int ret; diff --git a/target/linux/generic/backport-4.19/708-v5.3-net-phylink-remove-netdev-from-phylink-mii-ioctl-emu.patch b/target/linux/generic/backport-4.19/708-v5.3-net-phylink-remove-netdev-from-phylink-mii-ioctl-emu.patch index 1c3f1cc01a..ea82a83dbc 100644 --- a/target/linux/generic/backport-4.19/708-v5.3-net-phylink-remove-netdev-from-phylink-mii-ioctl-emu.patch +++ b/target/linux/generic/backport-4.19/708-v5.3-net-phylink-remove-netdev-from-phylink-mii-ioctl-emu.patch @@ -17,7 +17,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1360,8 +1360,8 @@ EXPORT_SYMBOL_GPL(phylink_ethtool_set_ee +@@ -1365,8 +1365,8 @@ EXPORT_SYMBOL_GPL(phylink_ethtool_set_ee * * FIXME: should deal with negotiation state too. */ @@ -28,7 +28,7 @@ Signed-off-by: Russell King { struct fixed_phy_status fs; int val; -@@ -1376,8 +1376,6 @@ static int phylink_mii_emul_read(struct +@@ -1381,8 +1381,6 @@ static int phylink_mii_emul_read(struct if (reg == MII_BMSR) { if (!state->an_complete) val &= ~BMSR_ANEGCOMPLETE; @@ -37,7 +37,7 @@ Signed-off-by: Russell King } return val; } -@@ -1473,8 +1471,7 @@ static int phylink_mii_read(struct phyli +@@ -1478,8 +1476,7 @@ static int phylink_mii_read(struct phyli case MLO_AN_FIXED: if (phy_id == 0) { phylink_get_fixed_state(pl, &state); @@ -47,7 +47,7 @@ Signed-off-by: Russell King } break; -@@ -1487,8 +1484,7 @@ static int phylink_mii_read(struct phyli +@@ -1492,8 +1489,7 @@ static int phylink_mii_read(struct phyli if (val < 0) return val; diff --git a/target/linux/generic/backport-4.19/709-v5.3-net-phylink-support-for-link-gpio-interrupt.patch b/target/linux/generic/backport-4.19/709-v5.3-net-phylink-support-for-link-gpio-interrupt.patch index 84a1c853d1..f2f5fce7e2 100644 --- a/target/linux/generic/backport-4.19/709-v5.3-net-phylink-support-for-link-gpio-interrupt.patch +++ b/target/linux/generic/backport-4.19/709-v5.3-net-phylink-support-for-link-gpio-interrupt.patch @@ -25,7 +25,7 @@ Signed-off-by: Russell King struct timer_list link_poll; void (*get_fixed_state)(struct net_device *dev, struct phylink_link_state *s); -@@ -645,7 +646,7 @@ void phylink_destroy(struct phylink *pl) +@@ -650,7 +651,7 @@ void phylink_destroy(struct phylink *pl) { if (pl->sfp_bus) sfp_unregister_upstream(pl->sfp_bus); @@ -34,7 +34,7 @@ Signed-off-by: Russell King gpiod_put(pl->link_gpio); cancel_work_sync(&pl->resolve); -@@ -912,6 +913,15 @@ void phylink_mac_change(struct phylink * +@@ -917,6 +918,15 @@ void phylink_mac_change(struct phylink * } EXPORT_SYMBOL_GPL(phylink_mac_change); @@ -50,7 +50,7 @@ Signed-off-by: Russell King /** * phylink_start() - start a phylink instance * @pl: a pointer to a &struct phylink returned from phylink_create() -@@ -947,7 +957,22 @@ void phylink_start(struct phylink *pl) +@@ -952,7 +962,22 @@ void phylink_start(struct phylink *pl) clear_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state); phylink_run_resolve(pl); @@ -74,7 +74,7 @@ Signed-off-by: Russell King mod_timer(&pl->link_poll, jiffies + HZ); if (pl->sfp_bus) sfp_upstream_start(pl->sfp_bus); -@@ -973,8 +998,11 @@ void phylink_stop(struct phylink *pl) +@@ -978,8 +1003,11 @@ void phylink_stop(struct phylink *pl) phy_stop(pl->phydev); if (pl->sfp_bus) sfp_upstream_stop(pl->sfp_bus); diff --git a/target/linux/generic/backport-4.19/711-v5.3-net-sfp-add-mandatory-attach-detach-methods-for-sfp-.patch b/target/linux/generic/backport-4.19/711-v5.3-net-sfp-add-mandatory-attach-detach-methods-for-sfp-.patch index 0600da2fad..198cdb2271 100644 --- a/target/linux/generic/backport-4.19/711-v5.3-net-sfp-add-mandatory-attach-detach-methods-for-sfp-.patch +++ b/target/linux/generic/backport-4.19/711-v5.3-net-sfp-add-mandatory-attach-detach-methods-for-sfp-.patch @@ -19,7 +19,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1615,6 +1615,20 @@ int phylink_mii_ioctl(struct phylink *pl +@@ -1620,6 +1620,20 @@ int phylink_mii_ioctl(struct phylink *pl } EXPORT_SYMBOL_GPL(phylink_mii_ioctl); @@ -40,7 +40,7 @@ Signed-off-by: Russell King static int phylink_sfp_module_insert(void *upstream, const struct sfp_eeprom_id *id) { -@@ -1733,6 +1747,8 @@ static void phylink_sfp_disconnect_phy(v +@@ -1738,6 +1752,8 @@ static void phylink_sfp_disconnect_phy(v } static const struct sfp_upstream_ops sfp_phylink_ops = { diff --git a/target/linux/generic/backport-4.19/712-v5.3-net-sfp-remove-sfp-bus-use-of-netdevs.patch b/target/linux/generic/backport-4.19/712-v5.3-net-sfp-remove-sfp-bus-use-of-netdevs.patch index e68cc381dc..040a6c61d9 100644 --- a/target/linux/generic/backport-4.19/712-v5.3-net-sfp-remove-sfp-bus-use-of-netdevs.patch +++ b/target/linux/generic/backport-4.19/712-v5.3-net-sfp-remove-sfp-bus-use-of-netdevs.patch @@ -18,8 +18,8 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -555,8 +555,7 @@ static int phylink_register_sfp(struct p - return ret; +@@ -560,8 +560,7 @@ static int phylink_register_sfp(struct p + return 0; } - pl->sfp_bus = sfp_register_upstream(ref.fwnode, pl->netdev, pl, diff --git a/target/linux/generic/backport-4.19/713-v5.2-net-phylink-avoid-reducing-support-mask.patch b/target/linux/generic/backport-4.19/713-v5.2-net-phylink-avoid-reducing-support-mask.patch index 3aa8d9e571..d5635bd9cb 100644 --- a/target/linux/generic/backport-4.19/713-v5.2-net-phylink-avoid-reducing-support-mask.patch +++ b/target/linux/generic/backport-4.19/713-v5.2-net-phylink-avoid-reducing-support-mask.patch @@ -16,7 +16,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1137,6 +1137,7 @@ EXPORT_SYMBOL_GPL(phylink_ethtool_ksetti +@@ -1142,6 +1142,7 @@ EXPORT_SYMBOL_GPL(phylink_ethtool_ksetti int phylink_ethtool_ksettings_set(struct phylink *pl, const struct ethtool_link_ksettings *kset) { @@ -24,7 +24,7 @@ Signed-off-by: David S. Miller struct ethtool_link_ksettings our_kset; struct phylink_link_state config; int ret; -@@ -1147,11 +1148,12 @@ int phylink_ethtool_ksettings_set(struct +@@ -1152,11 +1153,12 @@ int phylink_ethtool_ksettings_set(struct kset->base.autoneg != AUTONEG_ENABLE) return -EINVAL; @@ -38,7 +38,7 @@ Signed-off-by: David S. Miller /* FIXME: should we reject autoneg if phy/mac does not support it? */ if (kset->base.autoneg == AUTONEG_DISABLE) { -@@ -1161,7 +1163,7 @@ int phylink_ethtool_ksettings_set(struct +@@ -1166,7 +1168,7 @@ int phylink_ethtool_ksettings_set(struct * duplex. */ s = phy_lookup_setting(kset->base.speed, kset->base.duplex, @@ -47,7 +47,7 @@ Signed-off-by: David S. Miller __ETHTOOL_LINK_MODE_MASK_NBITS, false); if (!s) return -EINVAL; -@@ -1191,7 +1193,7 @@ int phylink_ethtool_ksettings_set(struct +@@ -1196,7 +1198,7 @@ int phylink_ethtool_ksettings_set(struct __set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, config.advertising); } @@ -56,7 +56,7 @@ Signed-off-by: David S. Miller return -EINVAL; /* If autonegotiation is enabled, we must have an advertisement */ -@@ -1633,6 +1635,7 @@ static int phylink_sfp_module_insert(voi +@@ -1638,6 +1640,7 @@ static int phylink_sfp_module_insert(voi { struct phylink *pl = upstream; __ETHTOOL_DECLARE_LINK_MODE_MASK(support) = { 0, }; @@ -64,7 +64,7 @@ Signed-off-by: David S. Miller struct phylink_link_state config; phy_interface_t iface; int ret = 0; -@@ -1660,6 +1663,8 @@ static int phylink_sfp_module_insert(voi +@@ -1665,6 +1668,8 @@ static int phylink_sfp_module_insert(voi return ret; } @@ -73,7 +73,7 @@ Signed-off-by: David S. Miller iface = sfp_select_interface(pl->sfp_bus, id, config.advertising); if (iface == PHY_INTERFACE_MODE_NA) { netdev_err(pl->netdev, -@@ -1669,7 +1674,7 @@ static int phylink_sfp_module_insert(voi +@@ -1674,7 +1679,7 @@ static int phylink_sfp_module_insert(voi } config.interface = iface; diff --git a/target/linux/generic/backport-4.19/715-v5.3-net-phylink-don-t-start-and-stop-SGMII-PHYs-in-SFP-m.patch b/target/linux/generic/backport-4.19/715-v5.3-net-phylink-don-t-start-and-stop-SGMII-PHYs-in-SFP-m.patch index 94fb2fb3e4..64dd323c5c 100644 --- a/target/linux/generic/backport-4.19/715-v5.3-net-phylink-don-t-start-and-stop-SGMII-PHYs-in-SFP-m.patch +++ b/target/linux/generic/backport-4.19/715-v5.3-net-phylink-don-t-start-and-stop-SGMII-PHYs-in-SFP-m.patch @@ -113,7 +113,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -973,10 +973,10 @@ void phylink_start(struct phylink *pl) +@@ -978,10 +978,10 @@ void phylink_start(struct phylink *pl) } if (pl->link_an_mode == MLO_AN_FIXED && pl->get_fixed_state) mod_timer(&pl->link_poll, jiffies + HZ); @@ -126,7 +126,7 @@ Signed-off-by: David S. Miller } EXPORT_SYMBOL_GPL(phylink_start); -@@ -993,10 +993,10 @@ void phylink_stop(struct phylink *pl) +@@ -998,10 +998,10 @@ void phylink_stop(struct phylink *pl) { ASSERT_RTNL(); diff --git a/target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch b/target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch index bc16e8f1c6..1a7726b224 100644 --- a/target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch +++ b/target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch @@ -16,7 +16,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -538,26 +538,17 @@ static const struct sfp_upstream_ops sfp +@@ -538,20 +538,13 @@ static const struct sfp_upstream_ops sfp static int phylink_register_sfp(struct phylink *pl, struct fwnode_handle *fwnode) { @@ -42,6 +42,10 @@ Signed-off-by: Russell King return ret; } +@@ -560,9 +553,7 @@ static int phylink_register_sfp(struct p + return 0; + } + - pl->sfp_bus = sfp_register_upstream(ref.fwnode, pl, &sfp_phylink_ops); - if (!pl->sfp_bus) - return -ENOMEM; diff --git a/target/linux/generic/backport-4.19/717-v5.5-net-sfp-rework-upstream-interface.patch b/target/linux/generic/backport-4.19/717-v5.5-net-sfp-rework-upstream-interface.patch index a901b15aaf..ac77b32a42 100644 --- a/target/linux/generic/backport-4.19/717-v5.5-net-sfp-rework-upstream-interface.patch +++ b/target/linux/generic/backport-4.19/717-v5.5-net-sfp-rework-upstream-interface.patch @@ -29,7 +29,7 @@ Signed-off-by: Russell King if (IS_ERR(bus)) { ret = PTR_ERR(bus); netdev_err(pl->netdev, "unable to attach SFP bus: %d\n", ret); -@@ -550,7 +550,10 @@ static int phylink_register_sfp(struct p +@@ -555,7 +555,10 @@ static int phylink_register_sfp(struct p pl->sfp_bus = bus; @@ -41,7 +41,7 @@ Signed-off-by: Russell King } /** -@@ -634,8 +637,7 @@ EXPORT_SYMBOL_GPL(phylink_create); +@@ -639,8 +642,7 @@ EXPORT_SYMBOL_GPL(phylink_create); */ void phylink_destroy(struct phylink *pl) { diff --git a/target/linux/generic/backport-4.19/739-v5.5-net-phylink-update-to-use-phy_support_asym_pause.patch b/target/linux/generic/backport-4.19/739-v5.5-net-phylink-update-to-use-phy_support_asym_pause.patch index 15db0abc96..f4ffe85a9d 100644 --- a/target/linux/generic/backport-4.19/739-v5.5-net-phylink-update-to-use-phy_support_asym_pause.patch +++ b/target/linux/generic/backport-4.19/739-v5.5-net-phylink-update-to-use-phy_support_asym_pause.patch @@ -12,7 +12,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -678,12 +678,6 @@ static int phylink_bringup_phy(struct ph +@@ -683,12 +683,6 @@ static int phylink_bringup_phy(struct ph u32 advertising; int ret; @@ -25,7 +25,7 @@ Signed-off-by: Russell King /* * This is the new way of dealing with flow control for PHYs, * as described by Timur Tabi in commit 529ed1275263 ("net: phy: -@@ -691,10 +685,13 @@ static int phylink_bringup_phy(struct ph +@@ -696,10 +690,13 @@ static int phylink_bringup_phy(struct ph * using our validate call to the MAC, we rely upon the MAC * clearing the bits from both supported and advertising fields. */ diff --git a/target/linux/generic/backport-4.19/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch b/target/linux/generic/backport-4.19/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch index 596ecc8272..51162ba970 100644 --- a/target/linux/generic/backport-4.19/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch +++ b/target/linux/generic/backport-4.19/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch @@ -25,7 +25,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1210,7 +1210,13 @@ int phylink_ethtool_ksettings_set(struct +@@ -1215,7 +1215,13 @@ int phylink_ethtool_ksettings_set(struct pl->link_config.duplex = our_kset.base.duplex; pl->link_config.an_enabled = our_kset.base.autoneg != AUTONEG_DISABLE; @@ -40,7 +40,7 @@ Signed-off-by: Russell King phylink_mac_config(pl, &pl->link_config); phylink_mac_an_restart(pl); } -@@ -1290,14 +1296,16 @@ int phylink_ethtool_set_pauseparam(struc +@@ -1295,14 +1301,16 @@ int phylink_ethtool_set_pauseparam(struc if (pause->tx_pause) config->pause |= MLO_PAUSE_TX; diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch index c2e07d03f9..8bac270271 100644 --- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch +++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch @@ -637,7 +637,7 @@ Signed-off-by: David S. Miller return received; --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c -@@ -3199,7 +3199,7 @@ static int gfar_poll_rx_sq(struct napi_s +@@ -3205,7 +3205,7 @@ static int gfar_poll_rx_sq(struct napi_s if (work_done < budget) { u32 imask; @@ -646,7 +646,7 @@ Signed-off-by: David S. Miller /* Clear the halt bit in RSTAT */ gfar_write(®s->rstat, gfargrp->rstat); -@@ -3288,7 +3288,7 @@ static int gfar_poll_rx(struct napi_stru +@@ -3294,7 +3294,7 @@ static int gfar_poll_rx(struct napi_stru if (!num_act_queues) { u32 imask; diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index 706696d419..2bd2346a28 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -604,6 +604,7 @@ CONFIG_BPF=y # CONFIG_BPF_JIT_ALWAYS_ON is not set # CONFIG_BPF_STREAM_PARSER is not set CONFIG_BPF_SYSCALL=y +# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set # CONFIG_BPQETHER is not set CONFIG_BQL=y CONFIG_BRANCH_PROFILE_NONE=y diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19 index 1163d21c55..dffb130266 100644 --- a/target/linux/generic/config-4.19 +++ b/target/linux/generic/config-4.19 @@ -629,6 +629,7 @@ CONFIG_BPF_JIT=y # CONFIG_BPF_JIT_ALWAYS_ON is not set # CONFIG_BPF_STREAM_PARSER is not set CONFIG_BPF_SYSCALL=y +# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set # CONFIG_BPQETHER is not set CONFIG_BQL=y CONFIG_BRANCH_PROFILE_NONE=y diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9 index e7d26acf7e..c8e530dd13 100644 --- a/target/linux/generic/config-4.9 +++ b/target/linux/generic/config-4.9 @@ -569,6 +569,7 @@ CONFIG_BOOT_RAW=y CONFIG_BPF=y # CONFIG_BPF_JIT is not set CONFIG_BPF_SYSCALL=y +# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set # CONFIG_BPQETHER is not set CONFIG_BQL=y CONFIG_BRANCH_PROFILE_NONE=y diff --git a/target/linux/generic/hack-4.14/204-module_strip.patch b/target/linux/generic/hack-4.14/204-module_strip.patch index a8619edbfc..d6f7d9fa67 100644 --- a/target/linux/generic/hack-4.14/204-module_strip.patch +++ b/target/linux/generic/hack-4.14/204-module_strip.patch @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -1903,6 +1903,13 @@ config TRIM_UNUSED_KSYMS +@@ -1913,6 +1913,13 @@ config TRIM_UNUSED_KSYMS If unsure, or if you need to build out-of-tree modules, say N. diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch index 756872818f..e6b761d3c0 100644 --- a/target/linux/generic/hack-4.14/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch @@ -283,7 +283,7 @@ Signed-off-by: Felix Fietkau goto err; --- a/net/core/net-procfs.c +++ b/net/core/net-procfs.c -@@ -320,10 +320,12 @@ static int __net_init dev_proc_net_init( +@@ -350,10 +350,12 @@ static int __net_init dev_proc_net_init( if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops)) goto out; @@ -298,7 +298,7 @@ Signed-off-by: Felix Fietkau goto out_softnet; if (wext_proc_init(net)) -@@ -332,9 +334,11 @@ static int __net_init dev_proc_net_init( +@@ -362,9 +364,11 @@ static int __net_init dev_proc_net_init( out: return rc; out_ptype: @@ -312,7 +312,7 @@ Signed-off-by: Felix Fietkau out_dev: remove_proc_entry("dev", net->proc_net); goto out; -@@ -344,8 +348,10 @@ static void __net_exit dev_proc_net_exit +@@ -374,8 +378,10 @@ static void __net_exit dev_proc_net_exit { wext_proc_exit(net); diff --git a/target/linux/generic/hack-4.14/998-usb-serial-option-add-u9300.patch b/target/linux/generic/hack-4.14/998-usb-serial-option-add-u9300.patch index 90b260e0a6..b98e21d3d8 100644 --- a/target/linux/generic/hack-4.14/998-usb-serial-option-add-u9300.patch +++ b/target/linux/generic/hack-4.14/998-usb-serial-option-add-u9300.patch @@ -1,6 +1,6 @@ --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -1351,6 +1351,7 @@ static const struct usb_device_id produc +@@ -1353,6 +1353,7 @@ static const struct usb_device_id produc {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ diff --git a/target/linux/generic/hack-4.19/204-module_strip.patch b/target/linux/generic/hack-4.19/204-module_strip.patch index 0f3c63677c..6c94301e14 100644 --- a/target/linux/generic/hack-4.19/204-module_strip.patch +++ b/target/linux/generic/hack-4.19/204-module_strip.patch @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -1997,6 +1997,13 @@ config TRIM_UNUSED_KSYMS +@@ -2007,6 +2007,13 @@ config TRIM_UNUSED_KSYMS If unsure, or if you need to build out-of-tree modules, say N. diff --git a/target/linux/generic/hack-4.19/902-debloat_proc.patch b/target/linux/generic/hack-4.19/902-debloat_proc.patch index 3b4e071e5d..52096144b2 100644 --- a/target/linux/generic/hack-4.19/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.19/902-debloat_proc.patch @@ -283,7 +283,7 @@ Signed-off-by: Felix Fietkau goto err; --- a/net/core/net-procfs.c +++ b/net/core/net-procfs.c -@@ -279,10 +279,12 @@ static int __net_init dev_proc_net_init( +@@ -309,10 +309,12 @@ static int __net_init dev_proc_net_init( if (!proc_create_net("dev", 0444, net->proc_net, &dev_seq_ops, sizeof(struct seq_net_private))) goto out; @@ -298,7 +298,7 @@ Signed-off-by: Felix Fietkau sizeof(struct seq_net_private))) goto out_softnet; -@@ -292,9 +294,11 @@ static int __net_init dev_proc_net_init( +@@ -322,9 +324,11 @@ static int __net_init dev_proc_net_init( out: return rc; out_ptype: @@ -312,7 +312,7 @@ Signed-off-by: Felix Fietkau out_dev: remove_proc_entry("dev", net->proc_net); goto out; -@@ -304,8 +308,10 @@ static void __net_exit dev_proc_net_exit +@@ -334,8 +338,10 @@ static void __net_exit dev_proc_net_exit { wext_proc_exit(net); diff --git a/target/linux/generic/hack-4.19/998-usb-serial-option-add-u9300.patch b/target/linux/generic/hack-4.19/998-usb-serial-option-add-u9300.patch index e2056f9dac..09b166e8c4 100644 --- a/target/linux/generic/hack-4.19/998-usb-serial-option-add-u9300.patch +++ b/target/linux/generic/hack-4.19/998-usb-serial-option-add-u9300.patch @@ -1,6 +1,6 @@ --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -1362,6 +1362,7 @@ static const struct usb_device_id produc +@@ -1364,6 +1364,7 @@ static const struct usb_device_id produc {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ diff --git a/target/linux/generic/hack-4.9/204-module_strip.patch b/target/linux/generic/hack-4.9/204-module_strip.patch index e6d6dad9da..7996c8b5cb 100644 --- a/target/linux/generic/hack-4.9/204-module_strip.patch +++ b/target/linux/generic/hack-4.9/204-module_strip.patch @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -2122,6 +2122,13 @@ config TRIM_UNUSED_KSYMS +@@ -2132,6 +2132,13 @@ config TRIM_UNUSED_KSYMS If unsure, or if you need to build out-of-tree modules, say N. diff --git a/target/linux/generic/hack-4.9/902-debloat_proc.patch b/target/linux/generic/hack-4.9/902-debloat_proc.patch index a9ae0ec19f..ce02c353c9 100644 --- a/target/linux/generic/hack-4.9/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.9/902-debloat_proc.patch @@ -284,7 +284,7 @@ Signed-off-by: Felix Fietkau goto err; --- a/net/core/net-procfs.c +++ b/net/core/net-procfs.c -@@ -319,10 +319,12 @@ static int __net_init dev_proc_net_init( +@@ -349,10 +349,12 @@ static int __net_init dev_proc_net_init( if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops)) goto out; @@ -299,7 +299,7 @@ Signed-off-by: Felix Fietkau goto out_softnet; if (wext_proc_init(net)) -@@ -331,9 +333,11 @@ static int __net_init dev_proc_net_init( +@@ -361,9 +363,11 @@ static int __net_init dev_proc_net_init( out: return rc; out_ptype: @@ -313,7 +313,7 @@ Signed-off-by: Felix Fietkau out_dev: remove_proc_entry("dev", net->proc_net); goto out; -@@ -343,8 +347,10 @@ static void __net_exit dev_proc_net_exit +@@ -373,8 +377,10 @@ static void __net_exit dev_proc_net_exit { wext_proc_exit(net); diff --git a/target/linux/generic/pending-4.14/601-add-kernel-imq-support.patch b/target/linux/generic/pending-4.14/601-add-kernel-imq-support.patch index c1c20e903f..2b7ec3a394 100644 --- a/target/linux/generic/pending-4.14/601-add-kernel-imq-support.patch +++ b/target/linux/generic/pending-4.14/601-add-kernel-imq-support.patch @@ -1437,7 +1437,7 @@ /* Interface address info used in eth_type_trans() */ unsigned char *dev_addr; -@@ -3677,6 +3682,19 @@ static inline void netif_tx_unlock_bh(st +@@ -3678,6 +3683,19 @@ static inline void netif_tx_unlock_bh(st } \ } diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch index fa02d3f706..3b7b25c75f 100644 --- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1838,6 +1838,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1842,6 +1842,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1845,6 +1846,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1849,6 +1850,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1857,7 +1859,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1861,7 +1863,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2084,12 +2086,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2088,12 +2090,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2217,12 +2219,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2221,12 +2223,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3325,6 +3327,7 @@ static int packet_create(struct net *net +@@ -3329,6 +3331,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3949,6 +3952,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3955,6 +3958,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -4001,6 +4014,13 @@ static int packet_getsockopt(struct sock +@@ -4007,6 +4020,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch index c7aa998517..40a539be9d 100644 --- a/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch +++ b/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau #define PPP_VERSION "2.4.2" /* -@@ -1393,12 +1398,37 @@ static void ppp_dev_priv_destructor(stru +@@ -1398,12 +1403,37 @@ static void ppp_dev_priv_destructor(stru ppp_destroy_interface(ppp); } diff --git a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch index 1fbdc0c54f..fb82edb21b 100644 --- a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5159,6 +5172,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5160,6 +5173,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -6062,6 +6078,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6063,6 +6079,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -6083,6 +6102,12 @@ static void ata_host_release(struct devi +@@ -6084,6 +6103,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6529,7 +6554,23 @@ int ata_host_register(struct ata_host *h +@@ -6530,7 +6555,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/generic/pending-4.14/920-mangle_bootargs.patch b/target/linux/generic/pending-4.14/920-mangle_bootargs.patch index 2f6a52c23d..cd245ad663 100644 --- a/target/linux/generic/pending-4.14/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-4.14/920-mangle_bootargs.patch @@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz --- a/init/Kconfig +++ b/init/Kconfig -@@ -1427,6 +1427,15 @@ config EMBEDDED +@@ -1437,6 +1437,15 @@ config EMBEDDED an embedded system so certain expert options are available for configuration. diff --git a/target/linux/generic/pending-4.19/601-add-kernel-imq-support.patch b/target/linux/generic/pending-4.19/601-add-kernel-imq-support.patch index 3c16575681..5ffe46c32b 100644 --- a/target/linux/generic/pending-4.19/601-add-kernel-imq-support.patch +++ b/target/linux/generic/pending-4.19/601-add-kernel-imq-support.patch @@ -1132,7 +1132,7 @@ /* Interface address info used in eth_type_trans() */ unsigned char *dev_addr; -@@ -3980,6 +3985,19 @@ static inline void netif_tx_unlock_bh(st +@@ -3981,6 +3986,19 @@ static inline void netif_tx_unlock_bh(st } \ } diff --git a/target/linux/generic/pending-4.19/630-packet_socket_type.patch b/target/linux/generic/pending-4.19/630-packet_socket_type.patch index 986565c04a..db9050832b 100644 --- a/target/linux/generic/pending-4.19/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.19/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1798,6 +1798,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1802,6 +1802,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1805,6 +1806,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1809,6 +1810,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1817,7 +1819,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1821,7 +1823,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2045,12 +2047,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2049,12 +2051,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2178,12 +2180,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2182,12 +2184,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3289,6 +3291,7 @@ static int packet_create(struct net *net +@@ -3293,6 +3295,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3911,6 +3914,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3917,6 +3920,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3963,6 +3976,13 @@ static int packet_getsockopt(struct sock +@@ -3969,6 +3982,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.19/644-net-pppoe-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.19/644-net-pppoe-support-hardware-flow-table-offload.patch index b4f060e6f9..71e5ff6f82 100644 --- a/target/linux/generic/pending-4.19/644-net-pppoe-support-hardware-flow-table-offload.patch +++ b/target/linux/generic/pending-4.19/644-net-pppoe-support-hardware-flow-table-offload.patch @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau #define PPP_VERSION "2.4.2" /* -@@ -1379,12 +1384,37 @@ static void ppp_dev_priv_destructor(stru +@@ -1384,12 +1389,37 @@ static void ppp_dev_priv_destructor(stru ppp_destroy_interface(ppp); } diff --git a/target/linux/generic/pending-4.19/741-net-sfp-derive-interface-mode-from-ethtool-link-mode.patch b/target/linux/generic/pending-4.19/741-net-sfp-derive-interface-mode-from-ethtool-link-mode.patch index f20b66eae7..e0dbabc776 100644 --- a/target/linux/generic/pending-4.19/741-net-sfp-derive-interface-mode-from-ethtool-link-mode.patch +++ b/target/linux/generic/pending-4.19/741-net-sfp-derive-interface-mode-from-ethtool-link-mode.patch @@ -29,7 +29,7 @@ Signed-off-by: Russell King dev_err(&phydev->mdio.dev, "incompatible SFP module inserted\n"); --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1663,7 +1663,7 @@ static int phylink_sfp_module_insert(voi +@@ -1668,7 +1668,7 @@ static int phylink_sfp_module_insert(voi linkmode_copy(support1, support); diff --git a/target/linux/generic/pending-4.19/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch b/target/linux/generic/pending-4.19/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch index a646fcd409..1068873085 100644 --- a/target/linux/generic/pending-4.19/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch +++ b/target/linux/generic/pending-4.19/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch @@ -16,7 +16,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1717,6 +1717,26 @@ static int phylink_sfp_module_insert(voi +@@ -1722,6 +1722,26 @@ static int phylink_sfp_module_insert(voi return ret; } @@ -43,7 +43,7 @@ Signed-off-by: Russell King static void phylink_sfp_link_down(void *upstream) { struct phylink *pl = upstream; -@@ -1752,6 +1772,8 @@ static const struct sfp_upstream_ops sfp +@@ -1757,6 +1777,8 @@ static const struct sfp_upstream_ops sfp .attach = phylink_sfp_attach, .detach = phylink_sfp_detach, .module_insert = phylink_sfp_module_insert, diff --git a/target/linux/generic/pending-4.19/746-net-phylink-re-split-__phylink_connect_phy.patch b/target/linux/generic/pending-4.19/746-net-phylink-re-split-__phylink_connect_phy.patch index c74a56c575..fbe0fc176d 100644 --- a/target/linux/generic/pending-4.19/746-net-phylink-re-split-__phylink_connect_phy.patch +++ b/target/linux/generic/pending-4.19/746-net-phylink-re-split-__phylink_connect_phy.patch @@ -16,7 +16,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -728,11 +728,9 @@ static int phylink_bringup_phy(struct ph +@@ -733,11 +733,9 @@ static int phylink_bringup_phy(struct ph return 0; } @@ -30,7 +30,7 @@ Signed-off-by: Russell King if (WARN_ON(pl->link_an_mode == MLO_AN_FIXED || (pl->link_an_mode == MLO_AN_INBAND && phy_interface_mode_is_8023z(interface)))) -@@ -741,15 +739,7 @@ static int __phylink_connect_phy(struct +@@ -746,15 +744,7 @@ static int __phylink_connect_phy(struct if (pl->phydev) return -EBUSY; @@ -47,7 +47,7 @@ Signed-off-by: Russell King } /** -@@ -769,13 +759,23 @@ static int __phylink_connect_phy(struct +@@ -774,13 +764,23 @@ static int __phylink_connect_phy(struct */ int phylink_connect_phy(struct phylink *pl, struct phy_device *phy) { @@ -72,7 +72,7 @@ Signed-off-by: Russell King } EXPORT_SYMBOL_GPL(phylink_connect_phy); -@@ -1759,8 +1759,17 @@ static void phylink_sfp_link_up(void *up +@@ -1764,8 +1764,17 @@ static void phylink_sfp_link_up(void *up static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) { struct phylink *pl = upstream; diff --git a/target/linux/generic/pending-4.19/747-net-phylink-support-Clause-45-PHYs-on-SFP-modules.patch b/target/linux/generic/pending-4.19/747-net-phylink-support-Clause-45-PHYs-on-SFP-modules.patch index 2cea118c82..70b07fbd51 100644 --- a/target/linux/generic/pending-4.19/747-net-phylink-support-Clause-45-PHYs-on-SFP-modules.patch +++ b/target/linux/generic/pending-4.19/747-net-phylink-support-Clause-45-PHYs-on-SFP-modules.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -671,7 +671,8 @@ static void phylink_phy_change(struct ph +@@ -676,7 +676,8 @@ static void phylink_phy_change(struct ph phy_duplex_to_str(phydev->duplex)); } @@ -28,7 +28,7 @@ Signed-off-by: Russell King { struct phylink_link_state config; __ETHTOOL_DECLARE_LINK_MODE_MASK(supported); -@@ -691,7 +692,7 @@ static int phylink_bringup_phy(struct ph +@@ -696,7 +697,7 @@ static int phylink_bringup_phy(struct ph ethtool_convert_legacy_u32_to_link_mode(supported, phy->supported); ethtool_convert_legacy_u32_to_link_mode(config.advertising, phy->advertising); @@ -37,7 +37,7 @@ Signed-off-by: Russell King ret = phylink_validate(pl, supported, &config); if (ret) -@@ -707,6 +708,7 @@ static int phylink_bringup_phy(struct ph +@@ -712,6 +713,7 @@ static int phylink_bringup_phy(struct ph mutex_lock(&phy->lock); mutex_lock(&pl->state_mutex); pl->phydev = phy; @@ -45,7 +45,7 @@ Signed-off-by: Russell King linkmode_copy(pl->supported, supported); linkmode_copy(pl->link_config.advertising, config.advertising); -@@ -771,7 +773,7 @@ int phylink_connect_phy(struct phylink * +@@ -776,7 +778,7 @@ int phylink_connect_phy(struct phylink * if (ret < 0) return ret; @@ -54,7 +54,7 @@ Signed-off-by: Russell King if (ret) phy_detach(phy); -@@ -824,7 +826,7 @@ int phylink_of_phy_connect(struct phylin +@@ -829,7 +831,7 @@ int phylink_of_phy_connect(struct phylin if (!phy_dev) return -ENODEV; @@ -63,7 +63,7 @@ Signed-off-by: Russell King if (ret) phy_detach(phy_dev); -@@ -1759,13 +1761,22 @@ static void phylink_sfp_link_up(void *up +@@ -1764,13 +1766,22 @@ static void phylink_sfp_link_up(void *up static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) { struct phylink *pl = upstream; diff --git a/target/linux/generic/pending-4.19/748-net-phylink-split-link_an_mode-configured-and-curren.patch b/target/linux/generic/pending-4.19/748-net-phylink-split-link_an_mode-configured-and-curren.patch index f30d37f0c6..00350be24e 100644 --- a/target/linux/generic/pending-4.19/748-net-phylink-split-link_an_mode-configured-and-curren.patch +++ b/target/linux/generic/pending-4.19/748-net-phylink-split-link_an_mode-configured-and-curren.patch @@ -91,7 +91,7 @@ Signed-off-by: Russell King pl->cur_interface, pl->phydev); netif_carrier_on(ndev); -@@ -610,7 +611,7 @@ struct phylink *phylink_create(struct ne +@@ -615,7 +616,7 @@ struct phylink *phylink_create(struct ne return ERR_PTR(ret); } @@ -100,7 +100,7 @@ Signed-off-by: Russell King ret = phylink_parse_fixedlink(pl, fwnode); if (ret < 0) { kfree(pl); -@@ -618,6 +619,8 @@ struct phylink *phylink_create(struct ne +@@ -623,6 +624,8 @@ struct phylink *phylink_create(struct ne } } @@ -109,7 +109,7 @@ Signed-off-by: Russell King ret = phylink_register_sfp(pl, fwnode); if (ret < 0) { kfree(pl); -@@ -733,8 +736,8 @@ static int phylink_bringup_phy(struct ph +@@ -738,8 +741,8 @@ static int phylink_bringup_phy(struct ph static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy, phy_interface_t interface) { @@ -120,7 +120,7 @@ Signed-off-by: Russell King phy_interface_mode_is_8023z(interface)))) return -EINVAL; -@@ -801,8 +804,8 @@ int phylink_of_phy_connect(struct phylin +@@ -806,8 +809,8 @@ int phylink_of_phy_connect(struct phylin int ret; /* Fixed links and 802.3z are handled without needing a PHY */ @@ -131,7 +131,7 @@ Signed-off-by: Russell King phy_interface_mode_is_8023z(pl->link_interface))) return 0; -@@ -813,7 +816,7 @@ int phylink_of_phy_connect(struct phylin +@@ -818,7 +821,7 @@ int phylink_of_phy_connect(struct phylin phy_node = of_parse_phandle(dn, "phy-device", 0); if (!phy_node) { @@ -140,7 +140,7 @@ Signed-off-by: Russell King return -ENODEV; return 0; } -@@ -876,7 +879,7 @@ int phylink_fixed_state_cb(struct phylin +@@ -881,7 +884,7 @@ int phylink_fixed_state_cb(struct phylin /* It does not make sense to let the link be overriden unless we use * MLO_AN_FIXED */ @@ -149,7 +149,7 @@ Signed-off-by: Russell King return -EINVAL; mutex_lock(&pl->state_mutex); -@@ -926,7 +929,7 @@ void phylink_start(struct phylink *pl) +@@ -931,7 +934,7 @@ void phylink_start(struct phylink *pl) ASSERT_RTNL(); netdev_info(pl->netdev, "configuring for %s/%s link mode\n", @@ -158,7 +158,7 @@ Signed-off-by: Russell King phy_modes(pl->link_config.interface)); /* Always set the carrier off */ -@@ -948,7 +951,7 @@ void phylink_start(struct phylink *pl) +@@ -953,7 +956,7 @@ void phylink_start(struct phylink *pl) clear_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state); phylink_run_resolve(pl); @@ -167,7 +167,7 @@ Signed-off-by: Russell King int irq = gpiod_to_irq(pl->link_gpio); if (irq > 0) { -@@ -963,7 +966,7 @@ void phylink_start(struct phylink *pl) +@@ -968,7 +971,7 @@ void phylink_start(struct phylink *pl) if (irq <= 0) mod_timer(&pl->link_poll, jiffies + HZ); } @@ -176,7 +176,7 @@ Signed-off-by: Russell King mod_timer(&pl->link_poll, jiffies + HZ); if (pl->phydev) phy_start(pl->phydev); -@@ -1090,7 +1093,7 @@ int phylink_ethtool_ksettings_get(struct +@@ -1095,7 +1098,7 @@ int phylink_ethtool_ksettings_get(struct linkmode_copy(kset->link_modes.supported, pl->supported); @@ -185,7 +185,7 @@ Signed-off-by: Russell King case MLO_AN_FIXED: /* We are using fixed settings. Report these as the * current link settings - and note that these also -@@ -1163,7 +1166,7 @@ int phylink_ethtool_ksettings_set(struct +@@ -1168,7 +1171,7 @@ int phylink_ethtool_ksettings_set(struct /* If we have a fixed link (as specified by firmware), refuse * to change link parameters. */ @@ -194,7 +194,7 @@ Signed-off-by: Russell King (s->speed != pl->link_config.speed || s->duplex != pl->link_config.duplex)) return -EINVAL; -@@ -1175,7 +1178,7 @@ int phylink_ethtool_ksettings_set(struct +@@ -1180,7 +1183,7 @@ int phylink_ethtool_ksettings_set(struct __clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, config.advertising); } else { /* If we have a fixed link, refuse to enable autonegotiation */ @@ -203,7 +203,7 @@ Signed-off-by: Russell King return -EINVAL; config.speed = SPEED_UNKNOWN; -@@ -1217,7 +1220,7 @@ int phylink_ethtool_ksettings_set(struct +@@ -1222,7 +1225,7 @@ int phylink_ethtool_ksettings_set(struct * configuration. For a fixed link, this isn't able to change any * parameters, which just leaves inband mode. */ @@ -212,7 +212,7 @@ Signed-off-by: Russell King !test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state)) { phylink_mac_config(pl, &pl->link_config); phylink_mac_an_restart(pl); -@@ -1307,7 +1310,7 @@ int phylink_ethtool_set_pauseparam(struc +@@ -1312,7 +1315,7 @@ int phylink_ethtool_set_pauseparam(struc pause->tx_pause); } else if (!test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state)) { @@ -221,7 +221,7 @@ Signed-off-by: Russell King case MLO_AN_FIXED: /* Should we allow fixed links to change against the config? */ phylink_resolve_flow(pl, config); -@@ -1496,7 +1499,7 @@ static int phylink_mii_read(struct phyli +@@ -1501,7 +1504,7 @@ static int phylink_mii_read(struct phyli struct phylink_link_state state; int val = 0xffff; @@ -230,7 +230,7 @@ Signed-off-by: Russell King case MLO_AN_FIXED: if (phy_id == 0) { phylink_get_fixed_state(pl, &state); -@@ -1524,7 +1527,7 @@ static int phylink_mii_read(struct phyli +@@ -1529,7 +1532,7 @@ static int phylink_mii_read(struct phyli static int phylink_mii_write(struct phylink *pl, unsigned int phy_id, unsigned int reg, unsigned int val) { @@ -239,7 +239,7 @@ Signed-off-by: Russell King case MLO_AN_FIXED: break; -@@ -1698,10 +1701,10 @@ static int phylink_sfp_module_insert(voi +@@ -1703,10 +1706,10 @@ static int phylink_sfp_module_insert(voi linkmode_copy(pl->link_config.advertising, config.advertising); } diff --git a/target/linux/generic/pending-4.19/749-net-phylink-split-phylink_sfp_module_insert.patch b/target/linux/generic/pending-4.19/749-net-phylink-split-phylink_sfp_module_insert.patch index 87d70d1434..7a5283a59c 100644 --- a/target/linux/generic/pending-4.19/749-net-phylink-split-phylink_sfp_module_insert.patch +++ b/target/linux/generic/pending-4.19/749-net-phylink-split-phylink_sfp_module_insert.patch @@ -13,7 +13,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1633,25 +1633,21 @@ static void phylink_sfp_detach(void *ups +@@ -1638,25 +1638,21 @@ static void phylink_sfp_detach(void *ups pl->netdev->sfp_bus = NULL; } @@ -46,7 +46,7 @@ Signed-off-by: Russell King config.interface = PHY_INTERFACE_MODE_NA; config.speed = SPEED_UNKNOWN; config.duplex = DUPLEX_UNKNOWN; -@@ -1666,8 +1662,6 @@ static int phylink_sfp_module_insert(voi +@@ -1671,8 +1667,6 @@ static int phylink_sfp_module_insert(voi return ret; } @@ -55,7 +55,7 @@ Signed-off-by: Russell King iface = sfp_select_interface(pl->sfp_bus, config.advertising); if (iface == PHY_INTERFACE_MODE_NA) { netdev_err(pl->netdev, -@@ -1677,18 +1671,18 @@ static int phylink_sfp_module_insert(voi +@@ -1682,18 +1676,18 @@ static int phylink_sfp_module_insert(voi } config.interface = iface; @@ -77,7 +77,7 @@ Signed-off-by: Russell King __ETHTOOL_LINK_MODE_MASK_NBITS, support); if (phy_interface_mode_is_8023z(iface) && pl->phydev) -@@ -1701,15 +1695,15 @@ static int phylink_sfp_module_insert(voi +@@ -1706,15 +1700,15 @@ static int phylink_sfp_module_insert(voi linkmode_copy(pl->link_config.advertising, config.advertising); } @@ -96,7 +96,7 @@ Signed-off-by: Russell King phy_modes(config.interface)); } -@@ -1722,6 +1716,21 @@ static int phylink_sfp_module_insert(voi +@@ -1727,6 +1721,21 @@ static int phylink_sfp_module_insert(voi return ret; } diff --git a/target/linux/generic/pending-4.19/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch b/target/linux/generic/pending-4.19/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch index 358b9a1082..f5618042c9 100644 --- a/target/linux/generic/pending-4.19/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch +++ b/target/linux/generic/pending-4.19/750-net-phylink-delay-MAC-configuration-for-copper-SFP-m.patch @@ -36,7 +36,7 @@ Signed-off-by: Russell King }; static inline void linkmode_zero(unsigned long *dst) -@@ -1633,7 +1636,7 @@ static void phylink_sfp_detach(void *ups +@@ -1638,7 +1641,7 @@ static void phylink_sfp_detach(void *ups pl->netdev->sfp_bus = NULL; } @@ -45,7 +45,7 @@ Signed-off-by: Russell King const unsigned long *supported, const unsigned long *advertising) { -@@ -1707,7 +1710,7 @@ static int phylink_sfp_config(struct phy +@@ -1712,7 +1715,7 @@ static int phylink_sfp_config(struct phy phy_modes(config.interface)); } @@ -54,7 +54,7 @@ Signed-off-by: Russell King if (changed && !test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state)) -@@ -1720,15 +1723,20 @@ static int phylink_sfp_module_insert(voi +@@ -1725,15 +1728,20 @@ static int phylink_sfp_module_insert(voi const struct sfp_eeprom_id *id) { struct phylink *pl = upstream; @@ -79,7 +79,7 @@ Signed-off-by: Russell King } static int phylink_sfp_module_start(void *upstream) -@@ -1736,10 +1744,19 @@ static int phylink_sfp_module_start(void +@@ -1741,10 +1749,19 @@ static int phylink_sfp_module_start(void struct phylink *pl = upstream; /* If this SFP module has a PHY, start the PHY now. */ @@ -102,7 +102,7 @@ Signed-off-by: Russell King } static void phylink_sfp_module_stop(void *upstream) -@@ -1773,10 +1790,30 @@ static void phylink_sfp_link_up(void *up +@@ -1778,10 +1795,30 @@ static void phylink_sfp_link_up(void *up static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) { struct phylink *pl = upstream; diff --git a/target/linux/generic/pending-4.19/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch b/target/linux/generic/pending-4.19/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch index 1724d445b7..c011f3cf8c 100644 --- a/target/linux/generic/pending-4.19/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch +++ b/target/linux/generic/pending-4.19/751-net-phylink-make-Broadcom-BCM84881-based-SFPs-work.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1787,12 +1787,22 @@ static void phylink_sfp_link_up(void *up +@@ -1792,12 +1792,22 @@ static void phylink_sfp_link_up(void *up phylink_run_resolve(pl); } @@ -41,7 +41,7 @@ Signed-off-by: Russell King int ret; /* -@@ -1807,8 +1817,13 @@ static int phylink_sfp_connect_phy(void +@@ -1812,8 +1822,13 @@ static int phylink_sfp_connect_phy(void ethtool_convert_legacy_u32_to_link_mode(supported, phy->supported); ethtool_convert_legacy_u32_to_link_mode(advertising, phy->advertising); diff --git a/target/linux/generic/pending-4.19/834-ledtrig-libata.patch b/target/linux/generic/pending-4.19/834-ledtrig-libata.patch index 4ed9964d74..a76f5b85b8 100644 --- a/target/linux/generic/pending-4.19/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.19/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5169,6 +5182,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5170,6 +5183,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = qc->hw_tag = tag; -@@ -6105,6 +6121,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6106,6 +6122,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -6140,6 +6159,12 @@ static void ata_host_release(struct kref +@@ -6141,6 +6160,12 @@ static void ata_host_release(struct kref kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6603,7 +6628,23 @@ int ata_host_register(struct ata_host *h +@@ -6604,7 +6629,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/generic/pending-4.19/920-mangle_bootargs.patch b/target/linux/generic/pending-4.19/920-mangle_bootargs.patch index 0750ab77c2..85014cb9d8 100644 --- a/target/linux/generic/pending-4.19/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-4.19/920-mangle_bootargs.patch @@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz --- a/init/Kconfig +++ b/init/Kconfig -@@ -1531,6 +1531,15 @@ config EMBEDDED +@@ -1541,6 +1541,15 @@ config EMBEDDED an embedded system so certain expert options are available for configuration. diff --git a/target/linux/generic/pending-4.9/601-add-kernel-imq-support.patch b/target/linux/generic/pending-4.9/601-add-kernel-imq-support.patch index 84a4682dcb..741e631d9f 100644 --- a/target/linux/generic/pending-4.9/601-add-kernel-imq-support.patch +++ b/target/linux/generic/pending-4.9/601-add-kernel-imq-support.patch @@ -1411,7 +1411,7 @@ + --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -3694,6 +3694,19 @@ static inline void netif_tx_unlock_bh(st +@@ -3695,6 +3695,19 @@ static inline void netif_tx_unlock_bh(st } \ } diff --git a/target/linux/generic/pending-4.9/630-packet_socket_type.patch b/target/linux/generic/pending-4.9/630-packet_socket_type.patch index f7ed5f9a6a..e69f9f1895 100644 --- a/target/linux/generic/pending-4.9/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.9/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1787,6 +1787,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1791,6 +1791,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1794,6 +1795,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1798,6 +1799,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1806,7 +1808,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1810,7 +1812,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2044,12 +2046,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2048,12 +2050,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2176,12 +2178,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2180,12 +2182,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3305,6 +3307,7 @@ static int packet_create(struct net *net +@@ -3309,6 +3311,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3929,6 +3932,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3935,6 +3938,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3981,6 +3994,13 @@ static int packet_getsockopt(struct sock +@@ -3987,6 +4000,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch index c83a5649d5..7ebe321278 100644 --- a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5033,6 +5046,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5034,6 +5047,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -5936,6 +5952,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -5937,6 +5953,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -5957,6 +5976,12 @@ static void ata_host_release(struct devi +@@ -5958,6 +5977,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6403,7 +6428,23 @@ int ata_host_register(struct ata_host *h +@@ -6404,7 +6429,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/generic/pending-4.9/920-mangle_bootargs.patch b/target/linux/generic/pending-4.9/920-mangle_bootargs.patch index 3422f41519..e34847f0a3 100644 --- a/target/linux/generic/pending-4.9/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-4.9/920-mangle_bootargs.patch @@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz --- a/init/Kconfig +++ b/init/Kconfig -@@ -1694,6 +1694,15 @@ config EMBEDDED +@@ -1704,6 +1704,15 @@ config EMBEDDED an embedded system so certain expert options are available for configuration. diff --git a/target/linux/ipq40xx/patches-4.14/950-add-tx-hw802.11-encapusaltion-offloading-support.patch b/target/linux/ipq40xx/patches-4.14/950-add-tx-hw802.11-encapusaltion-offloading-support.patch index 370f8f97a6..acc140bd4c 100644 --- a/target/linux/ipq40xx/patches-4.14/950-add-tx-hw802.11-encapusaltion-offloading-support.patch +++ b/target/linux/ipq40xx/patches-4.14/950-add-tx-hw802.11-encapusaltion-offloading-support.patch @@ -59,7 +59,7 @@ u8 drv_priv[0] __aligned(sizeof(void *)); --- a/drivers/net/wireless/ath/ath10k/htt_tx.c +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c -@@ -812,6 +812,10 @@ static u8 ath10k_htt_tx_get_tid(struct s +@@ -815,6 +815,10 @@ static u8 ath10k_htt_tx_get_tid(struct s struct ieee80211_hdr *hdr = (void *)skb->data; struct ath10k_skb_cb *cb = ATH10K_SKB_CB(skb); @@ -70,7 +70,7 @@ if (!is_eth && ieee80211_is_mgmt(hdr->frame_control)) return HTT_DATA_TX_EXT_TID_MGMT; else if (cb->flags & ATH10K_SKB_F_QOS) -@@ -933,15 +937,17 @@ int ath10k_htt_tx(struct ath10k_htt *htt +@@ -936,15 +940,17 @@ int ath10k_htt_tx(struct ath10k_htt *htt txbuf_paddr = htt->txbuf.paddr + (sizeof(struct ath10k_htt_txbuf) * msdu_id); @@ -287,8 +287,8 @@ + ath10k_htt_tx_free_msdu_id(htt, tx_done->msdu_id); ath10k_htt_tx_dec_pending(htt); - if (htt->num_pending_tx == 0) -@@ -119,7 +124,11 @@ int ath10k_txrx_tx_unref(struct ath10k_h + spin_unlock_bh(&htt->tx_lock); +@@ -117,7 +122,11 @@ int ath10k_txrx_tx_unref(struct ath10k_h (info->flags & IEEE80211_TX_CTL_NO_ACK)) info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; diff --git a/target/linux/ipq40xx/patches-4.14/998-ignore-stats-debug-info.patch b/target/linux/ipq40xx/patches-4.14/998-ignore-stats-debug-info.patch index bc8f5308f2..4f8c9df837 100644 --- a/target/linux/ipq40xx/patches-4.14/998-ignore-stats-debug-info.patch +++ b/target/linux/ipq40xx/patches-4.14/998-ignore-stats-debug-info.patch @@ -31,7 +31,7 @@ --- a/drivers/net/wireless/ath/ath10k/txrx.c +++ b/drivers/net/wireless/ath/ath10k/txrx.c -@@ -250,8 +250,8 @@ void ath10k_peer_unmap_event(struct ath1 +@@ -248,8 +248,8 @@ void ath10k_peer_unmap_event(struct ath1 spin_lock_bh(&ar->data_lock); peer = ath10k_peer_find_by_id(ar, ev->peer_id); if (!peer) { diff --git a/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch b/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch index ec641e5939..6303471448 100644 --- a/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch +++ b/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch @@ -26,7 +26,7 @@ case UPIO_MEM: case UPIO_MEM16: case UPIO_MEM32: -@@ -2959,6 +2960,7 @@ int uart_match_port(struct uart_port *po +@@ -2960,6 +2961,7 @@ int uart_match_port(struct uart_port *po case UPIO_HUB6: return (port1->iobase == port2->iobase) && (port1->hub6 == port2->hub6); diff --git a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch index b666fc9e32..082b9bb74b 100644 --- a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch @@ -539,7 +539,7 @@ Signed-off-by: Yangbo Lu --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -2378,7 +2378,8 @@ int register_netdevice_notifier(struct n +@@ -2379,7 +2379,8 @@ int register_netdevice_notifier(struct n int unregister_netdevice_notifier(struct notifier_block *nb); struct netdev_notifier_info { @@ -549,7 +549,7 @@ Signed-off-by: Yangbo Lu }; struct netdev_notifier_info_ext { -@@ -2410,6 +2411,7 @@ static inline void netdev_notifier_info_ +@@ -2411,6 +2412,7 @@ static inline void netdev_notifier_info_ struct net_device *dev) { info->dev = dev; @@ -557,7 +557,7 @@ Signed-off-by: Yangbo Lu } static inline struct net_device * -@@ -2418,6 +2420,12 @@ netdev_notifier_info_to_dev(const struct +@@ -2419,6 +2421,12 @@ netdev_notifier_info_to_dev(const struct return info->dev; } diff --git a/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch b/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch index a2a6b531b7..271cc81a3f 100644 --- a/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/707-dpaa-ethernet-support-layerscape.patch @@ -2129,8 +2129,8 @@ Signed-off-by: Zhao Qiang struct device_node *internal_phy_node; /* List of multicast addresses */ struct list_head mc_addr_list; -@@ -106,7 +104,7 @@ static void set_fman_mac_params(struct m - resource_size(mac_dev->res)); +@@ -109,7 +107,7 @@ static int set_fman_mac_params(struct ma + memcpy(¶ms->addr, mac_dev->addr, sizeof(mac_dev->addr)); params->max_speed = priv->max_speed; - params->phy_if = priv->phy_if; @@ -2138,7 +2138,7 @@ Signed-off-by: Zhao Qiang params->basex_if = false; params->mac_id = priv->cell_index; params->fm = (void *)priv->fman; -@@ -419,15 +417,12 @@ void fman_get_pause_cfg(struct mac_devic +@@ -430,15 +428,12 @@ void fman_get_pause_cfg(struct mac_devic } EXPORT_SYMBOL(fman_get_pause_cfg); @@ -2156,7 +2156,7 @@ Signed-off-by: Zhao Qiang struct phy_device *phy_dev = mac_dev->phy_dev; struct fman_mac *fman_mac; bool rx_pause, tx_pause; -@@ -444,14 +439,12 @@ static void adjust_link_dtsec(struct net +@@ -455,14 +450,12 @@ static void adjust_link_dtsec(struct net fman_get_pause_cfg(mac_dev, &rx_pause, &tx_pause); err = fman_set_mac_active_pause(mac_dev, rx_pause, tx_pause); if (err < 0) @@ -2174,7 +2174,7 @@ Signed-off-by: Zhao Qiang struct phy_device *phy_dev = mac_dev->phy_dev; struct fman_mac *fman_mac; bool rx_pause, tx_pause; -@@ -463,60 +456,12 @@ static void adjust_link_memac(struct net +@@ -474,60 +467,12 @@ static void adjust_link_memac(struct net fman_get_pause_cfg(mac_dev, &rx_pause, &tx_pause); err = fman_set_mac_active_pause(mac_dev, rx_pause, tx_pause); if (err < 0) @@ -2237,7 +2237,7 @@ Signed-off-by: Zhao Qiang mac_dev->init = dtsec_initialization; mac_dev->set_promisc = dtsec_set_promiscuous; mac_dev->change_addr = dtsec_modify_mac_address; -@@ -525,17 +470,18 @@ static void setup_dtsec(struct mac_devic +@@ -536,17 +481,18 @@ static void setup_dtsec(struct mac_devic mac_dev->set_tx_pause = dtsec_set_tx_pause_frames; mac_dev->set_rx_pause = dtsec_accept_rx_pause_frames; mac_dev->set_exception = dtsec_set_exception; @@ -2258,7 +2258,7 @@ Signed-off-by: Zhao Qiang mac_dev->init = tgec_initialization; mac_dev->set_promisc = tgec_set_promiscuous; mac_dev->change_addr = tgec_modify_mac_address; -@@ -544,17 +490,18 @@ static void setup_tgec(struct mac_device +@@ -555,17 +501,18 @@ static void setup_tgec(struct mac_device mac_dev->set_tx_pause = tgec_set_tx_pause_frames; mac_dev->set_rx_pause = tgec_accept_rx_pause_frames; mac_dev->set_exception = tgec_set_exception; @@ -2279,7 +2279,7 @@ Signed-off-by: Zhao Qiang mac_dev->init = memac_initialization; mac_dev->set_promisc = memac_set_promiscuous; mac_dev->change_addr = memac_modify_mac_address; -@@ -563,10 +510,12 @@ static void setup_memac(struct mac_devic +@@ -574,10 +521,12 @@ static void setup_memac(struct mac_devic mac_dev->set_tx_pause = memac_set_tx_pause_frames; mac_dev->set_rx_pause = memac_accept_rx_pause_frames; mac_dev->set_exception = memac_set_exception; @@ -2293,7 +2293,7 @@ Signed-off-by: Zhao Qiang mac_dev->priv->enable = memac_enable; mac_dev->priv->disable = memac_disable; } -@@ -599,8 +548,7 @@ static const u16 phy2speed[] = { +@@ -610,8 +559,7 @@ static const u16 phy2speed[] = { }; static struct platform_device *dpaa_eth_add_device(int fman_id, @@ -2303,7 +2303,7 @@ Signed-off-by: Zhao Qiang { struct platform_device *pdev; struct dpaa_eth_data data; -@@ -613,19 +561,15 @@ static struct platform_device *dpaa_eth_ +@@ -624,19 +572,15 @@ static struct platform_device *dpaa_eth_ data.mac_dev = mac_dev; data.mac_hw_id = priv->cell_index; data.fman_hw_id = fman_id; @@ -2323,7 +2323,7 @@ Signed-off-by: Zhao Qiang ret = platform_device_add_data(pdev, &data, sizeof(data)); if (ret) -@@ -676,7 +620,6 @@ static int mac_probe(struct platform_dev +@@ -687,7 +631,6 @@ static int mac_probe(struct platform_dev mac_dev = devm_kzalloc(dev, sizeof(*mac_dev), GFP_KERNEL); if (!mac_dev) { err = -ENOMEM; @@ -2331,7 +2331,7 @@ Signed-off-by: Zhao Qiang goto _return; } priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); -@@ -706,9 +649,6 @@ static int mac_probe(struct platform_dev +@@ -717,9 +660,6 @@ static int mac_probe(struct platform_dev goto _return; } @@ -2341,7 +2341,7 @@ Signed-off-by: Zhao Qiang INIT_LIST_HEAD(&priv->mc_addr_list); /* Get the FM node */ -@@ -717,7 +657,7 @@ static int mac_probe(struct platform_dev +@@ -728,7 +668,7 @@ static int mac_probe(struct platform_dev dev_err(dev, "of_get_parent(%pOF) failed\n", mac_node); err = -EINVAL; @@ -2350,7 +2350,7 @@ Signed-off-by: Zhao Qiang } of_dev = of_find_device_by_node(dev_node); -@@ -751,7 +691,7 @@ static int mac_probe(struct platform_dev +@@ -762,7 +702,7 @@ static int mac_probe(struct platform_dev if (err < 0) { dev_err(dev, "of_address_to_resource(%pOF) = %d\n", mac_node, err); @@ -2359,7 +2359,7 @@ Signed-off-by: Zhao Qiang } mac_dev->res = __devm_request_region(dev, -@@ -761,7 +701,7 @@ static int mac_probe(struct platform_dev +@@ -772,7 +712,7 @@ static int mac_probe(struct platform_dev if (!mac_dev->res) { dev_err(dev, "__devm_request_mem_region(mac) failed\n"); err = -EBUSY; @@ -2368,7 +2368,7 @@ Signed-off-by: Zhao Qiang } priv->vaddr = devm_ioremap(dev, mac_dev->res->start, -@@ -769,16 +709,12 @@ static int mac_probe(struct platform_dev +@@ -780,16 +720,12 @@ static int mac_probe(struct platform_dev if (!priv->vaddr) { dev_err(dev, "devm_ioremap() failed\n"); err = -EIO; @@ -2388,7 +2388,7 @@ Signed-off-by: Zhao Qiang } /* Get the cell-index */ -@@ -786,7 +722,7 @@ static int mac_probe(struct platform_dev +@@ -797,7 +733,7 @@ static int mac_probe(struct platform_dev if (err) { dev_err(dev, "failed to read cell-index for %pOF\n", mac_node); err = -EINVAL; @@ -2397,7 +2397,7 @@ Signed-off-by: Zhao Qiang } priv->cell_index = (u8)val; -@@ -795,7 +731,7 @@ static int mac_probe(struct platform_dev +@@ -806,7 +742,7 @@ static int mac_probe(struct platform_dev if (!mac_addr) { dev_err(dev, "of_get_mac_address(%pOF) failed\n", mac_node); err = -EINVAL; @@ -2406,7 +2406,7 @@ Signed-off-by: Zhao Qiang } memcpy(mac_dev->addr, mac_addr, sizeof(mac_dev->addr)); -@@ -805,14 +741,14 @@ static int mac_probe(struct platform_dev +@@ -816,14 +752,14 @@ static int mac_probe(struct platform_dev dev_err(dev, "of_count_phandle_with_args(%pOF, fsl,fman-ports) failed\n", mac_node); err = nph; @@ -2423,7 +2423,7 @@ Signed-off-by: Zhao Qiang } for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) { -@@ -851,13 +787,13 @@ static int mac_probe(struct platform_dev +@@ -862,13 +798,13 @@ static int mac_probe(struct platform_dev mac_node); phy_if = PHY_INTERFACE_MODE_SGMII; } @@ -2440,7 +2440,7 @@ Signed-off-by: Zhao Qiang mac_dev->if_support &= ~(SUPPORTED_10baseT_Half | SUPPORTED_100baseT_Half); -@@ -866,30 +802,31 @@ static int mac_probe(struct platform_dev +@@ -877,30 +813,31 @@ static int mac_probe(struct platform_dev mac_dev->if_support |= SUPPORTED_1000baseT_Full; /* The 10G interface only supports one mode */ @@ -2480,7 +2480,7 @@ Signed-off-by: Zhao Qiang } priv->fixed_link->link = phy->link; -@@ -904,8 +841,8 @@ static int mac_probe(struct platform_dev +@@ -915,8 +852,8 @@ static int mac_probe(struct platform_dev err = mac_dev->init(mac_dev); if (err < 0) { dev_err(dev, "mac_dev->init() = %d\n", err); @@ -2491,7 +2491,7 @@ Signed-off-by: Zhao Qiang } /* pause frame autonegotiation enabled */ -@@ -926,7 +863,7 @@ static int mac_probe(struct platform_dev +@@ -937,7 +874,7 @@ static int mac_probe(struct platform_dev mac_dev->addr[0], mac_dev->addr[1], mac_dev->addr[2], mac_dev->addr[3], mac_dev->addr[4], mac_dev->addr[5]); @@ -2500,7 +2500,7 @@ Signed-off-by: Zhao Qiang if (IS_ERR(priv->eth_dev)) { dev_err(dev, "failed to add Ethernet platform device for MAC %d\n", priv->cell_index); -@@ -937,9 +874,8 @@ static int mac_probe(struct platform_dev +@@ -948,9 +885,8 @@ static int mac_probe(struct platform_dev _return_of_node_put: of_node_put(dev_node); diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch index f8b858aed2..47525dd8ec 100644 --- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch @@ -528,7 +528,7 @@ Signed-off-by: Zhao Chenhui reg &= ~DWC3_DCTL_INITU2ENA; --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3244,6 +3244,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3257,6 +3257,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) { int ret; int irq; @@ -536,7 +536,7 @@ Signed-off-by: Zhao Chenhui irq = dwc3_gadget_get_irq(dwc); if (irq < 0) { -@@ -3322,6 +3323,12 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3335,6 +3336,12 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc3_gadget_set_speed(&dwc->gadget, dwc->maximum_speed); diff --git a/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch b/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch index 746391a31f..34c754dc4a 100644 --- a/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch @@ -131,7 +131,7 @@ Signed-off-by: Yinbo Zhu }; /** -@@ -500,13 +550,20 @@ static void esdhc_clock_enable(struct sd +@@ -504,13 +554,20 @@ static void esdhc_clock_enable(struct sd } } @@ -152,7 +152,7 @@ Signed-off-by: Yinbo Zhu u32 temp; host->mmc->actual_clock = 0; -@@ -520,27 +577,14 @@ static void esdhc_of_set_clock(struct sd +@@ -524,27 +581,14 @@ static void esdhc_of_set_clock(struct sd if (esdhc->vendor_ver < VENDOR_V_23) pre_div = 2; @@ -187,7 +187,7 @@ Signed-off-by: Yinbo Zhu temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL); temp &= ~(ESDHC_CLOCK_SDCLKEN | ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | -@@ -553,9 +597,30 @@ static void esdhc_of_set_clock(struct sd +@@ -557,9 +601,30 @@ static void esdhc_of_set_clock(struct sd while (host->max_clk / pre_div / div > clock && div < 16) div++; @@ -218,7 +218,7 @@ Signed-off-by: Yinbo Zhu pre_div >>= 1; div--; -@@ -565,6 +630,29 @@ static void esdhc_of_set_clock(struct sd +@@ -569,6 +634,29 @@ static void esdhc_of_set_clock(struct sd | (pre_div << ESDHC_PREDIV_SHIFT)); sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); @@ -248,7 +248,7 @@ Signed-off-by: Yinbo Zhu /* Wait max 20 ms */ timeout = ktime_add_ms(ktime_get(), 20); while (1) { -@@ -580,6 +668,7 @@ static void esdhc_of_set_clock(struct sd +@@ -584,6 +672,7 @@ static void esdhc_of_set_clock(struct sd udelay(10); } @@ -256,7 +256,7 @@ Signed-off-by: Yinbo Zhu temp |= ESDHC_CLOCK_SDCLKEN; sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); } -@@ -608,6 +697,8 @@ static void esdhc_pltfm_set_bus_width(st +@@ -612,6 +701,8 @@ static void esdhc_pltfm_set_bus_width(st static void esdhc_reset(struct sdhci_host *host, u8 mask) { @@ -265,7 +265,7 @@ Signed-off-by: Yinbo Zhu u32 val; sdhci_reset(host, mask); -@@ -619,6 +710,12 @@ static void esdhc_reset(struct sdhci_hos +@@ -623,6 +714,12 @@ static void esdhc_reset(struct sdhci_hos val = sdhci_readl(host, ESDHC_TBCTL); val &= ~ESDHC_TB_EN; sdhci_writel(host, val, ESDHC_TBCTL); @@ -278,7 +278,7 @@ Signed-off-by: Yinbo Zhu } } -@@ -630,6 +727,7 @@ static void esdhc_reset(struct sdhci_hos +@@ -634,6 +731,7 @@ static void esdhc_reset(struct sdhci_hos static const struct of_device_id scfg_device_ids[] = { { .compatible = "fsl,t1040-scfg", }, { .compatible = "fsl,ls1012a-scfg", }, @@ -286,7 +286,7 @@ Signed-off-by: Yinbo Zhu { .compatible = "fsl,ls1046a-scfg", }, {} }; -@@ -692,23 +790,91 @@ static int esdhc_signal_voltage_switch(s +@@ -696,23 +794,91 @@ static int esdhc_signal_voltage_switch(s } } @@ -383,7 +383,7 @@ Signed-off-by: Yinbo Zhu } #ifdef CONFIG_PM_SLEEP -@@ -757,7 +923,7 @@ static const struct sdhci_ops sdhci_esdh +@@ -761,7 +927,7 @@ static const struct sdhci_ops sdhci_esdh .adma_workaround = esdhc_of_adma_workaround, .set_bus_width = esdhc_pltfm_set_bus_width, .reset = esdhc_reset, @@ -392,7 +392,7 @@ Signed-off-by: Yinbo Zhu }; static const struct sdhci_ops sdhci_esdhc_le_ops = { -@@ -774,7 +940,7 @@ static const struct sdhci_ops sdhci_esdh +@@ -778,7 +944,7 @@ static const struct sdhci_ops sdhci_esdh .adma_workaround = esdhc_of_adma_workaround, .set_bus_width = esdhc_pltfm_set_bus_width, .reset = esdhc_reset, @@ -401,7 +401,7 @@ Signed-off-by: Yinbo Zhu }; static const struct sdhci_pltfm_data sdhci_esdhc_be_pdata = { -@@ -800,8 +966,20 @@ static struct soc_device_attribute soc_i +@@ -804,8 +970,20 @@ static struct soc_device_attribute soc_i { }, }; @@ -422,7 +422,7 @@ Signed-off-by: Yinbo Zhu struct sdhci_pltfm_host *pltfm_host; struct sdhci_esdhc *esdhc; struct device_node *np; -@@ -821,6 +999,24 @@ static void esdhc_init(struct platform_d +@@ -825,6 +1003,24 @@ static void esdhc_init(struct platform_d else esdhc->quirk_incorrect_hostver = false; @@ -447,7 +447,7 @@ Signed-off-by: Yinbo Zhu np = pdev->dev.of_node; clk = of_clk_get(np, 0); if (!IS_ERR(clk)) { -@@ -848,6 +1044,12 @@ static void esdhc_init(struct platform_d +@@ -852,6 +1048,12 @@ static void esdhc_init(struct platform_d } } @@ -460,7 +460,7 @@ Signed-off-by: Yinbo Zhu static int sdhci_esdhc_probe(struct platform_device *pdev) { struct sdhci_host *host; -@@ -871,6 +1073,7 @@ static int sdhci_esdhc_probe(struct plat +@@ -875,6 +1077,7 @@ static int sdhci_esdhc_probe(struct plat host->mmc_host_ops.start_signal_voltage_switch = esdhc_signal_voltage_switch; host->mmc_host_ops.execute_tuning = esdhc_execute_tuning; @@ -468,7 +468,7 @@ Signed-off-by: Yinbo Zhu host->tuning_delay = 1; esdhc_init(pdev, host); -@@ -879,6 +1082,11 @@ static int sdhci_esdhc_probe(struct plat +@@ -883,6 +1086,11 @@ static int sdhci_esdhc_probe(struct plat pltfm_host = sdhci_priv(host); esdhc = sdhci_pltfm_priv(pltfm_host); @@ -480,7 +480,7 @@ Signed-off-by: Yinbo Zhu if (esdhc->vendor_ver == VENDOR_V_22) host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23; -@@ -925,14 +1133,6 @@ static int sdhci_esdhc_probe(struct plat +@@ -929,14 +1137,6 @@ static int sdhci_esdhc_probe(struct plat return ret; } diff --git a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch index 317a0ad51c..22d49ce06d 100644 --- a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch +++ b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch @@ -49,7 +49,7 @@ Signed-off-by: Russell King }; --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1060,34 +1060,6 @@ int phylink_ethtool_set_pauseparam(struc +@@ -1065,34 +1065,6 @@ int phylink_ethtool_set_pauseparam(struc } EXPORT_SYMBOL_GPL(phylink_ethtool_set_pauseparam); diff --git a/target/linux/mvebu/patches-4.14/409-sfp-use-netdev-sfp_bus-for-start-stop.patch b/target/linux/mvebu/patches-4.14/409-sfp-use-netdev-sfp_bus-for-start-stop.patch index 10bd2d0a46..f07b3922c6 100644 --- a/target/linux/mvebu/patches-4.14/409-sfp-use-netdev-sfp_bus-for-start-stop.patch +++ b/target/linux/mvebu/patches-4.14/409-sfp-use-netdev-sfp_bus-for-start-stop.patch @@ -10,7 +10,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -777,8 +777,8 @@ void phylink_start(struct phylink *pl) +@@ -782,8 +782,8 @@ void phylink_start(struct phylink *pl) clear_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state); phylink_run_resolve(pl); @@ -21,7 +21,7 @@ Signed-off-by: Russell King if (pl->phydev) phy_start(pl->phydev); } -@@ -790,8 +790,8 @@ void phylink_stop(struct phylink *pl) +@@ -795,8 +795,8 @@ void phylink_stop(struct phylink *pl) if (pl->phydev) phy_stop(pl->phydev); diff --git a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch index 77d4728f5b..d223ac469f 100644 --- a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch +++ b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch @@ -15,7 +15,7 @@ /* initialize internal qc */ /* XXX: Tag 0 is used for drivers with legacy EH as some -@@ -5166,6 +5174,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5167,6 +5175,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) return NULL; @@ -25,7 +25,7 @@ /* libsas case */ if (ap->flags & ATA_FLAG_SAS_HOST) { tag = ata_sas_allocate_tag(ap); -@@ -5211,6 +5222,8 @@ void ata_qc_free(struct ata_queued_cmd * +@@ -5212,6 +5223,8 @@ void ata_qc_free(struct ata_queued_cmd * qc->tag = ATA_TAG_POISON; if (ap->flags & ATA_FLAG_SAS_HOST) ata_sas_free_tag(tag, ap);