From 41aebe0b99effc917c969616ced5b86c66e26556 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 19 Oct 2020 21:39:17 +0100 Subject: [PATCH 01/25] procd: jail: clean up capability handling and non-root ubusd Unify capability handling to only use OCI spec parsers even for ujail slim containers which previously supposedly used their own format. 80c9516 cgroups: restrict allowed keys in 'unified' section 5ade567 cgroups: memory controller fixes 3121467 early: run ubusd non-root as user ubus, group ubus 12a5b97 jail: adapt to new ubus socket path 788d144 instance: actually wire up capabilities filename ebc5a7f jail: nuke old capabilities code in favour of reusing OCI code 6c5233a jail: capabilities: apply in two phases 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 b0c035545e..d6def205c5 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-08-10 -PKG_SOURCE_VERSION:=fad899769e1411cc273785461f073a0f7931b9a0 -PKG_MIRROR_HASH:=f56b621f78f821f7070d85f63448f684af7e2fe0c85233a8d054683cc34f6d06 +PKG_SOURCE_DATE:=2020-10-21 +PKG_SOURCE_VERSION:=6c5233a16a4831c69e3dcf09bf557156bc144b80 +PKG_MIRROR_HASH:=026138c6b9a337f87bb1c8928aa6e0f2b0814b6ab04b1f2d044c284facbde0f5 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 5b85ab400f46dfac5c25bf4447e8d633a38cbff8 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 23 Oct 2020 03:07:09 +0100 Subject: [PATCH 02/25] procd: ujail fixes ec461ff jail: mount more stuff read-only 33b799b ujail: elf: work around GCC bug on MIPS64 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 d6def205c5..75da0b071b 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-10-21 -PKG_SOURCE_VERSION:=6c5233a16a4831c69e3dcf09bf557156bc144b80 -PKG_MIRROR_HASH:=026138c6b9a337f87bb1c8928aa6e0f2b0814b6ab04b1f2d044c284facbde0f5 +PKG_SOURCE_DATE:=2020-10-25 +PKG_SOURCE_VERSION:=33b799b94c38fd2d3961b465a8114e384573a6d6 +PKG_MIRROR_HASH:=d890570c35567a03976e591879383c6d8e974cf14e64a1507c6e498ae12007c4 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 2713a854d4d64d348a41ee3fff9dec35ebef62b7 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 5 Nov 2020 02:15:20 +0000 Subject: [PATCH 03/25] procd: bump to git HEAD 2f381fe jail: guard boolean blobmsg attributes 602b8fa jail: add option for pidfile bba6de7 jail: handle mount propagation flags 6963d50 jail: relax seccomp unknown syscall handling e1fcfdc jail: add support for absolute root path in OCI spec 257f29b jail: don't fail if maskedPath cannot be found 75f2374 uxc: mimic runc cmdline by using getopt_long 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 75da0b071b..2d494e24d6 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-10-25 -PKG_SOURCE_VERSION:=33b799b94c38fd2d3961b465a8114e384573a6d6 -PKG_MIRROR_HASH:=d890570c35567a03976e591879383c6d8e974cf14e64a1507c6e498ae12007c4 +PKG_SOURCE_DATE:=2020-10-27 +PKG_SOURCE_VERSION:=75f2374f1656b6f2eee3fa0e3b871f5ddcbee1c4 +PKG_MIRROR_HASH:=6bae7e57c6b349bdf6fbd62d4056127d186cbb80cd73959d6695007088ecf16c CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 5b95295b419897d3f3918266aa13f480a1f7e423 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 7 Nov 2020 06:03:12 +0000 Subject: [PATCH 04/25] procd: bump to git HEAD b0de894 jail: fix capabilities 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 2d494e24d6..4e0d864d7c 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-10-27 -PKG_SOURCE_VERSION:=75f2374f1656b6f2eee3fa0e3b871f5ddcbee1c4 -PKG_MIRROR_HASH:=6bae7e57c6b349bdf6fbd62d4056127d186cbb80cd73959d6695007088ecf16c +PKG_SOURCE_DATE:=2020-11-06 +PKG_SOURCE_VERSION:=b0de894830a93da5b303a3d89a42baf163d0a58c +PKG_MIRROR_HASH:=ba7f7631fa74d3bede0241f5d96ee4939f15164e79290d1ac7fd15fc8ed628d9 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 586b1c2c9a803b1726acd251669221afc9c0073c Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 19 Oct 2020 21:38:17 +0100 Subject: [PATCH 05/25] ubus: prepare to run ubusd as non-root user Move /var/run/ubus.sock to /var/run/ubus/ubus.sock in preparation for having ubusd run as non-root user. Signed-off-by: Daniel Golle --- package/system/ubus/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index 824e71924f..a1c35a7c0f 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2020-02-05 -PKG_SOURCE_VERSION:=171469e3138cce191892e20b6fd35b52c9368064 -PKG_MIRROR_HASH:=b4f1a3d70c2685c2aee2724b980b2ff747f8662f74d04d8be1c5a5e950b0e2ef +PKG_SOURCE_DATE:=2020-10-21 +PKG_SOURCE_VERSION:=13a4438b4ebdf85d301999e0a615640ac4c9b0a8 +PKG_MIRROR_HASH:=e9e88bb78993a31a33a1c9579f1facca2949c1a4397b842a9f1b469b170be5da CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 @@ -31,6 +31,7 @@ define Package/ubusd CATEGORY:=Base system TITLE:=OpenWrt RPC daemon DEPENDS:=+libubox +libblobmsg-json + USERID:=ubus=81:ubus=81 endef define Package/libubus From d7b03a4aaba5722d2e4012d64cbda22136c83883 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 25 Oct 2020 18:07:19 +0000 Subject: [PATCH 06/25] ubus: bump to git HEAD ad0cd11 ubusd_acl: add support for wildcard in methods Signed-off-by: Daniel Golle --- package/system/ubus/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index a1c35a7c0f..fd2ccace6b 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2020-10-21 -PKG_SOURCE_VERSION:=13a4438b4ebdf85d301999e0a615640ac4c9b0a8 -PKG_MIRROR_HASH:=e9e88bb78993a31a33a1c9579f1facca2949c1a4397b842a9f1b469b170be5da +PKG_SOURCE_DATE:=2020-10-25 +PKG_SOURCE_VERSION:=ad0cd117db74934385d81605514e041b1a9cdda9 +PKG_MIRROR_HASH:=8f6908bd826a342ed8e925dfec4744dbf24616f20d20d1af342a18419a3b14de CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 From 274f7f4955fb0a6ae0f4da3d9aa397c2d2fcd9f8 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 14 Nov 2020 15:23:16 +0800 Subject: [PATCH 07/25] udpspeeder: drop upstreamed package --- package/ctcgfw/openwrt-udpspeeder/Makefile | 58 ---------------------- 1 file changed, 58 deletions(-) delete mode 100644 package/ctcgfw/openwrt-udpspeeder/Makefile diff --git a/package/ctcgfw/openwrt-udpspeeder/Makefile b/package/ctcgfw/openwrt-udpspeeder/Makefile deleted file mode 100644 index c8654ce354..0000000000 --- a/package/ctcgfw/openwrt-udpspeeder/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (c) 2017 Yu Wang -# -# This is free software, licensed under the MIT. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=speederv2-tunnel -PKG_VERSION:=20190408 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/wangyu-/UDPspeeder.git -PKG_SOURCE_VERSION:=ecc90928d33741dbe726b547f2d8322540c26ea0 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=wangyu- - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/speederv2-tunnel - SECTION:=net - CATEGORY:=Network - TITLE:=UDP Network Speed-Up Tool - URL:=https://github.com/wangyu-/UDPspeeder - DEPENDS:= +libstdcpp +librt -endef - -define Package/speederv2-tunnel/description - A Tunnel which Improves your Network Quality on a High-latency Lossy Link by using Forward Error Correction,for All Traffics(TCP/UDP/ICMP) -endef - -MAKE_FLAGS += cross - -define Build/Prepare - $(PKG_UNPACK) - sed -i 's/cc_cross=.*/cc_cross=$(TARGET_CXX)/g' $(PKG_BUILD_DIR)/makefile - sed -i '/\gitversion/d' $(PKG_BUILD_DIR)/makefile - echo 'const char * const gitversion = "$(PKG_VERSION)";' > $(PKG_BUILD_DIR)/git_version.h - $(Build/Patch) -endef - -define Package/speederv2-tunnel/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/speederv2_cross $(1)/usr/bin/speederv2 - ( cd $(1)/usr/bin; $(LN) speederv2 udpspeeder; ) -endef - -$(eval $(call BuildPackage,speederv2-tunnel)) From 03c04cb7861be20071898b0a28c793b27899114b Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 14 Nov 2020 15:35:56 +0800 Subject: [PATCH 08/25] annie: bump to latest git HEAD --- package/ctcgfw/annie/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/ctcgfw/annie/Makefile b/package/ctcgfw/annie/Makefile index 6b58662016..fade56aaed 100644 --- a/package/ctcgfw/annie/Makefile +++ b/package/ctcgfw/annie/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=annie -PKG_VERSION:=0.10.3-67298d5 +PKG_VERSION:=0.10.3-68e47f1 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/iawia002/annie.git -PKG_SOURCE_VERSION:=67298d55aaf43d840b8d7283b0ac99736173d285 +PKG_SOURCE_VERSION:=68e47f1ae8b26b6db89118e995c8cafc1d5ab339 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) From bd8263836fd713e9b1ccf6ac845293212e109a53 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 14 Nov 2020 16:34:49 +0800 Subject: [PATCH 09/25] luci-app-turboacc: improve IPv6 detection --- .../ctcgfw/luci-app-turboacc/luasrc/model/cbi/turboacc.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package/ctcgfw/luci-app-turboacc/luasrc/model/cbi/turboacc.lua b/package/ctcgfw/luci-app-turboacc/luasrc/model/cbi/turboacc.lua index 6d3abf7957..20d6ff0bb2 100644 --- a/package/ctcgfw/luci-app-turboacc/luasrc/model/cbi/turboacc.lua +++ b/package/ctcgfw/luci-app-turboacc/luasrc/model/cbi/turboacc.lua @@ -1,5 +1,3 @@ -local ipkg = require('luci.model.ipkg') - local kernel_version = luci.sys.exec("echo -n $(uname -r)") m = Map("turboacc") @@ -38,7 +36,7 @@ sfe_bridge.default = 0 sfe_bridge.description = translate("Enable Bridge Acceleration (may be functional conflict with bridge-mode VPN server)") sfe_bridge:depends("sfe_flow", 1) -if ipkg.installed("ip6tables") then +if nixio.fs.access("/proc/sys/net/ipv6") then sfe_ipv6 = s:option(Flag, "sfe_ipv6", translate("IPv6 Acceleration")) sfe_ipv6.default = 0 sfe_ipv6.description = translate("Enable IPv6 Acceleration") From 11de2d95dd36c1f97046ade949824bbf10af4bd7 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 14 Nov 2020 17:32:21 +0800 Subject: [PATCH 10/25] luci-app-speederv2: replace depends --- package/ntlf9t/luci-app-speederv2/Makefile | 4 ++-- package/ntlf9t/luci-app-speederv2/root/etc/init.d/speederv2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/ntlf9t/luci-app-speederv2/Makefile b/package/ntlf9t/luci-app-speederv2/Makefile index 28584023f0..94c36f5b88 100644 --- a/package/ntlf9t/luci-app-speederv2/Makefile +++ b/package/ntlf9t/luci-app-speederv2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Support for speederv2-tunnel -LUCI_DEPENDS:=+speederv2-tunnel +LUCI_DEPENDS:=+UDPspeeder LUCI_PKGARCH:=all PKG_NAME:=luci-app-speederv2 PKG_VERSION:=1.1.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_LICENSE:=GPLv3 PKG_LICENSE_FILES:=LICENSE diff --git a/package/ntlf9t/luci-app-speederv2/root/etc/init.d/speederv2 b/package/ntlf9t/luci-app-speederv2/root/etc/init.d/speederv2 index a8f1098273..b7620659b6 100755 --- a/package/ntlf9t/luci-app-speederv2/root/etc/init.d/speederv2 +++ b/package/ntlf9t/luci-app-speederv2/root/etc/init.d/speederv2 @@ -74,7 +74,7 @@ start_instance() { [ $? -eq 0 ] && server_ip="[$server_ip]" procd_open_instance - procd_set_param command /usr/bin/speederv2 + procd_set_param command /usr/bin/udpspeeder procd_append_param command -c procd_append_param command -r ${server_ip}:${server_port} procd_append_param command -l ${listen_ip}:${listen_port} && _log "info" "listening on: ${listen_ip}:${listen_port}" From f083afebad8ef1a68973185d4655d744d46747ea Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 14 Nov 2020 17:34:20 +0800 Subject: [PATCH 11/25] luci-app-speederv2: fix status check --- .../ntlf9t/luci-app-speederv2/luasrc/controller/speederv2.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/ntlf9t/luci-app-speederv2/luasrc/controller/speederv2.lua b/package/ntlf9t/luci-app-speederv2/luasrc/controller/speederv2.lua index 8a78292722..3a97b7e9ea 100644 --- a/package/ntlf9t/luci-app-speederv2/luasrc/controller/speederv2.lua +++ b/package/ntlf9t/luci-app-speederv2/luasrc/controller/speederv2.lua @@ -18,6 +18,6 @@ end function action_status() luci.http.prepare_content("application/json") luci.http.write_json({ - running = is_running("speederv2") + running = is_running("udpspeeder") }) end From 8e66d35372d01edeaeb4d15aa2b4c9d7a053eabb Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Thu, 12 Nov 2020 18:18:52 +0100 Subject: [PATCH 12/25] iproute2: update to 5.9 Update iproute2 to latest stable 5.9; for the changes see https://lwn.net/Articles/834755/ Refresh patches Signed-off-by: Hans Dedecker Acked-by: Hauke Mehrtens --- package/network/utils/iproute2/Makefile | 4 ++-- .../utils/iproute2/patches/115-add-config-xtlibdir.patch | 2 +- .../utils/iproute2/patches/175-reduce-dynamic-syms.patch | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 9533487057..609d885d77 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.8.0 +PKG_VERSION:=5.9.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=cfcd1f890290f8c8afcc91d9444ad929b9252c16f9ab3f286c50dd3c59dc646e +PKG_HASH:=a25dac94bcdcf2f73316c7f812115ea7a5710580bad892b08a83d00c6b33dacf PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch index 03df7809f7..8702d5fd2d 100644 --- a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch +++ b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch @@ -1,6 +1,6 @@ --- a/tc/Makefile +++ b/tc/Makefile -@@ -127,6 +127,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR +@@ -128,6 +128,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR ifneq ($(IPT_LIB_DIR),) CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\" endif diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch index e5d5492a35..da961a183b 100644 --- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch +++ b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch @@ -9,7 +9,7 @@ endif TCLIB := tc_core.o -@@ -143,7 +143,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc +@@ -144,7 +144,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc all: tc $(TCSO) tc: $(TCOBJ) $(LIBNETLINK) libtc.a @@ -18,7 +18,7 @@ libtc.a: $(TCLIB) $(QUIET_AR)$(AR) rcs $@ $^ -@@ -165,6 +165,7 @@ install: all +@@ -166,6 +166,7 @@ install: all clean: rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \ rm -f emp_ematch.tab.* @@ -26,7 +26,7 @@ q_atm.so: q_atm.c $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm -@@ -204,4 +205,15 @@ static-syms.h: $(wildcard *.c) +@@ -205,4 +206,15 @@ static-syms.h: $(wildcard *.c) sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ done > $@ From 5184fe54e800cfa90880acd3745de3fec937de8e Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 14 Nov 2020 17:43:10 +0800 Subject: [PATCH 13/25] kernel: bump to 4.9.243, 4.14.206, 4.19.157 Resolve conflicted: - generic/backport-4.19/714-v5.3-net-sfp-Stop-SFP-polling-and-interrupt-handling-duri.patch Refreshed all patches. Signed-off-by: CN_SZTL --- include/kernel-version.mk | 12 ++++++------ ...9-add-more-register-defines-for-QCA956x-SoC.patch | 2 +- ...-even-more-register-defines-for-QCA956x-SoC.patch | 4 ++-- .../patches-4.9/940-qca955x-add-more-registers.patch | 4 ++-- ...dd-a-mode-for-using-the-closed-firmware-for.patch | 2 +- ...erial-option-fix-dwm-158-3g-modem-interface.patch | 2 +- ...top-SFP-polling-and-interrupt-handling-duri.patch | 7 ++++--- .../090-net-generalize-napi_complete_done.patch | 6 +++--- .../hack-4.14/998-usb-serial-option-add-u9300.patch | 8 ++++---- .../hack-4.19/998-usb-serial-option-add-u9300.patch | 8 ++++---- target/linux/generic/hack-4.9/204-module_strip.patch | 2 +- target/linux/generic/hack-4.9/930-crashlog.patch | 2 +- .../pending-4.9/203-kallsyms_uncompressed.patch | 2 +- .../generic/pending-4.9/920-mangle_bootargs.patch | 2 +- .../patches-4.14/411-sfp-add-sfp-compatible.patch | 2 +- ...s-armada-3720-espressobin-wire-up-spi-flash.patch | 2 +- ...-marvell-armada-37xx-Enable-emmc-on-espress.patch | 2 +- ...ts-armada-3720-espressobin-correct-spi-node.patch | 2 +- ...-marvell-armada-3720-espressobin-add-ports-.patch | 2 +- ...-armada-3720-espressobin-set-max-link-to-ge.patch | 2 +- ...-marvell-armada-37xx-Enable-emmc-on-espress.patch | 2 +- ...ts-armada-3720-espressobin-correct-spi-node.patch | 2 +- ...-marvell-armada-3720-espressobin-add-ports-.patch | 2 +- ...-armada-3720-espressobin-set-max-link-to-ge.patch | 2 +- 24 files changed, 42 insertions(+), 41 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 09cdf1fe70..2d133b4b99 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 = .241 -LINUX_VERSION-4.14 = .204 -LINUX_VERSION-4.19 = .155 +LINUX_VERSION-4.9 = .243 +LINUX_VERSION-4.14 = .206 +LINUX_VERSION-4.19 = .157 -LINUX_KERNEL_HASH-4.9.241 = c4c6d04f91d881e68524bda6062b5c1835f285bd03344bf8f2eaeef3394bb32c -LINUX_KERNEL_HASH-4.14.204 = 9e832899ec75dbfce393c9f7a07df24183b28f0bb95ad4dd8b1fa027bc668ad9 -LINUX_KERNEL_HASH-4.19.155 = cbc648f5405cb2b554b7a0f23885742d9969a11d22692287ee756adf940a48d2 +LINUX_KERNEL_HASH-4.9.243 = d3aa189ca7fcc6e52d6c0333a0d7acd8789e9a492b32dbf9476e926ffaa73984 +LINUX_KERNEL_HASH-4.14.206 = 1c233efaa5063983293a02d4692acc9ced9c03e18857364855d4f612347086ac +LINUX_KERNEL_HASH-4.19.157 = 76dca365255c1a13778c3b24f0eae14f4e66bc12fe79f5e6592b116fc57ef755 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/ar71xx/patches-4.9/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-4.9/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch index cab2f6f9cb..d1fbe2e31d 100644 --- a/target/linux/ar71xx/patches-4.9/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch +++ b/target/linux/ar71xx/patches-4.9/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch @@ -19,7 +19,7 @@ #define QCA956X_PLL_CPU_CONFIG_REFDIV_SHIFT 12 #define QCA956X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f -@@ -1196,4 +1201,16 @@ +@@ -1198,4 +1203,16 @@ #define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3 #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20 diff --git a/target/linux/ar71xx/patches-4.9/921-MIPS-ath79-add-even-more-register-defines-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-4.9/921-MIPS-ath79-add-even-more-register-defines-for-QCA956x-SoC.patch index a4608ea48d..a1a16817e3 100644 --- a/target/linux/ar71xx/patches-4.9/921-MIPS-ath79-add-even-more-register-defines-for-QCA956x-SoC.patch +++ b/target/linux/ar71xx/patches-4.9/921-MIPS-ath79-add-even-more-register-defines-for-QCA956x-SoC.patch @@ -130,8 +130,8 @@ Add more registers for QCA955x and QCA956x. +#define QCA955X_GMAC_REG_SGMII_SERDES 0x18 #define QCA955X_ETH_CFG_RGMII_EN BIT(0) - #define QCA955X_ETH_CFG_MII_GE0 BIT(1) -@@ -1210,16 +1291,58 @@ + #define QCA955X_ETH_CFG_GE0_MII_EN BIT(1) +@@ -1212,16 +1293,58 @@ #define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3 #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20 diff --git a/target/linux/ar71xx/patches-4.9/940-qca955x-add-more-registers.patch b/target/linux/ar71xx/patches-4.9/940-qca955x-add-more-registers.patch index ff72308465..705763a7a2 100644 --- a/target/linux/ar71xx/patches-4.9/940-qca955x-add-more-registers.patch +++ b/target/linux/ar71xx/patches-4.9/940-qca955x-add-more-registers.patch @@ -20,8 +20,8 @@ +#define QCA955X_GMAC_REG_SGMII_DEBUG 0x58 #define QCA955X_ETH_CFG_RGMII_EN BIT(0) - #define QCA955X_ETH_CFG_MII_GE0 BIT(1) -@@ -1291,6 +1295,18 @@ + #define QCA955X_ETH_CFG_GE0_MII_EN BIT(1) +@@ -1293,6 +1297,18 @@ #define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3 #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20 diff --git a/target/linux/bcm27xx/patches-4.19/950-0104-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch b/target/linux/bcm27xx/patches-4.19/950-0104-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch index b4db1d7c60..54cc9b9751 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0104-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0104-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch @@ -70,7 +70,7 @@ Signed-off-by: Eric Anholt --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c -@@ -347,6 +347,7 @@ static struct platform_driver *const com +@@ -348,6 +348,7 @@ static struct platform_driver *const com &vc4_txp_driver, &vc4_hvs_driver, &vc4_crtc_driver, 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 ebd90a8ef2..4ad22b3de1 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 -@@ -2001,7 +2001,8 @@ static const struct usb_device_id option +@@ -2011,7 +2011,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.19/714-v5.3-net-sfp-Stop-SFP-polling-and-interrupt-handling-duri.patch b/target/linux/generic/backport-4.19/714-v5.3-net-sfp-Stop-SFP-polling-and-interrupt-handling-duri.patch index 0509950296..5107bd1193 100644 --- a/target/linux/generic/backport-4.19/714-v5.3-net-sfp-Stop-SFP-polling-and-interrupt-handling-duri.patch +++ b/target/linux/generic/backport-4.19/714-v5.3-net-sfp-Stop-SFP-polling-and-interrupt-handling-duri.patch @@ -38,12 +38,13 @@ Signed-off-by: David S. Miller sfp = sfp_alloc(&pdev->dev); if (IS_ERR(sfp)) -@@ -1885,19 +1886,22 @@ static int sfp_probe(struct platform_dev +@@ -1885,20 +1886,22 @@ static int sfp_probe(struct platform_dev if (gpio_flags[i] != GPIOD_IN || !sfp->gpio[i]) continue; - irq = gpiod_to_irq(sfp->gpio[i]); -- if (!irq) { +- if (irq < 0) { +- irq = 0; + sfp->gpio_irq[i] = gpiod_to_irq(sfp->gpio[i]); + if (!sfp->gpio_irq[i]) { poll = true; @@ -65,7 +66,7 @@ Signed-off-by: David S. Miller } if (poll) -@@ -1928,9 +1932,26 @@ static int sfp_remove(struct platform_de +@@ -1929,9 +1932,26 @@ static int sfp_remove(struct platform_de return 0; } 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 06a3fd2b2e..6ee4d3dc5d 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 -@@ -3203,7 +3203,7 @@ static int gfar_poll_rx_sq(struct napi_s +@@ -3195,7 +3195,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); -@@ -3292,7 +3292,7 @@ static int gfar_poll_rx(struct napi_stru +@@ -3284,7 +3284,7 @@ static int gfar_poll_rx(struct napi_stru if (!num_act_queues) { u32 imask; @@ -1390,7 +1390,7 @@ Signed-off-by: David S. Miller if (more_to_do) --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c -@@ -429,7 +429,7 @@ static int cvm_oct_napi_poll(struct napi +@@ -433,7 +433,7 @@ static int cvm_oct_napi_poll(struct napi if (rx_count < budget) { /* No more work */ 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 24a05b376d..95be1a2283 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 -@@ -1294,6 +1294,7 @@ static const struct usb_device_id produc +@@ -1295,6 +1295,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 ++ */ @@ -10,7 +10,7 @@ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */ --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -385,6 +385,7 @@ static void option_instat_callback(struc +@@ -386,6 +386,7 @@ static void option_instat_callback(struc * Mobidata, etc sell under their own brand names. */ #define LONGCHEER_VENDOR_ID 0x1c9e @@ -18,7 +18,7 @@ /* 4G Systems products */ /* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick * -@@ -576,6 +577,16 @@ static void option_instat_callback(struc +@@ -577,6 +578,16 @@ static void option_instat_callback(struc /* Device needs ZLP */ #define ZLP BIT(17) @@ -35,7 +35,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, -@@ -610,6 +621,8 @@ static const struct usb_device_id option +@@ -611,6 +622,8 @@ static const struct usb_device_id option { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) }, { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), .driver_info = RSVD(4) }, 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 c60e94ce0a..7a33edc75a 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 -@@ -1305,6 +1305,7 @@ static const struct usb_device_id produc +@@ -1306,6 +1306,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 ++ */ @@ -10,7 +10,7 @@ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */ --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -382,6 +382,7 @@ static void option_instat_callback(struc +@@ -383,6 +383,7 @@ static void option_instat_callback(struc * Mobidata, etc sell under their own brand names. */ #define LONGCHEER_VENDOR_ID 0x1c9e @@ -18,7 +18,7 @@ /* 4G Systems products */ /* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick * -@@ -573,6 +574,16 @@ static void option_instat_callback(struc +@@ -574,6 +575,16 @@ static void option_instat_callback(struc /* Device needs ZLP */ #define ZLP BIT(17) @@ -35,7 +35,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, -@@ -607,6 +618,8 @@ static const struct usb_device_id option +@@ -608,6 +619,8 @@ static const struct usb_device_id option { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) }, { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), .driver_info = RSVD(4) }, 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 2f34791cd9..1fbadc766d 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 +@@ -2123,6 +2123,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/930-crashlog.patch b/target/linux/generic/hack-4.9/930-crashlog.patch index 61e256e00c..73c8e17a7d 100644 --- a/target/linux/generic/hack-4.9/930-crashlog.patch +++ b/target/linux/generic/hack-4.9/930-crashlog.patch @@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau +#endif --- a/init/Kconfig +++ b/init/Kconfig -@@ -1298,6 +1298,10 @@ config RELAY +@@ -1299,6 +1299,10 @@ config RELAY If unsure, say N. diff --git a/target/linux/generic/pending-4.9/203-kallsyms_uncompressed.patch b/target/linux/generic/pending-4.9/203-kallsyms_uncompressed.patch index 9bc8055039..39917ef795 100644 --- a/target/linux/generic/pending-4.9/203-kallsyms_uncompressed.patch +++ b/target/linux/generic/pending-4.9/203-kallsyms_uncompressed.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -1370,6 +1370,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW +@@ -1371,6 +1371,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW the unaligned access emulation. see arch/parisc/kernel/unaligned.c for reference 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..4d506ccc9a 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 +@@ -1695,6 +1695,15 @@ config EMBEDDED an embedded system so certain expert options are available for configuration. diff --git a/target/linux/mvebu/patches-4.14/411-sfp-add-sfp-compatible.patch b/target/linux/mvebu/patches-4.14/411-sfp-add-sfp-compatible.patch index 9174765e6a..6fce278305 100644 --- a/target/linux/mvebu/patches-4.14/411-sfp-add-sfp-compatible.patch +++ b/target/linux/mvebu/patches-4.14/411-sfp-add-sfp-compatible.patch @@ -14,7 +14,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -1168,6 +1168,7 @@ static int sfp_remove(struct platform_de +@@ -1169,6 +1169,7 @@ static int sfp_remove(struct platform_de static const struct of_device_id sfp_of_match[] = { { .compatible = "sff,sfp", }, diff --git a/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch b/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch index 840897473f..6395a3573d 100644 --- a/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch +++ b/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch @@ -20,7 +20,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -96,6 +96,33 @@ +@@ -100,6 +100,33 @@ status = "okay"; }; diff --git a/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch b/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch index 26d090f050..77d9956fff 100644 --- a/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch +++ b/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch @@ -15,7 +15,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -93,9 +93,31 @@ +@@ -97,9 +97,31 @@ cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; marvell,pad-type = "sd"; vqmmc-supply = <&vcc_sd_reg1>; diff --git a/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch index fc7cb2af1e..5c3f214d1e 100644 --- a/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch +++ b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch @@ -29,7 +29,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -123,25 +123,9 @@ +@@ -127,25 +127,9 @@ flash@0 { reg = <0>; diff --git a/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch b/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch index d0103bba19..bef9c40286 100644 --- a/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch +++ b/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch @@ -15,7 +15,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -153,7 +153,7 @@ +@@ -157,7 +157,7 @@ dsa,member = <0 0>; diff --git a/target/linux/mvebu/patches-4.14/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch b/target/linux/mvebu/patches-4.14/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch index 5ff9b47268..6ce49f71f0 100644 --- a/target/linux/mvebu/patches-4.14/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch +++ b/target/linux/mvebu/patches-4.14/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch @@ -62,7 +62,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -79,6 +79,8 @@ +@@ -83,6 +83,8 @@ /* J9 */ &pcie0 { status = "okay"; diff --git a/target/linux/mvebu/patches-4.19/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch b/target/linux/mvebu/patches-4.19/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch index c0200fbd7c..3dc71b17bf 100644 --- a/target/linux/mvebu/patches-4.19/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch +++ b/target/linux/mvebu/patches-4.19/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch @@ -15,7 +15,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -66,9 +66,31 @@ +@@ -70,9 +70,31 @@ cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; marvell,pad-type = "sd"; vqmmc-supply = <&vcc_sd_reg1>; diff --git a/target/linux/mvebu/patches-4.19/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch b/target/linux/mvebu/patches-4.19/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch index b835057a06..9b735a0f9e 100644 --- a/target/linux/mvebu/patches-4.19/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch +++ b/target/linux/mvebu/patches-4.19/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch @@ -29,7 +29,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -96,25 +96,9 @@ +@@ -100,25 +100,9 @@ flash@0 { reg = <0>; diff --git a/target/linux/mvebu/patches-4.19/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch b/target/linux/mvebu/patches-4.19/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch index 280ded2b4a..747df93179 100644 --- a/target/linux/mvebu/patches-4.19/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch +++ b/target/linux/mvebu/patches-4.19/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch @@ -15,7 +15,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -138,7 +138,7 @@ +@@ -142,7 +142,7 @@ dsa,member = <0 0>; diff --git a/target/linux/mvebu/patches-4.19/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch b/target/linux/mvebu/patches-4.19/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch index 4aaacf0d6a..3a2c8e804d 100644 --- a/target/linux/mvebu/patches-4.19/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch +++ b/target/linux/mvebu/patches-4.19/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch @@ -62,7 +62,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -52,6 +52,8 @@ +@@ -56,6 +56,8 @@ /* J9 */ &pcie0 { status = "okay"; From 5078e523e22a66cb2f680238d91e924dd04a3fec Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 14 Nov 2020 21:41:39 +0800 Subject: [PATCH 14/25] dnsforwarder: revert to original commit --- package/lean/dnsforwarder/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/lean/dnsforwarder/Makefile b/package/lean/dnsforwarder/Makefile index e66d1fa732..973f7eac71 100644 --- a/package/lean/dnsforwarder/Makefile +++ b/package/lean/dnsforwarder/Makefile @@ -8,7 +8,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/1715173329/dnsforwarder.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=693b554e59479c2867c74f0bb5e26290b93747c5 +PKG_SOURCE_VERSION:=587e61ae4d75dc976f538088b715a3c8ee26c144 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=Dennis PKG_LICENSE:=GPL-3.0 From a351cbbe8b62afbf12e972ffec9a3123d13eb328 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 14 Nov 2020 23:08:37 +0800 Subject: [PATCH 15/25] Revert "ubus: bump to git HEAD" This reverts commit d7b03a4aaba5722d2e4012d64cbda22136c83883. --- package/system/ubus/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index fd2ccace6b..a1c35a7c0f 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2020-10-25 -PKG_SOURCE_VERSION:=ad0cd117db74934385d81605514e041b1a9cdda9 -PKG_MIRROR_HASH:=8f6908bd826a342ed8e925dfec4744dbf24616f20d20d1af342a18419a3b14de +PKG_SOURCE_DATE:=2020-10-21 +PKG_SOURCE_VERSION:=13a4438b4ebdf85d301999e0a615640ac4c9b0a8 +PKG_MIRROR_HASH:=e9e88bb78993a31a33a1c9579f1facca2949c1a4397b842a9f1b469b170be5da CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 From c0907ca3b74514a90a06952d8dc3c5ad3750de00 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 14 Nov 2020 23:08:55 +0800 Subject: [PATCH 16/25] Revert "ubus: prepare to run ubusd as non-root user" This reverts commit 586b1c2c9a803b1726acd251669221afc9c0073c. --- package/system/ubus/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index a1c35a7c0f..824e71924f 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2020-10-21 -PKG_SOURCE_VERSION:=13a4438b4ebdf85d301999e0a615640ac4c9b0a8 -PKG_MIRROR_HASH:=e9e88bb78993a31a33a1c9579f1facca2949c1a4397b842a9f1b469b170be5da +PKG_SOURCE_DATE:=2020-02-05 +PKG_SOURCE_VERSION:=171469e3138cce191892e20b6fd35b52c9368064 +PKG_MIRROR_HASH:=b4f1a3d70c2685c2aee2724b980b2ff747f8662f74d04d8be1c5a5e950b0e2ef CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 @@ -31,7 +31,6 @@ define Package/ubusd CATEGORY:=Base system TITLE:=OpenWrt RPC daemon DEPENDS:=+libubox +libblobmsg-json - USERID:=ubus=81:ubus=81 endef define Package/libubus From f20e414b797e6a49d908d052d07e2f56b17f3cbe Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 12 Mar 2020 12:55:41 -1000 Subject: [PATCH 17/25] build: refactor JSON info files to `profiles.json` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JSON info files contain machine readable information of built profiles and resulting images. These files were added in commit 881ed09ee6e2 ("build: create JSON files containing image info"). They are useful for firmware wizards and script checking for reproducibility. Currently all JSON files are stored next to the built images, resulting in up to 168 individual files for the ath79/generic target. This patch refactors the JSON creation to store individual per image (not per profile) files in $(BUILD_DIR)/json_info_files and create an single overview file called `profiles.json` in the target directory. Storing per image files and not per profile solves the problem of parallel file writes. If a profiles sysupgrade and factory image are finished at the same time both processes would write to the same JSON file, resulting in randomly broken outputs. Some target like x86/64 do not use the image code yet, resulting in missing JSON files. If no JSON info files were created, no `profiles.json` files is created as it would be empty anyway. As before, this creation is enabled by default only if `BUILDBOT` is set. Tested via buildroot & ImageBuilder on ath79/generic, imx6 and x86/64. Signed-off-by: Paul Spooren [json_info_files dir handling in Make, if case refactoring] Signed-off-by: Petr Štetiar --- config/Config-build.in | 9 ++-- include/image.mk | 61 +++++++++++++------------ scripts/json_add_image_info.py | 70 ++++++++++++++++------------- scripts/json_overview_image_info.py | 39 ++++++++++++++++ target/imagebuilder/files/Makefile | 10 +++++ 5 files changed, 125 insertions(+), 64 deletions(-) create mode 100755 scripts/json_overview_image_info.py diff --git a/config/Config-build.in b/config/Config-build.in index b5512184fc..96ddfc7458 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -7,12 +7,13 @@ menu "Global build settings" - config JSON_ADD_IMAGE_INFO - bool "Create JSON info files per build image" + config JSON_OVERVIEW_IMAGE_INFO + bool "Create JSON info file overview per target" default BUILDBOT help - The JSON info files contain information about the device and - build images, stored next to the firmware images. + Create a JSON info file called profiles.json in the target + directory containing machine readable list of built profiles + and resulting images. config ALL_NONSHARED bool "Select all target specific packages by default" diff --git a/include/image.mk b/include/image.mk index 387922538e..98f7650a05 100644 --- a/include/image.mk +++ b/include/image.mk @@ -563,8 +563,11 @@ endef define Device/Build/image GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz)) - $$(_TARGET): $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX) + $$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \ + $(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json, \ + $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX)) $(eval $(call Device/Export,$(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)),$(1))) + ROOTFS/$(1)/$(3) := \ $(KDIR)/root.$(1)$$(strip \ $$(if $$(FS_OPTIONS/$(1)),+fs=$$(call param_mangle,$$(FS_OPTIONS/$(1)))) \ @@ -586,32 +589,33 @@ define Device/Build/image $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)) cp $$^ $$@ - $(if $(CONFIG_JSON_ADD_IMAGE_INFO), \ - DEVICE_ID="$(DEVICE_NAME)" \ - BIN_DIR="$(BIN_DIR)" \ - IMAGE_NAME="$(IMAGE_NAME)" \ - IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \ - IMAGE_PREFIX="$(IMAGE_PREFIX)" \ - DEVICE_VENDOR="$(DEVICE_VENDOR)" \ - DEVICE_MODEL="$(DEVICE_MODEL)" \ - DEVICE_VARIANT="$(DEVICE_VARIANT)" \ - DEVICE_ALT0_VENDOR="$(DEVICE_ALT0_VENDOR)" \ - DEVICE_ALT0_MODEL="$(DEVICE_ALT0_MODEL)" \ - DEVICE_ALT0_VARIANT="$(DEVICE_ALT0_VARIANT)" \ - DEVICE_ALT1_VENDOR="$(DEVICE_ALT1_VENDOR)" \ - DEVICE_ALT1_MODEL="$(DEVICE_ALT1_MODEL)" \ - DEVICE_ALT1_VARIANT="$(DEVICE_ALT1_VARIANT)" \ - DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \ - DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \ - DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \ - DEVICE_TITLE="$(DEVICE_TITLE)" \ - TARGET="$(BOARD)" \ - SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \ - VERSION_NUMBER="$(VERSION_NUMBER)" \ - VERSION_CODE="$(VERSION_CODE)" \ - SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \ - $(TOPDIR)/scripts/json_add_image_info.py \ - ) + + $(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX) + @mkdir -p $$(shell dirname $$@) + DEVICE_ID="$(DEVICE_NAME)" \ + BIN_DIR="$(BIN_DIR)" \ + IMAGE_NAME="$(IMAGE_NAME)" \ + IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \ + IMAGE_PREFIX="$(IMAGE_PREFIX)" \ + DEVICE_VENDOR="$(DEVICE_VENDOR)" \ + DEVICE_MODEL="$(DEVICE_MODEL)" \ + DEVICE_VARIANT="$(DEVICE_VARIANT)" \ + DEVICE_ALT0_VENDOR="$(DEVICE_ALT0_VENDOR)" \ + DEVICE_ALT0_MODEL="$(DEVICE_ALT0_MODEL)" \ + DEVICE_ALT0_VARIANT="$(DEVICE_ALT0_VARIANT)" \ + DEVICE_ALT1_VENDOR="$(DEVICE_ALT1_VENDOR)" \ + DEVICE_ALT1_MODEL="$(DEVICE_ALT1_MODEL)" \ + DEVICE_ALT1_VARIANT="$(DEVICE_ALT1_VARIANT)" \ + DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \ + DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \ + DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \ + DEVICE_TITLE="$(DEVICE_TITLE)" \ + TARGET="$(BOARD)" \ + SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \ + VERSION_NUMBER="$(VERSION_NUMBER)" \ + VERSION_CODE="$(VERSION_CODE)" \ + SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \ + $(TOPDIR)/scripts/json_add_image_info.py $$@ endef @@ -630,8 +634,6 @@ define Device/Build/artifact endef define Device/Build - $(shell rm -f $(BIN_DIR)/$(IMG_PREFIX)-$(1).json) - $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1))) $(call Device/Build/kernel,$(1)) @@ -717,6 +719,7 @@ define BuildImage image_prepare: compile mkdir -p $(BIN_DIR) $(KDIR)/tmp + rm -rf $(BUILD_DIR)/json_info_files $(call Image/Prepare) legacy-images-prepare-make: image_prepare diff --git a/scripts/json_add_image_info.py b/scripts/json_add_image_info.py index 44b4031f85..b6628113ac 100755 --- a/scripts/json_add_image_info.py +++ b/scripts/json_add_image_info.py @@ -1,18 +1,22 @@ #!/usr/bin/env python3 -import json -import os +from os import getenv +from pathlib import Path +from sys import argv import hashlib +import json +if len(argv) != 2: + print("ERROR: JSON info script requires output arg") + exit(1) -def e(variable, default=None): - return os.environ.get(variable, default) +json_path = Path(argv[1]) +bin_dir = Path(getenv("BIN_DIR")) +image_file = bin_dir / getenv("IMAGE_NAME") - -json_path = "{}{}{}.json".format(e("BIN_DIR"), os.sep, e("IMAGE_PREFIX")) - -with open(os.path.join(e("BIN_DIR"), e("IMAGE_NAME")), "rb") as image_file: - image_hash = hashlib.sha256(image_file.read()).hexdigest() +if not image_file.is_file(): + print("Skip JSON creation for non existing image ", image_file) + exit(0) def get_titles(): @@ -20,36 +24,40 @@ def get_titles(): for prefix in ["", "ALT0_", "ALT1_", "ALT2_"]: title = {} for var in ["vendor", "model", "variant"]: - if e("DEVICE_{}{}".format(prefix, var.upper())): - title[var] = e("DEVICE_{}{}".format(prefix, var.upper())) + if getenv("DEVICE_{}{}".format(prefix, var.upper())): + title[var] = getenv("DEVICE_{}{}".format(prefix, var.upper())) if title: titles.append(title) if not titles: - titles.append({"title": e("DEVICE_TITLE")}) + titles.append({"title": getenv("DEVICE_TITLE")}) return titles -if not os.path.exists(json_path): - device_info = { - "id": e("DEVICE_ID"), - "image_prefix": e("IMAGE_PREFIX"), - "images": [], - "metadata_version": 1, - "supported_devices": e("SUPPORTED_DEVICES").split(), - "target": "{}/{}".format(e("TARGET"), e("SUBTARGET", "generic")), - "titles": get_titles(), - "version_commit": e("VERSION_CODE"), - "version_number": e("VERSION_NUMBER"), - } -else: - with open(json_path, "r") as json_file: - device_info = json.load(json_file) +device_id = getenv("DEVICE_ID") +image_hash = hashlib.sha256(image_file.read_bytes()).hexdigest() -image_info = {"type": e("IMAGE_TYPE"), "name": e("IMAGE_NAME"), "sha256": image_hash} -device_info["images"].append(image_info) +image_info = { + "metadata_version": 1, + "target": "{}/{}".format(getenv("TARGET"), getenv("SUBTARGET")), + "version_code": getenv("VERSION_CODE"), + "version_number": getenv("VERSION_NUMBER"), + "profiles": { + device_id: { + "image_prefix": getenv("IMAGE_PREFIX"), + "images": [ + { + "type": getenv("IMAGE_TYPE"), + "name": getenv("IMAGE_NAME"), + "sha256": image_hash, + } + ], + "supported_devices": getenv("SUPPORTED_DEVICES").split(), + "titles": get_titles(), + } + }, +} -with open(json_path, "w") as json_file: - json.dump(device_info, json_file, sort_keys=True, indent=" ") +json_path.write_text(json.dumps(image_info, separators=(",", ":"))) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py new file mode 100755 index 0000000000..5ed829249b --- /dev/null +++ b/scripts/json_overview_image_info.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 + +import json +from pathlib import Path +from os import getenv +from sys import argv + +if len(argv) != 2: + print("JSON info files script requires ouput file as argument") + exit(1) + +output_path = Path(argv[1]) + +assert getenv("WORK_DIR"), "$WORK_DIR required" + +work_dir = Path(getenv("WORK_DIR")) + +assert work_dir.is_dir(), "$WORK_DIR not a directory" + +output = {} + +for json_file in work_dir.glob("*.json"): + image_info = json.loads(json_file.read_text()) + if not output: + output.update(image_info) + else: + # get first (and only) profile in json file + device_id = next(iter(image_info["profiles"].keys())) + if device_id not in output["profiles"]: + output["profiles"].update(image_info["profiles"]) + else: + output["profiles"][device_id]["images"].append( + image_info["profiles"][device_id]["images"][0] + ) + +if output: + output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":"))) +else: + print("JSON info file script could not find any JSON files for target") diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 70e0e7b3ca..fd7aa9190f 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -114,6 +114,7 @@ _call_image: staging_dir/host/.prereq-build $(MAKE) package_install $(MAKE) -s prepare_rootfs $(MAKE) -s build_image + $(MAKE) -s json_overview_image_info $(MAKE) -s checksum _call_manifest: FORCE @@ -162,6 +163,7 @@ prepare_rootfs: FORCE $(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG) $(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES)) + build_image: FORCE @echo @echo Building images... @@ -169,6 +171,14 @@ build_image: FORCE $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)") +$(BIN_DIR)/profiles.json: FORCE + $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \ + WORK_DIR=$(BUILD_DIR)/json_info_files \ + $(SCRIPT_DIR)/json_overview_image_info.py $@ \ + ) + +json_overview_image_info: $(BIN_DIR)/profiles.json + checksum: FORCE @echo @echo Calculating checksums... From d871bcd6d518e0132a5b170aa4a786ab00920665 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 30 Jun 2020 01:02:43 -1000 Subject: [PATCH 18/25] build: store default/device packages in JSON With this commit the `profiles.json` contain both the target specific `default_packages` as well as the device specific `device_packages` as a array of strings. This information is required for downstream projects like the various web-based interactive firmware generators. Signed-off-by: Daniel Golle Signed-off-by: Paul Spooren --- include/image.mk | 1 + scripts/json_add_image_info.py | 1 + scripts/json_overview_image_info.py | 20 ++++++++++++++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/include/image.mk b/include/image.mk index 98f7650a05..8f1aa0fbb7 100644 --- a/include/image.mk +++ b/include/image.mk @@ -610,6 +610,7 @@ define Device/Build/image DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \ DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \ DEVICE_TITLE="$(DEVICE_TITLE)" \ + DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \ TARGET="$(BOARD)" \ SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \ VERSION_NUMBER="$(VERSION_NUMBER)" \ diff --git a/scripts/json_add_image_info.py b/scripts/json_add_image_info.py index b6628113ac..768bb10254 100755 --- a/scripts/json_add_image_info.py +++ b/scripts/json_add_image_info.py @@ -54,6 +54,7 @@ image_info = { "sha256": image_hash, } ], + "device_packages": getenv("DEVICE_PACKAGES").split(), "supported_devices": getenv("SUPPORTED_DEVICES").split(), "titles": get_titles(), } diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 5ed829249b..6e7d3e02b3 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -1,9 +1,10 @@ #!/usr/bin/env python3 -import json +from os import getenv, environ from pathlib import Path -from os import getenv +from subprocess import run from sys import argv +import json if len(argv) != 2: print("JSON info files script requires ouput file as argument") @@ -33,6 +34,21 @@ for json_file in work_dir.glob("*.json"): image_info["profiles"][device_id]["images"][0] ) + +output["default_packages"] = run( + [ + "make", + "--no-print-directory", + "-C", + f"target/linux/{output['target'].split('/')[0]}", + "val.DEFAULT_PACKAGES", + ], + capture_output=True, + check=True, + env=environ.copy().update({"TOPDIR": Path().cwd()}), + text=True, +).stdout.split() + if output: output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":"))) else: From 4829b65c294492a42a36c84b52a47c2ed2d3d469 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Wed, 8 Apr 2020 10:17:01 -1000 Subject: [PATCH 19/25] scripts: JSON merge don't crash if no JSON found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The JSON `WORK_DIR` ($(KDIR)/json_info_files) is only created if the new image generation methods from `image.mk` are used. However some targets like `armvirt` do not use it yet, so the folder is never created. The `json_overview_image_info.py` script used to raise an error if the given `WORK_DIR` isn't a folder, however it should just notify about missing JSON files. This patch removes the Python assert and exists with code 0 even if no JSON files were found, as this is not necessarily an error but simply not yet implemented. Using `glob` on an not existing `Path` results in an empty list, therefore the for loop won't run. Signed-off-by: Paul Spooren CC: Petr Štetiar --- scripts/json_overview_image_info.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 6e7d3e02b3..59d69df314 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -16,8 +16,6 @@ assert getenv("WORK_DIR"), "$WORK_DIR required" work_dir = Path(getenv("WORK_DIR")) -assert work_dir.is_dir(), "$WORK_DIR not a directory" - output = {} for json_file in work_dir.glob("*.json"): From 6e6e62ac5b9c6bc6607df63f17e1cd3c4ea98c33 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 30 Jun 2020 16:00:25 -1000 Subject: [PATCH 20/25] build,json: store arch_packages in profiles.json The `arch_packages` contains the supported package architecture. Previously it was necessary to parse the `Packages` index for the line `Architecture:`, requiring both an additional parser and file download. Signed-off-by: Paul Spooren --- scripts/json_overview_image_info.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 59d69df314..20b14f236b 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -33,19 +33,22 @@ for json_file in work_dir.glob("*.json"): ) -output["default_packages"] = run( +default_packages, output["arch_packages"] = run( [ "make", "--no-print-directory", "-C", f"target/linux/{output['target'].split('/')[0]}", "val.DEFAULT_PACKAGES", + "val.ARCH_PACKAGES", ], capture_output=True, check=True, env=environ.copy().update({"TOPDIR": Path().cwd()}), text=True, -).stdout.split() +).stdout.splitlines() + +output["default_packages"] = default_packages.split() if output: output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":"))) From 15c4e9d88cb4337a107f2e70e3c0b7149acc08f8 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 3 Jul 2020 21:57:52 +0100 Subject: [PATCH 21/25] build,json: fix build failure in case no data is found Only collect arch_packages if actually generating any output. Fixes: commit f09b9319 ("build,json: store arch_packages in profiles.json"( Signed-off-by: Daniel Golle Signed-off-by: Paul Spooren --- scripts/json_overview_image_info.py | 34 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 20b14f236b..8f3525f890 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -32,25 +32,23 @@ for json_file in work_dir.glob("*.json"): image_info["profiles"][device_id]["images"][0] ) - -default_packages, output["arch_packages"] = run( - [ - "make", - "--no-print-directory", - "-C", - f"target/linux/{output['target'].split('/')[0]}", - "val.DEFAULT_PACKAGES", - "val.ARCH_PACKAGES", - ], - capture_output=True, - check=True, - env=environ.copy().update({"TOPDIR": Path().cwd()}), - text=True, -).stdout.splitlines() - -output["default_packages"] = default_packages.split() - if output: + default_packages, output["arch_packages"] = run( + [ + "make", + "--no-print-directory", + "-C", + f"target/linux/{output['target'].split('/')[0]}", + "val.DEFAULT_PACKAGES", + "val.ARCH_PACKAGES", + ], + capture_output=True, + check=True, + env=environ.copy().update({"TOPDIR": Path().cwd()}), + text=True, + ).stdout.splitlines() + + output["default_packages"] = default_packages.split() output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":"))) else: print("JSON info file script could not find any JSON files for target") From ef690c4d361070e84c0bdd3b085e08e6b407ab99 Mon Sep 17 00:00:00 2001 From: Huangbin Zhan Date: Tue, 7 Jul 2020 07:14:42 +0800 Subject: [PATCH 22/25] build: fix compatibility with python 3.6 On a system python3 is linked to python3.6, fail to perform json_overview_image_info and got `TypeError: __init__() got an unexpected keyword argument 'capture_output'`. This patch emulate the behaviour on python 3.7+. Signed-off-by: Huangbin Zhan --- scripts/json_overview_image_info.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 8f3525f890..c76a442840 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -2,7 +2,7 @@ from os import getenv, environ from pathlib import Path -from subprocess import run +from subprocess import run, PIPE from sys import argv import json @@ -42,10 +42,11 @@ if output: "val.DEFAULT_PACKAGES", "val.ARCH_PACKAGES", ], - capture_output=True, + stdout=PIPE, + stderr=PIPE, check=True, env=environ.copy().update({"TOPDIR": Path().cwd()}), - text=True, + universal_newlines=True, ).stdout.splitlines() output["default_packages"] = default_packages.split() From a7b5fd56ef6372ef09f795022511eed3af3cb56a Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sat, 11 Jul 2020 18:44:55 -1000 Subject: [PATCH 23/25] build,json: fix compatibility with Python 3.5 The f-string feature was introduced in Python 3.6. As Buildbots may run on Debian 9, which comes per default with Python 3.5, this would cause an issue. Instead of f-strings use the *legacy* `.format()` function. Signed-off-by: Paul Spooren --- scripts/json_overview_image_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index c76a442840..ca6fbbc962 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -38,7 +38,7 @@ if output: "make", "--no-print-directory", "-C", - f"target/linux/{output['target'].split('/')[0]}", + "target/linux/{}".format(output['target'].split('/')[0]), "val.DEFAULT_PACKAGES", "val.ARCH_PACKAGES", ], From b7db313bc8c2ce15aeeec4728c90a5d933eb3b1e Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sun, 1 Nov 2020 11:53:39 -1000 Subject: [PATCH 24/25] build: store SOURCE_DATE_EPOCH in JSON info files The source date epoch is the only reproducible date close to the actual build date. It can be used for tooling like the firmware wizard to show the image age. Signed-off-by: Paul Spooren --- include/image.mk | 1 + scripts/json_add_image_info.py | 1 + 2 files changed, 2 insertions(+) diff --git a/include/image.mk b/include/image.mk index 8f1aa0fbb7..8ee4b68c5b 100644 --- a/include/image.mk +++ b/include/image.mk @@ -594,6 +594,7 @@ define Device/Build/image @mkdir -p $$(shell dirname $$@) DEVICE_ID="$(DEVICE_NAME)" \ BIN_DIR="$(BIN_DIR)" \ + SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ IMAGE_NAME="$(IMAGE_NAME)" \ IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \ IMAGE_PREFIX="$(IMAGE_PREFIX)" \ diff --git a/scripts/json_add_image_info.py b/scripts/json_add_image_info.py index 768bb10254..ac907c777c 100755 --- a/scripts/json_add_image_info.py +++ b/scripts/json_add_image_info.py @@ -44,6 +44,7 @@ image_info = { "target": "{}/{}".format(getenv("TARGET"), getenv("SUBTARGET")), "version_code": getenv("VERSION_CODE"), "version_number": getenv("VERSION_NUMBER"), + "source_date_epoch": getenv("SOURCE_DATE_EPOCH"), "profiles": { device_id: { "image_prefix": getenv("IMAGE_PREFIX"), From 07e9ac66962cdd0053c36ccb260b8595ad0ce887 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 15 Nov 2020 00:39:33 +0800 Subject: [PATCH 25/25] luci-app-turboacc: bug fixes --- package/ctcgfw/luci-app-turboacc/Makefile | 2 +- .../luasrc/controller/turboacc.lua | 4 +- .../luasrc/model/cbi/turboacc.lua | 2 - .../root/etc/init.d/turboacc | 147 +++++++++--------- 4 files changed, 79 insertions(+), 76 deletions(-) diff --git a/package/ctcgfw/luci-app-turboacc/Makefile b/package/ctcgfw/luci-app-turboacc/Makefile index f61f4f78e2..788f6ec5cd 100644 --- a/package/ctcgfw/luci-app-turboacc/Makefile +++ b/package/ctcgfw/luci-app-turboacc/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-turboacc PKG_VERSION:=1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPLv3.0+ diff --git a/package/ctcgfw/luci-app-turboacc/luasrc/controller/turboacc.lua b/package/ctcgfw/luci-app-turboacc/luasrc/controller/turboacc.lua index 5e2813e66f..259859fc1c 100644 --- a/package/ctcgfw/luci-app-turboacc/luasrc/controller/turboacc.lua +++ b/package/ctcgfw/luci-app-turboacc/luasrc/controller/turboacc.lua @@ -13,7 +13,7 @@ function index() end local function fastpath_status() - return luci.sys.call("[ x$(cat /sys/module/xt_FLOWOFFLOAD/refcnt 2>/dev/null) != x0 ] || lsmod | grep -q fast_classifier") == 0 + return luci.sys.call("{ [ -e /sys/module/xt_FLOWOFFLOAD/refcnt ] && [ x$(cat /sys/module/xt_FLOWOFFLOAD/refcnt 2>/dev/null) != x0 ]; } || lsmod | grep -q fast_classifier") == 0 end local function bbr_status() @@ -21,7 +21,7 @@ local function bbr_status() end local function fullconebat_status() - return luci.sys.call("[ x$(cat /sys/module/xt_FULLCONENAT/refcnt 2>/dev/null) != x0 ]") == 0 + return luci.sys.call("[ -e /sys/module/xt_FULLCONENAT/refcnt ] && [ x$(cat /sys/module/xt_FULLCONENAT/refcnt 2>/dev/null) != x0 ]") == 0 end local function dnscaching_status() diff --git a/package/ctcgfw/luci-app-turboacc/luasrc/model/cbi/turboacc.lua b/package/ctcgfw/luci-app-turboacc/luasrc/model/cbi/turboacc.lua index 20d6ff0bb2..12892733a1 100644 --- a/package/ctcgfw/luci-app-turboacc/luasrc/model/cbi/turboacc.lua +++ b/package/ctcgfw/luci-app-turboacc/luasrc/model/cbi/turboacc.lua @@ -46,14 +46,12 @@ end if nixio.fs.access("/lib/modules/" .. kernel_version .. "/tcp_bbr.ko") then bbr_cca = s:option(Flag, "bbr_cca", translate("BBR CCA")) bbr_cca.default = 0 -bbr_cca.rmempty = false bbr_cca.description = translate("Using BBR CCA can improve TCP network performance effectively") end if nixio.fs.access("/lib/modules/" .. kernel_version .. "/xt_FULLCONENAT.ko") then fullcone_nat = s:option(Flag, "fullcone_nat", translate("FullCone NAT")) fullcone_nat.default = 0 -fullcone_nat.rmempty = false fullcone_nat.description = translate("Using FullCone NAT can improve gaming performance effectively") end diff --git a/package/ctcgfw/luci-app-turboacc/root/etc/init.d/turboacc b/package/ctcgfw/luci-app-turboacc/root/etc/init.d/turboacc index 70bab74434..3064f305cc 100755 --- a/package/ctcgfw/luci-app-turboacc/root/etc/init.d/turboacc +++ b/package/ctcgfw/luci-app-turboacc/root/etc/init.d/turboacc @@ -20,6 +20,11 @@ inital_conf(){ config_get "dns_caching_mode" "config" "dns_caching_mode" "0" config_get "dns_caching_v4_dns" "config" "dns_caching_v4_dns" config_get "dns_caching_v6_dns" "config" "dns_caching_v6_dns" + + [ ! -e "/lib/modules/$(uname -r)/xt_FLOWOFFLOAD.ko" ] && { sw_flow="0"; hw_flow="0"; } + [ ! -e "/lib/modules/$(uname -r)/fast-classifier.ko" ] && { sfe_flow="0"; sfe_bridge="0"; sfe_ipv6="0"; } + [ ! -e "/lib/modules/$(uname -r)/tcp_bbr.ko" ] && bbr_cca="0" + [ ! -e "/lib/modules/$(uname -r)/xt_FULLCONENAT.ko" ] && fullcone_nat="0" } start_pdnsd() { @@ -33,87 +38,87 @@ global { server_port=5333; # pdnsd监听的端口,不要和别的服务冲突即可 status_ctl = on; paranoid=on; # 二次请求模式,如果请求主DNS服务器返回的是垃圾地址,就向备用服务器请求 - query_method=udp_only; - neg_domain_pol = off; + query_method=udp_only; + neg_domain_pol = off; par_queries = 400; # 最多同时请求数 min_ttl = 1h; # DNS结果最短缓存时间 max_ttl = 1w; # DNS结果最长缓存时间 timeout = 10; # DNS请求超时时间,单位秒 } -server { - label = "routine"; - ip = ${dns_caching_v4_dns}; # 这里为主要上级 dns 的 ip 地址,建议填写一个当地最快的DNS地址 +server { + label = "routine"; + ip = ${dns_caching_v4_dns}; # 这里为主要上级 dns 的 ip 地址,建议填写一个当地最快的DNS地址 timeout = 5; # DNS请求超时时间 reject = 74.125.127.102, # 以下是脏IP,也就是DNS污染一般会返回的结果,如果收到如下DNS结果会触发二次请求(TCP协议一般不会碰到脏IP) - 74.125.155.102, - 74.125.39.102, - 74.125.39.113, - 209.85.229.138, - 128.121.126.139, - 159.106.121.75, - 169.132.13.103, - 192.67.198.6, - 202.106.1.2, - 202.181.7.85, - 203.161.230.171, - 203.98.7.65, - 207.12.88.98, - 208.56.31.43, - 209.145.54.50, - 209.220.30.174, - 209.36.73.33, - 211.94.66.147, - 213.169.251.35, - 216.221.188.182, - 216.234.179.13, - 243.185.187.39, - 37.61.54.158, - 4.36.66.178, - 46.82.174.68, - 59.24.3.173, - 64.33.88.161, - 64.33.99.47, - 64.66.163.251, - 65.104.202.252, - 65.160.219.113, - 66.45.252.237, - 69.55.52.253, - 72.14.205.104, - 72.14.205.99, - 78.16.49.15, - 8.7.198.45, - 93.46.8.89, - 37.61.54.158, - 243.185.187.39, - 190.93.247.4, - 190.93.246.4, - 190.93.245.4, - 190.93.244.4, - 65.49.2.178, - 189.163.17.5, - 23.89.5.60, - 49.2.123.56, - 54.76.135.1, - 77.4.7.92, - 118.5.49.6, - 159.24.3.173, - 188.5.4.96, - 197.4.4.12, - 220.250.64.24, - 243.185.187.30, - 249.129.46.48, - 253.157.14.165; - reject_policy = fail; + 74.125.155.102, + 74.125.39.102, + 74.125.39.113, + 209.85.229.138, + 128.121.126.139, + 159.106.121.75, + 169.132.13.103, + 192.67.198.6, + 202.106.1.2, + 202.181.7.85, + 203.161.230.171, + 203.98.7.65, + 207.12.88.98, + 208.56.31.43, + 209.145.54.50, + 209.220.30.174, + 209.36.73.33, + 211.94.66.147, + 213.169.251.35, + 216.221.188.182, + 216.234.179.13, + 243.185.187.39, + 37.61.54.158, + 4.36.66.178, + 46.82.174.68, + 59.24.3.173, + 64.33.88.161, + 64.33.99.47, + 64.66.163.251, + 65.104.202.252, + 65.160.219.113, + 66.45.252.237, + 69.55.52.253, + 72.14.205.104, + 72.14.205.99, + 78.16.49.15, + 8.7.198.45, + 93.46.8.89, + 37.61.54.158, + 243.185.187.39, + 190.93.247.4, + 190.93.246.4, + 190.93.245.4, + 190.93.244.4, + 65.49.2.178, + 189.163.17.5, + 23.89.5.60, + 49.2.123.56, + 54.76.135.1, + 77.4.7.92, + 118.5.49.6, + 159.24.3.173, + 188.5.4.96, + 197.4.4.12, + 220.250.64.24, + 243.185.187.30, + 249.129.46.48, + 253.157.14.165; + reject_policy = fail; } -server { - label = "special"; # 这个随便写 - ip = 117.50.10.10,52.80.52.52,119.29.29.29; # 这里为备用DNS服务器的 ip 地址 - port = 5353; # 推荐使用53以外的端口(DNS服务器必须支持) +server { + label = "special"; # 这个随便写 + ip = 117.50.10.10,52.80.52.52,119.29.29.29; # 这里为备用DNS服务器的 ip 地址 + port = 5353; # 推荐使用53以外的端口(DNS服务器必须支持 proxy_only = on; - timeout = 5; -} + timeout = 5; +} source { owner=localhost; @@ -217,7 +222,7 @@ start(){ lsmod | grep -q fast_classifier || modprobe fast_classifier 2>"/dev/null" echo "${sfe_bridge}" > "/sys/fast_classifier/skip_to_bridge_ingress" 2>"/dev/null" if [ "${sfe_ipv6}" -eq "1" ]; then - [ ! -f "/dev/sfe_ipv6" ] && mknod "/dev/sfe_ipv6" "c" "$(cat "/sys/sfe_ipv6/debug_dev")" "0" + [ ! -e "/dev/sfe_ipv6" ] && mknod "/dev/sfe_ipv6" "c" "$(cat "/sys/sfe_ipv6/debug_dev")" "0" else rm -f "/dev/sfe_ipv6" fi