From 3e9eac6b1de425b2625deb80c54d34f594e0ca9f Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 12 Jul 2020 21:37:11 -0600 Subject: [PATCH 01/20] wireguard: bump to 1.0.20200712 This release brings parity with the commits Linus released a few hours ago into 5.8-rc5. * receive: account for napi_gro_receive never returning GRO_DROP The napi_gro_receive function no longer returns GRO_DROP ever, making handling GRO_DROP dead code. This commit removes that dead code. Further, it's not even clear that device drivers have any business in taking action after passing off received packets; that's arguably out of their hands. * device: implement header_ops->parse_protocol for AF_PACKET WireGuard uses skb->protocol to determine packet type, and bails out if it's not set or set to something it's not expecting. For AF_PACKET injection, we need to support its call chain of: packet_sendmsg -> packet_snd -> packet_parse_headers -> dev_parse_header_protocol -> parse_protocol Without a valid parse_protocol, this returns zero, and wireguard then rejects the skb. So, this wires up the ip_tunnel handler for layer 3 packets for that case. * queueing: make use of ip_tunnel_parse_protocol Now that wg_examine_packet_protocol has been added for general consumption as ip_tunnel_parse_protocol, it's possible to remove wg_examine_packet_protocol and simply use the new ip_tunnel_parse_protocol function directly. * compat: backport ip_tunnel_parse_protocol and ip_tunnel_header_ops These are required for moving wg_examine_packet_protocol out of wireguard and into upstream. Signed-off-by: Jason A. Donenfeld --- package/network/services/wireguard/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile index b7adf27ec1..19aea4bb09 100644 --- a/package/network/services/wireguard/Makefile +++ b/package/network/services/wireguard/Makefile @@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=wireguard -PKG_VERSION:=1.0.20200623 +PKG_VERSION:=1.0.20200712 PKG_RELEASE:=1 PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/ -PKG_HASH:=130937724515799edf05ff8216bc837df8acda879428f3a7f96a3287758f9445 +PKG_HASH:=e15b3d4eb2cf186920a6ed13685187d6b846e59eb383c291913628682965ac95 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING From 658b8ba5f4fc21ccfae8c8d6afaac4bae7fce720 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 13 Jul 2020 12:19:08 +0100 Subject: [PATCH 02/20] procd: update to git HEAD aed7fb3 procd: fix compilation with uClibc-ng 9d0f831 jail: fix segfault with len(uidmap/gidmap) > 1 42a6217 jail: consider PATH for argv in OCI container 83f4b72 jail: actually chdir into OCI defined CWD fc9f614 jail: parse and run OCI hooks 02eec92 jail: memory allocation fixes 71e75f4 jail: refactor mount support to cover OCI spec b586e7d jail: don't make mount source read-only dacab12 uxc: fix 'stop' command Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 28 ++++++++++++++++++++++++---- package/system/procd/files/procd.sh | 9 +++++++++ package/system/procd/files/uxc.init | 18 ++++++++++++++++++ 3 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 package/system/procd/files/uxc.init diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index f5ed35b27e..cbdd38d197 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=procd -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-05-28 -PKG_SOURCE_VERSION:=b9b39e2061d7035a9d84eecbb4a4613deaf6d03f -PKG_MIRROR_HASH:=0d6a96a2fb38f72c72b457a2a8638bee22f91009f9686152fcf4aee97846fc84 +PKG_SOURCE_DATE:=2020-07-13 +PKG_SOURCE_VERSION:=dacab12b301085eac00e84a94e42096de70886e8 +PKG_MIRROR_HASH:=e9c49884ea1dd6554ce057c8ca7fb23bc980939b92e11f43d37b930c29f63dbd CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -70,6 +70,14 @@ define Package/procd-seccomp TITLE:=OpenWrt process seccomp helper + utrace endef +define Package/uxc + SECTION:=base + CATEGORY:=Base system + DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json + TITLE:=OpenWrt container management + MAINTAINER:=Daniel Golle +endef + define Package/procd/config menu "Configuration" depends on PACKAGE_procd @@ -130,7 +138,19 @@ define Package/procd-seccomp/install $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libpreload-trace.so $(1)/lib endef +define Package/uxc/conffiles +/etc/uxc +endef + +define Package/uxc/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/uxc $(1)/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/uxc.init $(1)/etc/init.d/uxc +endef + $(eval $(call BuildPackage,procd)) $(eval $(call BuildPackage,procd-ujail)) $(eval $(call BuildPackage,procd-ujail-console)) $(eval $(call BuildPackage,procd-seccomp)) +$(eval $(call BuildPackage,uxc)) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 85e625c847..dd6dc1c58d 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -48,6 +48,15 @@ _PROCD_SERVICE= procd_lock() { local basescript=$(readlink "$initscript") local service_name="$(basename ${basescript:-$initscript})" + + flock -n 1000 &> /dev/null + if [ "$?" != "0" ]; then + exec 1000>"$IPKG_INSTROOT/var/lock/procd_${service_name}.lock" + flock 1000 + if [ "$?" != "0" ]; then + logger "warning: procd flock for $service_name failed" + fi + fi } _procd_call() { diff --git a/package/system/procd/files/uxc.init b/package/system/procd/files/uxc.init new file mode 100644 index 0000000000..035c8b0b9e --- /dev/null +++ b/package/system/procd/files/uxc.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common + +START=99 +USE_PROCD=1 +NAME=uxc +PROG=/sbin/uxc + +start_service() { + [ "${__BOOT_UXC}" = "1" ] || return 0 + procd_open_instance "uxc" + procd_set_param command "$PROG" boot + procd_close_instance +} + +boot() { + __BOOT_UXC=1 + start +} From caf41cab250a54d3e8b23653ee0cb5f6b45ca7e0 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Thu, 16 Jul 2020 19:15:17 +0800 Subject: [PATCH 03/20] kernel: bump 4.19 to 4.19.133 Refreshed all patches. Signed-off-by: CN_SZTL --- include/kernel-version.mk | 4 ++-- .../950-0002-smsx95xx-fix-crimes-against-truesize.patch | 4 ++-- target/linux/generic/hack-4.19/204-module_strip.patch | 4 ++-- target/linux/generic/hack-4.19/259-regmap_dynamic.patch | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 7473626193..f8162966f5 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -8,11 +8,11 @@ endif LINUX_VERSION-4.9 = .230 LINUX_VERSION-4.14 = .188 -LINUX_VERSION-4.19 = .132 +LINUX_VERSION-4.19 = .133 LINUX_KERNEL_HASH-4.9.230 = d5ba9256e3ebf1cead127f323acc8124965d89cc88e75eca377fcca3bd6c037c LINUX_KERNEL_HASH-4.14.188 = 766fe01387b1d1b7bd37ca45a5048cdad13e3a51c6c43746dbb657a0ba67064b -LINUX_KERNEL_HASH-4.19.132 = d7d7ee94962ce4cc070e8db7f7f3755cbef122a3fd77c436d5381a61819a7d44 +LINUX_KERNEL_HASH-4.19.133 = b933e5fe7d09af623809b96fd26119381e71c8994af5f9f7a644b78ede77dbc4 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-0002-smsx95xx-fix-crimes-against-truesize.patch b/target/linux/bcm27xx/patches-4.19/950-0002-smsx95xx-fix-crimes-against-truesize.patch index 248601cb7f..918cfda2de 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0002-smsx95xx-fix-crimes-against-truesize.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0002-smsx95xx-fix-crimes-against-truesize.patch @@ -25,7 +25,7 @@ Signed-off-by: Steve Glendinning static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index, u32 *data, int in_pm) { -@@ -1972,7 +1976,8 @@ static int smsc95xx_rx_fixup(struct usbn +@@ -1979,7 +1983,8 @@ static int smsc95xx_rx_fixup(struct usbn if (dev->net->features & NETIF_F_RXCSUM) smsc95xx_rx_csum_offload(skb); skb_trim(skb, skb->len - 4); /* remove fcs */ @@ -35,7 +35,7 @@ Signed-off-by: Steve Glendinning return 1; } -@@ -1990,7 +1995,8 @@ static int smsc95xx_rx_fixup(struct usbn +@@ -1997,7 +2002,8 @@ static int smsc95xx_rx_fixup(struct usbn if (dev->net->features & NETIF_F_RXCSUM) smsc95xx_rx_csum_offload(ax_skb); skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */ diff --git a/target/linux/generic/hack-4.19/204-module_strip.patch b/target/linux/generic/hack-4.19/204-module_strip.patch index c9f84dd637..c5170ba295 100644 --- a/target/linux/generic/hack-4.19/204-module_strip.patch +++ b/target/linux/generic/hack-4.19/204-module_strip.patch @@ -114,7 +114,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -3028,9 +3028,11 @@ static int setup_load_info(struct load_i +@@ -3030,9 +3030,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3051,6 +3053,7 @@ static int check_modinfo(struct module * +@@ -3053,6 +3055,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/generic/hack-4.19/259-regmap_dynamic.patch b/target/linux/generic/hack-4.19/259-regmap_dynamic.patch index af9431e189..c9d88a4e5f 100644 --- a/target/linux/generic/hack-4.19/259-regmap_dynamic.patch +++ b/target/linux/generic/hack-4.19/259-regmap_dynamic.patch @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -3040,3 +3041,5 @@ static int __init regmap_initcall(void) +@@ -3032,3 +3033,5 @@ static int __init regmap_initcall(void) return 0; } postcore_initcall(regmap_initcall); From 40c40cc8fb836b4fc777d2b1e04529fd11b4cffe Mon Sep 17 00:00:00 2001 From: Xiaok <3795104+luxiaok@users.noreply.github.com> Date: Mon, 13 Jul 2020 10:09:57 +0800 Subject: [PATCH 04/20] vlmcsd: bump version to svn1113-2020-03-28 (#5088) --- package/lean/vlmcsd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/vlmcsd/Makefile b/package/lean/vlmcsd/Makefile index 50c8f160f4..d63579e143 100644 --- a/package/lean/vlmcsd/Makefile +++ b/package/lean/vlmcsd/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vlmcsd -PKG_VERSION:=svn1112 +PKG_VERSION:=svn1113 PKG_RELEASE:=1 PKG_MAINTAINER:=fuyumi <280604399@qq.com> @@ -10,7 +10,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/Wind4/vlmcsd.git -PKG_SOURCE_VERSION:=cd488aeb85aedefe1cb4db02c632397d78a9de88 +PKG_SOURCE_VERSION:=e599080486478e219cd065e141d6de050a450c27 PKG_SOURCE_SUBDIR:=$(PKG_NAME) PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_VERSION).tar.gz From eda338f871590b979cd971b2da23aba60d18e4e5 Mon Sep 17 00:00:00 2001 From: HiGarfield <32226909+HiGarfield@users.noreply.github.com> Date: Tue, 14 Jul 2020 20:00:10 +0800 Subject: [PATCH 05/20] openvpn: fix uci-defaults script (#5103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复防火墙端口号。用户如果设置自定义端口,例如1197,则升级固件时,需要uci查询用户设定的自定义端口号,然后打开防火墙端口。 --- .../luci-app-openvpn-server/root/etc/uci-defaults/openvpn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/lean/luci-app-openvpn-server/root/etc/uci-defaults/openvpn b/package/lean/luci-app-openvpn-server/root/etc/uci-defaults/openvpn index 115d258828..a41bbad56c 100755 --- a/package/lean/luci-app-openvpn-server/root/etc/uci-defaults/openvpn +++ b/package/lean/luci-app-openvpn-server/root/etc/uci-defaults/openvpn @@ -1,5 +1,8 @@ #!/bin/sh +openvpn_port="$(uci -q get openvpn.myvpn.port)" +[ -z "$openvpn_port" ] && openvpn_port=1194 + uci -q batch <<-EOF >/dev/null delete network.vpn0 set network.vpn0=interface @@ -14,7 +17,7 @@ uci -q batch <<-EOF >/dev/null set firewall.openvpn.target='ACCEPT' set firewall.openvpn.src='wan' set firewall.openvpn.proto='tcp udp' - set firewall.openvpn.dest_port='1194' + set firewall.openvpn.dest_port="$openvpn_port" delete firewall.vpn set firewall.vpn=zone From 0e650f7a866fdd2b2fedbadb5903f72ce77e6b33 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Thu, 16 Jul 2020 20:03:36 +0800 Subject: [PATCH 06/20] syncthing: add GO_PKG_TAGS --- package/zxlhhyccc/syncthing/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/zxlhhyccc/syncthing/Makefile b/package/zxlhhyccc/syncthing/Makefile index 686e848efb..c43609e70b 100644 --- a/package/zxlhhyccc/syncthing/Makefile +++ b/package/zxlhhyccc/syncthing/Makefile @@ -42,9 +42,10 @@ GO_PKG_LDFLAGS_X:= \ github.com/syncthing/syncthing/lib/build.User=ctcgfw \ github.com/syncthing/syncthing/lib/build.Host=project-openwrt \ github.com/syncthing/syncthing/lib/build.Program=syncthing +GO_PKG_TAGS:=noupgrade define Build/Compile - $(call GoPackage/Build/Compile,-tags noupgrade) + $(call GoPackage/Build/Compile) $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/syncthing endef From f4689c739bb48eb8bfd0b055b75257113ec3ce36 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 14 Jul 2020 10:28:45 +0200 Subject: [PATCH 07/20] ipq40xx: fix ethernet vlan double tagging As the the SoC uses implicit vlan tagging for dual MAC support, the offload feature breaks when using double tagging. This is backport of 9da2b567605b0964d921b9ca4f0c9886db4f636d from trunk. As the layout of the files has changed a cherry-pick was not possible. Signed-off-by: Sven Eckelmann Signed-off-by: John Crispin --- .../716-essedma-vlan-double-tag.patch | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 target/linux/ipq40xx/patches-4.14/716-essedma-vlan-double-tag.patch diff --git a/target/linux/ipq40xx/patches-4.14/716-essedma-vlan-double-tag.patch b/target/linux/ipq40xx/patches-4.14/716-essedma-vlan-double-tag.patch new file mode 100644 index 0000000000..f57804f3c7 --- /dev/null +++ b/target/linux/ipq40xx/patches-4.14/716-essedma-vlan-double-tag.patch @@ -0,0 +1,193 @@ +From: Sven Eckelmann +Date: Wed, 8 Feb 2017 16:26:00 +0100 +Subject: [PATCH] ipq40xx: Fix ar40xx port separation + +It is currently not possible to submit (or receive) VLAN tagged frames over +the ar40xx PHY switch and the edma ethernet device. + +This can be worked around by disabling enable_vlan. The separation of the +eth0 and eth1 ports is then done by the vlan_tag information from the +device tree. But the ar40xx PHY switch then also has to parse the word3 +port bitmap (word3) from the TDP when data was received from the CPU port +(0). + +IssueID: #2857 + +Forwarded: no + The ar40xx.c change was forwarded to Xiaofei Shen + (QCA). But John Crispin will rewrite the driver anyway and we have to check + later if this change is required in his driver too. +--- + drivers/net/phy/ar40xx.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/phy/ar40xx.c b/drivers/net/phy/ar40xx.c +index e408e8f7312f749aeb29c73a589047856e9479c7..421399b9b33e6f42d4e38db3f90b0c1d514a0b79 100644 +--- a/drivers/net/phy/ar40xx.c ++++ b/drivers/net/phy/ar40xx.c +@@ -1200,7 +1200,11 @@ ar40xx_init_port(struct ar40xx_priv *priv, int port) + ar40xx_rmw(priv, AR40XX_REG_PORT_STATUS(port), + AR40XX_PORT_AUTO_LINK_EN, 0); + +- ar40xx_write(priv, AR40XX_REG_PORT_HEADER(port), 0); ++ /* CPU port is setting headers to limit output ports */ ++ if (port == 0) ++ ar40xx_write(priv, AR40XX_REG_PORT_HEADER(port), 0x8); ++ else ++ ar40xx_write(priv, AR40XX_REG_PORT_HEADER(port), 0); + + ar40xx_write(priv, AR40XX_REG_PORT_VLAN0(port), 0); + +From: Sven Eckelmann +Date: Fri, 17 Mar 2017 11:00:40 +0100 +Subject: [PATCH] ipq40xx: Disable CTAG TX VLAN offloading + +The driver requires the offloading to set the VLAN specific header for the +port selection. It can therefore not be used at the same time to offload +the setting of the VLAN header on top of essedma interface. + +Forwarded: no +--- + drivers/net/ethernet/qualcomm/essedma/edma_axi.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c +index 81fc1e1b64daa41b15f21634ac1f08de0f5822a7..db184b82769f53e1554a1c51c53414ef7cadd7f6 100644 +--- a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c ++++ b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c +@@ -970,7 +970,6 @@ static int edma_axi_probe(struct platform_device *pdev) + edma_netdev[i]->netdev_ops = &edma_axi_netdev_ops; + edma_netdev[i]->max_mtu = 9000; + edma_netdev[i]->features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM +- | NETIF_F_HW_VLAN_CTAG_TX + | NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_SG | + NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_GRO; + edma_netdev[i]->hw_features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM | +From: Sven Eckelmann +Date: Fri, 17 Mar 2017 11:04:50 +0100 +Subject: [PATCH] ar40xx: Enable QinQ on the switch + +The switch used in by IPQ40xx is using VLANs by default to select the +outgoing port. It was therefore not possible to sent or receive 802.1q +tagged frames over the CPU port. This can be allowed by changing the port +configuration and lookup configuration. + +The resulting VLAN-tagged frames send or received by the CPU will therefore +look like QinQ frames. The outer VLAN tag is the port-VLAN of the port from +which the data was received or towards which the data has to be sent. The +inner VLAN tag (when it exists) is the VLAN which was configrued on top of +the ethernet device. + +Forwarded: no +--- + drivers/net/phy/ar40xx.c | 23 ++++++++++++++++++++--- + drivers/net/phy/ar40xx.h | 5 +++++ + 2 files changed, 25 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/phy/ar40xx.c b/drivers/net/phy/ar40xx.c +index 421399b9b33e6f42d4e38db3f90b0c1d514a0b79..4af26638d542a9ab5ca27454ce557233bcb64575 100644 +--- a/drivers/net/phy/ar40xx.c ++++ b/drivers/net/phy/ar40xx.c +@@ -1247,6 +1247,10 @@ ar40xx_init_globals(struct ar40xx_priv *priv) + t = (AR40XX_PORT0_FC_THRESH_ON_DFLT << 16) | + AR40XX_PORT0_FC_THRESH_OFF_DFLT; + ar40xx_write(priv, AR40XX_REG_PORT_FLOWCTRL_THRESH(0), t); ++ ++ /* set service tag to 802.1q */ ++ t = ETH_P_8021Q | AR40XX_ESS_SERVICE_TAG_STAG; ++ ar40xx_write(priv, AR40XX_ESS_SERVICE_TAG, t); + } + + static void +@@ -1572,7 +1576,11 @@ ar40xx_setup_port(struct ar40xx_priv *priv, int port, u32 members) + u32 pvid = priv->vlan_id[priv->pvid[port]]; + + if (priv->vlan) { +- egress = AR40XX_PORT_VLAN1_OUT_MODE_UNMOD; ++ if (priv->vlan_tagged & BIT(port)) ++ egress = AR40XX_PORT_VLAN1_OUT_MODE_TAG; ++ else ++ egress = AR40XX_PORT_VLAN1_OUT_MODE_UNMOD; ++ + ingress = AR40XX_IN_SECURE; + } else { + egress = AR40XX_PORT_VLAN1_OUT_MODE_UNTOUCH; +@@ -1583,8 +1591,17 @@ ar40xx_setup_port(struct ar40xx_priv *priv, int port, u32 members) + t |= pvid << AR40XX_PORT_VLAN0_DEF_CVID_S; + ar40xx_write(priv, AR40XX_REG_PORT_VLAN0(port), t); + +- t = AR40XX_PORT_VLAN1_PORT_VLAN_PROP; +- t |= egress << AR40XX_PORT_VLAN1_OUT_MODE_S; ++ t = egress << AR40XX_PORT_VLAN1_OUT_MODE_S; ++ ++ /* set CPU port to core port */ ++ if (port == 0) ++ t |= AR40XX_PORT_VLAN1_CORE_PORT; ++ ++ if (priv->vlan_tagged & BIT(port)) ++ t |= AR40XX_PORT_VLAN1_PORT_VLAN_PROP; ++ else ++ t |= AR40XX_PORT_VLAN1_PORT_TLS_MODE; ++ + ar40xx_write(priv, AR40XX_REG_PORT_VLAN1(port), t); + + t = members; +diff --git a/drivers/net/phy/ar40xx.h b/drivers/net/phy/ar40xx.h +index 722bf6ae4b32fcefa33e007ae34a3202315a3fe1..7ba40ccf753fe833e6a01b32cfe1407a317d92ee 100644 +--- a/drivers/net/phy/ar40xx.h ++++ b/drivers/net/phy/ar40xx.h +@@ -151,6 +151,9 @@ struct ar40xx_mib_desc { + #define AR40XX_MIB_FUNC_NO_OP 0x0 + #define AR40XX_MIB_FUNC_FLUSH 0x1 + ++#define AR40XX_ESS_SERVICE_TAG 0x48 ++#define AR40XX_ESS_SERVICE_TAG_STAG BIT(17) ++ + #define AR40XX_REG_PORT_STATUS(_i) (0x07c + (_i) * 4) + #define AR40XX_PORT_SPEED BITS(0, 2) + #define AR40XX_PORT_STATUS_SPEED_S 0 +@@ -179,6 +182,8 @@ struct ar40xx_mib_desc { + #define AR40XX_PORT_VLAN0_DEF_CVID_S 16 + + #define AR40XX_REG_PORT_VLAN1(_i) (0x424 + (_i) * 0x8) ++#define AR40XX_PORT_VLAN1_CORE_PORT BIT(9) ++#define AR40XX_PORT_VLAN1_PORT_TLS_MODE BIT(7) + #define AR40XX_PORT_VLAN1_PORT_VLAN_PROP BIT(6) + #define AR40XX_PORT_VLAN1_OUT_MODE BITS(12, 2) + #define AR40XX_PORT_VLAN1_OUT_MODE_S 12 +From: Sven Eckelmann +Date: Wed, 29 Mar 2017 16:05:26 +0200 +Subject: [PATCH] ipq40xx: Disable NETIF_F_RXHASH support in essedma + +The NETIF_F_RXHASH requires that each skb set the hash correctly with +skb_set_hash. essedma tries to do that but the set hash always results in +only used CPU when RPS is allowed for all CPUs. + +Disabling RXHASH works around this problem for now. + +IssueID: #5477 +Forwarded: no + Upstream author was informed via e-mail about the problem +--- + drivers/net/ethernet/qualcomm/essedma/edma_axi.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c +index db184b82769f53e1554a1c51c53414ef7cadd7f6..975e119cfe6f1a8cfe54ac0eb8f8752aa4bf22af 100644 +--- a/drivers/net/ethernet/qualcomm/essedma/edma_axi.c ++++ b/drivers/net/ethernet/qualcomm/essedma/edma_axi.c +@@ -984,10 +984,10 @@ static int edma_axi_probe(struct platform_device *pdev) + NETIF_F_GRO; + + #ifdef CONFIG_RFS_ACCEL +- edma_netdev[i]->features |= NETIF_F_RXHASH | NETIF_F_NTUPLE; +- edma_netdev[i]->hw_features |= NETIF_F_RXHASH | NETIF_F_NTUPLE; +- edma_netdev[i]->vlan_features |= NETIF_F_RXHASH | NETIF_F_NTUPLE; +- edma_netdev[i]->wanted_features |= NETIF_F_RXHASH | NETIF_F_NTUPLE; ++ edma_netdev[i]->features |= NETIF_F_NTUPLE; ++ edma_netdev[i]->hw_features |= NETIF_F_NTUPLE; ++ edma_netdev[i]->vlan_features |= NETIF_F_NTUPLE; ++ edma_netdev[i]->wanted_features |= NETIF_F_NTUPLE; + #endif + edma_set_ethtool_ops(edma_netdev[i]); + From 31d706251f230c9093f9a4dc2088efb9938863c9 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 13 Jul 2020 22:36:47 +0200 Subject: [PATCH 08/20] glibc: fix avx2 strncmp offset compare condition check [BZ #25933] 4e8a33a959 NEWS: Mention BZ 25933 fix fd15ba932d Fix avx2 strncmp offset compare condition check [BZ #25933 Signed-off-by: Hans Dedecker --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index f0b95d3cc7..e3f2ea60cf 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -11,8 +11,8 @@ PKG_VERSION:=2.31 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=3a44844c97a8ca1d0798c45b5252e6a49f9cf8e1 -PKG_MIRROR_HASH:=d7206510e494b3c723173d8ec0dd2e41314da59075871c5642324688001b3f6e +PKG_SOURCE_VERSION:=4e8a33a9590edc5c3a2cc5e726a3f2a73b66cdc0 +PKG_MIRROR_HASH:=41f678661dd1ee644dfae9734e27b47877ed7dee87c27eaddd9055394d36fe6a PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz From fb45025bc2020d680346f7e47a5dc0c52ec54837 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 14 Jul 2020 00:23:11 +0100 Subject: [PATCH 09/20] procd: update to git HEAD 639df57 uxc: fix build with uClibc-ng b2230e4 procd: add service instance watchdog Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index cbdd38d197..abcc9a7a3c 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-07-13 -PKG_SOURCE_VERSION:=dacab12b301085eac00e84a94e42096de70886e8 -PKG_MIRROR_HASH:=e9c49884ea1dd6554ce057c8ca7fb23bc980939b92e11f43d37b930c29f63dbd +PKG_SOURCE_DATE:=2020-07-14 +PKG_SOURCE_VERSION:=b2230e4ff28b29472d0a232fee5d9f4168390b52 +PKG_MIRROR_HASH:=67dd91d469a2e996a6b350575cfc0accedcf9ac948feaeee0d665199820bb6b0 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 10479fcd6d0d998089dbd620789b6eb43564ad16 Mon Sep 17 00:00:00 2001 From: Daniel Bailey Date: Mon, 13 Jul 2020 15:21:50 -0700 Subject: [PATCH 10/20] procd: allow optional watchdog instance parameter Optional instance watchdog timeout and watchdog mode can be set by adding: procd_set_param $mode $timeout $mode is an integer [0-1] representing instance watchdog mode of operation: 0 = disabled 1 = passive mode, client must periodically poke watchdog via ubus $timeout is an integer representing how often, in seconds, the watchdog must be poked. Signed-off-by: Daniel Bailey --- package/system/procd/files/procd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index dd6dc1c58d..d86b7219da 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -247,7 +247,7 @@ _procd_set_param() { env|data|limits) _procd_add_table "$type" "$@" ;; - command|netdev|file|respawn|watch) + command|netdev|file|respawn|watch|watchdog) _procd_add_array "$type" "$@" ;; error) @@ -378,7 +378,7 @@ _procd_append_param() { env|data|limits) _procd_add_table_data "$@" ;; - command|netdev|file|respawn|watch) + command|netdev|file|respawn|watch|watchdog) _procd_add_array_data "$@" ;; error) From b39f6377f9a67cd961a40f1df7c6eed3324fce9e Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Mon, 29 Jun 2020 22:04:54 -0700 Subject: [PATCH 11/20] iproute2: tc: fix dynamic symbol table size optimization Recent iproute2 5.x versions modified the symbols resolved for plugins, causing "tc .. action xt .." to fail. Update the list of symbols to fix. Fixes: b61495409bb3 ("iproute2: tc: reduce size of dynamic symbol table") Signed-off-by: Tony Ambardar --- .../utils/iproute2/patches/175-reduce-dynamic-syms.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch index f4e33c4511..dbb516f02e 100644 --- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch +++ b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch @@ -39,6 +39,6 @@ + for s in `grep -B 3 '\> $@ ; \ -+ echo "show_stats; print_tm; parse_rtattr; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> $@ ++ echo "show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> $@ + endif From dcfb84c2f77d2d1ab0570752334a3702909e7b3d Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Mon, 29 Jun 2020 22:07:19 -0700 Subject: [PATCH 12/20] iproute2: tc: fix missing em_ipset module Feature detection doesn't recognize ipset v7 use on kernel v5.x systems and thus disables the tc ematch function em_ipset. - backport patch: * 002-configure-support-ipset-v7.patch: 650591a7a70c configure: support ipset version 7 with kernel version 5 Fixes: 4e0c54bc5bc8 ("kernel: add support for kernel 5.4") Signed-off-by: Tony Ambardar --- package/network/utils/iproute2/Makefile | 2 +- .../002-configure-support-ipset-v7.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 package/network/utils/iproute2/patches/002-configure-support-ipset-v7.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 5646560c3b..89bbeb5608 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 PKG_VERSION:=5.7.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 diff --git a/package/network/utils/iproute2/patches/002-configure-support-ipset-v7.patch b/package/network/utils/iproute2/patches/002-configure-support-ipset-v7.patch new file mode 100644 index 0000000000..cd0c529544 --- /dev/null +++ b/package/network/utils/iproute2/patches/002-configure-support-ipset-v7.patch @@ -0,0 +1,32 @@ +From 650591a7a70cd79d826fcdc579a20c168c987cf2 Mon Sep 17 00:00:00 2001 +From: Tony Ambardar +Date: Tue, 7 Jul 2020 00:58:33 -0700 +Subject: [PATCH] configure: support ipset version 7 with kernel version 5 + +The configure script checks for ipset v6 availability but doesn't test +for v7, which is backward compatible and used on kernel v5.x systems. +Update the script to test for both ipset versions. Without this change, +the tc ematch function em_ipset will be disabled. + +Signed-off-by: Tony Ambardar +Signed-off-by: Stephen Hemminger +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index f415bf49..307912aa 100755 +--- a/configure ++++ b/configure +@@ -208,7 +208,7 @@ typedef unsigned short ip_set_id_t; + #include + + struct xt_set_info info; +-#if IPSET_PROTOCOL == 6 ++#if IPSET_PROTOCOL == 6 || IPSET_PROTOCOL == 7 + int main(void) + { + return IPSET_MAXNAMELEN; +-- +2.17.1 + From 6bbfa13ce10e0acc1b51a8c7ad0862336aaa32cb Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 15 Jul 2020 00:01:36 +0200 Subject: [PATCH 13/20] ravpower-mcu: add package Signed-off-by: David Bauer --- package/utils/ravpower-mcu/Makefile | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/utils/ravpower-mcu/Makefile diff --git a/package/utils/ravpower-mcu/Makefile b/package/utils/ravpower-mcu/Makefile new file mode 100644 index 0000000000..949ccfcce1 --- /dev/null +++ b/package/utils/ravpower-mcu/Makefile @@ -0,0 +1,34 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=ravpower-mcu +PKG_RELEASE:=2 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=https://github.com/blocktrron/ravpower-mcu.git +PKG_MIRROR_HASH:=edde0fda3fc708eac65baff46b5b6f1290ab733d3f4bd7fc027ef45c3d1b5814 +PKG_SOURCE_DATE:=2020-06-19 +PKG_SOURCE_VERSION:=1665d9e9212dcd118629a74fbe658841f81036f7 +PKG_MAINTAINER:=David Bauer +PKG_LICENSE:=GPL-2.0-or-later + +include $(INCLUDE_DIR)/package.mk + +define Package/ravpower-mcu + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Utility to control the RAVPower RP-WD009 PMIC + URL:=https://github.com/blocktrron/ravpower-mcu/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall" +endef + +define Package/ravpower-mcu/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/ravpower-mcu $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ravpower-mcu)) From 6a5cf0b8168c915fdfc19115b622d310cb0aab5e Mon Sep 17 00:00:00 2001 From: Johannes Kimmel Date: Mon, 8 Jun 2020 16:14:43 +0200 Subject: [PATCH 14/20] vxlan: fix udp checksum control So far, passing "rxcsum" and "txcsum" had no effect. Fixes: 95ab18e0124e ("vxlan: add options to enable and disable UDP checksums") Signed-off-by: Johannes Kimmel [add Fixes:] Signed-off-by: Adrian Schmutzler --- package/network/config/vxlan/files/vxlan.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/network/config/vxlan/files/vxlan.sh b/package/network/config/vxlan/files/vxlan.sh index d055d41edc..7b1c703955 100755 --- a/package/network/config/vxlan/files/vxlan.sh +++ b/package/network/config/vxlan/files/vxlan.sh @@ -129,6 +129,8 @@ vxlan_generic_init_config() { proto_config_add_int "ttl" proto_config_add_int "tos" proto_config_add_int "mtu" + proto_config_add_boolean "rxcsum" + proto_config_add_boolean "txcsum" proto_config_add_string "macaddr" } From 6bda55870e81b2ebe3b8c3f5972cbe62c0eef679 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 15 Jul 2020 16:49:36 +0200 Subject: [PATCH 15/20] vxlan: bump and change to PKG_RELEASE Bumping package version has been overlooked in a previous commit. While at it, use PKG_RELEASE instead of PKG_VERSION, as the latter is meant for upstream version number only. (The effective version string for the package would be "3" in both cases, so there is no harm done for version comparison.) Fixes: 0453c3866feb ("vxlan: fix udp checksum control") Signed-off-by: Adrian Schmutzler --- package/network/config/vxlan/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/vxlan/Makefile b/package/network/config/vxlan/Makefile index aeceb9cd88..9d825641e7 100644 --- a/package/network/config/vxlan/Makefile +++ b/package/network/config/vxlan/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vxlan -PKG_VERSION:=2 +PKG_RELEASE:=3 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk From ba7e451bc5c192c3708e01a31350da787e486053 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 24 Feb 2020 16:57:38 +0100 Subject: [PATCH 16/20] package: drop PKG_VERSION for purely local packages In the package guidelines, PKG_VERSION is supposed to be used as "The upstream version number that we're downloading", while PKG_RELEASE is referred to as "The version of this package Makefile". Thus, the variables in a strict interpretation provide a clear distinction between "their" (upstream) version in PKG_VERSION and "our" (local OpenWrt trunk) version in PKG_RELEASE. For local (OpenWrt-only) packages, this implies that those will only need PKG_RELEASE defined, while PKG_VERSION does not apply following a strict interpretation. While the majority of "our" packages actually follow that scheme, there are also some that mix both variables or have one of them defined but keep them at "1". This is misleading and confusing, which can be observed by the fact that there typically either one of the variables is never bumped or the choice of the variable to increase depends on the person doing the change. Consequently, this patch aims at clarifying the situation by consistently using only PKG_RELEASE for "our" packages. To achieve that, PKG_VERSION is removed there, bumping PKG_RELEASE where necessary to ensure the resulting package version string is bigger than before. During adjustment, one has to make sure that the new resulting composite package version will not be considered "older" than the previous one. A useful tool for evaluating that is 'opkg compare-versions'. In principle, there are the following cases: 1. Sole PKG_VERSION replaced by sole PKG_RELEASE: In this case, the resulting version string does not change, it's just the value of the variable put in the file. Consequently, we do not bump the number in these cases so nobody is tempted to install the same package again. 2. PKG_VERSION and PKG_RELEASE replaced by sole PKG_RELEASE: In this case, the resulting version string has been "version-release", e.g. 1-3 or 1.0-3. For this case, the new PKG_RELEASE will just need to be higher than the previous PKG_VERSION. For the cases where PKG_VERSION has always sticked to "1", and PKG_RELEASE has been incremented, we take the most recent value of PKG_RELEASE. Apart from that, a few packages appear to have developed their own complex versioning scheme, e.g. using x.y.z number for PKG_VERSION _and_ a PKG_RELEASE (qos-scripts) or using dates for PKG_VERSION (adb-enablemodem, wwan). I didn't touch these few in this patch. Cc: Hans Dedecker Cc: Felix Fietkau Cc: Andre Valentin Cc: Matthias Schiffer Cc: Jo-Philipp Wich Cc: Steven Barth Cc: Daniel Golle Cc: John Crispin Signed-off-by: Adrian Schmutzler --- package/kernel/om-watchdog/Makefile | 1 - package/kernel/trelay/Makefile | 1 - package/network/config/gre/Makefile | 4 +- package/network/config/gre/files/gre.sh | 21 +++-- package/network/config/ipip/Makefile | 4 +- package/network/config/ipip/files/ipip.sh | 2 - package/network/config/vti/Makefile | 4 +- package/network/config/vti/files/vti.sh | 2 - package/network/config/xfrm/Makefile | 38 +++++++++ package/network/config/xfrm/files/xfrm.sh | 69 +++++++++++++++ package/network/ipv6/464xlat/Makefile | 2 +- package/network/ipv6/6in4/Makefile | 3 +- package/network/ipv6/6rd/Makefile | 3 +- package/network/ipv6/6to4/Makefile | 3 +- package/network/ipv6/ds-lite/Makefile | 3 +- package/network/ipv6/map/Makefile | 3 +- package/network/utils/rssileds/Makefile | 3 +- package/system/urandom-seed/Makefile | 13 ++- .../files/lib/preinit/81_urandom_seed | 0 package/system/zram-swap/Makefile | 3 +- package/system/zram-swap/files/zram.init | 85 +++++++++++++++++-- 21 files changed, 218 insertions(+), 49 deletions(-) create mode 100644 package/network/config/xfrm/Makefile create mode 100755 package/network/config/xfrm/files/xfrm.sh mode change 100755 => 100644 package/system/urandom-seed/files/lib/preinit/81_urandom_seed diff --git a/package/kernel/om-watchdog/Makefile b/package/kernel/om-watchdog/Makefile index 403069b816..a7e859dc8b 100644 --- a/package/kernel/om-watchdog/Makefile +++ b/package/kernel/om-watchdog/Makefile @@ -9,7 +9,6 @@ include $(TOPDIR)/rules.mk PKG_NAME:=om-watchdog PKG_RELEASE:=2 -PKG_VERSION:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/kernel/trelay/Makefile b/package/kernel/trelay/Makefile index 258cbb184a..72d41aa60c 100644 --- a/package/kernel/trelay/Makefile +++ b/package/kernel/trelay/Makefile @@ -9,7 +9,6 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=trelay -PKG_VERSION:=0.1 PKG_RELEASE:=2 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/gre/Makefile b/package/network/config/gre/Makefile index a7e8612c6c..b16dd72cde 100644 --- a/package/network/config/gre/Makefile +++ b/package/network/config/gre/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gre -PKG_VERSION:=1 -PKG_RELEASE:=9 +PKG_RELEASE:=12 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk @@ -24,6 +23,7 @@ define Package/gre TITLE:=Generic Routing Encapsulation config support DEPENDS:=+kmod-gre +IPV6:kmod-gre6 +resolveip PROVIDES:=grev4 grev6 + PKGARCH:=all endef define Package/gre/description diff --git a/package/network/config/gre/files/gre.sh b/package/network/config/gre/files/gre.sh index ca11e87cfd..eb3df5b48c 100755 --- a/package/network/config/gre/files/gre.sh +++ b/package/network/config/gre/files/gre.sh @@ -13,10 +13,9 @@ gre_generic_setup() { local local="$3" local remote="$4" local link="$5" - local mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast - json_get_vars mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast + local mtu ipv6 ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast + json_get_vars mtu ipv6 ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast - [ -z "$zone" ] && zone="wan" [ -z "$multicast" ] && multicast=1 proto_init_update "$link" 1 @@ -24,6 +23,7 @@ gre_generic_setup() { proto_add_tunnel json_add_string mode "$mode" json_add_int mtu "${mtu:-1280}" + json_add_boolean ipv6 "${ipv6:-1}" [ -n "$df" ] && json_add_boolean df "$df" [ -n "$ttl" ] && json_add_int ttl "$ttl" [ -n "$tos" ] && json_add_string tos "$tos" @@ -57,7 +57,7 @@ gre_setup() { local remoteip local ipaddr peeraddr - json_get_vars df ipaddr peeraddr tunlink + json_get_vars df ipaddr peeraddr tunlink nohostroute [ -z "$peeraddr" ] && { proto_notify_error "$cfg" "MISSING_PEER_ADDRESS" @@ -77,7 +77,9 @@ gre_setup() { break done - ( proto_add_host_dependency "$cfg" "$peeraddr" "$tunlink" ) + if [ "${nohostroute}" != "1" ]; then + ( proto_add_host_dependency "$cfg" "$peeraddr" "$tunlink" ) + fi [ -z "$ipaddr" ] && { local wanif="$tunlink" @@ -134,7 +136,7 @@ grev6_setup() { local remoteip6 local ip6addr peer6addr weakif - json_get_vars ip6addr peer6addr tunlink weakif encaplimit + json_get_vars ip6addr peer6addr tunlink weakif encaplimit nohostroute [ -z "$peer6addr" ] && { proto_notify_error "$cfg" "MISSING_PEER_ADDRESS" @@ -154,7 +156,9 @@ grev6_setup() { break done - ( proto_add_host_dependency "$cfg" "$peer6addr" "$tunlink" ) + if [ "${nohostroute}" != "1" ]; then + ( proto_add_host_dependency "$cfg" "$peer6addr" "$tunlink" ) + fi [ -z "$ip6addr" ] && { local wanif="$tunlink" @@ -245,6 +249,7 @@ gre_generic_init_config() { available=1 proto_config_add_int "mtu" + proto_config_add_boolean "ipv6" proto_config_add_int "ttl" proto_config_add_string "tos" proto_config_add_string "tunlink" @@ -263,6 +268,7 @@ proto_gre_init_config() { proto_config_add_string "ipaddr" proto_config_add_string "peeraddr" proto_config_add_boolean "df" + proto_config_add_boolean "nohostroute" } proto_gretap_init_config() { @@ -276,6 +282,7 @@ proto_grev6_init_config() { proto_config_add_string "peer6addr" proto_config_add_string "weakif" proto_config_add_string "encaplimit" + proto_config_add_boolean "nohostroute" } proto_grev6tap_init_config() { diff --git a/package/network/config/ipip/Makefile b/package/network/config/ipip/Makefile index 9bdb13c6bc..c262182558 100644 --- a/package/network/config/ipip/Makefile +++ b/package/network/config/ipip/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ipip -PKG_VERSION:=1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk @@ -20,6 +19,7 @@ define Package/ipip MAINTAINER:=Hans Dedecker TITLE:=IP in IP Tunnel config support DEPENDS:= +kmod-ipip +resolveip + PKGARCH:=all endef define Package/ipip/description diff --git a/package/network/config/ipip/files/ipip.sh b/package/network/config/ipip/files/ipip.sh index f1c94d6eed..15b1c978e3 100755 --- a/package/network/config/ipip/files/ipip.sh +++ b/package/network/config/ipip/files/ipip.sh @@ -47,8 +47,6 @@ proto_ipip_setup() { fi } - [ -z "$zone" ] && zone="wan" - proto_init_update "ipip-$cfg" 1 proto_add_tunnel diff --git a/package/network/config/vti/Makefile b/package/network/config/vti/Makefile index 0a4657c94e..ffac77ab91 100644 --- a/package/network/config/vti/Makefile +++ b/package/network/config/vti/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vti -PKG_VERSION:=1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk @@ -18,6 +17,7 @@ define Package/vti/Default SECTION:=net CATEGORY:=Network MAINTAINER:=Andre Valentin + PKGARCH:=all endef define Package/vti diff --git a/package/network/config/vti/files/vti.sh b/package/network/config/vti/files/vti.sh index 0443800a0c..ebfd9d41e1 100755 --- a/package/network/config/vti/files/vti.sh +++ b/package/network/config/vti/files/vti.sh @@ -16,8 +16,6 @@ vti_generic_setup() { local mtu zone ikey json_get_vars mtu zone ikey okey - [ -z "$zone" ] && zone="wan" - proto_init_update "$link" 1 proto_add_tunnel diff --git a/package/network/config/xfrm/Makefile b/package/network/config/xfrm/Makefile new file mode 100644 index 0000000000..1b3b99adb0 --- /dev/null +++ b/package/network/config/xfrm/Makefile @@ -0,0 +1,38 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xfrm +PKG_RELEASE:=2 +PKG_LICENSE:=GPL-2.0 + +include $(INCLUDE_DIR)/package.mk + +define Package/xfrm/Default + SECTION:=net + CATEGORY:=Network + MAINTAINER:=Andre Valentin + PKGARCH:=all +endef + +define Package/xfrm +$(call Package/xfrm/Default) + TITLE:=XFRM IPsec Tunnel Interface config support + DEPENDS:=+kmod-xfrm-interface +endef + +define Package/xfrm/description + XFRM IPsec Tunnel Interface config support (IPv4 and IPv6) in /etc/config/network. +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/xfrm/install + $(INSTALL_DIR) $(1)/lib/netifd/proto + $(INSTALL_BIN) ./files/xfrm.sh $(1)/lib/netifd/proto/xfrm.sh +endef + +$(eval $(call BuildPackage,xfrm)) diff --git a/package/network/config/xfrm/files/xfrm.sh b/package/network/config/xfrm/files/xfrm.sh new file mode 100755 index 0000000000..1bd1958726 --- /dev/null +++ b/package/network/config/xfrm/files/xfrm.sh @@ -0,0 +1,69 @@ +#!/bin/sh + +[ -n "$INCLUDE_ONLY" ] || { + . /lib/functions.sh + . /lib/functions/network.sh + . ../netifd-proto.sh + init_proto "$@" +} + +proto_xfrm_setup() { + local cfg="$1" + local mode="xfrm" + + local tunlink ifid mtu zone + json_get_vars tunlink ifid mtu zone + + [ -z "$tunlink" ] && { + proto_notify_error "$cfg" NO_TUNLINK + proto_block_restart "$cfg" + exit + } + + [ -z "$ifid" ] && { + proto_notify_error "$cfg" NO_IFID + proto_block_restart "$cfg" + exit + } + + ( proto_add_host_dependency "$cfg" '' "$tunlink" ) + + proto_init_update "$cfg" 1 + + proto_add_tunnel + json_add_string mode "$mode" + json_add_int mtu "${mtu:-1280}" + + json_add_string link "$tunlink" + + json_add_object 'data' + [ -n "$ifid" ] && json_add_int ifid "$ifid" + json_close_object + + proto_close_tunnel + + proto_add_data + [ -n "$zone" ] && json_add_string zone "$zone" + proto_close_data + + proto_send_update "$cfg" +} + +proto_xfrm_teardown() { + local cfg="$1" +} + +proto_xfrm_init_config() { + no_device=1 + available=1 + + proto_config_add_int "mtu" + proto_config_add_string "tunlink" + proto_config_add_string "zone" + proto_config_add_int "ifid" +} + + +[ -n "$INCLUDE_ONLY" ] || { + [ -f /lib/modules/$(uname -r)/xfrm_interface.ko -o -d /sys/module/xfrm_interface ] && add_protocol xfrm +} diff --git a/package/network/ipv6/464xlat/Makefile b/package/network/ipv6/464xlat/Makefile index f4dce2e77d..c792323235 100644 --- a/package/network/ipv6/464xlat/Makefile +++ b/package/network/ipv6/464xlat/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=464xlat -PKG_VERSION:=12 +PKG_RELEASE:=12 PKG_SOURCE_DATE:=2018-01-16 PKG_MAINTAINER:=Hans Dedecker diff --git a/package/network/ipv6/6in4/Makefile b/package/network/ipv6/6in4/Makefile index 8ff4730e74..08696ef7a8 100644 --- a/package/network/ipv6/6in4/Makefile +++ b/package/network/ipv6/6in4/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6in4 -PKG_VERSION:=25 -PKG_RELEASE:=1 +PKG_RELEASE:=26 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/ipv6/6rd/Makefile b/package/network/ipv6/6rd/Makefile index 47f20414fc..9836ae9361 100644 --- a/package/network/ipv6/6rd/Makefile +++ b/package/network/ipv6/6rd/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6rd -PKG_VERSION:=9 -PKG_RELEASE:=4 +PKG_RELEASE:=10 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/ipv6/6to4/Makefile b/package/network/ipv6/6to4/Makefile index 32d7b325aa..dfb66aaae2 100644 --- a/package/network/ipv6/6to4/Makefile +++ b/package/network/ipv6/6to4/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6to4 -PKG_VERSION:=12 -PKG_RELEASE:=2 +PKG_RELEASE:=13 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/ipv6/ds-lite/Makefile b/package/network/ipv6/ds-lite/Makefile index 198b6ebcc7..502da366a9 100644 --- a/package/network/ipv6/ds-lite/Makefile +++ b/package/network/ipv6/ds-lite/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ds-lite -PKG_VERSION:=7 -PKG_RELEASE:=4 +PKG_RELEASE:=8 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/ipv6/map/Makefile b/package/network/ipv6/map/Makefile index f05f216a4c..5d0e0bbd3d 100644 --- a/package/network/ipv6/map/Makefile +++ b/package/network/ipv6/map/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=map -PKG_VERSION:=4 -PKG_RELEASE:=13 +PKG_RELEASE:=5 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/utils/rssileds/Makefile b/package/network/utils/rssileds/Makefile index 7a59314693..892b9f2c51 100644 --- a/package/network/utils/rssileds/Makefile +++ b/package/network/utils/rssileds/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rssileds -PKG_VERSION:=0.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICNESE:=GPL-2.0+ include $(INCLUDE_DIR)/package.mk diff --git a/package/system/urandom-seed/Makefile b/package/system/urandom-seed/Makefile index 6bde2e0b8a..7cb7c72038 100644 --- a/package/system/urandom-seed/Makefile +++ b/package/system/urandom-seed/Makefile @@ -1,20 +1,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=urandom-seed -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0 - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) +PKG_RELEASE:=2 +PKG_LICENSE:=GPL-2.0-only include $(INCLUDE_DIR)/package.mk -define Package/$(PKG_NAME) +define Package/urandom-seed SECTION:=base CATEGORY:=Base system DEPENDS:=+getrandom TITLE:=/etc/urandom.seed handling for OpenWrt - URL:=http://openwrt.org/ + URL:=https://openwrt.org/ endef define Build/Prepare @@ -25,7 +22,7 @@ define Build/Compile/Default endef Build/Compile = $(Build/Compile/Default) -define Package/$(PKG_NAME)/install +define Package/urandom-seed/install $(CP) ./files/* $(1)/ endef diff --git a/package/system/urandom-seed/files/lib/preinit/81_urandom_seed b/package/system/urandom-seed/files/lib/preinit/81_urandom_seed old mode 100755 new mode 100644 diff --git a/package/system/zram-swap/Makefile b/package/system/zram-swap/Makefile index 87ffaae068..4422c351ea 100644 --- a/package/system/zram-swap/Makefile +++ b/package/system/zram-swap/Makefile @@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zram-swap -PKG_VERSION:=1.1 -PKG_RELEASE:=2 +PKG_RELEASE:=5 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) diff --git a/package/system/zram-swap/files/zram.init b/package/system/zram-swap/files/zram.init index 9df9d7d22b..a6126e578f 100755 --- a/package/system/zram-swap/files/zram.init +++ b/package/system/zram-swap/files/zram.init @@ -2,17 +2,21 @@ START=15 -ram_size() +EXTRA_COMMANDS="compact status" +EXTRA_HELP=" compact trigger compaction for all Z-RAM swap dev's + status print out status information & statistics about Z-RAM swap devices" + +ram_getsize() { local line while read line; do case "$line" in MemTotal:*) set $line; echo "$2"; break ;; esac; done $zdev/compact + + # If not running interactively, than just return + [ -z "$PS1" ] && return 0 + + echo "" + echo "Compacting zram device $zdev" + awk -v old_mem="$old_mem_used" -v ovr="$old_overhead" 'BEGIN { fmt = "%-25s - %.1f %s\n" } + { printf fmt, "Memory usage reduced by ", (old_mem-$3)/1024/1024, "MiB" + printf fmt, "Overhead reduced by", (ovr-($3-$2))/ovr*100, "%" }' <$zdev/mm_stat +} + start() { - local zram_size="$( zram_size )" - local zram_dev - if [ $( grep -cs zram /proc/swaps ) -ne 0 ]; then logger -s -t zram_start -p daemon.notice "[OK] zram swap is already mounted" return 1 fi - zram_dev="$( zram_getdev )" + local zram_size="$( zram_getsize )" + local zram_dev="$( zram_getdev )" zram_applicable "$zram_dev" || return 1 + local zram_priority="$( uci -q get system.@system[0].zram_priority )" + zram_priority=${zram_priority:+-p $zram_priority} logger -s -t zram_start -p daemon.debug "activating '$zram_dev' for swapping ($zram_size MegaBytes)" @@ -144,3 +200,18 @@ stop() } done } +# show memory stats for all zram swaps +status() +{ + for zram_dev in $( grep zram /proc/swaps |awk '{print $1}' ); do { + zram_stats "$zram_dev" + } done +} + +# trigger compaction for all zram swaps +compact() +{ + for zram_dev in $( grep zram /proc/swaps |awk '{print $1}' ); do { + zram_compact "$zram_dev" + } done +} From 587c46d0d2f00030a5098efa8de43a3a6a8d45d7 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 10 May 2020 16:20:55 +0200 Subject: [PATCH 17/20] base-files: replace backticks in lib/upgrade/nand.sh This replaces deprecated backticks by more versatile $(...) syntax. Signed-off-by: Adrian Schmutzler --- package/base-files/files/lib/upgrade/nand.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh index 99916a4e96..267b2c8a7d 100755 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/base-files/files/lib/upgrade/nand.sh @@ -231,7 +231,7 @@ nand_upgrade_ubinized() { # Write the UBIFS image to UBI volume nand_upgrade_ubifs() { - local rootfs_length=`(cat $1 | wc -c) 2> /dev/null` + local rootfs_length=$( (cat $1 | wc -c) 2> /dev/null) nand_upgrade_prepare_ubi "$rootfs_length" "ubifs" "0" "0" @@ -249,8 +249,8 @@ nand_upgrade_tar() { local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') board_dir=${board_dir%/} - local kernel_length=`(tar xf $tar_file ${board_dir}/kernel -O | wc -c) 2> /dev/null` - local rootfs_length=`(tar xf $tar_file ${board_dir}/root -O | wc -c) 2> /dev/null` + local kernel_length=$( (tar xf $tar_file ${board_dir}/kernel -O | wc -c) 2> /dev/null) + local rootfs_length=$( (tar xf $tar_file ${board_dir}/root -O | wc -c) 2> /dev/null) local rootfs_type="$(identify_tar "$tar_file" ${board_dir}/root)" @@ -320,7 +320,7 @@ nand_do_upgrade() { nand_do_platform_check() { local board_name="$1" local tar_file="$2" - local control_length=`(tar xf $tar_file sysupgrade-$board_name/CONTROL -O | wc -c) 2> /dev/null` + local control_length=$( (tar xf $tar_file sysupgrade-$board_name/CONTROL -O | wc -c) 2> /dev/null) local file_type="$(identify $2)" [ "$control_length" = 0 -a "$file_type" != "ubi" -a "$file_type" != "ubifs" ] && { From 037de3e579c98d0ba66977ddeb6cd9ca31408e05 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 3 Jul 2020 15:50:42 +0200 Subject: [PATCH 18/20] ipq806x: fix aliases node name for Qualcomm IPQ8064/DB149 This device uses a node incorrectly named "alias" instead of "aliases" since it was introduced. Remove it without replacement, as the definitions in it don't seem to be required anyway: The serial0 definition has never been effective anyway and this would be the only device deviating from the common setting "serial0 = &gsbi4_serial;" for ipq8064. (So, maybe the wrong node prevented us from finding out about the wrong serial definition?) The mdio-gpio0 alias was supposed to be removed in d2a2eb7e48f6 anyway, the redundant definition in the alias node was just overlooked back then. Fixes: 0fd202f3e563 ("ipq806x: add db149 dts files") Fixes: d2a2eb7e48f6 ("ipq806x: replace caf nss-gmac driver by upstream stmmac") Signed-off-by: Adrian Schmutzler --- .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts | 5 ----- .../files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts | 5 ----- 2 files changed, 10 deletions(-) diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts index f4cface193..b37e717609 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts @@ -14,11 +14,6 @@ }; }; - alias { - serial0 = &uart2; - mdio-gpio0 = &mdio0; - }; - chosen { stdout-path = "serial0:115200n8"; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts index 5da523a728..625e9a84ff 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts @@ -14,11 +14,6 @@ }; }; - alias { - serial0 = &uart2; - mdio-gpio0 = &mdio0; - }; - chosen { stdout-path = "serial0:115200n8"; }; From 9b305d84566b2de4268dfaac108b8d5eb0898588 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 14 Jul 2020 12:23:53 +0200 Subject: [PATCH 19/20] ipq806x: use consistent DT labels for gsbiX_serial Kernel uses the label gsbiX_serial, so let's adjust our labels to this naming scheme. This is cosmetic, and actually only already existing gsbi4_serial has been used at all. Signed-off-by: Adrian Schmutzler --- .../ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++-- .../ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064.dtsi b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064.dtsi index d850553000..a8242a0267 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -734,7 +734,7 @@ syscon-tcsr = <&tcsr>; - uart2: serial@12490000 { + gsbi2_serial: serial@12490000 { compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; reg = <0x12490000 0x1000>, <0x12480000 0x1000>; @@ -809,7 +809,7 @@ syscon-tcsr = <&tcsr>; - uart5: serial@1a240000 { + gsbi5_serial: serial@1a240000 { compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; reg = <0x1a240000 0x1000>, <0x1a200000 0x1000>; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi index f95b0b4f95..a542af7866 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -818,7 +818,7 @@ syscon-tcsr = <&tcsr>; - uart2: serial@12490000 { + gsbi2_serial: serial@12490000 { compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; reg = <0x12490000 0x1000>, <0x12480000 0x1000>; @@ -893,7 +893,7 @@ syscon-tcsr = <&tcsr>; - uart5: serial@1a240000 { + gsbi5_serial: serial@1a240000 { compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; reg = <0x1a240000 0x1000>, <0x1a200000 0x1000>; From 099c14802e2a4f53fd5fc33bfbbc2d1c6fadf453 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 14 Jul 2020 16:59:44 +0200 Subject: [PATCH 20/20] ipq806x: really fix aliases node for Qualcomm IPQ8064/DB149 Having looked at this again, it appears that only gsbi2_serial is actually enabled for this device, so the entry in the broken aliases node was correct. Therefore, this needs to set its own serial0 instead of inheriting "serial0 = &gsbi4_serial;" from DTSI. Do this with the correctly named aliases node now. Fixes: c83f7b6d217f ("ipq806x: fix aliases node name for Qualcomm IPQ8064/DB149") Signed-off-by: Adrian Schmutzler --- .../files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts | 6 +++++- .../files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts index b37e717609..61aff0f855 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-db149.dts @@ -4,6 +4,10 @@ model = "Qualcomm IPQ8064/DB149"; compatible = "qcom,ipq8064-db149", "qcom,ipq8064"; + aliases { + serial0 = &gsbi2_serial; + }; + reserved-memory { #address-cells = <1>; #size-cells = <1>; @@ -56,7 +60,7 @@ gsbi2: gsbi@12480000 { qcom,mode = ; status = "ok"; - uart2: serial@12490000 { + gsbi2_serial: serial@12490000 { status = "ok"; }; }; diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts index 625e9a84ff..35b7e0ea37 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-db149.dts @@ -4,6 +4,10 @@ model = "Qualcomm IPQ8064/DB149"; compatible = "qcom,ipq8064-db149", "qcom,ipq8064"; + aliases { + serial0 = &gsbi2_serial; + }; + reserved-memory { #address-cells = <1>; #size-cells = <1>; @@ -56,7 +60,8 @@ gsbi2: gsbi@12480000 { qcom,mode = ; status = "okay"; - uart2: serial@12490000 { + + gsbi2_serial: serial@12490000 { status = "okay"; }; };