From 59e64f13844c7697fe09bbf85c0139f76cd929b7 Mon Sep 17 00:00:00 2001 From: Shimin Xiong Date: Fri, 29 May 2020 19:26:39 +0800 Subject: [PATCH 01/34] Update UnblockNeteaseMusicGo server.crt --- .../UnblockNeteaseMusic-Go/files/server.crt | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/package/lean/UnblockNeteaseMusic-Go/files/server.crt b/package/lean/UnblockNeteaseMusic-Go/files/server.crt index b58111aee7..b9025514d2 100644 --- a/package/lean/UnblockNeteaseMusic-Go/files/server.crt +++ b/package/lean/UnblockNeteaseMusic-Go/files/server.crt @@ -1,8 +1,8 @@ -----BEGIN CERTIFICATE----- -MIIDfTCCAmWgAwIBAgIJAKTlW9B59i1HMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV +MIIDkjCCAnqgAwIBAgIJAK/bIUIlE36LMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV BAYTAkNOMSQwIgYDVQQDDBtVbmJsb2NrTmV0ZWFzZU11c2ljIFJvb3QgQ0ExHTAb -BgNVBAoMFEdpdEh1Yi5jb20gQG5vbmRhbmVlMB4XDTE5MDUxODE2MDYxOFoXDTIw -MDUxNzE2MDYxOFowezELMAkGA1UEBhMCQ04xETAPBgNVBAcMCEhhbmd6aG91MSww +BgNVBAoMFEdpdEh1Yi5jb20gQG5vbmRhbmVlMB4XDTIwMDUxNjE3MTIxM1oXDTIx +MDUxNjE3MTIxM1owezELMAkGA1UEBhMCQ04xETAPBgNVBAcMCEhhbmd6aG91MSww KgYDVQQKDCNOZXRFYXNlIChIYW5nemhvdSkgTmV0d29yayBDby4sIEx0ZDERMA8G A1UECwwISVQgRGVwdC4xGDAWBgNVBAMMDyoubXVzaWMuMTYzLmNvbTCCASIwDQYJ KoZIhvcNAQEBBQADggEPADCCAQoCggEBALobECypwEoe8VqM/FJvBRR3p2T+ZWdi @@ -10,12 +10,13 @@ MSPrwfiRJr5p7OMtWBlLveCBV85+R3feidYbQTXlvVTdToY+GN6mFE1x6zG2dvLD s4UuRnipmvGcFYhIRTX8J4AJiN8VMtW0TNXscRMudpz/FAVtsRrggRaThYg4f/rI oAPMqKMsS4JoYhxs9ED6E6/tpj3XmSg1ekaXhgacYSYHeyxizZwoOFVCLH3TG5sF sD6CYNnukYol8bR+VRpvHftIYss5Yz+DyyhYEAMJm1CfQo+xoGR3D0ozbT3hUnzm -fEoOhmSp3sALrFVE4iJSuajoh2/3xhmcyi3xZdWyq4F8hpb+URyaoW0CAwEAAaMt -MCswKQYDVR0RBCIwIIINbXVzaWMuMTYzLmNvbYIPKi5tdXNpYy4xNjMuY29tMA0G -CSqGSIb3DQEBCwUAA4IBAQB32SVz5jHUYv3ZG7SNF/LFJ904/LI8QlTe9R+Abb9z -bpXmQeo4pvNNOk3LgcTyuSIPQSHEFn32hk/MedB6Q2cKaGVKQq7Usne1jsV0JirG -wMx3PTcKPnX+XexRY8s6v6cNKSx5YlMQNFeH7p8MgKqdM/UX/dNCxT04X/ClmP1K -/rKqonXn4i3wmWprl7Q7Z1wqt0ygQRkNJKqdYKTu4oQcPON8/dRcseYdJzSoK2/G -H6cOJwKrRLzuUqQlphe6wyUsyTIbIJiFu1a1Gml6zB4lhLZhL89H2lYwdS8wWlc+ -M+wYi+XTM/ylNHEIoKsOe2nscnwi/hTfHJOPPchHbEuM +fEoOhmSp3sALrFVE4iJSuajoh2/3xhmcyi3xZdWyq4F8hpb+URyaoW0CAwEAAaNC +MEAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwKQYDVR0RBCIwIIINbXVzaWMuMTYzLmNv +bYIPKi5tdXNpYy4xNjMuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQB+zW0o1169aGQI +7GA/8BQ769svpkpdy/lfvkokapFjzoxLTBQhjMo9rqzmGOwr9ksePwQqSDXn685W +mKnEl0CzhBrKnL5x3gHus8bg591xpW+01xAFXSyLITOfMJqMEdY7ylymkm0XZ3aN +vm+yFdP1fr/bZNw6Wrprg3i7eGhj7TdBXRA96usVgBcnCkC1SzEZfnDZsKl9o8Xx +TSOpvzIMSaD7++Bp7BdzA5oCCydv2c++zV/sgCPIr26Jq8UQac+qQP5SMlYyGbAl +vIQRRZyfQ4fPonYDnEPHWFCMyBkQIN39LMhDRsUgn8bT0rnP91xkNAd9S4VWbNDA +5TMiQy3F -----END CERTIFICATE----- From 964693e535517c2750ff7fb5d9e04a115833d854 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 30 May 2020 20:23:20 +0800 Subject: [PATCH 02/34] kernel: bump 4.9 to 4.9.225 Refreshed all patches. Signed-off-by: CN_SZTL --- include/kernel-version.mk | 4 ++-- ...-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch | 4 ++-- ...-rename-__page_frag-functions-to-__page_frag_cache.patch | 6 +++--- target/linux/generic/hack-4.9/220-gc_sections.patch | 2 +- ...-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 169b6c78b0..7ad265a6e6 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,11 +6,11 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-4.9 = .224 +LINUX_VERSION-4.9 = .225 LINUX_VERSION-4.14 = .181 LINUX_VERSION-4.19 = .124 -LINUX_KERNEL_HASH-4.9.224 = df6d07e99513f9afadd7d44c471f44c56fccc9e4c984a1ba4b988f053a13c949 +LINUX_KERNEL_HASH-4.9.225 = e547748c548b0f55f665bc78cfec322e7b96f41527b5e4b5d79430fdaa57c3e8 LINUX_KERNEL_HASH-4.14.181 = ab9bea577cfe59fb2f502ce4d6130bfb49163ef969364adc3d36a65721d64a4d LINUX_KERNEL_HASH-4.19.124 = d5d9001879d7a77309dca203656490326d26b068b7b0b9d8003548dba8fdad00 diff --git a/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch b/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch index 03481d13c8..7dd86b5a65 100644 --- a/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch +++ b/target/linux/generic/backport-4.9/041-mm-rename-__alloc_page_frag-to-page_frag_alloc-and-_.patch @@ -63,7 +63,7 @@ Signed-off-by: Linus Torvalds void *napi_alloc_frag(unsigned int fragsz); --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -3949,8 +3949,8 @@ void __page_frag_drain(struct page *page +@@ -3950,8 +3950,8 @@ void __page_frag_drain(struct page *page } EXPORT_SYMBOL(__page_frag_drain); @@ -74,7 +74,7 @@ Signed-off-by: Linus Torvalds { unsigned int size = PAGE_SIZE; struct page *page; -@@ -4001,19 +4001,19 @@ refill: +@@ -4002,19 +4002,19 @@ refill: return nc->va + offset; } diff --git a/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch b/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch index cb2bdfc7ee..5a1cfcdef5 100644 --- a/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch +++ b/target/linux/generic/backport-4.9/042-mm-rename-__page_frag-functions-to-__page_frag_cache.patch @@ -33,7 +33,7 @@ Signed-off-by: Linus Torvalds extern void page_frag_free(void *addr); --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -3914,8 +3914,8 @@ EXPORT_SYMBOL(free_pages); +@@ -3915,8 +3915,8 @@ EXPORT_SYMBOL(free_pages); * drivers to provide a backing region of memory for use as either an * sk_buff->head, or to be used in the "frags" portion of skb_shared_info. */ @@ -44,7 +44,7 @@ Signed-off-by: Linus Torvalds { struct page *page = NULL; gfp_t gfp = gfp_mask; -@@ -3935,19 +3935,20 @@ static struct page *__page_frag_refill(s +@@ -3936,19 +3936,20 @@ static struct page *__page_frag_refill(s return page; } @@ -68,7 +68,7 @@ Signed-off-by: Linus Torvalds void *page_frag_alloc(struct page_frag_cache *nc, unsigned int fragsz, gfp_t gfp_mask) -@@ -3958,7 +3959,7 @@ void *page_frag_alloc(struct page_frag_c +@@ -3959,7 +3960,7 @@ void *page_frag_alloc(struct page_frag_c if (unlikely(!nc->va)) { refill: diff --git a/target/linux/generic/hack-4.9/220-gc_sections.patch b/target/linux/generic/hack-4.9/220-gc_sections.patch index 3fa872a2fd..8da4a36205 100644 --- a/target/linux/generic/hack-4.9/220-gc_sections.patch +++ b/target/linux/generic/hack-4.9/220-gc_sections.patch @@ -21,7 +21,7 @@ Signed-off-by: Gabor Juhos --- a/Makefile +++ b/Makefile -@@ -402,6 +402,11 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/s +@@ -402,6 +402,11 @@ KBUILD_LDFLAGS_MODULE = -T $(srctree)/sc GCC_PLUGINS_CFLAGS := CLANG_FLAGS := diff --git a/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 0f6ce1f802..56b70697ee 100644 --- a/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-4.9/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -5924,7 +5924,7 @@ static void __ref alloc_node_mem_map(str +@@ -5925,7 +5925,7 @@ static void __ref alloc_node_mem_map(str mem_map = NODE_DATA(0)->node_mem_map; #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) if (page_to_pfn(mem_map) != pgdat->node_start_pfn) From 18b3e79112ae6fae8b0d88f01b5af61cbe6a7eff Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 30 May 2020 21:19:52 +0800 Subject: [PATCH 03/34] kernel: bump 4.14 to 4.14.182 Refreshed all patches. Signed-off-by: CN_SZTL --- include/kernel-version.mk | 4 ++-- target/linux/ramips/patches-4.14/0200-linkit_bootstrap.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 7ad265a6e6..d254addc4f 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,11 +7,11 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-4.9 = .225 -LINUX_VERSION-4.14 = .181 +LINUX_VERSION-4.14 = .182 LINUX_VERSION-4.19 = .124 LINUX_KERNEL_HASH-4.9.225 = e547748c548b0f55f665bc78cfec322e7b96f41527b5e4b5d79430fdaa57c3e8 -LINUX_KERNEL_HASH-4.14.181 = ab9bea577cfe59fb2f502ce4d6130bfb49163ef969364adc3d36a65721d64a4d +LINUX_KERNEL_HASH-4.14.182 = 671d1f1d5ad0ae74fb21ee70a5544400e7d6270098d3f8b134484ded2c3e5b90 LINUX_KERNEL_HASH-4.19.124 = d5d9001879d7a77309dca203656490326d26b068b7b0b9d8003548dba8fdad00 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/ramips/patches-4.14/0200-linkit_bootstrap.patch b/target/linux/ramips/patches-4.14/0200-linkit_bootstrap.patch index cd1462fbcf..865ae79f43 100644 --- a/target/linux/ramips/patches-4.14/0200-linkit_bootstrap.patch +++ b/target/linux/ramips/patches-4.14/0200-linkit_bootstrap.patch @@ -1,6 +1,6 @@ --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile -@@ -56,6 +56,7 @@ obj-$(CONFIG_CXL_BASE) += cxl/ +@@ -57,6 +57,7 @@ obj-$(CONFIG_CXL_BASE) += cxl/ obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o From d46a0e75652337e9e30da57910f9f759009b0235 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 30 May 2020 21:51:54 +0800 Subject: [PATCH 04/34] kernel: bump 4.19 to 4.19.125 Refreshed all patches. Signed-off-by: CN_SZTL --- include/kernel-version.mk | 4 ++-- ...hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index d254addc4f..19c5b04977 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -8,11 +8,11 @@ endif LINUX_VERSION-4.9 = .225 LINUX_VERSION-4.14 = .182 -LINUX_VERSION-4.19 = .124 +LINUX_VERSION-4.19 = .125 LINUX_KERNEL_HASH-4.9.225 = e547748c548b0f55f665bc78cfec322e7b96f41527b5e4b5d79430fdaa57c3e8 LINUX_KERNEL_HASH-4.14.182 = 671d1f1d5ad0ae74fb21ee70a5544400e7d6270098d3f8b134484ded2c3e5b90 -LINUX_KERNEL_HASH-4.19.124 = d5d9001879d7a77309dca203656490326d26b068b7b0b9d8003548dba8fdad00 +LINUX_KERNEL_HASH-4.19.125 = 9843f40efb37491770688810d153d0779daed8eb097773a0de5abf2cb0d1bd7e remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 465697b912..2839cdb9d6 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1197,6 +1200,9 @@ +@@ -1202,6 +1205,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -175,6 +176,7 @@ static const struct hid_device_id hid_qu +@@ -176,6 +177,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, From 85930b7659d4080c7a6692e0e4ea12bcf31084d8 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 30 May 2020 22:51:38 +0800 Subject: [PATCH 05/34] luci-app-clash: fix typo --- package/ntlf9t/luci-app-clash/luasrc/controller/clash.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/ntlf9t/luci-app-clash/luasrc/controller/clash.lua b/package/ntlf9t/luci-app-clash/luasrc/controller/clash.lua index 85cce4b312..0d1b042521 100644 --- a/package/ntlf9t/luci-app-clash/luasrc/controller/clash.lua +++ b/package/ntlf9t/luci-app-clash/luasrc/controller/clash.lua @@ -13,7 +13,7 @@ function index() local page = entry({"admin", "services", "clash"},alias("admin", "services", "clash", "overview"), _("Clash"), 5) page.dependent = true - page.acl_depends = { "luci-app-oclash" } + page.acl_depends = { "luci-app-clash" } entry({"admin", "services", "clash", "overview"},cbi("clash/overview"),_("Overview"), 10).leaf = true entry({"admin", "services", "clash", "client"},cbi("clash/client"),_("Client"), 20).leaf = true From 6d5988aa157ee1e65821ddb9aa639cf440029567 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 31 May 2020 08:55:19 +0800 Subject: [PATCH 06/34] autocore: add raspberrypi support --- package/lean/autocore/Makefile | 37 +- .../files/raspberrypi/090-cover-index_htm | 5 + .../lean/autocore/files/raspberrypi/index.htm | 818 ++++++++++++++++++ .../autocore/files/raspberrypi/sbin/cpuinfo | 11 + .../lean/autocore/files/{ => x86}/autocore | 0 .../lean/autocore/files/{ => x86}/index.htm | 0 .../autocore/files/{ => x86}/sbin/cpuinfo | 0 .../autocore/files/{ => x86}/sbin/ethinfo | 0 .../lean/autocore/files/{ => x86}/sbin/getcpu | 0 9 files changed, 862 insertions(+), 9 deletions(-) create mode 100755 package/lean/autocore/files/raspberrypi/090-cover-index_htm create mode 100644 package/lean/autocore/files/raspberrypi/index.htm create mode 100755 package/lean/autocore/files/raspberrypi/sbin/cpuinfo rename package/lean/autocore/files/{ => x86}/autocore (100%) rename package/lean/autocore/files/{ => x86}/index.htm (100%) rename package/lean/autocore/files/{ => x86}/sbin/cpuinfo (100%) rename package/lean/autocore/files/{ => x86}/sbin/ethinfo (100%) rename package/lean/autocore/files/{ => x86}/sbin/getcpu (100%) diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index 36023155c3..952848b12d 100644 --- a/package/lean/autocore/Makefile +++ b/package/lean/autocore/Makefile @@ -9,31 +9,50 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autocore PKG_VERSION:=1 -PKG_RELEASE:=31 +PKG_RELEASE:=32 include $(INCLUDE_DIR)/package.mk -define Package/autocore +define Package/autocore-raspberrypi + TITLE:=RaspberryPi auto core loadbalance script. + MAINTAINER:=CN_SZTL + DEPENDS:=@TARGET_bcm27xx +endef + +define Package/autocore-x86 TITLE:=x86/x64 auto core loadbalance script. MAINTAINER:=Lean DEPENDS:=@TARGET_x86 +bc +lm-sensors +ethtool endef define Package/autocore/description -A usb autoconfig hotplug script. + A usb autoconfig hotplug script. endef +Package/autocore-x86/description = $(call Package/autocore/description) +Package/autocore-raspberrypi/description = $(call Package/autocore/description) + define Build/Compile endef -define Package/autocore/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/autocore $(1)/etc/init.d/autocore +define Package/autocore-raspberrypi/install $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/index.htm $(1)/etc/index.htm + $(INSTALL_DATA) ./files/raspberrypi/index.htm $(1)/etc/index.htm + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/raspberrypi/090-cover-index_htm $(1)/etc/uci-defaults/090-cover-index_htm $(INSTALL_DIR) $(1)/sbin - $(CP) ./files/sbin/* $(1)/sbin + $(CP) ./files/raspberrypi/sbin/* $(1)/sbin endef -$(eval $(call BuildPackage,autocore)) +define Package/autocore-x86/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/x86/autocore $(1)/etc/init.d/autocore + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/x86/index.htm $(1)/etc/index.htm + $(INSTALL_DIR) $(1)/sbin + $(CP) ./files/x86/sbin/* $(1)/sbin +endef + +$(eval $(call BuildPackage,autocore-raspberrypi)) +$(eval $(call BuildPackage,autocore-x86)) diff --git a/package/lean/autocore/files/raspberrypi/090-cover-index_htm b/package/lean/autocore/files/raspberrypi/090-cover-index_htm new file mode 100755 index 0000000000..9aee5eb548 --- /dev/null +++ b/package/lean/autocore/files/raspberrypi/090-cover-index_htm @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -f /etc/index.htm ] && mv /etc/index.htm /usr/lib/lua/luci/view/admin_status/index.htm + +exit 0 diff --git a/package/lean/autocore/files/raspberrypi/index.htm b/package/lean/autocore/files/raspberrypi/index.htm new file mode 100644 index 0000000000..746926885e --- /dev/null +++ b/package/lean/autocore/files/raspberrypi/index.htm @@ -0,0 +1,818 @@ +<%# + Copyright 2008 Steven Barth + Copyright 2008-2011 Jo-Philipp Wich + Licensed to the public under the Apache License 2.0. +-%> + +<% + local fs = require "nixio.fs" + local util = require "luci.util" + local stat = require "luci.tools.status" + local ver = require "luci.version" + + local has_ipv6 = fs.access("/usr/sbin/ip6tables") + local has_dhcp = fs.access("/etc/config/dhcp") + local has_wifi = ((fs.stat("/etc/config/wireless", "size") or 0) > 0) + + local sysinfo = luci.util.ubus("system", "info") or { } + local boardinfo = luci.util.ubus("system", "board") or { } + local unameinfo = nixio.uname() or { } + + local meminfo = sysinfo.memory or { + total = 0, + free = 0, + buffered = 0, + shared = 0 + } + + local mem_cached = luci.sys.exec("sed -e '/^Cached: /!d; s#Cached: *##; s# kB##g' /proc/meminfo") + + local swapinfo = sysinfo.swap or { + total = 0, + free = 0 + } + + local has_dsl = fs.access("/etc/init.d/dsl_control") + + if luci.http.formvalue("status") == "1" then + local ntm = require "luci.model.network".init() + local wan = ntm:get_wannet() + local wan6 = ntm:get_wan6net() + + local conn_count = tonumber( + fs.readfile("/proc/sys/net/netfilter/nf_conntrack_count") or "") or 0 + + local conn_max = tonumber(luci.sys.exec( + "sysctl -n -e net.nf_conntrack_max net.ipv4.netfilter.ip_conntrack_max" + ):match("%d+")) or 4096 + + local user_info = luci.sys.exec("cat /proc/net/arp | grep 'br-lan' | grep '0x2' | wc -l") + + local cpu_usage = (luci.sys.exec("expr 100 - $(top -n 1 | grep 'CPU:' | awk -F '%' '{print$4}' | awk -F ' ' '{print$2}')") or "6") .. "%" + + local cpu_info = luci.sys.exec("cpuinfo") + + local rv = { + cpuusage = cpu_usage, + cpuinfo = cpu_info, + userinfo = user_info, + systemp = sys_temp, + uptime = sysinfo.uptime or 0, + localtime = os.date(), + loadavg = sysinfo.load or { 0, 0, 0 }, + memory = meminfo, + memcached = mem_cached, + swap = swapinfo, + connmax = conn_max, + conncount = conn_count, + leases = stat.dhcp_leases(), + leases6 = stat.dhcp6_leases(), + wifinets = stat.wifi_networks() + } + + if wan then + rv.wan = { + ipaddr = wan:ipaddr(), + gwaddr = wan:gwaddr(), + netmask = wan:netmask(), + dns = wan:dnsaddrs(), + expires = wan:expires(), + uptime = wan:uptime(), + proto = wan:proto(), + ifname = wan:ifname(), + link = wan:adminlink() + } + end + + if wan6 then + rv.wan6 = { + ip6addr = wan6:ip6addr(), + gw6addr = wan6:gw6addr(), + dns = wan6:dns6addrs(), + ip6prefix = wan6:ip6prefix(), + uptime = wan6:uptime(), + proto = wan6:proto(), + ifname = wan6:ifname(), + link = wan6:adminlink() + } + end + + if has_dsl then + local dsl_stat = luci.sys.exec("/etc/init.d/dsl_control lucistat") + local dsl_func = loadstring(dsl_stat) + if dsl_func then + rv.dsl = dsl_func() + end + end + + luci.http.prepare_content("application/json") + luci.http.write_json(rv) + + return + elseif luci.http.formvalue("hosts") == "1" then + luci.http.prepare_content("application/json") + luci.http.write_json(luci.sys.net.host_hints()) + + return + end +-%> + +<%+header%> + + + + +

<%:Status%>

+ +
+ <%:System%> + + + + + + + + + + + + +
<%:Hostname%><%=luci.sys.hostname() or "?"%>
<%:Model%><%=pcdata(boardinfo.model or "?")%> <%=luci.sys.exec("cat /etc/bench.log") or " "%>
<%:Architecture%><%=pcdata(boardinfo.system or "ARMv8 Processor")%> x <%=luci.sys.exec("cat /proc/cpuinfo | grep 'processor' | wc -l") or "1"%>
<%:CPU Info%>-
<%:Firmware Version%> + <%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> +
<%:Kernel Version%><%=unameinfo.release or "?"%>
<%:Local Time%>-
<%:Uptime%>-
<%:Load Average%>-
<%:CPU usage (%)%>-
+
+ +
+ <%:Memory%> + + + + +
<%:Total Available%>-
<%:Buffered%>-
+
+ +<% if swapinfo.total > 0 then %> +
+ <%:Swap%> + + + + +
<%:Total Available%>-
<%:Free%>-
+
+<% end %> + +
+ <%:Network%> + + + + <% if has_ipv6 then %> + + <% end %> + + +
<%:IPv4 WAN Status%> + + + +

?
<%:Collecting data...%>
+
<%:IPv6 WAN Status%> + + + +

?
<%:Collecting data...%>
+
<%:Online Users%>0
<%:Active Connections%>-
+
+ +<% if has_dhcp then %> +
+ <%:DHCP Leases%> + + + + + + + + + + + +
<%:Hostname%><%:IPv4-Address%><%:MAC-Address%><%:Leasetime remaining%>

<%:Collecting data...%>
+
+ +<% if has_ipv6 then %> + +<% end %> +<% end %> + +<% if has_dsl then %> +
+ <%:DSL%> + + +
<%:DSL Status%> + + + +

?
<%:Collecting data...%>
+
+
+<% end %> + +<% if has_wifi then %> +
+ <%:Wireless%> + + + +
<%:Collecting data...%>
+
+<% end %> + +<%+footer%> diff --git a/package/lean/autocore/files/raspberrypi/sbin/cpuinfo b/package/lean/autocore/files/raspberrypi/sbin/cpuinfo new file mode 100755 index 0000000000..3456ad6a14 --- /dev/null +++ b/package/lean/autocore/files/raspberrypi/sbin/cpuinfo @@ -0,0 +1,11 @@ +#!/bin/sh + +if command -v vcgencmd >/dev/null; then + cpu_freq="$(vcgencmd get_config arm_freq | awk -F '=' '{print $2}')Mhz" + sys_temp="$(vcgencmd measure_temp | grep -Eo '[0-9.]+')°C" +else + cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) / 1000)Mhz" + sys_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C" +fi + +echo -n "${cpu_freq} | ${sys_temp}" diff --git a/package/lean/autocore/files/autocore b/package/lean/autocore/files/x86/autocore similarity index 100% rename from package/lean/autocore/files/autocore rename to package/lean/autocore/files/x86/autocore diff --git a/package/lean/autocore/files/index.htm b/package/lean/autocore/files/x86/index.htm similarity index 100% rename from package/lean/autocore/files/index.htm rename to package/lean/autocore/files/x86/index.htm diff --git a/package/lean/autocore/files/sbin/cpuinfo b/package/lean/autocore/files/x86/sbin/cpuinfo similarity index 100% rename from package/lean/autocore/files/sbin/cpuinfo rename to package/lean/autocore/files/x86/sbin/cpuinfo diff --git a/package/lean/autocore/files/sbin/ethinfo b/package/lean/autocore/files/x86/sbin/ethinfo similarity index 100% rename from package/lean/autocore/files/sbin/ethinfo rename to package/lean/autocore/files/x86/sbin/ethinfo diff --git a/package/lean/autocore/files/sbin/getcpu b/package/lean/autocore/files/x86/sbin/getcpu similarity index 100% rename from package/lean/autocore/files/sbin/getcpu rename to package/lean/autocore/files/x86/sbin/getcpu From f69592eaf039a4be8225c09641676708d4574874 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 31 May 2020 08:58:09 +0800 Subject: [PATCH 07/34] target/x86|bcm27xx: adjust default packages --- target/linux/bcm27xx/Makefile | 3 ++- target/linux/x86/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/bcm27xx/Makefile b/target/linux/bcm27xx/Makefile index f554f84936..a528dd7020 100644 --- a/target/linux/bcm27xx/Makefile +++ b/target/linux/bcm27xx/Makefile @@ -27,7 +27,8 @@ DEFAULT_PACKAGES += \ kmod-usb-hid \ kmod-sound-core kmod-sound-arm-bcm2835 \ kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \ - partx-utils mkf2fs e2fsprogs + partx-utils mkf2fs e2fsprogs \ + htop autocore-raspberrypi KERNELNAME:=Image dtbs diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile index 5599d02f43..8d35286d4a 100644 --- a/target/linux/x86/Makefile +++ b/target/linux/x86/Makefile @@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += partx-utils mkf2fs fdisk e2fsprogs wpad kmod-usb-hid \ kmod-ath5k kmod-ath9k kmod-ath9k-htc kmod-ath10k kmod-rt2800-usb kmod-e1000e kmod-igb kmod-igbvf kmod-ixgbe kmod-pcnet32 kmod-tulip kmod-vmxnet3 kmod-i40e kmod-i40evf kmod-r8125 kmod-8139cp kmod-8139too kmod-fs-f2fs \ -htop lm-sensors autocore automount autosamba luci-app-ipsec-vpnd luci-proto-bonding luci-app-unblockmusic luci-app-zerotier luci-app-xlnetacc ddns-scripts_aliyun ddns-scripts_dnspod ca-certificates \ +htop lm-sensors autocore-x86 automount autosamba luci-app-ipsec-vpnd luci-proto-bonding luci-app-unblockmusic luci-app-zerotier luci-app-xlnetacc ddns-scripts_aliyun ddns-scripts_dnspod ca-certificates \ luci-app-airplay2 luci-app-music-remote-center luci-app-qbittorrent luci-app-amule luci-app-openvpn-server \ ath10k-firmware-qca988x ath10k-firmware-qca9888 ath10k-firmware-qca9984 brcmfmac-firmware-43602a1-pcie \ kmod-sound-hda-core kmod-sound-hda-codec-realtek kmod-sound-hda-codec-via kmod-sound-via82xx kmod-sound-hda-intel kmod-sound-hda-codec-hdmi kmod-sound-i8x0 kmod-usb-audio \ From 297a116933a3e51e305fa5a3943a663b78b26455 Mon Sep 17 00:00:00 2001 From: R3pl4c3r <30682790+R3pl4c3r@users.noreply.github.com> Date: Sun, 31 May 2020 10:43:37 +0800 Subject: [PATCH 08/34] luci-app-docker: rename dockerman (#4704) --- .../Makefile | 0 .../luasrc/controller/docker.lua | 0 .../luasrc/model/cbi/docker.lua | 0 .../luasrc/view/docker/docker_status.htm | 0 .../po/zh-cn/docker.po | 0 .../root/etc/config/dockerd | 0 .../root/etc/docker-init | 0 .../root/etc/docker-web | 0 .../root/etc/init.d/dockerd | 0 .../root/etc/uci-defaults/docker | 0 .../root/www/DockerReadme.pdf | Bin 11 files changed, 0 insertions(+), 0 deletions(-) rename package/lean/{luci-app-dockerman => luci-app-docker}/Makefile (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/luasrc/controller/docker.lua (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/luasrc/model/cbi/docker.lua (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/luasrc/view/docker/docker_status.htm (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/po/zh-cn/docker.po (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/root/etc/config/dockerd (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/root/etc/docker-init (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/root/etc/docker-web (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/root/etc/init.d/dockerd (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/root/etc/uci-defaults/docker (100%) rename package/lean/{luci-app-dockerman => luci-app-docker}/root/www/DockerReadme.pdf (100%) diff --git a/package/lean/luci-app-dockerman/Makefile b/package/lean/luci-app-docker/Makefile similarity index 100% rename from package/lean/luci-app-dockerman/Makefile rename to package/lean/luci-app-docker/Makefile diff --git a/package/lean/luci-app-dockerman/luasrc/controller/docker.lua b/package/lean/luci-app-docker/luasrc/controller/docker.lua similarity index 100% rename from package/lean/luci-app-dockerman/luasrc/controller/docker.lua rename to package/lean/luci-app-docker/luasrc/controller/docker.lua diff --git a/package/lean/luci-app-dockerman/luasrc/model/cbi/docker.lua b/package/lean/luci-app-docker/luasrc/model/cbi/docker.lua similarity index 100% rename from package/lean/luci-app-dockerman/luasrc/model/cbi/docker.lua rename to package/lean/luci-app-docker/luasrc/model/cbi/docker.lua diff --git a/package/lean/luci-app-dockerman/luasrc/view/docker/docker_status.htm b/package/lean/luci-app-docker/luasrc/view/docker/docker_status.htm similarity index 100% rename from package/lean/luci-app-dockerman/luasrc/view/docker/docker_status.htm rename to package/lean/luci-app-docker/luasrc/view/docker/docker_status.htm diff --git a/package/lean/luci-app-dockerman/po/zh-cn/docker.po b/package/lean/luci-app-docker/po/zh-cn/docker.po similarity index 100% rename from package/lean/luci-app-dockerman/po/zh-cn/docker.po rename to package/lean/luci-app-docker/po/zh-cn/docker.po diff --git a/package/lean/luci-app-dockerman/root/etc/config/dockerd b/package/lean/luci-app-docker/root/etc/config/dockerd similarity index 100% rename from package/lean/luci-app-dockerman/root/etc/config/dockerd rename to package/lean/luci-app-docker/root/etc/config/dockerd diff --git a/package/lean/luci-app-dockerman/root/etc/docker-init b/package/lean/luci-app-docker/root/etc/docker-init similarity index 100% rename from package/lean/luci-app-dockerman/root/etc/docker-init rename to package/lean/luci-app-docker/root/etc/docker-init diff --git a/package/lean/luci-app-dockerman/root/etc/docker-web b/package/lean/luci-app-docker/root/etc/docker-web similarity index 100% rename from package/lean/luci-app-dockerman/root/etc/docker-web rename to package/lean/luci-app-docker/root/etc/docker-web diff --git a/package/lean/luci-app-dockerman/root/etc/init.d/dockerd b/package/lean/luci-app-docker/root/etc/init.d/dockerd similarity index 100% rename from package/lean/luci-app-dockerman/root/etc/init.d/dockerd rename to package/lean/luci-app-docker/root/etc/init.d/dockerd diff --git a/package/lean/luci-app-dockerman/root/etc/uci-defaults/docker b/package/lean/luci-app-docker/root/etc/uci-defaults/docker similarity index 100% rename from package/lean/luci-app-dockerman/root/etc/uci-defaults/docker rename to package/lean/luci-app-docker/root/etc/uci-defaults/docker diff --git a/package/lean/luci-app-dockerman/root/www/DockerReadme.pdf b/package/lean/luci-app-docker/root/www/DockerReadme.pdf similarity index 100% rename from package/lean/luci-app-dockerman/root/www/DockerReadme.pdf rename to package/lean/luci-app-docker/root/www/DockerReadme.pdf From ef2ebeeec4f91abd7457968c0767ab561e21f38f Mon Sep 17 00:00:00 2001 From: Kuma Date: Sun, 31 May 2020 10:45:33 +0800 Subject: [PATCH 09/34] Update UnblockNeteaseMusicGo server.crt (#4697) --- .../UnblockNeteaseMusicGo/files/server.crt | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/package/lean/UnblockNeteaseMusicGo/files/server.crt b/package/lean/UnblockNeteaseMusicGo/files/server.crt index b58111aee7..b9025514d2 100644 --- a/package/lean/UnblockNeteaseMusicGo/files/server.crt +++ b/package/lean/UnblockNeteaseMusicGo/files/server.crt @@ -1,8 +1,8 @@ -----BEGIN CERTIFICATE----- -MIIDfTCCAmWgAwIBAgIJAKTlW9B59i1HMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV +MIIDkjCCAnqgAwIBAgIJAK/bIUIlE36LMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV BAYTAkNOMSQwIgYDVQQDDBtVbmJsb2NrTmV0ZWFzZU11c2ljIFJvb3QgQ0ExHTAb -BgNVBAoMFEdpdEh1Yi5jb20gQG5vbmRhbmVlMB4XDTE5MDUxODE2MDYxOFoXDTIw -MDUxNzE2MDYxOFowezELMAkGA1UEBhMCQ04xETAPBgNVBAcMCEhhbmd6aG91MSww +BgNVBAoMFEdpdEh1Yi5jb20gQG5vbmRhbmVlMB4XDTIwMDUxNjE3MTIxM1oXDTIx +MDUxNjE3MTIxM1owezELMAkGA1UEBhMCQ04xETAPBgNVBAcMCEhhbmd6aG91MSww KgYDVQQKDCNOZXRFYXNlIChIYW5nemhvdSkgTmV0d29yayBDby4sIEx0ZDERMA8G A1UECwwISVQgRGVwdC4xGDAWBgNVBAMMDyoubXVzaWMuMTYzLmNvbTCCASIwDQYJ KoZIhvcNAQEBBQADggEPADCCAQoCggEBALobECypwEoe8VqM/FJvBRR3p2T+ZWdi @@ -10,12 +10,13 @@ MSPrwfiRJr5p7OMtWBlLveCBV85+R3feidYbQTXlvVTdToY+GN6mFE1x6zG2dvLD s4UuRnipmvGcFYhIRTX8J4AJiN8VMtW0TNXscRMudpz/FAVtsRrggRaThYg4f/rI oAPMqKMsS4JoYhxs9ED6E6/tpj3XmSg1ekaXhgacYSYHeyxizZwoOFVCLH3TG5sF sD6CYNnukYol8bR+VRpvHftIYss5Yz+DyyhYEAMJm1CfQo+xoGR3D0ozbT3hUnzm -fEoOhmSp3sALrFVE4iJSuajoh2/3xhmcyi3xZdWyq4F8hpb+URyaoW0CAwEAAaMt -MCswKQYDVR0RBCIwIIINbXVzaWMuMTYzLmNvbYIPKi5tdXNpYy4xNjMuY29tMA0G -CSqGSIb3DQEBCwUAA4IBAQB32SVz5jHUYv3ZG7SNF/LFJ904/LI8QlTe9R+Abb9z -bpXmQeo4pvNNOk3LgcTyuSIPQSHEFn32hk/MedB6Q2cKaGVKQq7Usne1jsV0JirG -wMx3PTcKPnX+XexRY8s6v6cNKSx5YlMQNFeH7p8MgKqdM/UX/dNCxT04X/ClmP1K -/rKqonXn4i3wmWprl7Q7Z1wqt0ygQRkNJKqdYKTu4oQcPON8/dRcseYdJzSoK2/G -H6cOJwKrRLzuUqQlphe6wyUsyTIbIJiFu1a1Gml6zB4lhLZhL89H2lYwdS8wWlc+ -M+wYi+XTM/ylNHEIoKsOe2nscnwi/hTfHJOPPchHbEuM +fEoOhmSp3sALrFVE4iJSuajoh2/3xhmcyi3xZdWyq4F8hpb+URyaoW0CAwEAAaNC +MEAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwKQYDVR0RBCIwIIINbXVzaWMuMTYzLmNv +bYIPKi5tdXNpYy4xNjMuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQB+zW0o1169aGQI +7GA/8BQ769svpkpdy/lfvkokapFjzoxLTBQhjMo9rqzmGOwr9ksePwQqSDXn685W +mKnEl0CzhBrKnL5x3gHus8bg591xpW+01xAFXSyLITOfMJqMEdY7ylymkm0XZ3aN +vm+yFdP1fr/bZNw6Wrprg3i7eGhj7TdBXRA96usVgBcnCkC1SzEZfnDZsKl9o8Xx +TSOpvzIMSaD7++Bp7BdzA5oCCydv2c++zV/sgCPIr26Jq8UQac+qQP5SMlYyGbAl +vIQRRZyfQ4fPonYDnEPHWFCMyBkQIN39LMhDRsUgn8bT0rnP91xkNAd9S4VWbNDA +5TMiQy3F -----END CERTIFICATE----- From 4476de3bb7718e32e8d3d5416c070f62a1cb1c2e Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 31 May 2020 09:20:23 +0800 Subject: [PATCH 10/34] autocore-raspberrypi: show CPU info in Architecture --- package/lean/autocore/Makefile | 2 +- package/lean/autocore/files/raspberrypi/index.htm | 11 ++--------- package/lean/autocore/files/raspberrypi/sbin/cpuinfo | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index 952848b12d..49a7444df4 100644 --- a/package/lean/autocore/Makefile +++ b/package/lean/autocore/Makefile @@ -17,7 +17,7 @@ include $(INCLUDE_DIR)/package.mk define Package/autocore-raspberrypi TITLE:=RaspberryPi auto core loadbalance script. MAINTAINER:=CN_SZTL - DEPENDS:=@TARGET_bcm27xx + DEPENDS:=@TARGET_bcm27xx +bcm27xx-userland endef define Package/autocore-x86 diff --git a/package/lean/autocore/files/raspberrypi/index.htm b/package/lean/autocore/files/raspberrypi/index.htm index 746926885e..f77f4ed44f 100644 --- a/package/lean/autocore/files/raspberrypi/index.htm +++ b/package/lean/autocore/files/raspberrypi/index.htm @@ -50,11 +50,8 @@ local cpu_usage = (luci.sys.exec("expr 100 - $(top -n 1 | grep 'CPU:' | awk -F '%' '{print$4}' | awk -F ' ' '{print$2}')") or "6") .. "%" - local cpu_info = luci.sys.exec("cpuinfo") - local rv = { cpuusage = cpu_usage, - cpuinfo = cpu_info, userinfo = user_info, systemp = sys_temp, uptime = sysinfo.uptime or 0, @@ -648,9 +645,6 @@ if (e = document.getElementById('cpuusage')) e.innerHTML = info.cpuusage; - if (e = document.getElementById('cpuinfo')) - e.innerHTML = info.cpuinfo; - if (e = document.getElementById('loadavg')) e.innerHTML = String.format( '%.02f, %.02f, %.02f', @@ -697,9 +691,8 @@ - - - + +
<%:Hostname%><%=luci.sys.hostname() or "?"%>
<%:Model%><%=pcdata(boardinfo.model or "?")%> <%=luci.sys.exec("cat /etc/bench.log") or " "%>
<%:Architecture%><%=pcdata(boardinfo.system or "ARMv8 Processor")%> x <%=luci.sys.exec("cat /proc/cpuinfo | grep 'processor' | wc -l") or "1"%>
<%:CPU Info%>-
<%:Model%><%=pcdata(boardinfo.model or "?")%> <%=luci.sys.exec("cat /etc/bench.log") or ""%>
<%:Architecture%><%=pcdata(boardinfo.system or "ARMv8 Processor")%> x <%=luci.sys.exec("cat /proc/cpuinfo | grep 'processor' | wc -l") or "1"%> <%=luci.sys.exec("cpuinfo") or ""%>
<%:Firmware Version%> <%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> diff --git a/package/lean/autocore/files/raspberrypi/sbin/cpuinfo b/package/lean/autocore/files/raspberrypi/sbin/cpuinfo index 3456ad6a14..c79f937869 100755 --- a/package/lean/autocore/files/raspberrypi/sbin/cpuinfo +++ b/package/lean/autocore/files/raspberrypi/sbin/cpuinfo @@ -8,4 +8,4 @@ else sys_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C" fi -echo -n "${cpu_freq} | ${sys_temp}" +echo -n "(${cpu_freq}, ${sys_temp})" From 7daa7bd280f41b913a476cb29d2282a0602f5b05 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 31 May 2020 13:31:52 +0800 Subject: [PATCH 11/34] target/bcm27xx: enable audio by default --- target/linux/bcm27xx/image/config.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target/linux/bcm27xx/image/config.txt b/target/linux/bcm27xx/image/config.txt index f8ca1bf2d4..73d2a7d7ea 100644 --- a/target/linux/bcm27xx/image/config.txt +++ b/target/linux/bcm27xx/image/config.txt @@ -10,5 +10,14 @@ # OpenWrt config include distroconfig.txt +[pi2] +dtparam=i2c_arm=on,audio=on + +[pi3] +dtparam=i2c_arm=on,audio=on + +[pi4] +dtparam=i2c_arm=on,audio=on + [all] # Place your custom settings here. From 6bc29f9596b40bb9c3474555225e17d3a46d635e Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 31 May 2020 13:50:02 +0800 Subject: [PATCH 12/34] generic: 4.19: add missing config --- target/linux/generic/config-4.19 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19 index 7a8d9754ad..ecc1029638 100644 --- a/target/linux/generic/config-4.19 +++ b/target/linux/generic/config-4.19 @@ -286,6 +286,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARC_IRQ_NO_AUTOSAVE is not set # CONFIG_ARM64_ERRATUM_1024718 is not set # CONFIG_ARM64_ERRATUM_1463225 is not set +# CONFIG_ARM64_ERRATUM_1542419 is not set # CONFIG_ARM64_ERRATUM_819472 is not set # CONFIG_ARM64_ERRATUM_824069 is not set # CONFIG_ARM64_ERRATUM_826319 is not set From 00196b01d57a19556ff3ea50b96403788a9814da Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 31 May 2020 15:15:44 +0800 Subject: [PATCH 13/34] v2ray: bump to 4.23.2 --- package/lean/v2ray/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/v2ray/Makefile b/package/lean/v2ray/Makefile index 9fcdf9e6f3..0c646882ac 100644 --- a/package/lean/v2ray/Makefile +++ b/package/lean/v2ray/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray -PKG_VERSION:=4.23.1 +PKG_VERSION:=4.23.2 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-core-$(PKG_VERSION) PKG_SOURCE:=v2ray-core-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2ray/v2ray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=474b3aeed069d9867f7603a0544abcc0f31386cef9254423577ab752fc8d4dcc +PKG_HASH:=c4c6d290859d1701fa6198bc7d2f657671ddfb4652356efdc454f48429736f66 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE From 7e07f82b0e7ccca90fb4bb1f23f897cf1a5fab58 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 9 Apr 2020 15:11:44 +0100 Subject: [PATCH 14/34] exfat-utils: add exFAT File System utilities package Signed-off-by: Daniel Golle --- package/utils/exfat-utils/Makefile | 69 ++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 package/utils/exfat-utils/Makefile diff --git a/package/utils/exfat-utils/Makefile b/package/utils/exfat-utils/Makefile new file mode 100644 index 0000000000..ef2b59606d --- /dev/null +++ b/package/utils/exfat-utils/Makefile @@ -0,0 +1,69 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=exfat-utils +PKG_VERSION:=1.0.1 +PKG_RELEASE:=1 + +PKG_LICENSE:=GPL-2.0 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_VERSION)? +PKG_HASH:=7d4e95c3042b58601a581dc02f55eb4a726a2fb8db2e74a9619dbf3083997e06 + +PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +PKG_MAINTAINER:=Daniel Golle + +include $(INCLUDE_DIR)/package.mk + +CONFIGURE_ARGS += \ + --enable-shared \ + --disable-static + +define Package/exfat-utils/Default + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Filesystem + DEPENDS:=+libexfat + URL:=https://github.com/exfat-utils/exfat-utils +endef + +define Package/exfat-mkfs + $(Package/exfat-utils/Default) + TITLE:=Utility for creating an exFAT File System +endef + +define Package/exfat-fsck + $(Package/exfat-utils/Default) + TITLE:=Utility for checking/repairing an exFAT File System +endef + +define Package/libexfat + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Library for exFAT File System tools + DEPENDS:=+libuuid + ABI_VERSION:=1 +endef + +define Package/libexfat/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libexfat.so.* $(1)/usr/lib/ +endef + +define Package/exfat-mkfs/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.exfat $(1)/usr/sbin +endef + +define Package/exfat-fsck/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.exfat $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,libexfat)) +$(eval $(call BuildPackage,exfat-mkfs)) +$(eval $(call BuildPackage,exfat-fsck)) From 7d9f88d92f28b3455820aeb846dfd86f6c40459f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 13 May 2020 20:22:12 +0200 Subject: [PATCH 15/34] tools: add zstd Signed-off-by: Matthias Schiffer --- tools/Makefile | 2 +- tools/zstd/Makefile | 20 ++++++ ...re-portable-header-prefix-usage-1987.patch | 61 +++++++++++++++++++ 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 tools/zstd/Makefile create mode 100644 tools/zstd/patches/0001-build-issue-More-portable-header-prefix-usage-1987.patch diff --git a/tools/Makefile b/tools/Makefile index ea76abd1d7..6f808d26d1 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -34,7 +34,7 @@ tools-$(CONFIG_TARGET_mxs) += elftosb sdimage tools-$(CONFIG_TARGET_ar71xx) += lzma-old tools-$(CONFIG_TARGET_ar71xx)$(CONFIG_TARGET_ath79) += squashfs tools-$(CONFIG_USES_MINOR) += kernel2minor -tools-y += lzma squashfskit4 zip +tools-y += lzma squashfskit4 zip zstd tools-$(BUILD_B43_TOOLS) += b43-tools tools-$(BUILD_ISL) += isl tools-$(CONFIG_USE_SPARSE) += sparse diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile new file mode 100644 index 0000000000..7459725e8e --- /dev/null +++ b/tools/zstd/Makefile @@ -0,0 +1,20 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=zstd +PKG_VERSION:=1.4.4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GITHUB/facebook/zstd/releases/download/v$(PKG_VERSION) +PKG_HASH:=a364f5162c7d1a455cc915e8e3cf5f4bd8b75d09bc0f53965b0c9ca1383c52c8 + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:facebook:zstandard + +HOST_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/host-build.mk + +HOST_MAKE_FLAGS = PREFIX=$(HOST_BUILD_PREFIX) HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0 + +$(eval $(call HostBuild)) diff --git a/tools/zstd/patches/0001-build-issue-More-portable-header-prefix-usage-1987.patch b/tools/zstd/patches/0001-build-issue-More-portable-header-prefix-usage-1987.patch new file mode 100644 index 0000000000..6d743aa385 --- /dev/null +++ b/tools/zstd/patches/0001-build-issue-More-portable-header-prefix-usage-1987.patch @@ -0,0 +1,61 @@ +From 06a57cf57e3c4e887cadcf688e3081154f3f6db4 Mon Sep 17 00:00:00 2001 +Message-Id: <06a57cf57e3c4e887cadcf688e3081154f3f6db4.1589392463.git.mschiffer@universe-factory.net> +From: Bimba Shrestha +Date: Thu, 6 Feb 2020 14:10:51 -0800 +Subject: [PATCH] [build-issue] More portable header prefix usage (#) (#1987) + +* make 4.3 build issue fix + +* Changing header name and adding comment +--- + programs/Makefile | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/programs/Makefile b/programs/Makefile +index b75314a83f43..a9ee3cb5311b 100644 +--- a/programs/Makefile ++++ b/programs/Makefile +@@ -94,9 +94,12 @@ endif + + VOID = /dev/null + ++# Make 4.3 doesn't support '\#' anymore (https://lwn.net/Articles/810071/) ++NUM_SYMBOL := \# ++ + # thread detection + NO_THREAD_MSG := ==> no threads, building without multithreading support +-HAVE_PTHREAD := $(shell printf '\#include \nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c) ++HAVE_PTHREAD := $(shell printf '$(NUM_SYMBOL)include \nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c) + HAVE_THREAD := $(shell [ "$(HAVE_PTHREAD)" -eq "1" -o -n "$(filter Windows%,$(OS))" ] && echo 1 || echo 0) + ifeq ($(HAVE_THREAD), 1) + THREAD_MSG := ==> building with threading support +@@ -108,7 +111,7 @@ endif + + # zlib detection + NO_ZLIB_MSG := ==> no zlib, building zstd without .gz support +-HAVE_ZLIB := $(shell printf '\#include \nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c) ++HAVE_ZLIB := $(shell printf '$(NUM_SYMBOL)include \nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c) + ifeq ($(HAVE_ZLIB), 1) + ZLIB_MSG := ==> building zstd with .gz compression support + ZLIBCPP = -DZSTD_GZCOMPRESS -DZSTD_GZDECOMPRESS +@@ -119,7 +122,7 @@ endif + + # lzma detection + NO_LZMA_MSG := ==> no liblzma, building zstd without .xz/.lzma support +-HAVE_LZMA := $(shell printf '\#include \nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c) ++HAVE_LZMA := $(shell printf '$(NUM_SYMBOL)include \nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c) + ifeq ($(HAVE_LZMA), 1) + LZMA_MSG := ==> building zstd with .xz/.lzma compression support + LZMACPP = -DZSTD_LZMACOMPRESS -DZSTD_LZMADECOMPRESS +@@ -130,7 +133,7 @@ endif + + # lz4 detection + NO_LZ4_MSG := ==> no liblz4, building zstd without .lz4 support +-HAVE_LZ4 := $(shell printf '\#include \n\#include \nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c) ++HAVE_LZ4 := $(shell printf '$(NUM_SYMBOL)include \n\#include \nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c) + ifeq ($(HAVE_LZ4), 1) + LZ4_MSG := ==> building zstd with .lz4 compression support + LZ4CPP = -DZSTD_LZ4COMPRESS -DZSTD_LZ4DECOMPRESS +-- +2.26.2 + From 104faa99da48e055ff8f02b9ddc09c1ae4ddf8b6 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 17 May 2020 13:18:10 +0200 Subject: [PATCH 16/34] build: add zstd support to pack/unpack functions Signed-off-by: Matthias Schiffer --- include/download.mk | 1 + include/unpack.mk | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/download.mk b/include/download.mk index 14d68bf8f5..9c8ada052b 100644 --- a/include/download.mk +++ b/include/download.mk @@ -50,6 +50,7 @@ endef dl_pack/bz2=bzip2 -c > $(1) dl_pack/gz=gzip -nc > $(1) dl_pack/xz=xz -zc -7e > $(1) +dl_pack/zst=zstd -T0 --ultra -20 -c > $(1) dl_pack/unknown=$(error ERROR: Unknown pack format for file $(1)) define dl_pack $(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown)) diff --git a/include/unpack.mk b/include/unpack.mk index 6141b1c722..5bb27d41c9 100644 --- a/include/unpack.mk +++ b/include/unpack.mk @@ -31,6 +31,10 @@ ifeq ($(strip $(UNPACK_CMD)),) EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=)) DECOMPRESS_CMD:=xzcat $(DL_DIR)/$(PKG_SOURCE) | endif + ifeq (zst,$(EXT)) + EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=)) + DECOMPRESS_CMD:=zstdcat $(DL_DIR)/$(PKG_SOURCE) | + endif ifeq ($(filter tgz tbz tbz2 txz,$(EXT1)),$(EXT1)) EXT:=tar endif From 4969d9fde3958edcb88701eb7ec5adb3bc4eb85c Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 13 May 2020 20:33:46 +0200 Subject: [PATCH 17/34] build: compress kernel debuginfo using zstd zstd with its default settings (compression level -3) compresses better than bzip2 -9 (which is the default setting), and is an order of magnitude faster. I made the following measurements for the most common compression tools (all standard Debian Buster versions, default flags unless noted otherwise), using the debug information of a large x86-64 kernel with ALL_KMODS: * kernel-debug.tar: 376M * kernel-debug.tar.gz: 101M, compressed in ~12s * kernel-debug.tar.bz2: 91M, compressed in ~15s * kernel-debug.tar.xz: 57M, compressed in ~101s * kernel-debug.tar.zst: 86M, compressed in ~1s With zstd, there is still some room for improvement by increasing the compression, but the slight increase in compression ratio (22.83% -> 19.46%) does not justify the significant increase in compression time (about 5 times on my machine) in my opinion. Note that multithreaded compression (-T argument) does not affect reproducibility with zstd. Signed-off-by: Matthias Schiffer --- include/kernel-build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/kernel-build.mk b/include/kernel-build.mk index b1d3fc07fd..7108ee10f1 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -70,7 +70,7 @@ ifdef CONFIG_COLLECT_KERNEL_DEBUG $(FIND) $(KERNEL_BUILD_DIR)/debug -type f | $(XARGS) $(KERNEL_CROSS)strip --only-keep-debug $(TAR) c -C $(KERNEL_BUILD_DIR) debug \ $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \ - | bzip2 -c -9 > $(BIN_DIR)/kernel-debug.tar.bz2 + | zstd -T0 -f -o $(BIN_DIR)/kernel-debug.tar.zst endef endif From 50f3cf27efbf45ae4c54d9193d072b7a827eee6f Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 31 May 2020 20:01:05 +0800 Subject: [PATCH 18/34] mtd: sync upstream source code --- package/system/mtd/Makefile | 4 +- package/system/mtd/src/Makefile | 5 +- package/system/mtd/src/fis.c | 26 +---- package/system/mtd/src/fis.h | 2 + package/system/mtd/src/linksys_bootcount.c | 108 +++++++++++++++--- package/system/mtd/src/mtd.c | 54 ++++++++- package/system/mtd/src/mtd.h | 1 + .../system/mtd/src/tpl_ramips_recoveryflag.c | 94 +++++++++++++++ package/system/mtd/src/wrgg.c | 27 +++-- tools/firmware-utils/Makefile | 2 +- tools/firmware-utils/src/mkfwimage.c | 9 ++ tools/firmware-utils/src/tplink-safeloader.c | 39 ++++++- 12 files changed, 310 insertions(+), 61 deletions(-) create mode 100644 package/system/mtd/src/tpl_ramips_recoveryflag.c diff --git a/package/system/mtd/Makefile b/package/system/mtd/Makefile index f31a34a612..166bb33281 100644 --- a/package/system/mtd/Makefile +++ b/package/system/mtd/Makefile @@ -3,13 +3,13 @@ # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. -# +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mtd -PKG_RELEASE:=23 +PKG_RELEASE:=25 PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME) STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS) diff --git a/package/system/mtd/src/Makefile b/package/system/mtd/src/Makefile index b8ba456c41..2812959d21 100644 --- a/package/system/mtd/src/Makefile +++ b/package/system/mtd/src/Makefile @@ -6,12 +6,15 @@ obj = mtd.o jffs2.o crc32.o md5.o obj.seama = seama.o md5.o obj.wrg = wrg.o md5.o obj.wrgg = wrgg.o md5.o +obj.tpl = tpl_ramips_recoveryflag.o obj.ar71xx = trx.o $(obj.seama) $(obj.wrgg) +obj.ath79 = $(obj.seama) +obj.gemini = $(obj.wrgg) obj.brcm = trx.o obj.brcm47xx = $(obj.brcm) obj.bcm53xx = $(obj.brcm) $(obj.seama) obj.brcm63xx = imagetag.o -obj.ramips = $(obj.seama) $(obj.wrg) linksys_bootcount.o +obj.ramips = $(obj.seama) $(obj.tpl) $(obj.wrg) linksys_bootcount.o obj.mvebu = linksys_bootcount.o obj.kirkwood = linksys_bootcount.o obj.ipq806x = linksys_bootcount.o diff --git a/package/system/mtd/src/fis.c b/package/system/mtd/src/fis.c index b50411cfeb..8bde9af6dc 100644 --- a/package/system/mtd/src/fis.c +++ b/package/system/mtd/src/fis.c @@ -139,8 +139,6 @@ done: int fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new) { - struct fis_image_desc *fisdir = NULL; - struct fis_image_desc *redboot = NULL; struct fis_image_desc *first = NULL; struct fis_image_desc *last = NULL; struct fis_image_desc *first_fb = NULL; @@ -164,12 +162,6 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new) if (!desc->hdr.name[0] || (desc->hdr.name[0] == 0xff)) break; - if (!strcmp((char *) desc->hdr.name, "FIS directory")) - fisdir = desc; - - if (!strcmp((char *) desc->hdr.name, "RedBoot")) - redboot = desc; - /* update max offset */ if (offset < desc->hdr.flash_base) offset = desc->hdr.flash_base; @@ -210,18 +202,6 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new) size = offset - first_fb->hdr.flash_base; -#ifdef notyet - desc = first - 1; - if (redboot && (desc >= redboot)) { - if (first->hdr.flash_base - desc->hdr.size > desc->hdr.flash_base) { - int delta = first->hdr.flash_base - desc->hdr.size - desc->hdr.flash_base; - - offset -= delta; - size += delta; - } - } -#endif - last++; desc = first + n_new; offset = first_fb->hdr.flash_base; @@ -243,14 +223,14 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new) memset(desc, 0, sizeof(struct fis_image_desc)); memcpy(desc->hdr.name, part->name, sizeof(desc->hdr.name)); desc->crc.desc = 0; - desc->crc.file = 0; + desc->crc.file = part->crc; desc->hdr.flash_base = offset; desc->hdr.mem_base = part->loadaddr; desc->hdr.entry_point = part->loadaddr; desc->hdr.size = (part->size > 0) ? part->size : size; - desc->hdr.data_length = desc->hdr.size; - + desc->hdr.data_length = (part->length > 0) ? part->length : + desc->hdr.size; offset += desc->hdr.size; size -= desc->hdr.size; } diff --git a/package/system/mtd/src/fis.h b/package/system/mtd/src/fis.h index bdf1103d8a..2be2cb1f04 100644 --- a/package/system/mtd/src/fis.h +++ b/package/system/mtd/src/fis.h @@ -6,6 +6,8 @@ struct fis_part { uint32_t offset; uint32_t loadaddr; uint32_t size; + uint32_t length; + uint32_t crc; }; int fis_validate(struct fis_part *old, int n_old, struct fis_part *new, int n_new); diff --git a/package/system/mtd/src/linksys_bootcount.c b/package/system/mtd/src/linksys_bootcount.c index 500ede4972..bd06728696 100644 --- a/package/system/mtd/src/linksys_bootcount.c +++ b/package/system/mtd/src/linksys_bootcount.c @@ -2,6 +2,7 @@ * Linksys boot counter reset code for mtd * * Copyright (C) 2013 Jonas Gorski + * Portions Copyright (c) 2019, Jeff Kletsky * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License v2 @@ -29,6 +30,7 @@ #include #include #include +#include #include #include @@ -37,6 +39,30 @@ #define BOOTCOUNT_MAGIC 0x20110811 +/* + * EA6350v3, and potentially other NOR-boot devices, + * use an offset increment of 16 between records, + * not mtd_info_user.writesize (often 1 on NOR devices). + */ + +#define BC_OFFSET_INCREMENT_MIN 16 + + + +#define DLOG_OPEN() + +#define DLOG_ERR(...) do { \ + fprintf(stderr, "ERROR: " __VA_ARGS__); fprintf(stderr, "\n"); \ + } while (0) + +#define DLOG_NOTICE(...) do { \ + fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); \ + } while (0) + +#define DLOG_DEBUG(...) + + + struct bootcounter { uint32_t magic; uint32_t count; @@ -50,25 +76,50 @@ int mtd_resetbc(const char *mtd) struct mtd_info_user mtd_info; struct bootcounter *curr = (struct bootcounter *)page; unsigned int i; + unsigned int bc_offset_increment; int last_count = 0; int num_bc; int fd; int ret; + int retval = 0; + + DLOG_OPEN(); fd = mtd_check_open(mtd); if (ioctl(fd, MEMGETINFO, &mtd_info) < 0) { - fprintf(stderr, "failed to get mtd info!\n"); - return -1; + DLOG_ERR("Unable to obtain mtd_info for given partition name."); + + retval = -1; + goto out; } - num_bc = mtd_info.size / mtd_info.writesize; + + /* Detect need to override increment (for EA6350v3) */ + + if (mtd_info.writesize < BC_OFFSET_INCREMENT_MIN) { + + bc_offset_increment = BC_OFFSET_INCREMENT_MIN; + DLOG_DEBUG("Offset increment set to %i for writesize of %i", + bc_offset_increment, mtd_info.writesize); + } else { + + bc_offset_increment = mtd_info.writesize; + } + + num_bc = mtd_info.size / bc_offset_increment; for (i = 0; i < num_bc; i++) { - pread(fd, curr, sizeof(*curr), i * mtd_info.writesize); + pread(fd, curr, sizeof(*curr), i * bc_offset_increment); - if (curr->magic != BOOTCOUNT_MAGIC && curr->magic != 0xffffffff) { - fprintf(stderr, "unexpected magic %08x, bailing out\n", curr->magic); + /* Existing code assumes erase is to 0xff; left as-is (2019) */ + + if (curr->magic != BOOTCOUNT_MAGIC && + curr->magic != 0xffffffff) { + DLOG_ERR("Unexpected magic %08x at offset %08x; aborting.", + curr->magic, i * bc_offset_increment); + + retval = -2; goto out; } @@ -78,38 +129,59 @@ int mtd_resetbc(const char *mtd) last_count = curr->count; } - /* no need to do writes when last boot count is already 0 */ - if (last_count == 0) + + if (last_count == 0) { /* bootcount is already 0 */ + + retval = 0; goto out; + } if (i == num_bc) { + DLOG_NOTICE("Boot-count log full with %i entries; erasing (expected occasionally).", + i); + struct erase_info_user erase_info; erase_info.start = 0; erase_info.length = mtd_info.size; - /* erase block */ ret = ioctl(fd, MEMERASE, &erase_info); if (ret < 0) { - fprintf(stderr, "failed to erase block: %i\n", ret); - return -1; + DLOG_ERR("Failed to erase boot-count log MTD; ioctl() MEMERASE returned %i", + ret); + + retval = -3; + goto out; } i = 0; } - memset(curr, 0xff, mtd_info.writesize); + memset(curr, 0xff, bc_offset_increment); curr->magic = BOOTCOUNT_MAGIC; curr->count = 0; curr->checksum = BOOTCOUNT_MAGIC; - ret = pwrite(fd, curr, mtd_info.writesize, i * mtd_info.writesize); - if (ret < 0) - fprintf(stderr, "failed to write: %i\n", ret); - sync(); + /* Assumes bc_offset_increment is a multiple of mtd_info.writesize */ + + ret = pwrite(fd, curr, bc_offset_increment, i * bc_offset_increment); + if (ret < 0) { + DLOG_ERR("Failed to write boot-count log entry; pwrite() returned %i", + errno); + retval = -4; + goto out; + + } else { + sync(); + + DLOG_NOTICE("Boot count sucessfully reset to zero."); + + retval = 0; + goto out; + } + out: close(fd); - - return 0; + return retval; } diff --git a/package/system/mtd/src/mtd.c b/package/system/mtd/src/mtd.c index fa04c0f95b..9baed3fd5e 100644 --- a/package/system/mtd/src/mtd.c +++ b/package/system/mtd/src/mtd.c @@ -44,6 +44,7 @@ #include #include #include +#include "crc32.h" #include "fis.h" #include "mtd.h" @@ -85,6 +86,7 @@ static char *buf = NULL; static char *imagefile = NULL; static enum mtd_image_format imageformat = MTD_IMAGE_FORMAT_UNKNOWN; static char *jffs2file = NULL, *jffs2dir = JFFS2_DEFAULT_DIR; +static char *tpl_uboot_args_part; static int buflen = 0; int quiet; int no_erase; @@ -472,12 +474,14 @@ mtd_write(int imagefd, const char *mtd, char *fis_layout, size_t part_offset) ssize_t r, w, e; ssize_t skip = 0; uint32_t offset = 0; + int buflen_raw = 0; int jffs2_replaced = 0; int skip_bad_blocks = 0; #ifdef FIS_SUPPORT static struct fis_part new_parts[MAX_ARGS]; static struct fis_part old_parts[MAX_ARGS]; + struct fis_part *cur_part = NULL; int n_new = 0, n_old = 0; if (fis_layout) { @@ -487,6 +491,8 @@ mtd_write(int imagefd, const char *mtd, char *fis_layout, size_t part_offset) memset(&old_parts, 0, sizeof(old_parts)); memset(&new_parts, 0, sizeof(new_parts)); + if (!part_offset) + cur_part = new_parts; do { next = strchr(tmp, ':'); @@ -554,6 +560,17 @@ resume: lseek(fd, part_offset, SEEK_SET); } + /* Write TP-Link recovery flag */ + if (tpl_uboot_args_part && mtd_tpl_recoverflag_write) { + if (quiet < 2) + fprintf(stderr, "Writing recovery flag to %s\n", tpl_uboot_args_part); + result = mtd_tpl_recoverflag_write(tpl_uboot_args_part, true); + if (result < 0) { + fprintf(stderr, "Could not write TP-Link recovery flag to %s: %i", mtd, result); + exit(1); + } + } + indicate_writing(mtd); w = e = 0; @@ -576,6 +593,9 @@ resume: buflen += r; } + if (buflen_raw == 0) + buflen_raw = buflen; + if (buflen == 0) break; @@ -587,6 +607,7 @@ resume: if (skip > 0) { skip -= buflen; + buflen_raw = 0; buflen = 0; if (skip <= 0) indicate_writing(mtd); @@ -610,6 +631,7 @@ resume: w += skip; e += skip; skip -= buflen; + buflen_raw = 0; buflen = 0; offset = 0; continue; @@ -675,6 +697,17 @@ resume: } w += buflen; +#ifdef FIS_SUPPORT + if (cur_part && cur_part->size + && cur_part < &new_parts[MAX_ARGS - 1] + && cur_part->length + buflen_raw > cur_part->size) + cur_part++; + if (cur_part) { + cur_part->length += buflen_raw; + cur_part->crc = crc32(cur_part->crc, buf, buflen_raw); + } +#endif + buflen_raw = 0; buflen = 0; offset = 0; } @@ -716,6 +749,18 @@ resume: #endif close(fd); + + /* Clear TP-Link recovery flag */ + if (tpl_uboot_args_part && mtd_tpl_recoverflag_write) { + if (quiet < 2) + fprintf(stderr, "Removing recovery flag from %s\n", tpl_uboot_args_part); + result = mtd_tpl_recoverflag_write(tpl_uboot_args_part, false); + if (result < 0) { + fprintf(stderr, "Could not clear TP-Link recovery flag to %s: %i", mtd, result); + exit(1); + } + } + return 0; } @@ -771,6 +816,10 @@ static void usage(void) fprintf(stderr, " -c datasize amount of data to be used for checksum calculation (for fixtrx / fixseama / fixwrg / fixwrgg)\n"); } + if (mtd_tpl_recoverflag_write) { + fprintf(stderr, + " -t write TP-Link recovery-flag to (for write)\n"); + } fprintf(stderr, #ifdef FIS_SUPPORT " -F [:[:]][,...]\n" @@ -828,7 +877,7 @@ int main (int argc, char **argv) #ifdef FIS_SUPPORT "F:" #endif - "frnqe:d:s:j:p:o:c:l:")) != -1) + "frnqe:d:s:j:p:o:c:t:l:")) != -1) switch (ch) { case 'f': force = 1; @@ -896,6 +945,9 @@ int main (int argc, char **argv) usage(); } break; + case 't': + tpl_uboot_args_part = optarg; + break; #ifdef FIS_SUPPORT case 'F': fis_layout = optarg; diff --git a/package/system/mtd/src/mtd.h b/package/system/mtd/src/mtd.h index 0250a90e0b..3eda6159c6 100644 --- a/package/system/mtd/src/mtd.h +++ b/package/system/mtd/src/mtd.h @@ -30,4 +30,5 @@ extern int mtd_fixseama(const char *mtd, size_t offset, size_t data_size) __attr extern int mtd_fixwrg(const char *mtd, size_t offset, size_t data_size) __attribute__ ((weak)); extern int mtd_fixwrgg(const char *mtd, size_t offset, size_t data_size) __attribute__ ((weak)); extern int mtd_resetbc(const char *mtd) __attribute__ ((weak)); +extern int mtd_tpl_recoverflag_write(const char *mtd, const bool recovery_active) __attribute__ ((weak)); #endif /* __mtd_h */ diff --git a/package/system/mtd/src/tpl_ramips_recoveryflag.c b/package/system/mtd/src/tpl_ramips_recoveryflag.c new file mode 100644 index 0000000000..3711e01317 --- /dev/null +++ b/package/system/mtd/src/tpl_ramips_recoveryflag.c @@ -0,0 +1,94 @@ +/* + * TP-Link recovery flag set and unset code for ramips target + * + * Copyright (C) 2018 David Bauer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License v2 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "mtd.h" + + +#define TPL_RECOVER_MAGIC 0x89abcdef +#define TPL_NO_RECOVER_MAGIC 0x00000000 + + +struct uboot_args { + uint32_t magic; +}; + +int mtd_tpl_recoverflag_write(const char *mtd, const bool recovery_active) +{ + struct erase_info_user erase_info; + struct uboot_args *args; + uint32_t magic; + int ret = 0; + int fd; + + args = malloc(erasesize); + if (!args) { + fprintf(stderr, "Could not allocate memory!\n"); + return -1; + } + + fd = mtd_check_open(mtd); + if (fd < 0) { + fprintf(stderr, "Could not open mtd device: %s\n", mtd); + ret = -1; + goto out; + } + + /* read first block (containing the magic) */ + pread(fd, args, erasesize, 0); + + /* set magic to desired value */ + magic = TPL_RECOVER_MAGIC; + if (!recovery_active) + magic = TPL_NO_RECOVER_MAGIC; + + /* no need to write when magic is already set correctly */ + if (magic == args->magic) + goto out; + + /* erase first block (containing the magic) */ + erase_info.start = 0; + erase_info.length = erasesize; + + ret = ioctl(fd, MEMERASE, &erase_info); + if (ret < 0) { + fprintf(stderr, "failed to erase block: %i\n", ret); + goto out; + } + + /* write magic to flash */ + args->magic = magic; + + ret = pwrite(fd, args, erasesize, 0); + if (ret < 0) + fprintf(stderr, "failed to write: %i\n", ret); + + sync(); +out: + free(args); + close(fd); + + return ret; +} diff --git a/package/system/mtd/src/wrgg.c b/package/system/mtd/src/wrgg.c index e0b5ca172d..c62f9f5507 100644 --- a/package/system/mtd/src/wrgg.c +++ b/package/system/mtd/src/wrgg.c @@ -39,13 +39,10 @@ #include "wrgg.h" #include "md5.h" -#if __BYTE_ORDER == __BIG_ENDIAN -#define STORE32_LE(X) ((((X) & 0x000000FF) << 24) | (((X) & 0x0000FF00) << 8) | (((X) & 0x00FF0000) >> 8) | (((X) & 0xFF000000) >> 24)) -#elif __BYTE_ORDER == __LITTLE_ENDIAN -#define STORE32_LE(X) (X) -#else -#error unknown endianness! -#endif +static inline uint32_t le32_to_cpu(uint8_t *buf) +{ + return buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24; +} ssize_t pread(int fd, void *buf, size_t count, off_t offset); ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset); @@ -94,7 +91,7 @@ wrgg_fix_md5(struct wrgg03_header *shdr, int fd, size_t data_offset, size_t data } /* update the size in the image */ - shdr->size = htonl(data_size); + shdr->size = data_size; /* update the checksum in the image */ memcpy(shdr->digest, digest, sizeof(digest)); @@ -147,12 +144,14 @@ mtd_fixwrgg(const char *mtd, size_t offset, size_t data_size) } shdr = (struct wrgg03_header *)(first_block + offset); - if (shdr->magic1 != htonl(STORE32_LE(WRGG03_MAGIC))) { - fprintf(stderr, "magic1 %x\n", shdr->magic1); - fprintf(stderr, "htonl(WRGG03_MAGIC) %x\n", WRGG03_MAGIC); + + /* The magic is always stored in little-endian byte order */ + if (le32_to_cpu((uint8_t *)&shdr->magic1) != WRGG03_MAGIC) { + fprintf(stderr, "magic1 = %x\n", shdr->magic1); + fprintf(stderr, "WRGG03_MAGIC = %x\n", WRGG03_MAGIC); fprintf(stderr, "No WRGG header found\n"); exit(1); - } else if (!ntohl(shdr->size)) { + } else if (!shdr->size) { fprintf(stderr, "WRGG entity with empty image\n"); exit(1); } @@ -160,8 +159,8 @@ mtd_fixwrgg(const char *mtd, size_t offset, size_t data_size) data_offset = offset + sizeof(struct wrgg03_header); if (!data_size) data_size = mtdsize - data_offset; - if (data_size > ntohl(shdr->size)) - data_size = ntohl(shdr->size); + if (data_size > shdr->size) + data_size = shdr->size; if (wrgg_fix_md5(shdr, fd, data_offset, data_size)) goto out; diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 97c89eec27..561d6d868f 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -32,7 +32,7 @@ define Host/Compile $(call cc,dgfirmware) $(call cc,mksenaofw md5, -Wall --std=gnu99) $(call cc,trx2usr) - $(call cc,ptgen) + $(call cc,ptgen cyg_crc32) $(call cc,srec2bin) $(call cc,mkmylofw) $(call cc,mkcsysimg) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index 9e6d8f5b9a..ff9011a0c4 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -137,6 +137,15 @@ struct fw_info fw_info[] = { }, .sign = true, }, + { + .name = "XC", + .fw_layout = { + .kern_start = 0x9f050000, + .kern_entry = 0x80002000, + .firmware_max_length= 0x00F60000, + }, + .sign = true, + }, { .name = "ACB-ISP", .fw_layout = { diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 0359c9f614..10178dc714 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -891,7 +891,7 @@ static struct device_info boards[] = { "{product_name:Archer C6,product_ver:2.0.0,special_id:52550000}\r\n" "{product_name:Archer C6,product_ver:2.0.0,special_id:4A500000}\r\n", .support_trail = '\x00', - .soft_ver = "soft_ver:1.1.1\n", + .soft_ver = "soft_ver:1.2.1\n", .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -1021,6 +1021,42 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "file-system", }, + /** Firmware layout for the C60v3 */ + { + .id = "ARCHER-C60-V3", + .vendor = "", + .support_list = + "SupportList:\r\n" + "{product_name:Archer C60,product_ver:3.0.0,special_id:42520000}\r\n" + "{product_name:Archer C60,product_ver:3.0.0,special_id:45550000}\r\n" + "{product_name:Archer C60,product_ver:3.0.0,special_id:55530000}\r\n", + .support_trail = '\x00', + .soft_ver = "soft_ver:3.0.0\n", + + .partitions = { + {"factory-boot", 0x00000, 0x1fb00}, + {"default-mac", 0x1fb00, 0x00200}, + {"pin", 0x1fd00, 0x00100}, + {"product-info", 0x1fe00, 0x00100}, + {"device-id", 0x1ff00, 0x00100}, + {"fs-uboot", 0x20000, 0x10000}, + {"firmware", 0x30000, 0x7a0000}, + {"soft-version", 0x7d9500, 0x00100}, + {"support-list", 0x7d9600, 0x00100}, + {"extra-para", 0x7d9700, 0x00100}, + {"profile", 0x7d9800, 0x03000}, + {"default-config", 0x7dc800, 0x03000}, + {"partition-table", 0x7df800, 0x00800}, + {"user-config", 0x7e0000, 0x0c000}, + {"certificate", 0x7ec000, 0x04000}, + {"radio", 0x7f0000, 0x10000}, + {NULL, 0, 0} + }, + + .first_sysupgrade_partition = "os-image", + .last_sysupgrade_partition = "file-system", + }, + /** Firmware layout for the C5 */ { .id = "ARCHER-C5-V2", @@ -2172,6 +2208,7 @@ static void build_image(const char *output, strcasecmp(info->id, "ARCHER-C25-V1") == 0 || strcasecmp(info->id, "ARCHER-C59-V2") == 0 || strcasecmp(info->id, "ARCHER-C60-V2") == 0 || + strcasecmp(info->id, "ARCHER-C60-V3") == 0 || strcasecmp(info->id, "TLWR1043NV5") == 0) { const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00}; parts[5] = put_data("extra-para", mdat, 11); From 7405352678e87ec8ab6dd809a9cdffa6baea5f9b Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 31 May 2020 20:21:12 +0800 Subject: [PATCH 19/34] build dependencies: add intltool --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91bbc33594..96d0bc6aaa 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Has access to both ChinaNet & Internet ```bash sudo apt-get update -y sudo apt-get full-upgrade -y -sudo apt-get install -y build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libreadline-dev libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint ccache curl wget vim nano python python3 python-pip python3-pip python-ply python3-ply haveged lrzsz device-tree-compiler scons antlr3 gperf ecj fastjar +sudo apt-get install -y build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libreadline-dev libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint ccache curl wget vim nano python python3 python-pip python3-pip python-ply python3-ply haveged lrzsz device-tree-compiler scons antlr3 gperf intltool ``` #### For mainland China & Ubuntu(16.04+) user, you may run the following command to setup quickly: ```bash From 939405f2cc944975d099c9a556bec2889d13ac02 Mon Sep 17 00:00:00 2001 From: Max Zhao Date: Mon, 1 Jun 2020 10:48:20 +0800 Subject: [PATCH 20/34] v2ray: update v2ray-core to 4.23.2 (#4705) --- package/lean/v2ray/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/v2ray/Makefile b/package/lean/v2ray/Makefile index abed0879a1..2250262e3e 100644 --- a/package/lean/v2ray/Makefile +++ b/package/lean/v2ray/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray -PKG_VERSION:=4.23.1 +PKG_VERSION:=4.23.2 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-core-$(PKG_VERSION) PKG_SOURCE:=v2ray-core-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2ray/v2ray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=474b3aeed069d9867f7603a0544abcc0f31386cef9254423577ab752fc8d4dcc +PKG_HASH:=c4c6d290859d1701fa6198bc7d2f657671ddfb4652356efdc454f48429736f66 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE From e2d9339d8cbaa4fead334a37c2430e39db615f9f Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 31 May 2020 12:46:26 +0200 Subject: [PATCH 21/34] ath79: fix LEDs for GL.inet GL-AR150 Since the wireless LED was used for boot and set up with a DT trigger, the WiFi indication hasn't worked on ath79 at all. In addition, a look into the manual revealed that the OEM configuration is as follows: LED 1 (green): power LED 2 (green): configurable LED 3 (red): wireless So, let's just keep the WiFi trigger and convert the rest to its "intended" use. Signed-off-by: Adrian Schmutzler --- .../linux/ath79/dts/ar9330_glinet_gl-ar150.dts | 18 ++++++++++-------- .../generic/base-files/etc/board.d/01_leds | 4 ---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts index 70754c905e..bf9137c54b 100644 --- a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts +++ b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts @@ -12,29 +12,31 @@ aliases { serial0 = &uart; - led-boot = &led_wlan; - led-failsafe = &led_wlan; - led-upgrade = &led_wlan; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; label-mac-device = ð0; }; leds { compatible = "gpio-leds"; - led_wlan: wlan { + wlan { label = "gl-ar150:orange:wlan"; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; - lan { - label = "gl-ar150:green:lan"; + configurable { + label = "gl-ar150:green:configurable"; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; - wan { - label = "gl-ar150:green:wan"; + led_power: power { + label = "gl-ar150:green:power"; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + default-state = "on"; }; }; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 6668e15a74..5ae656f846 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -101,10 +101,6 @@ glinet,6408|\ glinet,6416) ucidef_set_led_netdev "lan" "LAN" "gl-inet:green:lan" "eth0" ;; -glinet,gl-ar150) - ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1" - ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x02" - ;; glinet,gl-ar300m-lite) ucidef_set_led_netdev "lan" "LAN" "gl-ar300m-lite:green:lan" "eth0" ;; From de4bff44f068920cbc9efd0cd887b1b285ccf42f Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Fri, 29 May 2020 21:56:18 +0200 Subject: [PATCH 22/34] ar71xx: fix reset key for TP-Link TL-WR802N V1/V2 During porting support for this router to ath79 target it was discovered that GPIO mapping was incorrect (GPIO11 active high). Correct mapping for both V1 and V2 is GPIO12 active low. Default configuration from GPL source for V2 explicitly states this, and this was confirmed experimentally on ath79 by looking on /sys/kernel/debug/gpio. Correctness of this was also validated for V1 by cross-flashing vendor firmware for V1 on V2 hardware, in which reset button also worked. Fix it. Signed-off-by: Lech Perczak [slightly adjust commit title] Signed-off-by: Adrian Schmutzler --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c index ece38f900f..514529ca18 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr802n.c @@ -24,7 +24,7 @@ #include "machtypes.h" #define TL_WR802N_GPIO_LED_SYSTEM 13 -#define TL_WR802N_GPIO_BTN_RESET 11 +#define TL_WR802N_GPIO_BTN_RESET 12 #define TL_WR802N_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WR802N_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR802N_KEYS_POLL_INTERVAL) @@ -61,7 +61,7 @@ static struct gpio_keys_button tl_wr802n_gpio_keys[] __initdata = { .code = KEY_RESTART, .debounce_interval = TL_WR802N_KEYS_DEBOUNCE_INTERVAL, .gpio = TL_WR802N_GPIO_BTN_RESET, - .active_low = 0, + .active_low = 1, } }; From 39548941418e4ad092924f35e41d4795bec43c30 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 30 May 2020 16:24:03 +0200 Subject: [PATCH 23/34] ar71xx: correct button type for TL-MR3020 mode slider The TP-Link TL-MR3020 has a three-state mode slider which was previously integrated as a button (EV_KEY). This led to spurious activations of failsafe mode. Set the type for the button to switch (EV_SW), to avoid unintended activations of failsafe mode. Related: commit 27f3f493de06 ("gpio-button-hotplug: unify polled and interrupt code") Signed-off-by: David Bauer --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c index 0a9dfbc8a0..e3b4087eff 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c @@ -79,7 +79,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = { }, { .desc = "sw1", - .type = EV_KEY, + .type = EV_SW, .code = BTN_0, .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL, .gpio = TL_MR3020_GPIO_BTN_SW1, @@ -87,7 +87,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = { }, { .desc = "sw2", - .type = EV_KEY, + .type = EV_SW, .code = BTN_1, .debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL, .gpio = TL_MR3020_GPIO_BTN_SW2, From 7ce5b47dcadb7dff1c13a61796ec80b1eeff6c8a Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Mon, 1 Jun 2020 16:15:25 +0800 Subject: [PATCH 24/34] mt76: refresh patches --- .../mt76/patches/001-allow-vht-on-2g.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package/kernel/mt76/patches/001-allow-vht-on-2g.patch b/package/kernel/mt76/patches/001-allow-vht-on-2g.patch index 571574980b..53cd01b8b7 100644 --- a/package/kernel/mt76/patches/001-allow-vht-on-2g.patch +++ b/package/kernel/mt76/patches/001-allow-vht-on-2g.patch @@ -1,24 +1,24 @@ --- a/mac80211.c +++ b/mac80211.c -@@ -156,7 +156,7 @@ static void mt76_init_stream_cap(struct +@@ -156,7 +156,7 @@ static void mt76_init_stream_cap(struct mt76_dev *dev, void mt76_set_stream_caps(struct mt76_dev *dev, bool vht) { if (dev->cap.has_2ghz) -- mt76_init_stream_cap(dev, &dev->phy.sband_2g.sband, false); -+ mt76_init_stream_cap(dev, &dev->phy.sband_2g.sband, vht); +- mt76_init_stream_cap(dev, &dev->sband_2g.sband, false); ++ mt76_init_stream_cap(dev, &dev->sband_2g.sband, vht); if (dev->cap.has_5ghz) - mt76_init_stream_cap(dev, &dev->phy.sband_5g.sband, vht); + mt76_init_stream_cap(dev, &dev->sband_5g.sband, vht); } -@@ -218,14 +218,14 @@ mt76_init_sband(struct mt76_dev *dev, st +@@ -221,14 +221,14 @@ mt76_init_sband(struct mt76_dev *dev, struct mt76_sband *msband, static int mt76_init_sband_2g(struct mt76_dev *dev, struct ieee80211_rate *rates, - int n_rates) + int n_rates, bool vht) { - dev->hw->wiphy->bands[NL80211_BAND_2GHZ] = &dev->phy.sband_2g.sband; + dev->hw->wiphy->bands[NL80211_BAND_2GHZ] = &dev->sband_2g.sband; - return mt76_init_sband(dev, &dev->phy.sband_2g, + return mt76_init_sband(dev, &dev->sband_2g, mt76_channels_2ghz, ARRAY_SIZE(mt76_channels_2ghz), - rates, n_rates, false); @@ -26,8 +26,8 @@ } static int -@@ -445,7 +445,7 @@ int mt76_register_device(struct mt76_dev - mt76_phy_init(dev, hw); +@@ -349,7 +349,7 @@ int mt76_register_device(struct mt76_dev *dev, bool vht, + BIT(NL80211_IFTYPE_ADHOC); if (dev->cap.has_2ghz) { - ret = mt76_init_sband_2g(dev, rates, n_rates); From d42b563e2faf531e327781ba11f172f643caa7e6 Mon Sep 17 00:00:00 2001 From: Max Zhao Date: Mon, 1 Jun 2020 22:01:44 +0800 Subject: [PATCH 25/34] v2ray-plugin: update to 1.3.1 (#4709) --- package/lean/v2ray-plugin/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/v2ray-plugin/Makefile b/package/lean/v2ray-plugin/Makefile index 5506183e17..8111b4e335 100644 --- a/package/lean/v2ray-plugin/Makefile +++ b/package/lean/v2ray-plugin/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray-plugin -PKG_VERSION:=1.3.0 +PKG_VERSION:=1.3.1 PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/shadowsocks/v2ray-plugin/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=dfb86cd8d9be86e665c4b86b68cd7037e4310de001656eef01ec9aeea71edd10 +PKG_HASH:=86d37a8ecef82457b4750a1af9e8d093b25ae0d32ea7dcc2ad5c0068fe2d3d74 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE From e2bbcd5ac216c9ed1b468a7c7cc74f06cc2a91a7 Mon Sep 17 00:00:00 2001 From: Zeezorn <31385055+Zeezorn@users.noreply.github.com> Date: Wed, 3 Jun 2020 12:10:15 +0800 Subject: [PATCH 26/34] update v2ray-core to 4.23.3 (#4716) Fix Issued an emergency fix for VMess weakness described in https://github.com/v2ray/v2ray-core/issues/2523 This fix can significantly hindrance attack based on the weakness described. Only servers need to be updated to apply this emergency fix, it not expected for well-behaved clients to be influenced. A more permanent solution is underway. --- package/lean/v2ray/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/v2ray/Makefile b/package/lean/v2ray/Makefile index 2250262e3e..dedcbf9d09 100644 --- a/package/lean/v2ray/Makefile +++ b/package/lean/v2ray/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray -PKG_VERSION:=4.23.2 +PKG_VERSION:=4.23.3 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-core-$(PKG_VERSION) PKG_SOURCE:=v2ray-core-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2ray/v2ray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=c4c6d290859d1701fa6198bc7d2f657671ddfb4652356efdc454f48429736f66 +PKG_HASH:=39558c5a9300158a4adf76d099b210790f7ef9705ce2909c6bdc2fccc70d5c69 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE From 4e8af21e7d6f9446ca93f9482b40f6ceb03562f9 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 29 Mar 2020 18:13:56 -0700 Subject: [PATCH 27/34] prereq-build: test for perl's Data::Dumper Required for installation of autoconf: make[5]: Entering directory `/openwrt/build_dir/host/autoconf-2.69' Making all in bin make[6]: Entering directory `/openwrt/build_dir/host/autoconf-2.69/bin' autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg' ../bin/autom4te -B '..'/lib -B '..'/lib --language M4sh --cache '' --melt ./autoconf.as -o autoconf.in Can't locate Data/Dumper.pm in @INC (@INC contains: ../lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ../lib/Autom4te/C4che.pm line 33. BEGIN failed--compilation aborted at ../lib/Autom4te/C4che.pm line 33. Compilation failed in require at ../bin/autom4te line 40. BEGIN failed--compilation aborted at ../bin/autom4te line 40. make[6]: *** [autoconf.in] Error 2 Signed-off-by: Rosen Penev --- include/prereq-build.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 885ed77250..6f62570773 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -62,6 +62,10 @@ else zlib_link_flags := -lz endif +$(eval $(call TestHostCommand,perl-data-dumper, \ + Please install the Perl Data::Dumper module, \ + perl -MData::Dumper -e 1)) + $(eval $(call TestHostCommand,perl-thread-queue, \ Please install the Perl Thread::Queue module, \ perl -MThread::Queue -e 1)) From d9676aae6dd298cdcb98cb70982a77748a2a9c34 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 14 Apr 2020 11:14:47 -1000 Subject: [PATCH 28/34] build, imagebuilder: Do not require libncurses-dev The buildroot and SDK both require `libncurses-dev` to be installed on the system, however the ImageBuilder uses precompiled binaries. This patch changes the prerequirements checks to skip the `libncurses-dev` part if running as ImageBuilder. Signed-off-by: Paul Spooren --- include/prereq-build.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 6f62570773..6bdc869394 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -51,10 +51,12 @@ $(eval $(call TestHostCommand,working-g++, \ g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ $(TMP_DIR)/a.out)) +ifndef IB $(eval $(call TestHostCommand,ncurses, \ Please install ncurses. (Missing libncurses.so or ncurses.h), \ echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses)) +endif ifeq ($(HOST_OS),Linux) zlib_link_flags := -Wl,-Bstatic -lz -Wl,-Bdynamic From 2bd2ddf83dd65993adae6fc927cccdce4bc81483 Mon Sep 17 00:00:00 2001 From: Johann Neuhauser Date: Tue, 28 Apr 2020 23:20:13 +0200 Subject: [PATCH 29/34] ath79: phy-ar7200-usb: do not print error on defered init This is only a cosmetic correction, as the driver works as expected. However, the error message confuses users about a missing reset definition. On a defered init we don't see the following error message now: [ 0.078292] ar7200-usb-phy usb-phy: phy reset is missing Tested-by: Lech Perczak Signed-off-by: Johann Neuhauser --- .../ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch index fa3487d392..3629e6e875 100644 --- a/target/linux/ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch +++ b/target/linux/ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch @@ -194,7 +194,7 @@ Signed-off-by: John Crispin +MODULE_LICENSE("GPL"); --- /dev/null +++ b/drivers/phy/phy-ar7200-usb.c -@@ -0,0 +1,135 @@ +@@ -0,0 +1,136 @@ +/* + * Copyright (C) 2015 Alban Bedel + * @@ -265,7 +265,8 @@ Signed-off-by: John Crispin + + priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy"); + if (IS_ERR(priv->rst_phy)) { -+ dev_err(&pdev->dev, "phy reset is missing\n"); ++ if (PTR_ERR(priv->rst_phy) != -EPROBE_DEFER) ++ dev_err(&pdev->dev, "phy reset is missing\n"); + return PTR_ERR(priv->rst_phy); + } + From 4c5ac36835e0880575c5e4abe4a74236721641f5 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 29 Apr 2020 15:54:06 +0200 Subject: [PATCH 30/34] kernel: add gpio-it87 Since commit 910df3f06cc902ca2cb0ca8e963e9354c930df1a we have build in on all X86/64 platforms the gpio-it87 driver. Since this change I am getting the following error message on boot. > kern.err kernel: [ 1.009416] gpio_it87: no device I do not have this device on my system. To prevent the nonsensical message and the loading of the module I have added this as a package, so that it can be installed later or during image building. Signed-off-by: Florian Eckert Reviewed-by: Philip Prindeville --- package/kernel/linux/modules/other.mk | 18 ++++++++++++++++++ target/linux/x86/64/config-4.14 | 2 +- target/linux/x86/64/config-4.19 | 2 +- target/linux/x86/64/config-4.9 | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 1cb0ccc342..717eece079 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -282,6 +282,24 @@ endef $(eval $(call KernelPackage,gpio-pcf857x)) +define KernelPackage/gpio-it87 + SUBMENU:=$(OTHER_MENU) + DEPENDS:=@GPIO_SUPPORT @TARGET_x86 + TITLE:=GPIO support for IT87xx Super I/O chips + KCONFIG:=CONFIG_GPIO_IT87 + FILES:=$(LINUX_DIR)/drivers/gpio/gpio-it87.ko + AUTOLOAD:=$(call AutoLoad,25,gpio-it87,1) +endef + +define KernelPackage/gpio-it87/description + This driver is tested with ITE IT8728 and IT8732 Super I/O chips, and + supports the IT8761E, IT8613, IT8620E, and IT8628E Super I/O chips as + well. +endef + +$(eval $(call KernelPackage,gpio-it87)) + + define KernelPackage/ppdev SUBMENU:=$(OTHER_MENU) TITLE:=Parallel port support diff --git a/target/linux/x86/64/config-4.14 b/target/linux/x86/64/config-4.14 index 0d61df9824..f8c109442a 100644 --- a/target/linux/x86/64/config-4.14 +++ b/target/linux/x86/64/config-4.14 @@ -148,7 +148,7 @@ CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_ICH=y -CONFIG_GPIO_IT87=y +# CONFIG_GPIO_IT87 is not set CONFIG_GPIO_LYNXPOINT=y CONFIG_GPIO_SCH=y CONFIG_GPIO_SYSFS=y diff --git a/target/linux/x86/64/config-4.19 b/target/linux/x86/64/config-4.19 index ba86d9d506..70e7e2f3a0 100644 --- a/target/linux/x86/64/config-4.19 +++ b/target/linux/x86/64/config-4.19 @@ -154,7 +154,7 @@ CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_ICH=y -CONFIG_GPIO_IT87=y +# CONFIG_GPIO_IT87 is not set CONFIG_GPIO_LYNXPOINT=y CONFIG_GPIO_SCH=y CONFIG_GPIO_SYSFS=y diff --git a/target/linux/x86/64/config-4.9 b/target/linux/x86/64/config-4.9 index c69a15bfe9..1e31d8ce98 100644 --- a/target/linux/x86/64/config-4.9 +++ b/target/linux/x86/64/config-4.9 @@ -149,7 +149,7 @@ CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_ICH=y -CONFIG_GPIO_IT87=y +# CONFIG_GPIO_IT87 is not set CONFIG_GPIO_LYNXPOINT=y CONFIG_GPIO_SCH=y CONFIG_GPIO_SYSFS=y From b0e552747eda3498628f6f816e69277c306a494a Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Tue, 26 May 2020 10:45:22 -0300 Subject: [PATCH 31/34] wolfssl: use -fomit-frame-pointer to fix asm error 32-bit x86 fail to compile fast-math feature when compiled with frame pointer, which uses a register used in a couple of inline asm functions. Previous versions of wolfssl had this by default. Keeping an extra register available may increase performance, so it's being restored for all architectures. Signed-off-by: Eneas U de Queiroz --- package/libs/wolfssl/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index b186a087e7..159cfbc53f 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl PKG_VERSION:=4.4.0-stable -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) @@ -56,7 +56,7 @@ define Package/libwolfssl/config source "$(SOURCE)/Config.in" endef -TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192 +TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192 -fomit-frame-pointer # --enable-stunnel needed for OpenSSL API compatibility bits CONFIGURE_ARGS += \ From ee958e2bd374a38be4048e82867d3d9641a10468 Mon Sep 17 00:00:00 2001 From: Aaron-lv <58249729+Aaron-lv@users.noreply.github.com> Date: Thu, 4 Jun 2020 15:48:17 +0800 Subject: [PATCH 32/34] Update v2ray-core to 4.23.4 (#4725) --- package/lean/v2ray/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/lean/v2ray/Makefile b/package/lean/v2ray/Makefile index dedcbf9d09..ec1b6726fc 100644 --- a/package/lean/v2ray/Makefile +++ b/package/lean/v2ray/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray -PKG_VERSION:=4.23.3 +PKG_VERSION:=4.23.4 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-core-$(PKG_VERSION) PKG_SOURCE:=v2ray-core-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/v2ray/v2ray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=39558c5a9300158a4adf76d099b210790f7ef9705ce2909c6bdc2fccc70d5c69 +PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=726dd98d674bd73150158b1d4c8bc0d59dbb672ba10096ac61548d6278213c78 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE From 4b97e2a8262deb8c783c7f5751019e4029d34e83 Mon Sep 17 00:00:00 2001 From: hyird <31695447+hyird@users.noreply.github.com> Date: Thu, 4 Jun 2020 15:48:42 +0800 Subject: [PATCH 33/34] luci-app-frpc:fix translate (#4726) Co-authored-by: hyird <1326606797@qq.com> --- .../luci-app-frpc/luasrc/i18n/frp.zh-cn.lmo | Bin 5032 -> 0 bytes package/lean/luci-app-frpc/po/zh-cn/frp.po | 255 ++++++++++++++++++ 2 files changed, 255 insertions(+) delete mode 100644 package/lean/luci-app-frpc/luasrc/i18n/frp.zh-cn.lmo create mode 100644 package/lean/luci-app-frpc/po/zh-cn/frp.po diff --git a/package/lean/luci-app-frpc/luasrc/i18n/frp.zh-cn.lmo b/package/lean/luci-app-frpc/luasrc/i18n/frp.zh-cn.lmo deleted file mode 100644 index 9e48c9b3fad24425271ac5c91888635be699583a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5032 zcmaJ^3s_WD9zTkq;)IGQW|UXcd?uQ%eHpPCSek~EvMaW2BI08qU;!Vc*?>F-hhauV zc@0m8H_SjPj~T`>A8n?)x~1j1ZqesG_ukQV+1fJGUEANeXGAQ`@4I+@_x@k!{~pO~ zpgSvRQ5`k6&{8c?TqdP5SL|pegvdFaQt1xSVUcrkMW;*7ucLW-xvQRbX{pI3?`)H_ zX*9Dt7Ej8CkW;@fdJ6FKVl)GNa#TimT zo4eqkT+%_?tzw5k+2K^$G8I?0FzZ(W)n&PNmtWSV6S8pm@(8)!<<=S{)oN&>#{K;L zvU_}>x>8!Jmx~Ax!yJJ(6*rAo0D(@m|Y3)na)0In2 zHB?tbTe76wG}+NiTS^t%Ua+`}vV<3slLT%MuE-2s9vUG~OR>^!qZR|arr4_K&T`z! z?I={N7UsMBItaykccuZ3b60k%K4PI@m)f1%>q_d%bXPh=S1A<3P$m1I>Iy;)M#XBC zTOG7aFFNvsO*3cAdUD20LC(=h<|Y=QT0OJdzL&P9yS2rltCF)w`8J4hYjY%hy$~0Z zB=FaCXN6nK+$<1ozbc=Q#q2JgGsGY$qGP{o%2HfqQeL$hO;4OXav6!hA|*t;x^zX9 z&>M5bRf5dorU+^*xgAwoxu`<}`|}U2087((pti zf|Q$0t;O!D45}-k4m+n}d9}9%e1usUBZyrpMWzlG-N_$^U2fDXhuXOa&Hzp>0`B0H z(t$dfm5Us87v~c)Q>mk^mG;T?8RMpNhsD9_(sfUqx$Lm&C09!m~OE$B@ zWFRad`{oBNFURX3+HB${#brkRiyaPB88d?4ZQkU=>6B!_<~VNN`GOa$>@|kl?k638@0iOiX@u z{JP}W*o5&RYAW7TYtajErbYub?c$!G_I%zHczp_~F-g;fjcf2{eQK)bZ;B_XtOKYq zR%6CR)66>Bs`d2YayvZ6&x+F~I@)+wP_i44tzu^mhpgCzU-A`o?x8sbPK;ds*?pz* zYT2xp%vxz*3#TH?E}mpOPK5ub_DD~oF{ZNwR_*W8!#ES~XT5gvm!vmwk!RGDi*n=B zNOV+-9XrJii(G5)kP=#xE|r;isvu{%deNSR%;qGMQ#P(%llW%zhJ-iPC#IxMVb!WD z`iV+Dgb+;HT80?jmswy@yj@n3Zl9vfln#_|MJ!6FX+Af5X$snyLba*0euZwthNGwP zd#t^msZ@0xm%EG&84sg61fYx8HLp~zS2FHK^zV0;>MCiM5$OO}cVIcb=P+giFKlLQ-#+q7z2#naQr~$>#AJ|b z(fY{G-qDs;#7gMP-)Ms&+$egxG2YV-br=hguPzZVujTw!$Y;69%TTK5L|^G`QMbwH z;S5f!IGd<(7uB^OVUU?D8%%ld8&}Nk-dC`ASkKZ^9achoVoY@EhQx%FXM+-AH>dD4 z#Il5Or>a463+fkvwK&T`$mVvqcR1mDrK+)4x#B89$LZCH)dLWUxvwEe(YH$bvfbJO zYHVi{sW_jht4aT<5z~XBS0`>v72pHDAb9eJPkgIIv8AzYBqXsRAn=b&k`Xc_G=8*1 zY?K&Ym$7NuvgC?1DMwuo)$Id*=bHx454AAV&BHTXZZr3J$A#d2kqH~N2+I;<;yl-2 z%i7_L-g;GaaceinuI8@w)Uqn=9)^`xQ)>>|@K3nl%)2=}*kg(4vP$`#!a}qnVPS0a zn%HEXf83{ZXB~EI4~^=2o&(s=;ZuP%Fo8A~NY+C%uN)hnIxK|y(ex%v-y~(-R81$T z#3dQ3#11=KSG8U65vts?I(6i+LyCadutgmu&Ns@eOls}qV;2)%IlPBugW4OA#?oG$ zyYM}!xk@^ehBXWsE9q+_U4t4YYU|`2C`!oS%OU@H!DL{PyBa-wPF7=BPN}^HpG0RC z8?tPfE2WlwQkzcE7O1wLL(vtKABjLWxtPj=VYcg7Yag9>YGVHv8gdZ@DY1r;JX*%qf^!koQ~)6 z+?Sc`^g6J}^>(#N!GQ({cO*iL~jUi<5c=CkpH444T#(tFe&qHL*Kzrgu-c)|zMm1{#U z`Gfz#VBm**0-YiKuZIi=YXtC6pP+ev^!1-~1e#G1WaN-C&G*}Ns~#offhE9kn(n4< z^Q5T1K;O5(ehjz&efTLt2A&4iXm0g8b6|v(o!P&kL+7SVoz$+qi0>DGH6z|m$!wW& z>?2^@iM;C{^!)yQw?;h;d2@hgjeJpi{>$kf&w##eMnCG@_=RKL-i?I#F#6$Ro*cPh zPa`hY<37`Y1B9w; zMNuDZ_y^9z@C+XRNI}Z6##xz!49W!_J}Jx+@ZkAC*y1Gs`%RAT{_kUs6XW5p6~He| z88~LiuJDmooR8xPm{$DQ;{IDqiwGH_1@;SCQWW(?J${%H5{O3=taW>@p1I>8_}2nF zI3#54+vJnzYW-X(dgVJuQ8GEjTh7B7jC-o`qwXcYjB>- z=)&)Cjac0SQvu2FmF@2uk9~7?IpiH@ z-|t|}C5EGeKPkQW>#H~6@2`ND#&5pqTfOn~iJ)H(>=&=R8Cg8-^*7*u5jZ$ejyYMp zZ9Zb-tpnC1r>q=kSsi`?-`V|qQqSL5+1CF*hjC`|$88Fjct$@a2D%3v0ruNMul{gx zLU;z^!Th7ysvr3LgxL=Kq8fA%_@(XMbB?v0To4R<;4`AxzHRgJ-@ots4(Um6^Pls0z{?;F1YTLZEjPGxoKH9*{nh}# zQgZyMb<=Nb84CUZ59%eHzXg-n(>Eeh%_FfHlo!*D8j65LXTULBM`@@F1q&uVuY>^y!7D+*{jLB0d$s!%rC+!Y1kq_0XRS z?0x1pfyu!c528Q#Fn{}>?f-!9Rox{dpO*+c?A)+Tv!6C;W1)}v)9(%*#O(F^f{ZA9 z=hHlV^M;Sequo8ev$xKFD-`jb4m|hr|8AWL&74|+d|~$Zh(}9~tY4Ub`}aEz9Iosu z{q2SJN728A}n|^m_S;$#K740D3P*uepBn g5xUws3ilhh3OMp+$`gBTKKA`Qs2a__!*0v}0cwvE761SM diff --git a/package/lean/luci-app-frpc/po/zh-cn/frp.po b/package/lean/luci-app-frpc/po/zh-cn/frp.po new file mode 100644 index 0000000000..13f7f9adde --- /dev/null +++ b/package/lean/luci-app-frpc/po/zh-cn/frp.po @@ -0,0 +1,255 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + + +msgid "Frp Setting" +msgstr "Frp 内网穿透" + +msgid "Frp Status" +msgstr "Frp状态" + +msgid "The Frp service is not running." +msgstr "Frp服务未运行" + +msgid "The Frp service is running." +msgstr "Frp服务正在运行" + +msgid "Frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet." +msgstr "Frp 是一个可用于内网穿透的高性能的反向代理应用。" + +msgid "Global Setting" +msgstr "全局设置" + +msgid "Basic Settings" +msgstr "基本设置" + +msgid "Other Settings" +msgstr "其他设置" + +msgid "Client Log" +msgstr "日志" + +msgid "Enabled" +msgstr "启用" + +msgid "Server" +msgstr "服务器" + +msgid "Port" +msgstr "端口" + +msgid "Token" +msgstr "令牌" + +msgid "Time duration between server of frpc and frps mustn't exceed 15 minutes." +msgstr "frpc服务器与frps之间的时间间隔不得超过15分钟" + +msgid "Vhost HTTP Port" +msgstr "HTTP穿透服务端口" + +msgid "Vhost HTTPS Port" +msgstr "HTTPS穿透服务端口" + +msgid "Exit program when first login failed" +msgstr "初始登录失败即退出程序" + +msgid "TCP Stream Multiplexing" +msgstr "TCP端口复用" + +msgid "decide if exit program when first login failed, otherwise continuous relogin to frps." +msgstr "第一次登录失败就退出程序,否则将持续尝试登陆 Frp 服务器。" + +msgid "Default is Ture. This feature in frps.ini and frpc.ini must be same." +msgstr "该功能默认启用,该配置项在服务端和客户端必须保持一致。" + +msgid "Protocol Type" +msgstr "协议类型" + +msgid "Frp support kcp protocol since v0.12.0" +msgstr "从 v0.12.0 版本开始,底层通信协议支持选择 kcp 协议加速。" + +msgid "TCP Protocol" +msgstr "TCP协议" + +msgid "KCP Protocol" +msgstr "KCP协议" + +msgid "Connect frps by HTTP PROXY" +msgstr "通过代理连接 frps" + +msgid "frpc can connect frps using HTTP PROXY" +msgstr "frpc 支持通过 HTTP PROXY 和 frps 进行通信" + +msgid "HTTP PROXY" +msgstr "HTTP代理" + +msgid "Enable Connection Pool" +msgstr "启用连接池功能" + +msgid "This feature is fit for a large number of short connections." +msgstr "适合有大量短连接请求时开启" + +msgid "Connection Pool" +msgstr "指定预创建连接的数量" + +msgid "Connections will be established in advance." +msgstr "frpc 会预先和服务端建立起指定数量的连接。" + +msgid "Service registration interval" +msgstr "服务注册间隔" + +msgid "0 means disable this feature, unit: min" +msgstr "0表示禁用定时注册功能,单位:分钟" + +msgid "Log Level" +msgstr "日志记录等级" + +msgid "Trace" +msgstr "追踪" + +msgid "Debug" +msgstr "调试" + +msgid "Info" +msgstr "信息" + +msgid "Warning" +msgstr "警告" + +msgid "Error" +msgstr "错误" + +msgid "Log Keepd Max Days" +msgstr "日志记录天数" + +msgid "Services List" +msgstr "服务列表" + +msgid "Service Remark Name" +msgstr "服务备注名" + +msgid "Domain/Subdomain" +msgstr "域名/子域名" + +msgid "Remote Port" +msgstr "远程主机端口" + +msgid "Local Host Address" +msgstr "内网主机地址" + +msgid "Local Host Port" +msgstr "内网主机端口" + +msgid "Use Encryption" +msgstr "开启数据加密" + +msgid "Use Compression" +msgstr "使用压缩" + +msgid "Enable State" +msgstr "开启状态" + +msgid "Frp Domain Config" +msgstr "Frp域名配置" + +msgid "Config Frp Protocol" +msgstr "配置 Frp 协议参数" + +msgid "Disable" +msgstr "关闭" + +msgid "Frp Protocol Type" +msgstr "Frp 协议类型" + +msgid "Domain Type" +msgstr "域名类型" + +msgid "Custom Domains" +msgstr "自定义域名" + +msgid "SubDomain" +msgstr "子域名" + +msgid "Both the above two Domain types" +msgstr "同时使用2种域名" + +msgid "If SubDomain is used, Custom Domains couldn't be subdomain or wildcard domain of the maindomain(subdomain_host)." +msgstr "如果服务端配置了主域名(subdomain_host),则自定义域名不能是属于主域名(subdomain_host) 的子域名或者泛域名。" + +msgid "subdomain_host must be configured in server: frps in advance." +msgstr "使用子域名时,必须预先在服务端配置主域名(subdomain_host)参数。" + +msgid "STCP Role" +msgstr "SFTP服务类型" + +msgid "Use Plugin" +msgstr "使用插件" + +msgid "If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps." +msgstr "使用插件使用插件模式时,本地 IP 地址和端口无需配置,插件将会处理来自服务端的链接请求。" + +msgid "STCP Screct Key" +msgstr "SFTP密钥" + +msgid "STCP Server Name" +msgstr "SFTP服务名称" + +msgid "Enable URL routing" +msgstr "启用 URL 路由" + +msgid "Frp support forward http requests to different backward web services by url routing." +msgstr "Frp支持通过url路由将http请求转发到不同的反向web服务。" + +msgid "Choose Plugin" +msgstr "选择插件" + +msgid "Proxy Authentication" +msgstr "代理认证" + +msgid "Other PCs could access the Internet through frpc's network by using http_proxy plugin." +msgstr "http proxy 插件,可以使其他机器通过 frpc 的网络访问互联网;开启身份验证之后需要用户名、密码才能连接到 HTTP 代理。" + +msgid "HTTP Proxy UserName" +msgstr "HTTP 代理用户名" + +msgid "HTTP Proxy Password" +msgstr "HTTP 代理密码" + +msgid "Plugin Unix Sock Path" +msgstr "Unix Sock 插件路径" + +msgid "Password protecting your web service" +msgstr "密码保护您的web服务" + +msgid "HTTP UserName" +msgstr "HTTP 用户名" + +msgid "HTTP PassWord" +msgstr "HTTP 密码" + +msgid "Rewriting the Host Header" +msgstr "修改 Host Header" + +msgid "Frp can rewrite http requests with a modified Host header." +msgstr "Frp可以用修改后的主机头重写http请求。" + +msgid "Proxy-Protocol Version" +msgstr "Proxy-Protocol 版本" + +msgid "Encrypted the communication between frpc and frps, will effectively prevent the traffic intercepted." +msgstr "将 frpc 与 frps 之间的通信内容加密传输,将会有效防止流量被拦截。" + +msgid "The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources." +msgstr "对传输内容进行压缩,加快流量转发速度,但是会额外消耗一些 cpu 资源。" + +msgid "Http username and password are safety certification for http protocol." +msgstr "Http用户名和密码是Http协议的安全认证。" + +msgid "Proxy Protocol to send user's real IP to local services." +msgstr "将用户的真实IP发送到本地服务的代理协议。" + +msgid "STCP Server Name is Service Remark Name of STCP Server" +msgstr "STCP服务器别名" + +msgid "Please ensure the remark name is unique." +msgstr "确保备注名唯一" \ No newline at end of file From 340f1bffaa5ef9700490beb257b6132ae516c4e2 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 4 Jun 2020 16:38:42 +0800 Subject: [PATCH 34/34] ps3netsrv: add ps3netsrv allows you to stream games and ISOs over the network to your CFW PlayStation(R) 3 system --- package/lean/ps3netsrv/Makefile | 55 +++++++++ package/lean/ps3netsrv/files/ps3netsrv.config | 5 + package/lean/ps3netsrv/files/ps3netsrv.init | 83 +++++++++++++ .../patches/001-include.common.h.patch | 20 +++ .../patches/002-include.compat.h.patch | 12 ++ .../lean/ps3netsrv/patches/003-makefile.patch | 114 ++++++++++++++++++ 6 files changed, 289 insertions(+) create mode 100644 package/lean/ps3netsrv/Makefile create mode 100644 package/lean/ps3netsrv/files/ps3netsrv.config create mode 100644 package/lean/ps3netsrv/files/ps3netsrv.init create mode 100644 package/lean/ps3netsrv/patches/001-include.common.h.patch create mode 100644 package/lean/ps3netsrv/patches/002-include.compat.h.patch create mode 100644 package/lean/ps3netsrv/patches/003-makefile.patch diff --git a/package/lean/ps3netsrv/Makefile b/package/lean/ps3netsrv/Makefile new file mode 100644 index 0000000000..ab81de49a5 --- /dev/null +++ b/package/lean/ps3netsrv/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2012-2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=ps3netsrv +PKG_VERSION:=20190630 +PKG_GIT_COMMIT:=3107bba17870657c5bb3f7830657838d766a296c +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_GIT_COMMIT).tar.gz +PKG_SOURCE_URL:=https://github.com/jhonathanc/ps3netsrv/releases/download/$(PKG_VERSION) +PKG_HASH:=b1df52bab6496d3008019ff76660436c4b24d05c84fc71f293719dbd608f1511 +PKG_INSTALL:=1 + +PKG_MAINTAINER:=JCorrea +PKG_LICENSE:=GPLv3 +PKG_LICENSE_FILES:=COPYING +PKG_BUILD_DEPENDS:=mbedtls + +include $(INCLUDE_DIR)/package.mk + +define Package/ps3netsrv + SECTION:=net + CATEGORY:=Network + SUBMENU:=File Transfer + TITLE:=PS3 Game Server + URL:=https://github.com/jhonathanc/ps3netsrv-openwrt/ + DEPENDS:=+libpthread +libstdcpp +endef + +define Package/ps3netsrv/description +ps3netsrv allows you to stream games and ISOs over the network to your CFW PlayStation(R) 3 system. +This may be useful if you have a modified PS3, and your router has storage options. +endef + +define Build/Install + # Do nothing +endef + +define Package/ps3netsrv/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ps3netsrv $(1)/usr/bin + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ps3netsrv.init $(1)/etc/init.d/ps3netsrv + + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/ps3netsrv.config $(1)/etc/config/ps3netsrv +endef + +$(eval $(call BuildPackage,ps3netsrv)) diff --git a/package/lean/ps3netsrv/files/ps3netsrv.config b/package/lean/ps3netsrv/files/ps3netsrv.config new file mode 100644 index 0000000000..d03ae2b094 --- /dev/null +++ b/package/lean/ps3netsrv/files/ps3netsrv.config @@ -0,0 +1,5 @@ +config ps3netsrv 'main' + option enabled '0' + option user 'root' + option dir '/root' + option port '38008' diff --git a/package/lean/ps3netsrv/files/ps3netsrv.init b/package/lean/ps3netsrv/files/ps3netsrv.init new file mode 100644 index 0000000000..8565dbb74a --- /dev/null +++ b/package/lean/ps3netsrv/files/ps3netsrv.init @@ -0,0 +1,83 @@ +#!/bin/sh /etc/rc.common + +START=99 +USE_PROCD=1 + +NAME=ps3netsrv +PROG=/usr/bin/ps3netsrv + +_info() { + logger -p daemon.info -t "$NAME" "$*" +} + +_err() { + logger -p daemon.err -t "$NAME" "$*" +} + +_change_owner() { + local u="$1"; shift + + local d + for d in "$@"; do + if [ -f "$d" ]; then + chown "$u" "$d" 2>/dev/null || return 1 + elif [ -d "$d" ]; then + chown -R "$u" "$d" 2>/dev/null || return 1 + fi + done + + return 0 +} + +ps3netsrv_validate() { + uci_validate_section "$NAME" ps3netsrv "$1" \ + 'enabled:bool:0' \ + 'dir:string:/root' \ + 'user:string' \ + 'port:range(1024,65535)' +} + +ps3netsrv_start() { + local section="$1" + ps3netsrv_validate "$section" || { _err "Validation failed."; return 1; } + + [ "$enabled" = "1" ] || { _info "Instance \"${section}\" disabled."; return 1; } + [ -n "$dir" ] || { _err "Please set PS3 Game dir."; return 1; } + [ -n "$port" ] || { _err "Please set bind port."; return 1; } + [ -d "$dir" ] || { _err "Please create PS3 Game dir first."; return 1; } + + if [ -n "$user" ]; then + if ( user_exists "$user" && _change_owner "$user" "$log" ); then + _info "ps3netsrv will run as user '${user}'." + if [ "$user" != "root" ]; then + _info "Please make sure user '${user}' has read access to directory: ${dir}" + fi + else + _info "Set run user to '${user}' failed, default user will be used." + user= + fi + fi + + procd_open_instance "${NAME}.${section}" + procd_set_param command "$PROG" "$dir" "$port" + + procd_set_param respawn + procd_set_param stdout 1 + procd_set_param stderr 1 + + [ -n "$user" ] && \ + procd_set_param user "$user" + + procd_add_jail "${NAME}.${section}" log + procd_add_jail_mount "$dir" + procd_close_instance +} + +service_triggers() { + procd_add_reload_trigger "$NAME" +} + +start_service() { + config_load "$NAME" + config_foreach ps3netsrv_start "ps3netsrv" +} diff --git a/package/lean/ps3netsrv/patches/001-include.common.h.patch b/package/lean/ps3netsrv/patches/001-include.common.h.patch new file mode 100644 index 0000000000..17fa47f6ec --- /dev/null +++ b/package/lean/ps3netsrv/patches/001-include.common.h.patch @@ -0,0 +1,20 @@ +diff -Naur a/include/common.h b/include/common.h +--- a/include/common.h 2019-08-03 10:48:42.000000000 -0700 ++++ b/include/common.h 2020-03-01 19:26:14.000000000 -0800 +@@ -2,6 +2,7 @@ + #define __COMMON_H__ + + #include ++#include + + #ifdef DEBUG + #include +@@ -10,7 +11,7 @@ + #define DPRINTF(...) + #endif + +-#ifdef __BIG_ENDIAN__ ++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + + static inline uint16_t BE16(uint16_t x) + { diff --git a/package/lean/ps3netsrv/patches/002-include.compat.h.patch b/package/lean/ps3netsrv/patches/002-include.compat.h.patch new file mode 100644 index 0000000000..517a116428 --- /dev/null +++ b/package/lean/ps3netsrv/patches/002-include.compat.h.patch @@ -0,0 +1,12 @@ +diff -Naur a/include/compat.h b/include/compat.h +--- a/include/compat.h 2019-08-03 10:48:42.000000000 -0700 ++++ b/include/compat.h 2020-03-01 19:26:14.000000000 -0800 +@@ -57,7 +57,7 @@ typedef int socklen_t; + + #else + +-#include ++#include + #include + #include + #include diff --git a/package/lean/ps3netsrv/patches/003-makefile.patch b/package/lean/ps3netsrv/patches/003-makefile.patch new file mode 100644 index 0000000000..c9e0c90640 --- /dev/null +++ b/package/lean/ps3netsrv/patches/003-makefile.patch @@ -0,0 +1,114 @@ +diff -Naur a/Makefile b/Makefile +--- a/Makefile 2019-08-03 10:48:42.000000000 -0700 ++++ b/Makefile 2020-03-01 19:26:14.000000000 -0800 +@@ -1,21 +1,17 @@ +-OS = windows ++OS = linux + BUILD_TYPE = release_static + + OUTPUT := ps3netsrv + OBJS = src/main.o src/compat.o src/File.o src/VIsoFile.o + +-CFLAGS = -Wall -I./include -I./polarssl-1.3.2/include -std=gnu99 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL +-CPPFLAGS += -Wall -I./include -I./polarssl-1.3.2/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL +- +-#CFLAGS += -DNOSSL +-#CPPFLAGS +=-DNOSSL +- +-LDFLAGS = -L. -L./polarssl-1.3.2/library +-LIBS = -lstdc++ -lpolarssl ++CFLAGS = -Wall -I./include -std=gnu99 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ++CPPFLAGS = -Wall -I./include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + ++LDFLAGS = -L. ++LIBS = -lstdc++ + + ifeq ($(OS), linux) +-LIBS += -lpthread ++LIBS += -lpthread -lgcc_eh + endif + + ifeq ($(OS), windows) +@@ -37,28 +33,82 @@ endif + ifeq ($(BUILD_TYPE), debug) + CFLAGS += -O0 -g3 -DDEBUG + CPPFLAGS += -O0 -g3 -DDEBUG ++LIBS += -lmbedtls -lmbedx509 -lmbedcrypto ++endif ++ ++ifeq ($(BUILD_TYPE), debug_nossl) ++CFLAGS += -O0 -g3 -DDEBUG -DNOSSL ++CPPFLAGS += -O0 -g3 -DDEBUG -DNOSSL ++endif ++ ++ifeq ($(BUILD_TYPE), debug_polar) ++CFLAGS += -O0 -g3 -DDEBUG -I./polarssl-1.3.2/include -DPOLARSSL ++CPPFLAGS += -O0 -g3 -DDEBUG -I./polarssl-1.3.2/include -DPOLARSSL ++LDFLAGS += -L./polarssl-1.3.2/library ++LIBS += -lpolarssl + endif + + ifeq ($(BUILD_TYPE), debug_static) + CFLAGS += -O0 -static -g3 -DDEBUG + CPPFLAGS += -O0 -static -g3 -DDEBUG ++LIBS += -lmbedtls -lmbedx509 -lmbedcrypto ++endif ++ ++ifeq ($(BUILD_TYPE), debug_static_nossl) ++CFLAGS += -O0 -static -g3 -DDEBUG -DNOSSL ++CPPFLAGS += -O0 -static -g3 -DDEBUG -DNOSSL ++endif ++ ++ifeq ($(BUILD_TYPE), debug_static_polar) ++CFLAGS += -O0 -static -g3 -DDEBUG -I./polarssl-1.3.2/include -DPOLARSSL ++CPPFLAGS += -O0 -static -g3 -DDEBUG -I./polarssl-1.3.2/include -DPOLARSSL ++LDFLAGS += -L./polarssl-1.3.2/library ++LIBS += -lpolarssl + endif + + ifeq ($(BUILD_TYPE), release) + CFLAGS += -O3 -s -DNDEBUG + CPPFLAGS += -O3 -s -DNDEBUG ++LIBS += -lmbedtls -lmbedx509 -lmbedcrypto ++endif ++ ++ifeq ($(BUILD_TYPE), release_nossl) ++CFLAGS += -O3 -s -DNDEBUG -DNOSSL ++CPPFLAGS += -O3 -s -DNDEBUG -DNOSSL ++endif ++ ++ifeq ($(BUILD_TYPE), release_polar) ++CFLAGS += -O3 -s -DNDEBUG -I./polarssl-1.3.2/include -DPOLARSSL ++CPPFLAGS += -O3 -s -DNDEBUG -I./polarssl-1.3.2/include -DPOLARSSL ++LDFLAGS += -L./polarssl-1.3.2/library ++LIBS += -lpolarssl + endif + + ifeq ($(BUILD_TYPE), release_static) + CFLAGS += -static -O3 -s -DNDEBUG + CPPFLAGS += -static -O3 -s -DNDEBUG ++LIBS += -lmbedtls -lmbedx509 -lmbedcrypto ++endif ++ ++ifeq ($(BUILD_TYPE), release_static_nossl) ++CFLAGS += -static -O3 -s -DNDEBUG -DNOSSL ++CPPFLAGS += -static -O3 -s -DNDEBUG -DNOSSL ++endif ++ ++ifeq ($(BUILD_TYPE), release_static_polar) ++CFLAGS += -static -O3 -s -DNDEBUG -I./polarssl-1.3.2/include -DPOLARSSL ++CPPFLAGS += -static -O3 -s -DNDEBUG -I./polarssl-1.3.2/include -DPOLARSSL ++LDFLAGS += -L./polarssl-1.3.2/library ++LIBS += -lpolarssl + endif + + all: $(OUTPUT) + rm -r -f src/*.o ++ rm -r -f polarssl-1.3.2/library/*.o + + clean: + rm -r -f $(OUTPUT) src/*.o ++ rm -r -f polarssl-1.3.2/library/*.o + + $(OUTPUT): $(OBJS) + $(LINK.c) $(LDFLAGS) -o $@ $^ $(LIBS)