From 25cb37bc009341da8afff0335cd7f9590a6bb411 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 30 Aug 2021 20:34:45 +0100 Subject: [PATCH 01/13] procd: update to git HEAD df251c2 uxc: move mountpoint of persistent config to /var/run/uxc e5b38fd trace: free memory allocated by blobmsg_format_json_indent() Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index b202afff8a..0edf586feb 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2021-08-23 -PKG_SOURCE_VERSION:=167dc249b0a55fdb973afbd797059a3880bb7aea -PKG_MIRROR_HASH:=fdb5206f41a8e74710abaca3a26bb2276a5eb0e9fb14672c6685950d18ba3775 +PKG_SOURCE_DATE:=2021-08-30 +PKG_SOURCE_VERSION:=e5b38fd1298cec50f68b01568fcecf5e626cd286 +PKG_MIRROR_HASH:=a836bf84fe16fb6460e8a30f2efbbde43c7f97365132ffc95a068f1082107528 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 3e16866f395e5292feb3dca2ee076258acd7f0b1 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 31 Aug 2021 00:52:47 +0100 Subject: [PATCH 02/13] procd: update to git HEAD 96d8bf2 trace: fix potential use-after-free occurence 8eb1d78 initd: fix off-by-one error in mkdev.c 86f82f3 utils: don't ignore open() return value f5fe04b jail: actually check calloc return value 269c9e4 trace: preload: avoid NULL-dereference here as well Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 0edf586feb..65c76e6d62 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2021-08-30 -PKG_SOURCE_VERSION:=e5b38fd1298cec50f68b01568fcecf5e626cd286 -PKG_MIRROR_HASH:=a836bf84fe16fb6460e8a30f2efbbde43c7f97365132ffc95a068f1082107528 +PKG_SOURCE_DATE:=2021-08-31 +PKG_SOURCE_VERSION:=269c9e4c7e5b6a726712abf939255980f03266c5 +PKG_MIRROR_HASH:=7784c2853c74209e3aeb8e7328dd0024208cc5441afe6a5419c08ba1aee31f62 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From c39be8e7a4d60b5b66d5bf3b0f8947ae9da42184 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 31 Aug 2021 01:43:31 +0200 Subject: [PATCH 03/13] ramips: minew g1-c: use default static address for lan instead of dhcp As Adrian Schmutzler suggested on github [1] the device should follow the default behaviour on ethernet using a static address instead using dhcp. [1] https://github.com/openwrt/openwrt/commit/8d497b65704f62294a4bbc0e1f5aa4eb1dbf9e24 Signed-off-by: Alexander Couzens --- .../linux/ramips/mt76x8/base-files/etc/board.d/02_network | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index 7c9da8f3e4..7cdf27c004 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -15,6 +15,7 @@ ramips_setup_interfaces() glinet,vixmini|\ hak5,wifi-pineapple-mk7|\ mediatek,linkit-smart-7688|\ + minew,g1-c|\ onion,omega2p|\ onion,omega2|\ ravpower,rp-wd009|\ @@ -33,11 +34,6 @@ ramips_setup_interfaces() ucidef_add_switch_attr "switch0" "enable" "false" ucidef_set_interface_lan "eth0" ;; - minew,g1-c) - ucidef_add_switch "switch0" - ucidef_add_switch_attr "switch0" "enable" "false" - ucidef_set_interface_lan "eth0" "dhcp" - ;; asus,rt-n10p-v3|\ asus,rt-n11p-b1|\ asus,rt-n12-vp-b1|\ From a235b417925b18cd803e48332601eb9965f85cbd Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 24 Nov 2020 01:49:17 -0800 Subject: [PATCH 04/13] libjson-c: remove old math patch Remove old math patch meant for old GCC versions. It's not needed for GCC and causes issues with clang. Add CMake patch to identify clang properly and apply the proper flags. Fixes the following warnings/errors: json_pointer.c:230:7: warning: implicit declaration of function 'vasprintf' is invalid in C99 [-Wimplicit-function-declaration] rc = vasprintf(&path_copy, path_fmt, args); ^ json_pointer.c:317:7: warning: implicit declaration of function 'vasprintf' is invalid in C99 [-Wimplicit-function-declaration] rc = vasprintf(&path_copy, path_fmt, args); ^ /usr/include/bits/mathcalls.h:177:23: error: cannot redeclare builtin function '__builtin_isinf' __MATHDECL_ALIAS (int,isinf,, (_Mdouble_ __value), isinf) ^ /usr/include/bits/mathcalls.h:177:23: note: '__builtin_isinf' is a builtin with type 'int ()' /usr/include/bits/mathcalls.h:213:23: error: cannot redeclare builtin function '__builtin_isnan' __MATHDECL_ALIAS (int,isnan,, (_Mdouble_ __value), isnan) The clang patch is an upstream backport. Signed-off-by: Rosen Penev --- package/libs/libjson-c/patches/000-libm.patch | 45 ------------------- .../libs/libjson-c/patches/010-clang.patch | 11 +++++ 2 files changed, 11 insertions(+), 45 deletions(-) delete mode 100644 package/libs/libjson-c/patches/000-libm.patch create mode 100644 package/libs/libjson-c/patches/010-clang.patch diff --git a/package/libs/libjson-c/patches/000-libm.patch b/package/libs/libjson-c/patches/000-libm.patch deleted file mode 100644 index c6ff5f4766..0000000000 --- a/package/libs/libjson-c/patches/000-libm.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- a/math_compat.h -+++ b/math_compat.h -@@ -6,38 +6,9 @@ - * @brief Do not use, json-c internal, may be changed or removed at any time. - */ - --/* Define isnan, isinf, infinity and nan on Windows/MSVC */ -- --#ifndef HAVE_DECL_ISNAN --#ifdef HAVE_DECL__ISNAN --#include --#define isnan(x) _isnan(x) --#else --/* On platforms like AIX and "IBM i" we need to provide our own isnan */ --#define isnan(x) ((x) != (x)) --#endif --#endif -- --#ifndef HAVE_DECL_ISINF --#ifdef HAVE_DECL__FINITE --#include --#define isinf(x) (!_finite(x)) --#else --#include --/* On platforms like AIX and "IBM i" we need to provide our own isinf */ --#define isinf(x) ((x) < -DBL_MAX || (x) > DBL_MAX) --#endif --#endif -- --#ifndef HAVE_DECL_INFINITY --#include --#define INFINITY (DBL_MAX + DBL_MAX) --#define HAVE_DECL_INFINITY --#endif -- --#ifndef HAVE_DECL_NAN --#define NAN (INFINITY - INFINITY) --#define HAVE_DECL_NAN --#endif -+#undef isnan -+#define isnan(x) __builtin_isnan(x) -+#undef isinf -+#define isinf(x) __builtin_isinf(x) - - #endif diff --git a/package/libs/libjson-c/patches/010-clang.patch b/package/libs/libjson-c/patches/010-clang.patch new file mode 100644 index 0000000000..9ef73f1a82 --- /dev/null +++ b/package/libs/libjson-c/patches/010-clang.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -265,7 +265,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_D + configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h) + message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h") + +-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") ++if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections") + if ("${DISABLE_WERROR}" STREQUAL "OFF") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") From 62465c75be43dc97fd5a94223dfbc226e0dfa6ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 31 Aug 2021 09:33:47 +0200 Subject: [PATCH 05/13] bcm53xx: fix USB in kernel 5.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes USB controller driver work with USBs that are always powered on (don't require toggling any GPIO). Signed-off-by: Rafał Miłecki --- ...-bcma-Add-a-check-for-devm_gpiod_get.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 target/linux/bcm53xx/patches-5.10/181-Revert-USB-bcma-Add-a-check-for-devm_gpiod_get.patch diff --git a/target/linux/bcm53xx/patches-5.10/181-Revert-USB-bcma-Add-a-check-for-devm_gpiod_get.patch b/target/linux/bcm53xx/patches-5.10/181-Revert-USB-bcma-Add-a-check-for-devm_gpiod_get.patch new file mode 100644 index 0000000000..9e424760ce --- /dev/null +++ b/target/linux/bcm53xx/patches-5.10/181-Revert-USB-bcma-Add-a-check-for-devm_gpiod_get.patch @@ -0,0 +1,41 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 31 Aug 2021 08:40:49 +0200 +Subject: [PATCH fix] Revert "USB: bcma: Add a check for devm_gpiod_get" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit f3de5d857bb2362b00e2a8d4bc886cd49dcb66db. + +That commit broke USB on all routers that have USB always powered on and +don't require toggling any GPIO. It's a majority of devices actually. + +The original code worked and seemed safe: vcc GPIO is optional and +bcma_hci_platform_power_gpio() takes care of checking the pointer before +using it. + +This revert fixes: +[ 10.801127] bcma_hcd: probe of bcma0:11 failed with error -2 + +Cc: Chuhong Yuan +Signed-off-by: Rafał Miłecki +--- + drivers/usb/host/bcma-hcd.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/drivers/usb/host/bcma-hcd.c ++++ b/drivers/usb/host/bcma-hcd.c +@@ -406,12 +406,9 @@ static int bcma_hcd_probe(struct bcma_de + return -ENOMEM; + usb_dev->core = core; + +- if (core->dev.of_node) { ++ if (core->dev.of_node) + usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc", + GPIOD_OUT_HIGH); +- if (IS_ERR(usb_dev->gpio_desc)) +- return PTR_ERR(usb_dev->gpio_desc); +- } + + switch (core->id.id) { + case BCMA_CORE_USB20_HOST: From 9b40346328aeb0c46ffb62f6c64f7fd64e909b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 31 Aug 2021 11:13:38 +0200 Subject: [PATCH 06/13] bcm53xx: fix kmod-i2c-bcm-iproc for kernel 5.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I2C_BCM_IPROC selects I2C_SLAVE which in turn makes two new symbols available: I2C_SLAVE_EEPROM and I2C_SLAVE_TESTUNIT. That was causing: I2C support (I2C) [M/n/y/?] m Enable compatibility bits for old user-space (I2C_COMPAT) [N/y/?] n I2C device interface (I2C_CHARDEV) [M/n/?] m I2C bus multiplexing support (I2C_MUX) [N/m/?] n Autoselect pertinent helper modules (I2C_HELPER_AUTO) [N/y/?] n SMBus-specific protocols (I2C_SMBUS) [N/m/?] n I2C/SMBus Test Stub (I2C_STUB) [N/m/?] n I2C slave support (I2C_SLAVE) [Y/?] y I2C eeprom slave driver (I2C_SLAVE_EEPROM) [N/m/?] n I2C eeprom testunit driver (I2C_SLAVE_TESTUNIT) [N/m/?] (NEW) Ideally I2C_SLAVE should probably be packaged as kmod-i2c-slabe. For now just modify kmod-i2c-bcm-iproc to fix kernel compilation. Signed-off-by: Rafał Miłecki --- target/linux/bcm53xx/modules.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/linux/bcm53xx/modules.mk b/target/linux/bcm53xx/modules.mk index e43231f376..4b28923d8b 100644 --- a/target/linux/bcm53xx/modules.mk +++ b/target/linux/bcm53xx/modules.mk @@ -36,7 +36,9 @@ $(eval $(call KernelPackage,phy-bcm-ns-usb3)) define KernelPackage/i2c-bcm-iproc TITLE:=Broadcom iProc I2C controller - KCONFIG:=CONFIG_I2C_BCM_IPROC + KCONFIG:= \ + CONFIG_I2C_BCM_IPROC \ + CONFIG_I2C_SLAVE_TESTUNIT=n DEPENDS:=@TARGET_bcm53xx +kmod-i2c-core SUBMENU:=$(I2C_MENU) FILES:=$(LINUX_DIR)/drivers/i2c/busses/i2c-bcm-iproc.ko From f55f1dbaad33a259e854bdad93d8adcef00a5629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 31 Aug 2021 09:40:54 +0200 Subject: [PATCH 07/13] bcm53xx: switch to the kernel 5.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With PCI and USB regressions fixed it should be safe to switch now. Signed-off-by: Rafał Miłecki --- target/linux/bcm53xx/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile index 9457d68ee3..083f905096 100644 --- a/target/linux/bcm53xx/Makefile +++ b/target/linux/bcm53xx/Makefile @@ -11,7 +11,7 @@ FEATURES:=squashfs nand usb pci pcie gpio pwm CPU_TYPE:=cortex-a9 SUBTARGETS:=generic -KERNEL_PATCHVER:=5.4 +KERNEL_PATCHVER:=5.10 KERNEL_TESTING_PATCHVER:=5.10 define Target/Description From 6f39649555efb1ce44a63e802322c68ebd26e92e Mon Sep 17 00:00:00 2001 From: Matthew Hagan Date: Thu, 5 Aug 2021 22:24:40 +0000 Subject: [PATCH 08/13] firmware-utils: mkmerakifw-old: Add le32 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mkmerakifw-old was created for the z1 which uses the AR9344 SoC with be32 addressing. The MX64/MX65 devices use the same header style, however these boards use a BCM NSP SoC with le32 addressing. Since we may be booting initramfs images with this header, which may be of any size, within reason, board->imagelen is set to 0. The kernel image shoule be limited in the image Makefile. Signed-off-by: Matthew Hagan Signed-off-by: Rafał Miłecki --- tools/firmware-utils/src/mkmerakifw-old.c | 63 +++++++++++++++-------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/tools/firmware-utils/src/mkmerakifw-old.c b/tools/firmware-utils/src/mkmerakifw-old.c index 76fd487a83..a3e7a726b8 100644 --- a/tools/firmware-utils/src/mkmerakifw-old.c +++ b/tools/firmware-utils/src/mkmerakifw-old.c @@ -44,6 +44,7 @@ struct board_info { uint32_t imagelen; uint32_t load_addr; uint32_t entry; + bool le32; }; /* @@ -62,7 +63,16 @@ static const struct board_info boards[] = { .magic = 0x4d495053, .imagelen = 0x007e0000, .load_addr = 0x80060000, - .entry = 0x80060000 + .entry = 0x80060000, + .le32 = 0, + }, { + .id = "mx64", + .description = "Meraki MX64/MX65", + .magic = 0x4d495053, + .imagelen = 0x00000000, + .load_addr = 0x60008000, + .entry = 0x60008000, + .le32 = 1, }, { /* terminating entry */ } @@ -123,9 +133,11 @@ static void usage(int status) exit(status); } -static void writel(unsigned char *buf, size_t offset, uint32_t value) +static void writel(unsigned char *buf, size_t offset, uint32_t value, bool le32) { - value = htonl(value); + if (!le32) + value = htonl(value); + memcpy(buf + offset, &value, sizeof(uint32_t)); } @@ -201,21 +213,25 @@ static inline uint32_t crc32_accumulate_8(const uint32_t crc, const uint8_t ch) return crc32_table[(crc ^ ch) & 0xff] ^ (crc >> 8); } -static void crc32_csum(uint8_t *buf, const size_t len) +static void crc32_csum(uint8_t *buf, const size_t len, bool le32) { + int j, k, l, m; uint32_t crc; size_t i; crc = ~0; + k = le32 * 3; + l = le32 * -2 + 1; + for (i = 0; i < len; i += 4) { - crc = crc32_accumulate_8(crc, buf[i + 3]); - crc = crc32_accumulate_8(crc, buf[i + 2]); - crc = crc32_accumulate_8(crc, buf[i + 1]); - crc = crc32_accumulate_8(crc, buf[i]); + for (j = 3; j >= 0; j -= 1) { + m = (j - k) * l; + crc = crc32_accumulate_8(crc, buf[i + m]); + } } crc = ~crc; - writel(buf, HDR_OFF_CHECKSUM, crc); + writel(buf, HDR_OFF_CHECKSUM, crc, le32); } @@ -229,11 +245,14 @@ static int meraki_build_hdr(const struct board_info *board, const size_t klen, size_t rc; buflen = board->imagelen; - kspace = buflen - HDR_LENGTH; - if (klen > kspace) { - ERR("kernel file is too big - max size: 0x%08lX\n", kspace); - return EXIT_FAILURE; + if (buflen > 0) { + kspace = buflen - HDR_LENGTH; + + if (klen > kspace) { + ERR("kernel file is too big - max size: 0x%08lX\n", kspace); + return EXIT_FAILURE; + } } /* If requested, resize buffer to remove padding */ @@ -253,23 +272,23 @@ static int meraki_build_hdr(const struct board_info *board, const size_t klen, fread(kernel, klen, 1, in); /* Write magic values and filler */ - writel(buf, HDR_OFF_MAGIC1, board->magic); - writel(buf, HDR_OFF_FILLER0, 0); - writel(buf, HDR_OFF_FILLER1, 0); - writel(buf, HDR_OFF_FILLER2, 0); + writel(buf, HDR_OFF_MAGIC1, board->magic, board->le32); + writel(buf, HDR_OFF_FILLER0, 0, board->le32); + writel(buf, HDR_OFF_FILLER1, 0, board->le32); + writel(buf, HDR_OFF_FILLER2, 0, board->le32); /* Write load and kernel entry point address */ - writel(buf, HDR_OFF_LOAD_ADDR, board->load_addr); - writel(buf, HDR_OFF_ENTRY, board->entry); + writel(buf, HDR_OFF_LOAD_ADDR, board->load_addr, board->le32); + writel(buf, HDR_OFF_ENTRY, board->entry, board->le32); /* Write header and image length */ - writel(buf, HDR_OFF_IMAGELEN, klen); + writel(buf, HDR_OFF_IMAGELEN, klen, board->le32); /* this gets replaced later, after the checksum has been calculated */ - writel(buf, HDR_OFF_CHECKSUM, 0); + writel(buf, HDR_OFF_CHECKSUM, 0, board->le32); /* Write checksum */ - crc32_csum(buf, klen + HDR_LENGTH); + crc32_csum(buf, klen + HDR_LENGTH, board->le32); rc = fwrite(buf, buflen, 1, out); From bf94c2da3e60fe41b379cf4a7f87763d30fcb601 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 31 Aug 2021 12:28:56 +0100 Subject: [PATCH 09/13] procd: fix issue mounting overlay fs The previous procd update broke mounting overlayfs in an attempt to fix an off-by-one error. Revert that broken fix and apply fix from Nick Hainke instead to bring things back to life. 20adf53 Revert "initd: fix off-by-one error in mkdev.c" 773e8da initd: fix off-by-one error in mkdev.c Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 65c76e6d62..76dd190151 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -13,8 +13,8 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git PKG_SOURCE_DATE:=2021-08-31 -PKG_SOURCE_VERSION:=269c9e4c7e5b6a726712abf939255980f03266c5 -PKG_MIRROR_HASH:=7784c2853c74209e3aeb8e7328dd0024208cc5441afe6a5419c08ba1aee31f62 +PKG_SOURCE_VERSION:=773e8da41532b23888511cd864fbd251ecadc577 +PKG_MIRROR_HASH:=2b7c91427861f23fcd444fc05c033ed0f348ff353097a98d583f38a79ce294dd CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 4d0883c011e1f56711f59c2f18315d2cd817dba2 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 12 Aug 2021 10:57:07 -0300 Subject: [PATCH 10/13] ethtool: fix recursive dependency Change the CONFLICTS definition from the alternative package (ethtool-full) to the main one. The CONFLICTS line creates a dependency to the conflicting package. Right now, the dependency would be created in the PACKAGE_ethtool-full symbol: config PACKAGE_ethtool-full depends on m || (PACKAGE_ethtool != y) When the main package is selected by airmon-ng, it selects PACKAGE_ethtool, *depending* on the value of PACKAGE_ethtool-full: config PACKAGE_airmon-ng select PACKAGE_ethtool if PACKAGE_ethtool-full --- package/network/utils/ethtool/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index a82e5c92fa..9889677a16 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool PKG_VERSION:=5.13 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -31,6 +31,7 @@ define Package/ethtool TITLE:=Display or change ethernet card settings URL:=http://www.kernel.org/pub/software/network/ethtool/ VARIANT:=tiny + CONFLICTS:=ethtool-full endef define Package/ethtool-full @@ -38,8 +39,8 @@ define Package/ethtool-full TITLE += (full) VARIANT:=full PROVIDES:=ethtool - CONFLICTS:=ethtool DEPENDS:=+libmnl + CONFLICTS:= endef define Package/ethtool/description From 42ee7d8157c177675a508b6d8a502e4ac3623235 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 1 Sep 2021 09:02:20 +0100 Subject: [PATCH 11/13] kernel: add missing CONFIG_SECURITY_NETWORK_XFRM ksym Paul noticed a build failure [1] due to this missing symbol. Add it as disabled to both generic kconfigs. [1] https://github.com/aparcar/openwrt/runs/3480872706?check_suite_focus=true#step:11:63 Signed-off-by: Rui Salvaterra --- target/linux/generic/config-5.10 | 1 + target/linux/generic/config-5.4 | 1 + 2 files changed, 2 insertions(+) diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 02e8ce18d1..2aef5728c2 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -5034,6 +5034,7 @@ CONFIG_SECTION_MISMATCH_WARN_ONLY=y CONFIG_SECURITY_DMESG_RESTRICT=y # CONFIG_SECURITY_LOADPIN is not set # CONFIG_SECURITY_LOCKDOWN_LSM is not set +# CONFIG_SECURITY_NETWORK_XFRM is not set # CONFIG_SECURITY_PATH is not set # CONFIG_SECURITY_SAFESETID is not set # CONFIG_SECURITY_SELINUX_AVC_STATS is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 4e40b07b47..7819d35fc9 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -4642,6 +4642,7 @@ CONFIG_SECTION_MISMATCH_WARN_ONLY=y CONFIG_SECURITY_DMESG_RESTRICT=y # CONFIG_SECURITY_LOADPIN is not set # CONFIG_SECURITY_LOCKDOWN_LSM is not set +# CONFIG_SECURITY_NETWORK_XFRM is not set # CONFIG_SECURITY_PATH is not set # CONFIG_SECURITY_SAFESETID is not set # CONFIG_SECURITY_SELINUX_AVC_STATS is not set From eebc25ccae9257ab090dc4427805f7ccbb6a019d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 1 Sep 2021 15:34:15 +0200 Subject: [PATCH 12/13] firewall4: update to latest Git HEAD cf835ce treewide: convert deprecated syntax c9a3bf5 tests: adapt to latest ucode Signed-off-by: Jo-Philipp Wich --- package/network/config/firewall4/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile index bfe10cfb8f..ccf5740466 100644 --- a/package/network/config/firewall4/Makefile +++ b/package/network/config/firewall4/Makefile @@ -9,9 +9,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git -PKG_SOURCE_DATE:=2021-03-31 -PKG_SOURCE_VERSION:=29fba840201287b9265888adba6298779b750af5 -PKG_MIRROR_HASH:=1d26a611aeecdf37f09e4cdee6b192e5da087abf6e0fc7a9ca97a80e58d14222 +PKG_SOURCE_DATE:=2021-09-01 +PKG_SOURCE_VERSION:=cf835cecc8a449b2d2019f1ef4f085e535d5c1c1 +PKG_MIRROR_HASH:=5798b76846107dde69a2a1ff3467f735b9a91a74106fbd6299d8a26eff70b9c2 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC From 9e9057f4164a31bbe5a645878a9e0f083b533c0f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 11 Jul 2021 20:37:45 +0200 Subject: [PATCH 13/13] ucode: update to latest Git HEAD 929c862 vm: fix toplevel function call protocol 8f34d70 fs: fix chown() and rename() error return values 03ca445 tests: disable fuzz tests for now 3b1be3d types: mark further GC roots d49af4e types: fix comparison of differently signed integers c79ff39 types: handle conversion errors when dealing with negative error indexes 3315b1f types: allow negative array indexes d5b25f9 treewide: harmonize function naming cc4ce8d module: remove unused defines f5d7526 examples: add libucode usage examples 559eff2 types, vm: adjust GC api e5e7e62 treewide: move header files into dedicated directory ff6168a build: install header files 7e6ce0f main: introduce new flag `-x` to allow disabling specific functions b1817b3 vm: fix invalid memory access on GC'ing uninitialized VM context 498fe87 main: refactor option parsing and VM setup ff52440 treewide: consolidate typedef naming 1d60418 vm: add API to control trace mode 48f33ad vm: make root exception handler configurable 0f69f09 vm: fix invalid memory access on toplevel function calls 6bcc318 vm: fix handling exceptions in top-level function calls 4ae0568 lib, vm: reimplement exit() as exception type 2f77657 vm: extend API to allow returning result value from VM execution 111645a vm: remove module preloading logic 38ff6de main: preload modules ourselves d5bc223 vm: add uc_vm_invoke() helper ef0baf1 vm: cosmetic fix for outputting exceptions without source context b11a2fa vm: move global scope allocation into uc_vm_init() 900b2a3 vm: add getter and setter for vm globals scope 0179576 lib: rename uc_add_proto_functions() to uc_add_functions() 98b9c84 lib: expose stdlib function array 1adfba0 treewide: eliminate dead code and unused functions 3974e71 treewide: replace a number of unnecessary type casts bf85226 treewide: move ressource type registry into vm instance e2b3d2e build: split into libucode and ucode cli dad8f3a types: properly deal with circular data in GC mark phase 62dbd64 lexer: rename UT_ prefixed constants to UC_ bc8e465 types: fix wrong assert() on tearing down object trees 853b9f1 vm: fix potential invalid memory access in uc_vm_get_error_context() 6f05cdd lib: fix refcount imbalance in uc_require_path() 96f140b lib, vm: ensure that require() compiles modules only once df5db5f compiler: don't segfault on invalid declaration expressions a97c7a1 lexer: transition into EOF state on unrecognized character 2a838d1 compiler: improve mapping of binary operator tokens to instructions 9872f65 vm: add support for I_LE and I_GE instructions 4e410c3 treewide: let uc_cmp() use instruction instead of token numbers ce6081d lexer, vm: reorder token and instruction numbers 234a4f6 lib: implement b64enc() and b64dec() functions 856a0c0 lib: only consider context of calling function for callbacks 86fb130 lib: implement min() and max() functions 3e893e6 lib: pass-through "this" context to library function callbacks 42de7ab lib: implement `sourcepath()` function 05c80a7 lib: fix negative uc_index() return value on 32bit systems 9874562 lexer: implement raw code mode 3b665c8 lexer: drop value union from keyword table 44354cf lexer, compiler: separate TK_BOOL token into TK_TRUE and TK_FALSE tokens 5879bdf syntax: drop Infinity and NaN keywords d4edadc lib: rename uc_lib_init() to uc_load_stdlib() d81bad7 main, lib: move allocation of globals object into lib function c4f4b38 main: simplify REQUIRE_SEARCH_PATH initialization 54ca3aa types: fix uninitialized memory on setting non-contiguous array indexes cbc0d78 build: let require search patch default to CMAKE_INSTALL_PREFIX 5714705 syntax: introduce `const` support ed32c42 compiler, lexer: add NO_LEGACY define to disable legacy syntax features ff6811f syntax: implement `delete` as proper operator 5803d86 lib: implement wildcard() function dfb7379 fs: implement chmod(), chown(), rename() and glob() functions 1ddf5b6 lexer: skip interpreter line in any source buffer 9951a00 build: lower minimum required CMake version to v3.13 7b81ab2 main: expose argv as global ARGV array to ucode scripts 7283a70 tests: rename misnamed testcases for consistency 3f80116 compiler: fix local for-loop initializer variable declarations f20b56f compiler: properly parse slashes in parenthesized division expressions 5c4e1ea lib: implement regexp(), a function to construct regexp instances at runtime e546bba lib: implement render(), an include variant capturing output in a string 0cb10c6 vm: implement mechanism to change output file descriptor eb8a64d lib: fix uc_sort() f1ffc9f vm: truncate long values after 60 chars in trace output 850612f compiler: properly handle break/continue in nested scopes f0a9875 compiler: properly handle keyword in parenthesized property access expression 1660433 compiler: fix stack mismatch on compiling `use strict` statements a36e0df syntax: implement support for 'use strict' pragma 827a34a vm, compiler: get rid of unused struct members 594cdf3 lib: implement assert() c4d1648 lib: add support for pretty printing JSON to printf() and sprintf() f2eaea3 lib: gracefully handle truncated format strings in uc_printf_common() 02629b8 lexer: fix infinite loop on parsing unterminated comments 2bc9bac lexer: fix infinite loop on parsing unterminated expression blocks f73e201 lexer: fix infinite loop when parsing regexp literal at EOF 86b4863 compiler: fix segfault on parsing invalid pre/post increment expressions 0e24509 lib: fix reporting source context lines at EOF e66b2ad compiler, lexer: improve lexical state handling e29b574 lib: fix uc_split() quirks 64eec7f treewide: ISO C / pedantic compliance 4af803d build: output error messages on test failures 9ef693e vm: improve context for early errors 6def9fc tests: pass ucode library path through environment d5dd183 treewide: address various sign-compare warnings 28825ac types: support creating ressource values without associated type 9c5106a types: fix potential memory leaks and null pointer accesses c51934a types: fix potential leak of key in ucv_object_add() 7b28727 main: fix ineffective EOF check in parse() 4cf897c lib: uc_system(): fix invalid free() of non-heap memory 35af4ba treewide: rework internal data type system f2c4b79 treewide: fix issues reported by clang code analyzer 93ededb tests: allow executing run_tests.sh from any directory 0e4a387 Add initial GitLab and GitHub CI support df73b25 tests: add more tests 41d33d0 tests: custom: return exit code if tests fails 1c548a6 cmake: do not output binaries into lib directory 2b59097 tests: create custom tests from current tests cases 8039361 main: provide just binary name in help output 778e4f7 lexer: fix incomplete struct initializers 502ecdc cmake: enable extra compiler checks 3c2aeff cmake: fix includes and libraries 617a114 cmake: make 3.0 minimum version f360350 lib: implement sleep(ms) function 7f0ff91 lib: allow parsing non-array, non-object value in json() Signed-off-by: Jo-Philipp Wich --- package/utils/ucode/Makefile | 47 +++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile index 7c8907a716..26281af730 100644 --- a/package/utils/ucode/Makefile +++ b/package/utils/ucode/Makefile @@ -12,15 +12,19 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/jow-/ucode.git -PKG_SOURCE_DATE:=2021-03-31 -PKG_SOURCE_VERSION:=973cc6c865dcf6075c493125313058b650b08234 -PKG_MIRROR_HASH:=fb4d3e231c79a9122743f0ced7fd4fdcf81903de5c721d3c18d5779e44d50bdf +PKG_SOURCE_DATE:=2021-07-30 +PKG_SOURCE_VERSION:=929c8627cf077c3e348fb12b02553d4a444c5e48 +PKG_MIRROR_HASH:= PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC +PKG_ABI_VERSION:=20210730 + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk +CMAKE_OPTIONS += -DSOVERSION=$(PKG_ABI_VERSION) + define Package/ucode/default SECTION:=utils CATEGORY:=Utilities @@ -29,7 +33,7 @@ endef define Package/ucode $(Package/ucode/default) - DEPENDS:=+libjson-c + DEPENDS:=+libucode endef define Package/ucode/description @@ -38,6 +42,18 @@ define Package/ucode/description endef +define Package/libucode + $(Package/ucode/default) + TITLE+= - runtime library + ABI_VERSION:=$(PKG_ABI_VERSION) + DEPENDS:=+libjson-c +endef + +define Package/libucode/description + The libucode package provides the shared runtime library for the ucode interpreter. +endef + + define Package/ucode-mod-fs $(Package/ucode/default) TITLE+= (filesystem module) @@ -83,33 +99,46 @@ define Package/ucode-mod-uci/description endef +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include/ucode + $(CP) $(PKG_INSTALL_DIR)/usr/include/ucode/*.h $(1)/usr/include/ucode/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so* $(1)/usr/lib/ +endef + + define Package/ucode/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ucode $(1)/usr/bin/ucode + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ucode $(1)/usr/bin/ucode +endef + +define Package/libucode/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so.* $(1)/usr/lib/ endef define Package/ucode-mod-fs/install $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/fs.so $(1)/usr/lib/ucode/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/fs.so $(1)/usr/lib/ucode/ endef define Package/ucode-mod-math/install $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/math.so $(1)/usr/lib/ucode/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/math.so $(1)/usr/lib/ucode/ endef define Package/ucode-mod-ubus/install $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/ubus.so $(1)/usr/lib/ucode/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/ubus.so $(1)/usr/lib/ucode/ endef define Package/ucode-mod-uci/install $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/uci.so $(1)/usr/lib/ucode/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uci.so $(1)/usr/lib/ucode/ endef $(eval $(call BuildPackage,ucode)) +$(eval $(call BuildPackage,libucode)) $(eval $(call BuildPackage,ucode-mod-fs)) $(eval $(call BuildPackage,ucode-mod-math)) $(eval $(call BuildPackage,ucode-mod-ubus))