From 487d312d256a7a53f4cc56e3f20b814c82c2aaea Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 7 Mar 2021 13:29:44 +0100 Subject: [PATCH 01/67] fastd: update and add L2TP variant This also drops the GMAC-based methods from gluon-mesh-vpn-fastd's check_site.lua, as they are not supported anymore. --- package/gluon-mesh-vpn-fastd/check_site.lua | 2 +- .../0001-fastd-simplify-Config.in.patch | 124 ++++++++++++++++++ ...isable-GMAC-based-methods-by-default.patch | 32 +++++ .../packages/0003-fastd-update-to-v22.patch | 59 +++++++++ .../0004-fastd-add-L2TP-variant.patch | 88 +++++++++++++ ...-fastd-fix-start-of-non-L2TP-variant.patch | 63 +++++++++ ...a-config-option-instead-of-a-variant.patch | 112 ++++++++++++++++ 7 files changed, 479 insertions(+), 1 deletion(-) create mode 100644 patches/packages/packages/0001-fastd-simplify-Config.in.patch create mode 100644 patches/packages/packages/0002-fastd-disable-GMAC-based-methods-by-default.patch create mode 100644 patches/packages/packages/0003-fastd-update-to-v22.patch create mode 100644 patches/packages/packages/0004-fastd-add-L2TP-variant.patch create mode 100644 patches/packages/packages/0005-fastd-fix-start-of-non-L2TP-variant.patch create mode 100644 patches/packages/packages/0006-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch diff --git a/package/gluon-mesh-vpn-fastd/check_site.lua b/package/gluon-mesh-vpn-fastd/check_site.lua index 70c0d079..57cc7bb1 100644 --- a/package/gluon-mesh-vpn-fastd/check_site.lua +++ b/package/gluon-mesh-vpn-fastd/check_site.lua @@ -1,4 +1,4 @@ -local fastd_methods = {'salsa2012+gmac', 'salsa2012+umac', 'null+salsa2012+gmac', 'null+salsa2012+umac', 'null'} +local fastd_methods = {'salsa2012+umac', 'null+salsa2012+umac', 'null'} need_array_of({'mesh_vpn', 'fastd', 'methods'}, fastd_methods) need_boolean(in_site({'mesh_vpn', 'fastd', 'configurable'}), false) diff --git a/patches/packages/packages/0001-fastd-simplify-Config.in.patch b/patches/packages/packages/0001-fastd-simplify-Config.in.patch new file mode 100644 index 00000000..973342cf --- /dev/null +++ b/patches/packages/packages/0001-fastd-simplify-Config.in.patch @@ -0,0 +1,124 @@ +From: Matthias Schiffer +Date: Sun, 7 Mar 2021 11:48:32 +0100 +Subject: fastd: simplify Config.in + +Signed-off-by: Matthias Schiffer +(cherry picked from commit 45976ff31a9894dec35fc4a077c9652f6cb59a54) + +diff --git a/net/fastd/Config.in b/net/fastd/Config.in +index 8302f7ee4dac874b1303ebeeb836551ef202c261..89ff6850aa5ab4ad0e762d8fb9473d5e5c820089 100644 +--- a/net/fastd/Config.in ++++ b/net/fastd/Config.in +@@ -1,102 +1,79 @@ ++if PACKAGE_fastd ++ + menu "Configuration" +- depends on PACKAGE_fastd + + config FASTD_ENABLE_METHOD_CIPHER_TEST + bool "Enable cipher-test method provider" +- depends on PACKAGE_fastd +- default n + + config FASTD_ENABLE_METHOD_COMPOSED_GMAC + bool "Enable composed-gmac method provider" +- depends on PACKAGE_fastd ++ select FASTD_ENABLE_MAC_GHASH + default y + + config FASTD_ENABLE_METHOD_COMPOSED_UMAC + bool "Enable composed-umac method provider" +- depends on PACKAGE_fastd ++ select FASTD_ENABLE_MAC_UHASH + default y + + config FASTD_ENABLE_METHOD_GENERIC_GMAC + bool "Enable generic-gmac method provider" +- depends on PACKAGE_fastd ++ select FASTD_ENABLE_MAC_GHASH + default y + + config FASTD_ENABLE_METHOD_GENERIC_POLY1305 + bool "Enable generic-poly1305 method provider" +- depends on PACKAGE_fastd +- default n + + config FASTD_ENABLE_METHOD_GENERIC_UMAC + bool "Enable generic-umac method provider" +- depends on PACKAGE_fastd ++ select FASTD_ENABLE_MAC_UHASH + default y + + config FASTD_ENABLE_METHOD_NULL + bool "Enable null method" +- depends on PACKAGE_fastd + default y + + + config FASTD_ENABLE_CIPHER_NULL + bool "Enable the null cipher" +- depends on PACKAGE_fastd + default y + + config FASTD_ENABLE_CIPHER_SALSA20 + bool "Enable the Salsa20 cipher" +- depends on PACKAGE_fastd +- default n + + config FASTD_ENABLE_CIPHER_SALSA2012 + bool "Enable the Salsa20/12 cipher" +- depends on PACKAGE_fastd + default y + + + config FASTD_ENABLE_MAC_GHASH +- bool "Enable the GHASH message authentication code" +- depends on PACKAGE_fastd +- default y ++ bool + + config FASTD_ENABLE_MAC_UHASH +- bool "Enable the UHASH message authentication code" +- depends on PACKAGE_fastd +- default y ++ bool + + + config FASTD_WITH_CAPABILITIES + bool "Enable POSIX capability support" +- depends on PACKAGE_fastd +- default n + + config FASTD_WITH_CMDLINE_USER + bool "Include support for setting user/group related options on the command line" +- depends on PACKAGE_fastd +- default n + + config FASTD_WITH_CMDLINE_LOGGING + bool "Include support for setting logging related options on the command line" +- depends on PACKAGE_fastd +- default n + + config FASTD_WITH_CMDLINE_OPERATION + bool "Include support for setting options related to the VPN operation (like mode, interface, encryption method) on the command line" +- depends on PACKAGE_fastd +- default n + + config FASTD_WITH_CMDLINE_COMMANDS + bool "Include support for setting handler scripts (e.g. --on-up) on the command line" +- depends on PACKAGE_fastd +- default n + + config FASTD_WITH_DYNAMIC_PEERS + bool "Include support for dynamic peers (using on-verify handlers)" +- depends on PACKAGE_fastd +- default n + + config FASTD_WITH_STATUS_SOCKET + bool "Include support for status sockets" +- depends on PACKAGE_fastd + default y + + endmenu ++ ++endif diff --git a/patches/packages/packages/0002-fastd-disable-GMAC-based-methods-by-default.patch b/patches/packages/packages/0002-fastd-disable-GMAC-based-methods-by-default.patch new file mode 100644 index 00000000..a0075a0b --- /dev/null +++ b/patches/packages/packages/0002-fastd-disable-GMAC-based-methods-by-default.patch @@ -0,0 +1,32 @@ +From: Matthias Schiffer +Date: Sun, 7 Mar 2021 11:50:04 +0100 +Subject: fastd: disable GMAC-based methods by default + +The UMAC-based methods provide higher performance than GMAC and aren't +suspectible to timing attacks when implemented in software (which is +always the case on OpenWrt, as OpenSSL support is disabled). Disable +GMAC by default to save a few KiB. + +Signed-off-by: Matthias Schiffer +(cherry picked from commit 916a65781829d93856bfb82cf78ba333b8fbc973) + +diff --git a/net/fastd/Config.in b/net/fastd/Config.in +index 89ff6850aa5ab4ad0e762d8fb9473d5e5c820089..b6d46246e53516cdb7fc6e4857ea62481b4e8276 100644 +--- a/net/fastd/Config.in ++++ b/net/fastd/Config.in +@@ -8,7 +8,6 @@ config FASTD_ENABLE_METHOD_CIPHER_TEST + config FASTD_ENABLE_METHOD_COMPOSED_GMAC + bool "Enable composed-gmac method provider" + select FASTD_ENABLE_MAC_GHASH +- default y + + config FASTD_ENABLE_METHOD_COMPOSED_UMAC + bool "Enable composed-umac method provider" +@@ -18,7 +17,6 @@ config FASTD_ENABLE_METHOD_COMPOSED_UMAC + config FASTD_ENABLE_METHOD_GENERIC_GMAC + bool "Enable generic-gmac method provider" + select FASTD_ENABLE_MAC_GHASH +- default y + + config FASTD_ENABLE_METHOD_GENERIC_POLY1305 + bool "Enable generic-poly1305 method provider" diff --git a/patches/packages/packages/0003-fastd-update-to-v22.patch b/patches/packages/packages/0003-fastd-update-to-v22.patch new file mode 100644 index 00000000..4c1f8016 --- /dev/null +++ b/patches/packages/packages/0003-fastd-update-to-v22.patch @@ -0,0 +1,59 @@ +From: Matthias Schiffer +Date: Sun, 27 Jun 2021 13:07:49 +0200 +Subject: fastd: update to v22 + +Signed-off-by: Matthias Schiffer +(cherry picked from commit c8ca43865dcc7be0e3193f9b7d12f40d3441c258) + +diff --git a/net/fastd/Config.in b/net/fastd/Config.in +index b6d46246e53516cdb7fc6e4857ea62481b4e8276..157d1e39931cc0163785212cb5eea7d8af4f46f2 100644 +--- a/net/fastd/Config.in ++++ b/net/fastd/Config.in +@@ -30,6 +30,10 @@ config FASTD_ENABLE_METHOD_NULL + bool "Enable null method" + default y + ++config FASTD_ENABLE_METHOD_NULL_L2TP ++ bool "Enable null@l2tp method" ++ default y ++ + + config FASTD_ENABLE_CIPHER_NULL + bool "Enable the null cipher" +diff --git a/net/fastd/Makefile b/net/fastd/Makefile +index c7ab056a9ae005a75a75911658607e64d6228aac..d1ed4cf9afbe2faf11a0fa3b7b4d281848a8df2d 100644 +--- a/net/fastd/Makefile ++++ b/net/fastd/Makefile +@@ -8,12 +8,12 @@ + include $(TOPDIR)/rules.mk + + PKG_NAME:=fastd +-PKG_VERSION:=21 ++PKG_VERSION:=22 + + PKG_MAINTAINER:=Matthias Schiffer + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz + PKG_SOURCE_URL:=https://github.com/NeoRaider/fastd/releases/download/v$(PKG_VERSION) +-PKG_HASH:=942f33bcd794bcb8e19da4c30c875bdfd4d0f1c24ec4dcdf51237791bbfb0d4c ++PKG_HASH:=19750b88705d66811b7c21b672537909c19ae6b21350688cbd1a3a54d08a8951 + + PKG_LICENSE:=BSD-2-Clause + PKG_LICENSE_FILES:=COPYRIGHT +@@ -26,6 +26,7 @@ PKG_CONFIG_DEPENDS:=\ + CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305 \ + CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC \ + CONFIG_FASTD_ENABLE_METHOD_NULL \ ++ CONFIG_FASTD_ENABLE_METHOD_NULL_L2TP \ + CONFIG_FASTD_ENABLE_CIPHER_NULL \ + CONFIG_FASTD_ENABLE_CIPHER_SALSA20 \ + CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 \ +@@ -81,7 +82,9 @@ MESON_ARGS += \ + -Dmethod_generic-poly1305=$(call feature,ENABLE_METHOD_GENERIC_POLY1305) \ + -Dmethod_generic-umac=$(call feature,ENABLE_METHOD_GENERIC_UMAC) \ + -Dmethod_null=$(call feature,ENABLE_METHOD_NULL) \ ++ -Dmethod_null_l2tp=$(call feature,ENABLE_METHOD_NULL_L2TP) \ + -Dstatus_socket=$(call feature,WITH_STATUS_SOCKET) \ ++ -Doffload_l2tp=disabled \ + -Dsystemd=disabled \ + -Duse_nacl=true \ + -Db_lto=true \ diff --git a/patches/packages/packages/0004-fastd-add-L2TP-variant.patch b/patches/packages/packages/0004-fastd-add-L2TP-variant.patch new file mode 100644 index 00000000..61948e3c --- /dev/null +++ b/patches/packages/packages/0004-fastd-add-L2TP-variant.patch @@ -0,0 +1,88 @@ +From: Matthias Schiffer +Date: Sun, 27 Jun 2021 13:26:26 +0200 +Subject: fastd: add L2TP variant + +Signed-off-by: Matthias Schiffer +(cherry picked from commit 7b9c04f95b5202d5eb75e4bf1c6831a667ac3d0f) + +diff --git a/net/fastd/Config.in b/net/fastd/Config.in +index 157d1e39931cc0163785212cb5eea7d8af4f46f2..3da5e1f183c5400cc38650efad39edf31c6f18d0 100644 +--- a/net/fastd/Config.in ++++ b/net/fastd/Config.in +@@ -1,4 +1,4 @@ +-if PACKAGE_fastd ++if PACKAGE_fastd || PACKAGE_fastd-l2tp + + menu "Configuration" + +diff --git a/net/fastd/Makefile b/net/fastd/Makefile +index d1ed4cf9afbe2faf11a0fa3b7b4d281848a8df2d..58255cb0ba1a3b00fbca7cfdd44abd3a923603f3 100644 +--- a/net/fastd/Makefile ++++ b/net/fastd/Makefile +@@ -15,8 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz + PKG_SOURCE_URL:=https://github.com/NeoRaider/fastd/releases/download/v$(PKG_VERSION) + PKG_HASH:=19750b88705d66811b7c21b672537909c19ae6b21350688cbd1a3a54d08a8951 + +-PKG_LICENSE:=BSD-2-Clause +-PKG_LICENSE_FILES:=COPYRIGHT ++PKG_LICENSE:=BSD-2-Clause LGPL-2.1-or-later ++PKG_LICENSE_FILES:=COPYRIGHT src/dep/libmnl/COPYING + + PKG_CONFIG_DEPENDS:=\ + CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST \ +@@ -54,6 +54,14 @@ define Package/fastd + TITLE:=Fast and Secure Tunneling Daemon + URL:=https://github.com/NeoRaider/fastd/ + SUBMENU:=VPN ++ VARIANT:=default ++endef ++define Package/fastd-l2tp ++$(Package/fastd) ++ DEPENDS+=+kmod-l2tp +kmod-l2tp-eth ++ TITLE+=(L2TP kernel offloading) ++ VARIANT:=l2tp ++ PROVIDES:=fastd + endef + + define Package/fastd/config +@@ -85,18 +93,31 @@ MESON_ARGS += \ + -Dmethod_null_l2tp=$(call feature,ENABLE_METHOD_NULL_L2TP) \ + -Dstatus_socket=$(call feature,WITH_STATUS_SOCKET) \ + -Doffload_l2tp=disabled \ ++ -Dlibmnl_builtin=true \ + -Dsystemd=disabled \ + -Duse_nacl=true \ + -Db_lto=true \ + -Dprefix=/usr + ++ifeq ($(BUILD_VARIANT),l2tp) ++ MESON_ARGS += \ ++ -Dmethod_null_l2tp=enabled \ ++ -Doffload_l2tp=enabled ++endif ++ + define Package/fastd/description +- Fast and secure tunneling daemon, which is optimized on small code size and few dependencies ++Fast and secure tunneling daemon, which is optimized on small code size and few dependencies ++endef ++define Package/fastd-l2tp/description ++$(Package/fastd/description) ++ ++This variant enables L2TP kernel offloadig support. + endef + + define Package/fastd/conffiles + /etc/config/fastd + endef ++Package/fastd-l2tp/conffiles = $(Package/fastd/conffiles) + + define Package/fastd/install + $(INSTALL_DIR) $(1)/usr/bin +@@ -110,5 +131,7 @@ define Package/fastd/install + $(INSTALL_DIR) $(1)/lib/upgrade/keep.d + $(INSTALL_DATA) files/fastd.upgrade $(1)/lib/upgrade/keep.d/fastd + endef ++Package/fastd-l2tp/install = $(Package/fastd/install) + + $(eval $(call BuildPackage,fastd)) ++$(eval $(call BuildPackage,fastd-l2tp)) diff --git a/patches/packages/packages/0005-fastd-fix-start-of-non-L2TP-variant.patch b/patches/packages/packages/0005-fastd-fix-start-of-non-L2TP-variant.patch new file mode 100644 index 00000000..a34ce851 --- /dev/null +++ b/patches/packages/packages/0005-fastd-fix-start-of-non-L2TP-variant.patch @@ -0,0 +1,63 @@ +From: Matthias Schiffer +Date: Sun, 27 Jun 2021 14:48:48 +0200 +Subject: fastd: fix start of non-L2TP variant + +Signed-off-by: Matthias Schiffer +(cherry picked from commit 62742985d7cf15029b4d6027a7ccfa0e480278ca) + +diff --git a/net/fastd/Makefile b/net/fastd/Makefile +index 58255cb0ba1a3b00fbca7cfdd44abd3a923603f3..6fd316374d876834995f696fc63e7fbb98fb437c 100644 +--- a/net/fastd/Makefile ++++ b/net/fastd/Makefile +@@ -9,6 +9,7 @@ include $(TOPDIR)/rules.mk + + PKG_NAME:=fastd + PKG_VERSION:=22 ++PKG_RELEASE=2 + + PKG_MAINTAINER:=Matthias Schiffer + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +diff --git a/net/fastd/patches/0001-config-allow-disabling-L2TP-offload-when-fastd-doesn.patch b/net/fastd/patches/0001-config-allow-disabling-L2TP-offload-when-fastd-doesn.patch +new file mode 100644 +index 0000000000000000000000000000000000000000..f2eabc95d61abf070907239b9d5d5935bd82966c +--- /dev/null ++++ b/net/fastd/patches/0001-config-allow-disabling-L2TP-offload-when-fastd-doesn.patch +@@ -0,0 +1,38 @@ ++From d95ae843845760aecbbc62a734c2b93b401b1834 Mon Sep 17 00:00:00 2001 ++Message-Id: ++From: Matthias Schiffer ++Date: Sun, 27 Jun 2021 14:45:46 +0200 ++Subject: [PATCH] config: allow disabling L2TP offload when fastd doesn't ++ support it ++ ++Only attempting to enable the offloading should raise an error when it ++is not supported. ++--- ++ src/config.y | 8 +++++--- ++ 1 file changed, 5 insertions(+), 3 deletions(-) ++ ++diff --git a/src/config.y b/src/config.y ++index a107d7b9fda7..7a3ec6a32649 100644 ++--- a/src/config.y +++++ b/src/config.y ++@@ -282,12 +282,14 @@ offload: TOK_L2TP boolean { ++ #ifdef WITH_OFFLOAD_L2TP ++ conf.offload_l2tp = $2; ++ #else +++ if ($2) { ++ # ifdef __linux__ ++- fastd_config_error(&@$, state, "L2TP offload is not supported by this build of fastd"); +++ fastd_config_error(&@$, state, "L2TP offload is not supported by this build of fastd"); ++ # else ++- fastd_config_error(&@$, state, "L2TP offload is not supported on this platform"); +++ fastd_config_error(&@$, state, "L2TP offload is not supported on this platform"); ++ # endif ++- YYERROR; +++ YYERROR; +++ } ++ #endif ++ } ++ ; ++-- ++2.32.0 ++ diff --git a/patches/packages/packages/0006-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch b/patches/packages/packages/0006-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch new file mode 100644 index 00000000..7759d711 --- /dev/null +++ b/patches/packages/packages/0006-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch @@ -0,0 +1,112 @@ +From: Matthias Schiffer +Date: Sun, 27 Jun 2021 16:46:38 +0200 +Subject: fastd: make L2TP support a config option instead of a variant + +We enable the option by default, but do not depend on the kernel modules +required for L2TP offloading to avoid wasting space when the feature is +not needed. To use offloading, kmod-l2tp-eth must be installed. + +Signed-off-by: Matthias Schiffer +(cherry picked from commit 03ff71d5ba955ad2d3f23de30e526ab6452297d4) + +diff --git a/net/fastd/Config.in b/net/fastd/Config.in +index 3da5e1f183c5400cc38650efad39edf31c6f18d0..67ae7c6b1390632735c5d26bade2cb2c570a9a43 100644 +--- a/net/fastd/Config.in ++++ b/net/fastd/Config.in +@@ -1,4 +1,4 @@ +-if PACKAGE_fastd || PACKAGE_fastd-l2tp ++if PACKAGE_fastd + + menu "Configuration" + +@@ -76,6 +76,10 @@ config FASTD_WITH_STATUS_SOCKET + bool "Include support for status sockets" + default y + ++config FASTD_WITH_OFFLOAD_L2TP ++ bool "Enable L2TP offloading" ++ default y ++ + endmenu + + endif +diff --git a/net/fastd/Makefile b/net/fastd/Makefile +index 6fd316374d876834995f696fc63e7fbb98fb437c..9175227a5fe179bdb9d38d5e173f84908fb216ef 100644 +--- a/net/fastd/Makefile ++++ b/net/fastd/Makefile +@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk + + PKG_NAME:=fastd + PKG_VERSION:=22 +-PKG_RELEASE=2 ++PKG_RELEASE=3 + + PKG_MAINTAINER:=Matthias Schiffer + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +@@ -39,7 +39,8 @@ PKG_CONFIG_DEPENDS:=\ + CONFIG_FASTD_WITH_CMDLINE_OPERATION \ + CONFIG_FASTD_WITH_CMDLINE_COMMANDS \ + CONFIG_FASTD_WITH_DYNAMIC_PEERS \ +- CONFIG_FASTD_WITH_STATUS_SOCKET ++ CONFIG_FASTD_WITH_STATUS_SOCKET \ ++ CONFIG_FASTD_WITH_OFFLOAD_L2TP + + + PKG_BUILD_DEPENDS:=meson/host nacl +@@ -55,14 +56,6 @@ define Package/fastd + TITLE:=Fast and Secure Tunneling Daemon + URL:=https://github.com/NeoRaider/fastd/ + SUBMENU:=VPN +- VARIANT:=default +-endef +-define Package/fastd-l2tp +-$(Package/fastd) +- DEPENDS+=+kmod-l2tp +kmod-l2tp-eth +- TITLE+=(L2TP kernel offloading) +- VARIANT:=l2tp +- PROVIDES:=fastd + endef + + define Package/fastd/config +@@ -93,32 +86,20 @@ MESON_ARGS += \ + -Dmethod_null=$(call feature,ENABLE_METHOD_NULL) \ + -Dmethod_null_l2tp=$(call feature,ENABLE_METHOD_NULL_L2TP) \ + -Dstatus_socket=$(call feature,WITH_STATUS_SOCKET) \ +- -Doffload_l2tp=disabled \ ++ -Doffload_l2tp=$(call feature,WITH_OFFLOAD_L2TP) \ + -Dlibmnl_builtin=true \ + -Dsystemd=disabled \ + -Duse_nacl=true \ + -Db_lto=true \ + -Dprefix=/usr + +-ifeq ($(BUILD_VARIANT),l2tp) +- MESON_ARGS += \ +- -Dmethod_null_l2tp=enabled \ +- -Doffload_l2tp=enabled +-endif +- + define Package/fastd/description + Fast and secure tunneling daemon, which is optimized on small code size and few dependencies + endef +-define Package/fastd-l2tp/description +-$(Package/fastd/description) +- +-This variant enables L2TP kernel offloadig support. +-endef + + define Package/fastd/conffiles + /etc/config/fastd + endef +-Package/fastd-l2tp/conffiles = $(Package/fastd/conffiles) + + define Package/fastd/install + $(INSTALL_DIR) $(1)/usr/bin +@@ -132,7 +113,5 @@ define Package/fastd/install + $(INSTALL_DIR) $(1)/lib/upgrade/keep.d + $(INSTALL_DATA) files/fastd.upgrade $(1)/lib/upgrade/keep.d/fastd + endef +-Package/fastd-l2tp/install = $(Package/fastd/install) + + $(eval $(call BuildPackage,fastd)) +-$(eval $(call BuildPackage,fastd-l2tp)) From 15eeb86f426c7d171f2a5f80c9ea8f50ee17fadd Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 7 Mar 2021 20:13:41 +0100 Subject: [PATCH 02/67] gluon-{,web-}mesh-vpn-fastd: add support for null@l2tp method THe "null" and "null@l2tp" methods are considered equivalent and always added and removed together when the method list is "configurable". "null@l2tp" is added before "null", so it is preferred when the peer supports both. --- package/gluon-mesh-vpn-fastd/check_site.lua | 2 +- .../luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd | 10 ++++++---- .../gluon/config-mode/model/admin/mesh_vpn_fastd.lua | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package/gluon-mesh-vpn-fastd/check_site.lua b/package/gluon-mesh-vpn-fastd/check_site.lua index 57cc7bb1..6f3c0832 100644 --- a/package/gluon-mesh-vpn-fastd/check_site.lua +++ b/package/gluon-mesh-vpn-fastd/check_site.lua @@ -1,4 +1,4 @@ -local fastd_methods = {'salsa2012+umac', 'null+salsa2012+umac', 'null'} +local fastd_methods = {'salsa2012+umac', 'null+salsa2012+umac', 'null@l2tp', 'null'} need_array_of({'mesh_vpn', 'fastd', 'methods'}, fastd_methods) need_boolean(in_site({'mesh_vpn', 'fastd', 'configurable'}), false) diff --git a/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd b/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd index 5fed1e8c..1af8218e 100755 --- a/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd +++ b/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd @@ -17,20 +17,22 @@ end local methods if site.mesh_vpn.fastd.configurable(false) then - local has_null = util.contains(site.mesh_vpn.fastd.methods(), 'null') + local site_methods = site.mesh_vpn.fastd.methods() + local has_null = util.contains(site_methods, 'null@l2tp') or util.contains(site_methods, 'null') local old_methods = uci:get('fastd', 'mesh_vpn', 'method') if old_methods then - has_null = util.contains(old_methods, 'null') + has_null = util.contains(old_methods, 'null@l2tp') or util.contains(old_methods, 'null') end methods = {} if has_null then + table.insert(methods, 'null@l2tp') table.insert(methods, 'null') end - for _, method in ipairs(site.mesh_vpn.fastd.methods()) do - if method ~= 'null' then + for _, method in ipairs(site_methods) do + if method ~= 'null@l2tp' and method ~= 'null' then table.insert(methods, method) end end diff --git a/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/model/admin/mesh_vpn_fastd.lua b/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/model/admin/mesh_vpn_fastd.lua index ad890c31..9243ec92 100644 --- a/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/model/admin/mesh_vpn_fastd.lua +++ b/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/model/admin/mesh_vpn_fastd.lua @@ -10,7 +10,7 @@ mode.package = "gluon-web-mesh-vpn-fastd" mode.template = "mesh-vpn-fastd" local methods = uci:get('fastd', 'mesh_vpn', 'method') -if util.contains(methods, 'null') then +if util.contains(methods, 'null@l2tp') or util.contains(methods, 'null') then -- performance mode will only be used as default, if it is present in site.mesh_vpn.fastd.methods mode.default = 'performance' else @@ -24,11 +24,12 @@ function mode:write(data) -- if performance mode was selected, and the method 'null' was not present in the original table, it will be added local site_methods = {} if data == 'performance' then + table.insert(site_methods, 'null@l2tp') table.insert(site_methods, 'null') end for _, method in ipairs(site.mesh_vpn.fastd.methods()) do - if method ~= 'null' then + if method ~= 'null@l2tp' and method ~= 'null' then table.insert(site_methods, method) end end From 7c6befc7c3cae040c58f7d5d19b0276ec3d4e0cb Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 7 Mar 2021 20:47:27 +0100 Subject: [PATCH 03/67] gluon-mesh-vpn-fastd: add L2TP offload support --- package/features | 7 ++++++- package/gluon-mesh-vpn-fastd-l2tp/Makefile | 13 +++++++++++++ .../files/lib/gluon/mesh-vpn/fastd/l2tp | 0 .../files/lib/gluon/mesh-vpn/fastd/.keep | 0 .../lib/gluon/upgrade/400-mesh-vpn-fastd | 18 ++++++++++++++++++ 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 package/gluon-mesh-vpn-fastd-l2tp/Makefile create mode 100644 package/gluon-mesh-vpn-fastd-l2tp/files/lib/gluon/mesh-vpn/fastd/l2tp create mode 100644 package/gluon-mesh-vpn-fastd/files/lib/gluon/mesh-vpn/fastd/.keep diff --git a/package/features b/package/features index c6e94a1a..da68b369 100644 --- a/package/features +++ b/package/features @@ -16,7 +16,12 @@ when(_'web-wizard' and _'autoupdater', { 'gluon-config-mode-autoupdater', }) -when(_'web-wizard' and (_'mesh-vpn-fastd' or _'mesh-vpn-tunneldigger' or _'mesh-vpn-wireguard'), { +when(_'web-wizard' and ( + _'mesh-vpn-fastd' or + _'mesh-vpn-fastd-l2tp' or + _'mesh-vpn-tunneldigger' or + _'mesh-vpn-wireguard' +), { 'gluon-config-mode-mesh-vpn', }) diff --git a/package/gluon-mesh-vpn-fastd-l2tp/Makefile b/package/gluon-mesh-vpn-fastd-l2tp/Makefile new file mode 100644 index 00000000..8eb5f6ec --- /dev/null +++ b/package/gluon-mesh-vpn-fastd-l2tp/Makefile @@ -0,0 +1,13 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=gluon-mesh-vpn-fastd-l2tp +PKG_VERSION:=1 + +include ../gluon.mk + +define Package/gluon-mesh-vpn-fastd-l2tp + TITLE:=Support for connecting meshes via fastd (with L2TP kernel offloading) + DEPENDS:=+gluon-core +gluon-mesh-vpn-fastd +kmod-l2tp-eth +@GLUON_SPECIALIZE_KERNEL:KERNEL_L2TP +endef + +$(eval $(call BuildPackageGluon,gluon-mesh-vpn-fastd-l2tp)) diff --git a/package/gluon-mesh-vpn-fastd-l2tp/files/lib/gluon/mesh-vpn/fastd/l2tp b/package/gluon-mesh-vpn-fastd-l2tp/files/lib/gluon/mesh-vpn/fastd/l2tp new file mode 100644 index 00000000..e69de29b diff --git a/package/gluon-mesh-vpn-fastd/files/lib/gluon/mesh-vpn/fastd/.keep b/package/gluon-mesh-vpn-fastd/files/lib/gluon/mesh-vpn/fastd/.keep new file mode 100644 index 00000000..e69de29b diff --git a/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd b/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd index 1af8218e..c8898755 100755 --- a/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd +++ b/package/gluon-mesh-vpn-fastd/luasrc/lib/gluon/upgrade/400-mesh-vpn-fastd @@ -5,6 +5,7 @@ local util = require 'gluon.util' local vpn_core = require 'gluon.mesh-vpn' local uci = require('simple-uci').cursor() +local unistd = require 'posix.unistd' local syslog_level = uci:get('fastd', 'mesh_vpn', 'syslog_level') or 'verbose' @@ -52,9 +53,19 @@ uci:section('fastd', 'fastd', 'mesh_vpn', { secure_handshakes = true, method = methods, packet_mark = 1, + persist_interface = true, + offload_l2tp = false, status_socket = '/var/run/fastd.mesh_vpn.socket', }) +uci:delete('fastd', 'mesh_vpn', 'peer_limit') +-- L2TP offload support +if unistd.access('/lib/gluon/mesh-vpn/fastd/l2tp') then + uci:set('fastd', 'mesh_vpn', 'mode', 'multitap') + uci:set('fastd', 'mesh_vpn', 'persist_interface', false) + uci:set('fastd', 'mesh_vpn', 'offload_l2tp', true) + uci:set('fastd', 'mesh_vpn', 'peer_limit', 1) +end -- Collect list of groups that have peers with 'preserve' flag local preserve_groups = {} @@ -96,6 +107,7 @@ local function add_peer(group, name, config) enabled = true, net = 'mesh_vpn', group = group, + interface = 'mesh-vpn', key = config.key, remote = config.remotes, }) @@ -125,5 +137,11 @@ end add_groups('mesh_vpn', site.mesh_vpn.fastd.groups()) +-- Update preserved peers as well +uci:foreach('fastd', 'peer', function(peer) + if peer.net == 'mesh_vpn' then + uci:set('fastd', peer['.name'], 'interface', 'mesh-vpn') + end +end) uci:save('fastd') From a8c767621543c1277fe730095668a0c5a9b3215f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 24 Dec 2021 17:50:26 +0100 Subject: [PATCH 04/67] docs: update Mesh VPN documentation - Restructure page - Add information on how to add L2TPv3 offloading support to a build using configurable ciphers. The null method is not reocmmended anymore. - Add notes and pointers regarding the gateway configuration to provide gateway admins with hints on how to modify their configuration to accommodate this new feature. - Mention wireguard support Based-on-patch-by: Felix Kaechele --- docs/features/vpn.rst | 132 +++++++++++++++++++++++++++++++----------- 1 file changed, 98 insertions(+), 34 deletions(-) diff --git a/docs/features/vpn.rst b/docs/features/vpn.rst index c1ed9336..bc2bf733 100644 --- a/docs/features/vpn.rst +++ b/docs/features/vpn.rst @@ -1,57 +1,121 @@ -Mesh-VPN +Mesh VPN ======== -Gluon integrates several OSI-Layer 2 tunneling protocols to -enable interconnects between local meshes and provide -internetwork access. Available protocols currently are: +Gluon integrates several layer 2 tunneling protocols to +allow connections between local meshes through the internet. -- fastd -- L2TPv3 (via tunneldigger) +Protocol handlers +^^^^^^^^^^^^^^^^^ -fastd is a lightweight userspace tunneling daemon, that +There are currently three protocol handlers which can be selected +via ``GLUON_FEATURES`` in ``site.mk``: + +mesh-vpn-fastd +~~~~~~~~~~~~~~ + +fastd is a lightweight userspace tunneling daemon that implements cipher suites that are specifically designed to work well on embedded devices. It offers encryption -and authentication. Its primary drawback are the necessary -context-switches when forwarding packets. +and authentication. +The primary drawback of fastd's encrypted connection modes +is the necessary context switches when forwarding packets. +A kernel-supported L2TPv3 offloading option is available to +work around the context-switching bottleneck, but it comes +at the cost of losing the ability to protect tunnel connections +against eavesdropping or manipulation. -L2TPv3 is an in-kernel tunneling protocol that performs well, -but offers no security properties by itself. -The brokering of the tunnel happens through tunneldigger, -its primary drawback being the lack of IPv6 support. +mesh-vpn-tunneldigger +~~~~~~~~~~~~~~~~~~~~~ + +Tunneldigger always uses L2TPv3, generally achieving the same +performance as fastd with the ``null@l2tp`` method, but offering +no security. +Tunneldigger's primary drawback is the lack of IPv6 support. +It also provides less configurability than fastd. + +mesh-vpn-wireguard (experimental) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Wireguard is a new tunneling software that offers modern encryption +methods and is implemented in the kernel, resulting in high throughput. +It is implemented in Gluon using the *wgpeerselector* tool. fastd ------ +^^^^^ -Configurable Cipher -^^^^^^^^^^^^^^^^^^^ +Methods +~~~~~~~ +fastd offers various different connection "methods" with different +security properties that can be configured in the site configuration. -From the site configuration fastd can be allowed to offer +The following methods are currently recommended: + +- ``salsa2012+umac``: Encrypted + authenticated +- ``null+salsa2012+umac``: Unencrypted, authenticated +- ``null@l2tp``: Unencrypted, unauthenticated + +Multiple methods can be listed in ``site.conf``. The first listed method +supported by both the node and its peer will be used. + +The use of the ``null@l2tp`` method with offloading enabled can provide a +considerable performance gain, especially on weaker embedded hardware. +For L2TP offloading, the ``mesh-vpn-fastd-l2tp`` feature needs to be enabled in +``site.mk``. + +Configurable Method +~~~~~~~~~~~~~~~~~~~ + +From the site configuration, fastd can be allowed to offer toggleable encryption in the config mode with the intent to -increase throughput, although in practice the gain is minimal. +increase throughput. -**Site configuration:** +There is also an older unprotected method ``null``. Use of the newer +``null@l2tp`` method is generally recommended over ``null``, as the +performance gains provided by the latter (compared to the encrypted +and authenticated methods) are very small. -1) Add the feature ``web-mesh-vpn-fastd`` in ``site.mk`` -2) Set ``mesh_vpn.fastd.configurable = true`` in ``site.conf`` -3) Optionally add ``null`` to the ``mesh_vpn.fastd.methods`` table if you want "Performance mode" as default (not recommended) +Site configuration +------------------ -**Gateway configuration:** +1) + Add the feature ``web-mesh-vpn-fastd`` in ``site.mk`` +2) + Set ``mesh_vpn.fastd.configurable = true`` in ``site.conf`` +3) + Optionally, add ``null@l2tp`` to the ``mesh_vpn.fastd.methods`` table if you want + "Performance mode" as default (not recommended) -1) Prepend the ``null`` cipher in fastd's method list +Gateway / Supernode Configuration +--------------------------------- +When only using the ``null`` or ``null@l2tp`` methods without offloading, +simply add these methods to the front of the method list. ``null@l2tp`` +should always appear before ``null`` in the configuration when both are enabled. +fastd v22 or newer is needed for the ``null@l2tp`` method. + +It is often not necessary to enable L2TP offloading on supernodes for +performance reasons. Nodes using offloading can communicate with supornodes that +don't use offloading as long as both use the ``null@l2tp`` method. + +To enable L2TP offloading on the supornodes as well, it is recommended to study +the fastd documentation section pertaining to the `offload configuration option +`_. + +Note that in ``multitap`` mode, which is required when using +L2TP offloading, fastd will create one interface per peer +on the supernode's side and it is the administrator's +responsibility to ensure that these interfaces are handled correctly. +In batman-adv-based setups this involves adding the dynamically created +interfaces to an batadv interface using fastd's ``on up`` scripts or some +network configuration daemon like systemd-networkd. + +Config Mode +----------- -**Config Mode:** The resulting firmware will allow users to choose between secure (encrypted) and fast (unencrypted) transport. .. image:: fastd_mode.gif -**Unix socket:** -To confirm whether the correct cipher is being used, fastd's unix -socket can be interrogated, after installing for example `socat`. - -:: - - opkg update - opkg install socat - socat - UNIX-CONNECT:/var/run/fastd.mesh_vpn.socket +To confirm whether the correct cipher is being used, the log output +of fastd can be checked using ``logread``. From 62b24ed7ce8c46232f5e99bf9e8b365a95805ef1 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 13 Feb 2022 21:59:53 +0100 Subject: [PATCH 05/67] gluon-web-osm: update OpenLayers default URL to 5.3.0 The OpenLayers JS/CSS download URL is dead. Update it to make the map work again: - Update from OpenLayers 5.2.0 to 5.3.0 - Switch from the obsolete rawgit.com URL to jsdelivr.net (rawgit.com was only redirecting to jsdelivr.net for the last few years anyways) - Set a fixed commit in the URL, so the URL doesn't become outdated again --- docs/user/site.rst | 2 +- .../gluon-web-osm/luasrc/usr/lib/lua/gluon/web/model/osm.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/user/site.rst b/docs/user/site.rst index 28297e38..79e7ca1e 100644 --- a/docs/user/site.rst +++ b/docs/user/site.rst @@ -471,7 +471,7 @@ config_mode \: optional *openlayers_url* allows to override the base URL of the *build/ol.js* and *css/ol.css* files (the default is - ``https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.2.0``). + ``https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@35ffe7626ce16c372143f3c903950750075e7068/en/v5.3.0``). It is also possible to replace the default tile layer (which is OpenStreetMap) with a custom one using the *tile_layer* section. Only XYZ layers are supported at this point. diff --git a/package/gluon-web-osm/luasrc/usr/lib/lua/gluon/web/model/osm.lua b/package/gluon-web-osm/luasrc/usr/lib/lua/gluon/web/model/osm.lua index ec18a003..294caddf 100644 --- a/package/gluon-web-osm/luasrc/usr/lib/lua/gluon/web/model/osm.lua +++ b/package/gluon-web-osm/luasrc/usr/lib/lua/gluon/web/model/osm.lua @@ -4,7 +4,8 @@ local util = require "gluon.web.util" local class = util.class -local DEFAULT_URL = 'https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.2.0' +local DEFAULT_URL = + 'https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@35ffe7626ce16c372143f3c903950750075e7068/en/v5.3.0' local M = {} From bbc00017a922fc691297c3ca1263cb7057f63e24 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 20 Feb 2022 11:51:58 +0100 Subject: [PATCH 06/67] gluon-web-osm: Fix " rendering in attribution with CDATA tag (#2398) --- .../gluon-web-osm/files/lib/gluon/web/view/model/osm/map.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/gluon-web-osm/files/lib/gluon/web/view/model/osm/map.html b/package/gluon-web-osm/files/lib/gluon/web/view/model/osm/map.html index 2caa3f37..a2822cd4 100644 --- a/package/gluon-web-osm/files/lib/gluon/web/view/model/osm/map.html +++ b/package/gluon-web-osm/files/lib/gluon/web/view/model/osm/map.html @@ -1,6 +1,7 @@ From d728f17b8fc848b35e93eebb8e948798a1e4440a Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 20 Feb 2022 12:34:57 +0100 Subject: [PATCH 07/67] treewide: Replace xhtml content type with html, remove xhtml workaround --- docs/dev/web/controller.rst | 3 +-- .../files/lib/gluon/config-mode/www/index.html | 2 +- .../files/lib/gluon/config-mode/view/theme/layout.html | 4 ++-- .../files/lib/gluon/status-page/view/layout.html | 4 ++-- .../files/lib/gluon/status-page/view/status-page.html | 4 ++-- .../files/lib/gluon/status-page/www/index.html | 2 +- .../files/lib/gluon/web/view/model/osm/map.html | 2 -- package/gluon-web/luasrc/usr/lib/lua/gluon/web/http.lua | 7 ------- 8 files changed, 9 insertions(+), 19 deletions(-) diff --git a/docs/dev/web/controller.rst b/docs/dev/web/controller.rst index 3f63ef01..2f0ab733 100644 --- a/docs/dev/web/controller.rst +++ b/docs/dev/web/controller.rst @@ -74,8 +74,7 @@ Useful functions: - *header* (*key*, *value*): Adds an HTTP header to the reply to be sent to the client. Has no effect when non-header data has already been written. - *prepare_content* (*mime*): Sets the *Content-Type* header to the given MIME - type, potentially setting additional headers or modifying the MIME type to - accommodate browser quirks + type - *write* (*data*, ...): Sends the given data to the client. If headers have not been sent, it will be done before the data is written. diff --git a/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html b/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html index 292129f6..8b29b2b4 100644 --- a/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html +++ b/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html @@ -1,5 +1,5 @@ - + diff --git a/package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html b/package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html index c80cd4b3..47d66cb6 100644 --- a/package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html +++ b/package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html @@ -94,10 +94,10 @@ You may obtain a copy of the License at subtree({path}, root.nodes[category], ...) end - http:prepare_content("application/xhtml+xml") + http:prepare_content("text/html") -%> - + diff --git a/package/gluon-status-page/files/lib/gluon/status-page/view/layout.html b/package/gluon-status-page/files/lib/gluon/status-page/view/layout.html index 11969ddc..7b33bd93 100644 --- a/package/gluon-status-page/files/lib/gluon/status-page/view/layout.html +++ b/package/gluon-status-page/files/lib/gluon/status-page/view/layout.html @@ -1,8 +1,8 @@ <%- - http:prepare_content("application/xhtml+xml") + http:prepare_content("text/html") -%> - + diff --git a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html index 6957599f..16fbaa5d 100644 --- a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html +++ b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html @@ -118,10 +118,10 @@ ) end - http:prepare_content("application/xhtml+xml") + http:prepare_content("text/html") -%> - + diff --git a/package/gluon-status-page/files/lib/gluon/status-page/www/index.html b/package/gluon-status-page/files/lib/gluon/status-page/www/index.html index cc209cec..b360a712 100644 --- a/package/gluon-status-page/files/lib/gluon/status-page/www/index.html +++ b/package/gluon-status-page/files/lib/gluon/status-page/www/index.html @@ -1,5 +1,5 @@ - + diff --git a/package/gluon-web-osm/files/lib/gluon/web/view/model/osm/map.html b/package/gluon-web-osm/files/lib/gluon/web/view/model/osm/map.html index a2822cd4..2caa3f37 100644 --- a/package/gluon-web-osm/files/lib/gluon/web/view/model/osm/map.html +++ b/package/gluon-web-osm/files/lib/gluon/web/view/model/osm/map.html @@ -1,7 +1,6 @@ diff --git a/package/gluon-web/luasrc/usr/lib/lua/gluon/web/http.lua b/package/gluon-web/luasrc/usr/lib/lua/gluon/web/http.lua index c77d4ace..eae38bff 100644 --- a/package/gluon-web/luasrc/usr/lib/lua/gluon/web/http.lua +++ b/package/gluon-web/luasrc/usr/lib/lua/gluon/web/http.lua @@ -78,13 +78,6 @@ end function Http:prepare_content(mime) if self.headers["content-type"] then return end - if mime == "application/xhtml+xml" then - local accept = self:getenv("HTTP_ACCEPT") - if not accept or not accept:find("application/xhtml+xml", nil, true) then - mime = "text/html; charset=UTF-8" - end - self:header("Vary", "Accept") - end self:header("Content-Type", mime) end From f033fcfc0d9697e2124a850ff07072da2329795d Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 20 Feb 2022 16:12:30 +0100 Subject: [PATCH 08/67] treewide: Replace ` />` self closing html tags with `>` --- docs/site-example/i18n/de.po | 2 +- docs/site-example/i18n/en.po | 2 +- docs/site-example/i18n/fr.po | 2 +- .../files/lib/gluon/config-mode/www/index.html | 8 ++++---- .../lib/gluon/config-mode/view/theme/layout.html | 8 ++++---- .../files/lib/gluon/status-page/view/layout.html | 6 +++--- .../lib/gluon/status-page/view/status-page.html | 16 ++++++++-------- .../files/lib/gluon/status-page/www/index.html | 8 ++++---- .../gluon/config-mode/view/admin/upgrade.html | 8 ++++---- .../config-mode/view/admin/upgrade_confirm.html | 12 ++++++------ package/gluon-web-admin/i18n/de.po | 4 ++-- package/gluon-web-admin/i18n/fr.po | 4 ++-- package/gluon-web-admin/i18n/gluon-web-admin.pot | 2 +- .../lib/gluon/config-mode/model/admin/remote.lua | 2 +- .../gluon/config-mode/view/mesh-vpn-fastd.html | 12 ++++++------ .../files/lib/gluon/web/view/model/dynlist.html | 2 +- .../files/lib/gluon/web/view/model/form.html | 6 +++--- .../files/lib/gluon/web/view/model/fvalue.html | 2 +- .../files/lib/gluon/web/view/model/lvalue.html | 4 ++-- .../files/lib/gluon/web/view/model/value.html | 2 +- .../lib/gluon/web/view/model/valuewrapper.html | 2 +- package/gluon-web-wifi-config/i18n/de.po | 6 +++--- package/gluon-web-wifi-config/i18n/fr.po | 4 ++-- .../i18n/gluon-web-wifi-config.pot | 2 +- .../config-mode/model/admin/wifi-config.lua | 2 +- 25 files changed, 64 insertions(+), 64 deletions(-) diff --git a/docs/site-example/i18n/de.po b/docs/site-example/i18n/de.po index 51b8e71c..f2db6eef 100644 --- a/docs/site-example/i18n/de.po +++ b/docs/site-example/i18n/de.po @@ -45,7 +45,7 @@ msgstr "" "selbstverständlich vertraulich behandelt und nicht weitergegeben." "

" "
" -"# <%= pcdata(hostname) %>
" +"# <%= pcdata(hostname) %>
" "<%= pubkey %>" "
" "

Dein Knoten startet gerade neu und wird anschließend versuchen, sich mit " diff --git a/docs/site-example/i18n/en.po b/docs/site-example/i18n/en.po index eef8bd08..4f393860 100644 --- a/docs/site-example/i18n/en.po +++ b/docs/site-example/i18n/en.po @@ -41,7 +41,7 @@ msgstr "" "\">keys@alpha-centauri.freifunk.net. Of course, your e-mail address will " "be treated confidentially and will not be passed on.

" "
" -" # <%= pcdata(hostname) %>
" +" # <%= pcdata(hostname) %>
" "<%= pubkey %>" "
" "

Your node <%= pcdata(hostname) %> is currently rebooting and will " diff --git a/docs/site-example/i18n/fr.po b/docs/site-example/i18n/fr.po index ba0f43a4..e9c259f8 100644 --- a/docs/site-example/i18n/fr.po +++ b/docs/site-example/i18n/fr.po @@ -36,7 +36,7 @@ msgstr "" "body=<%= urlencode('# ' .. hostname .. '\n' .. pubkey) %>\">keys@alpha-centauri.freifunk.net." "

" "
" -" # <%= pcdata(hostname) %>
" +" # <%= pcdata(hostname) %>
" "<%= pubkey %>" "
" diff --git a/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html b/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html index 8b29b2b4..e42b9eed 100644 --- a/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html +++ b/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html @@ -1,10 +1,10 @@ - - - - + + + + diff --git a/package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html b/package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html index 47d66cb6..865ec2aa 100644 --- a/package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html +++ b/package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html @@ -82,7 +82,7 @@ You may obtain a copy of the License at end %> -
+
<% subtree(append(prefix, name), node.nodes[name], ...) %> @@ -99,8 +99,8 @@ You may obtain a copy of the License at - - + + <%| hostname .. ((rnode and rnode.title) and ' - ' .. title(rnode) or '') %> @@ -134,7 +134,7 @@ You may obtain a copy of the License at
diff --git a/package/gluon-status-page/files/lib/gluon/status-page/view/layout.html b/package/gluon-status-page/files/lib/gluon/status-page/view/layout.html index 7b33bd93..6b960207 100644 --- a/package/gluon-status-page/files/lib/gluon/status-page/view/layout.html +++ b/package/gluon-status-page/files/lib/gluon/status-page/view/layout.html @@ -4,12 +4,12 @@ - - + + <%:Error%> - +
diff --git a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html index 16fbaa5d..703cf436 100644 --- a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html +++ b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html @@ -111,7 +111,7 @@ end local function statisticsTraffic(key) - return string.format('%s
%s
%s', + return string.format('%s
%s
%s', statistics(key .. '/packets', 'packetsDiff'), statistics(key .. '/bytes', 'bytesDiff'), statistics(key .. '/bytes', 'bytes') @@ -123,12 +123,12 @@ - - + + <%| nodeinfo.hostname %> - <%:Status%> - +
<%:Model%>
<%| nodeinfo.hardware.model %>
<%:Primary MAC address%>
<%| nodeinfo.network.mac %>
-
<%:IP address%>
<%= pcdata(table.concat(sorted(nodeinfo.network.addresses), '\n')):gsub('\n', '
') %>
+
<%:IP address%>
<%= pcdata(table.concat(sorted(nodeinfo.network.addresses), '\n')):gsub('\n', '
') %>
<%:Firmware%>
<%| nodeinfo.software.firmware.release %>
<% if nodeinfo.network.mesh_vpn then -%>
<%:Mesh VPN%>
<%| enabled(nodeinfo.network.mesh_vpn.enabled) %> <% if nodeinfo.network.mesh_vpn.provider then -%> -
<%| nodeinfo.network.mesh_vpn.provider %> +
<%| nodeinfo.network.mesh_vpn.provider %> <%- end %>
<% if nodeinfo.network.mesh_vpn.bandwidth_limit.enabled then -%>
<%:Bandwidth limit%>
<% if nodeinfo.network.mesh_vpn.bandwidth_limit.ingress then -%> - ▼ <%| formatBits(nodeinfo.network.mesh_vpn.bandwidth_limit.ingress*1000) %>/s <%:downstream%>
+ ▼ <%| formatBits(nodeinfo.network.mesh_vpn.bandwidth_limit.ingress*1000) %>/s <%:downstream%>
<%- end %> <% if nodeinfo.network.mesh_vpn.bandwidth_limit.egress then -%> ▲ <%| formatBits(nodeinfo.network.mesh_vpn.bandwidth_limit.egress*1000) %>/s <%:upstream%> @@ -213,7 +213,7 @@ <%:Load average%><%= statistics('loadavg', 'decimal') %> <%:RAM%><%= statistics('memory', 'memory') %> <%:Filesystem%><%= statistics('rootfs_usage', 'percent') %> - <%:Gateway%><%= statistics('gateway') %>
<%= statistics('gateway_nexthop', 'neighbour') %> + <%:Gateway%><%= statistics('gateway') %>
<%= statistics('gateway_nexthop', 'neighbour') %>

<%:Clients%>

diff --git a/package/gluon-status-page/files/lib/gluon/status-page/www/index.html b/package/gluon-status-page/files/lib/gluon/status-page/www/index.html index b360a712..03e08420 100644 --- a/package/gluon-status-page/files/lib/gluon/status-page/www/index.html +++ b/package/gluon-status-page/files/lib/gluon/status-page/www/index.html @@ -1,10 +1,10 @@ - - - - + + + + diff --git a/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade.html b/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade.html index 7778be4a..6791c2c0 100644 --- a/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade.html +++ b/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade.html @@ -26,7 +26,7 @@ $Id$ <%:Firmware image%>
- +
@@ -36,14 +36,14 @@ $Id$
- +
- - + +
diff --git a/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade_confirm.html b/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade_confirm.html index 9733132f..b45012ef 100644 --- a/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade_confirm.html +++ b/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade_confirm.html @@ -47,13 +47,13 @@ You may obtain a copy of the License at

- - " /> - + + "> +
- - " /> - + + "> +
diff --git a/package/gluon-web-admin/i18n/de.po b/package/gluon-web-admin/i18n/de.po index c6511012..33b459a0 100644 --- a/package/gluon-web-admin/i18n/de.po +++ b/package/gluon-web-admin/i18n/de.po @@ -21,11 +21,11 @@ msgstr "Erweiterte Einstellungen" msgid "" "Alternatively, you can set a password to access your node. Please choose a " -"secure password you don't use anywhere else.

If you set an empty " +"secure password you don't use anywhere else.

If you set an empty " "password, login via password will be disabled. This is the default." msgstr "" "Alternativ kannst du auch ein Passwort setzen. Wähle bitte ein sicheres " -"Passwort, das du nirgendwo anders verwendest.

Beim Setzen eines " +"Passwort, das du nirgendwo anders verwendest.

Beim Setzen eines " "leeren Passworts wird der Login per Passwort gesperrt (dies ist die Standard-" "Einstellung)." diff --git a/package/gluon-web-admin/i18n/fr.po b/package/gluon-web-admin/i18n/fr.po index 4e16238d..dcae406e 100644 --- a/package/gluon-web-admin/i18n/fr.po +++ b/package/gluon-web-admin/i18n/fr.po @@ -21,12 +21,12 @@ msgstr "Paramètres avancés" msgid "" "Alternatively, you can set a password to access your node. Please choose a " -"secure password you don't use anywhere else.

If you set an empty " +"secure password you don't use anywhere else.

If you set an empty " "password, login via password will be disabled. This is the default." msgstr "" "Alternativement, vous pouvez mettre un mot de passe pour accéder à votre " "nœud, Penseiz à choisir un mot de passe sûr, que vous n'utilisez nulle part " -"ailleurs.

Si vous n'entrez pas de mot de passe, la connexion " +"ailleurs.

Si vous n'entrez pas de mot de passe, la connexion " "par mot de passe sera désactivée. La connexion par mot de passe est " "désactivée par défaut." diff --git a/package/gluon-web-admin/i18n/gluon-web-admin.pot b/package/gluon-web-admin/i18n/gluon-web-admin.pot index 084182e5..48c5f2bb 100644 --- a/package/gluon-web-admin/i18n/gluon-web-admin.pot +++ b/package/gluon-web-admin/i18n/gluon-web-admin.pot @@ -12,7 +12,7 @@ msgstr "" msgid "" "Alternatively, you can set a password to access your node. Please choose a " -"secure password you don't use anywhere else.

If you set an empty " +"secure password you don't use anywhere else.

If you set an empty " "password, login via password will be disabled. This is the default." msgstr "" diff --git a/package/gluon-web-admin/luasrc/lib/gluon/config-mode/model/admin/remote.lua b/package/gluon-web-admin/luasrc/lib/gluon/config-mode/model/admin/remote.lua index 5d614acf..226969c0 100644 --- a/package/gluon-web-admin/luasrc/lib/gluon/config-mode/model/admin/remote.lua +++ b/package/gluon-web-admin/luasrc/lib/gluon/config-mode/model/admin/remote.lua @@ -51,7 +51,7 @@ end local f_password = Form(translate("Password"), translate( "Alternatively, you can set a password to access your node. Please choose a " - .. "secure password you don't use anywhere else.

If you set an empty " + .. "secure password you don't use anywhere else.

If you set an empty " .. "password, login via password will be disabled. This is the default." ), 'password' ) diff --git a/package/gluon-web-mesh-vpn-fastd/files/lib/gluon/config-mode/view/mesh-vpn-fastd.html b/package/gluon-web-mesh-vpn-fastd/files/lib/gluon/config-mode/view/mesh-vpn-fastd.html index 5bb5f069..e0ef55dd 100644 --- a/package/gluon-web-mesh-vpn-fastd/files/lib/gluon/config-mode/view/mesh-vpn-fastd.html +++ b/package/gluon-web-mesh-vpn-fastd/files/lib/gluon/config-mode/view/mesh-vpn-fastd.html @@ -1,34 +1,34 @@
- /> + > >
class="gluon-value-title"><%:Security mode%> -
+
<%| translate( 'In security mode, the mesh VPN uses an encrypted tunnel to connect to the VPN servers. ' .. 'The encryption ensures that it is impossible for your internet access provider to see what ' .. 'data is exchanged over your node.' ) %> -
+
- /> + > >
class="gluon-value-title"><%:Performance mode%> -
+
<%| translate( 'In performance mode, no encryption is used. This usually allows for higher throughput, but the data exchanged over your node is not ' .. 'protected against eavesdropping.' ) %> -
+
diff --git a/package/gluon-web-model/files/lib/gluon/web/view/model/dynlist.html b/package/gluon-web-model/files/lib/gluon/web/view/model/dynlist.html index b0cd9d0a..bbc65734 100644 --- a/package/gluon-web-model/files/lib/gluon/web/view/model/dynlist.html +++ b/package/gluon-web-model/files/lib/gluon/web/view/model/dynlist.html @@ -15,6 +15,6 @@ attr("name", id) .. attr("size", self.size) .. attr("placeholder", self.placeholder) - %> />
+ %>>
<% end %> diff --git a/package/gluon-web-model/files/lib/gluon/web/view/model/form.html b/package/gluon-web-model/files/lib/gluon/web/view/model/form.html index d222dde2..6b35fe89 100644 --- a/package/gluon-web-model/files/lib/gluon/web/view/model/form.html +++ b/package/gluon-web-model/files/lib/gluon/web/view/model/form.html @@ -1,5 +1,5 @@
- +
<% if self.title and #self.title > 0 then %>

<%|self.title%>

<% end %> @@ -16,12 +16,12 @@ <%- if self.submit ~= false then %> + "> <% end %> <%- if self.reset ~= false then %> + "> <% end %>
diff --git a/package/gluon-web-model/files/lib/gluon/web/view/model/fvalue.html b/package/gluon-web-model/files/lib/gluon/web/view/model/fvalue.html index 5662df99..a244bb02 100644 --- a/package/gluon-web-model/files/lib/gluon/web/view/model/fvalue.html +++ b/package/gluon-web-model/files/lib/gluon/web/view/model/fvalue.html @@ -1,5 +1,5 @@ /> +%>> > diff --git a/package/gluon-web-model/files/lib/gluon/web/view/model/lvalue.html b/package/gluon-web-model/files/lib/gluon/web/view/model/lvalue.html index e63d33ee..b0110904 100644 --- a/package/gluon-web-model/files/lib/gluon/web/view/model/lvalue.html +++ b/package/gluon-web-model/files/lib/gluon/web/view/model/lvalue.html @@ -1,5 +1,5 @@ <% - local br = self.orientation == "horizontal" and '   ' or '
' + local br = self.orientation == "horizontal" and '   ' or '
' local entries = self:entries() %> @@ -35,7 +35,7 @@ attr("name", id) .. attr("value", entry.key) .. attr("checked", (self:cfgvalue() == entry.key) and "checked") - %> /> + %>> > <%|entry.value%> diff --git a/package/gluon-web-model/files/lib/gluon/web/view/model/value.html b/package/gluon-web-model/files/lib/gluon/web/view/model/value.html index fc8b8de6..250c8ce0 100644 --- a/package/gluon-web-model/files/lib/gluon/web/view/model/value.html +++ b/package/gluon-web-model/files/lib/gluon/web/view/model/value.html @@ -8,4 +8,4 @@ attr("maxlength", self.maxlength) .. attr("data-type", self.datatype) .. attr("data-optional", self.datatype and self.optional) -%> /> +%>> diff --git a/package/gluon-web-model/files/lib/gluon/web/view/model/valuewrapper.html b/package/gluon-web-model/files/lib/gluon/web/view/model/valuewrapper.html index 1a1a63d1..b4a331e5 100644 --- a/package/gluon-web-model/files/lib/gluon/web/view/model/valuewrapper.html +++ b/package/gluon-web-model/files/lib/gluon/web/view/model/valuewrapper.html @@ -7,7 +7,7 @@ <%- end -%> <% if self.subtemplate then include(self.subtemplate) end %> <% if self.description and #self.description > 0 then -%> -
+
<%=self.description%>
diff --git a/package/gluon-web-wifi-config/i18n/de.po b/package/gluon-web-wifi-config/i18n/de.po index d2ddeb8b..f0883ad6 100644 --- a/package/gluon-web-wifi-config/i18n/de.po +++ b/package/gluon-web-wifi-config/i18n/de.po @@ -56,15 +56,15 @@ msgstr "WLAN" msgid "" "You can enable or disable your node's client and mesh network SSIDs here. " "Please don't disable the mesh network without a good reason, so other nodes " -"can mesh with yours.

It is also possible to configure the WLAN " +"can mesh with yours.

It is also possible to configure the WLAN " "adapters transmission power here. Please note that the transmission power " "values include the antenna gain where available, but there are many devices " "for which the gain is unavailable or inaccurate." msgstr "" "In diesem Abschnitt hast du die Möglichkeit, die SSIDs des Client- und des " "Mesh-Netzes zu aktivieren bzw. deaktivieren. Bitte lass die SSID des Mesh-" -"Netzes aktiviert, damit sich andere Knoten mit deinem verbinden können.

Außerdem kann hier die Sendeleistung des WLAN-Adapters konfiguriert " +"Netzes aktiviert, damit sich andere Knoten mit deinem verbinden können.
Außerdem kann hier die Sendeleistung des WLAN-Adapters konfiguriert " "werden. Wenn möglich, ist in den Werten der Sendeleistung der Antennengewinn " "enthalten; diese Werte sind allerdings für viele Geräte nicht verfügbar oder " "fehlerhaft." diff --git a/package/gluon-web-wifi-config/i18n/fr.po b/package/gluon-web-wifi-config/i18n/fr.po index faf6d47d..eb09694f 100644 --- a/package/gluon-web-wifi-config/i18n/fr.po +++ b/package/gluon-web-wifi-config/i18n/fr.po @@ -51,14 +51,14 @@ msgstr "Wi-Fi" msgid "" "You can enable or disable your node's client and mesh network SSIDs here. " "Please don't disable the mesh network without a good reason, so other nodes " -"can mesh with yours.

It is also possible to configure the WLAN " +"can mesh with yours.

It is also possible to configure the WLAN " "adapters transmission power here. Please note that the transmission power " "values include the antenna gain where available, but there are many devices " "for which the gain is unavailable or inaccurate." msgstr "" "Ici vous pouvez activer ou désactiver la SSID du client ou MESH. Pensez a " "laisser la SSID du MESH activée pour que les autres nœuds puissent se " -"connecter.

Ici vous pouvez aussi configurer la puissance " +"connecter.

Ici vous pouvez aussi configurer la puissance " "d'émmission se votre Wi-Fi. Prenez note que les valeurs fournies pour la " "puissance de transmission prennent en compte les gains fournis par " "l'antenne, et que ces valeurs ne sont pas toujours disponibles ou exactes." diff --git a/package/gluon-web-wifi-config/i18n/gluon-web-wifi-config.pot b/package/gluon-web-wifi-config/i18n/gluon-web-wifi-config.pot index 19536e30..2af9b5f3 100644 --- a/package/gluon-web-wifi-config/i18n/gluon-web-wifi-config.pot +++ b/package/gluon-web-wifi-config/i18n/gluon-web-wifi-config.pot @@ -42,7 +42,7 @@ msgstr "" msgid "" "You can enable or disable your node's client and mesh network SSIDs here. " "Please don't disable the mesh network without a good reason, so other nodes " -"can mesh with yours.

It is also possible to configure the WLAN " +"can mesh with yours.

It is also possible to configure the WLAN " "adapters transmission power here. Please note that the transmission power " "values include the antenna gain where available, but there are many devices " "for which the gain is unavailable or inaccurate." diff --git a/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua b/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua index 13ac6434..49009eaf 100644 --- a/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua +++ b/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua @@ -29,7 +29,7 @@ local f = Form(translate("WLAN")) f:section(Section, nil, translate( "You can enable or disable your node's client and mesh network " .. "SSIDs here. Please don't disable the mesh network without " - .. "a good reason, so other nodes can mesh with yours.

" + .. "a good reason, so other nodes can mesh with yours.

" .. "It is also possible to configure the WLAN adapters transmission power " .. "here. Please note that the transmission power values include the antenna gain " .. "where available, but there are many devices for which the gain is unavailable or inaccurate." From eea49a2834f2ed3070a4ce3e4d840e2b6ce55d5f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 22 Feb 2022 18:51:45 +0100 Subject: [PATCH 09/67] gluon-config-mode-core: discard gluon-reconfigure output (#2395) The stdout output of gluon-web scripts is directly sent to uhttpd, becoming a part of the HTML output or even replacing HTTP status or headers. The output of gluon-reconfigure is not supposed to end up there. While we're at it, also add an exec to avoid an unnecessary shell process. --- .../lib/gluon/config-mode/model/gluon-config-mode/wizard.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/model/gluon-config-mode/wizard.lua b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/model/gluon-config-mode/wizard.lua index dfc4ab4c..edfe0bc3 100644 --- a/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/model/gluon-config-mode/wizard.lua +++ b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/model/gluon-config-mode/wizard.lua @@ -22,7 +22,7 @@ function f:write() uci:set("gluon-setup-mode", uci:get_first("gluon-setup-mode", "setup_mode"), "configured", true) uci:save("gluon-setup-mode") - os.execute('gluon-reconfigure') + os.execute('exec gluon-reconfigure >/dev/null') f.template = "wizard/reboot" f.package = "gluon-config-mode-core" From c2a5f57c40548f707d22140f34d32aa335bd3ad2 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 9 Jan 2022 16:32:00 +0100 Subject: [PATCH 10/67] treewide: regenerate network and system configs on every reconfigure --- .../upgrade/300-gluon-client-bridge-network | 15 +---- .../310-gluon-client-bridge-local-node | 2 - .../files/lib/gluon/upgrade/001-reset-uci | 23 ++++++++ .../files/lib/gluon/upgrade/998-commit | 3 + .../lib/gluon/upgrade/002-migrate-system | 31 ++++++++++ .../luasrc/lib/gluon/upgrade/020-interfaces | 4 +- .../luasrc/lib/gluon/upgrade/110-network | 26 ++++---- .../luasrc/lib/gluon/upgrade/200-wireless | 4 -- .../lib/gluon/upgrade/210-interface-wan | 30 +++++----- .../lib/gluon/upgrade/220-interface-lan | 59 +++++++------------ .../430-gluon-mesh-babel-add-mmfd-interface | 1 - .../upgrade/310-gluon-mesh-batman-adv-mesh | 4 +- .../320-gluon-mesh-batman-adv-client-bridge | 1 - .../330-gluon-mesh-batman-adv-mac-addresses | 2 - .../lib/gluon/upgrade/400-mesh-vpn-wireguard | 2 +- 15 files changed, 114 insertions(+), 93 deletions(-) create mode 100755 package/gluon-core/files/lib/gluon/upgrade/001-reset-uci create mode 100755 package/gluon-core/luasrc/lib/gluon/upgrade/002-migrate-system diff --git a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network index 490325cf..b344b2b3 100755 --- a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network +++ b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network @@ -6,26 +6,13 @@ local util = require 'gluon.util' local uci = require('simple-uci').cursor() -local interfaces = uci:get('network', 'client', 'ifname') or {} - -if type(interfaces) == 'string' then - local ifname = interfaces - interfaces = {} - for iface in ifname:gmatch('%S+') do - util.add_to_set(interfaces, iface) - end -end - +local interfaces = { 'local-port' } if sysconfig.lan_ifname and uci:get_bool('network', 'mesh_lan', 'disabled') then for lanif in sysconfig.lan_ifname:gmatch('%S+') do util.add_to_set(interfaces, lanif) end end -util.add_to_set(interfaces, 'local-port') - - -uci:delete('network', 'client') uci:section('network', 'interface', 'client', { type = 'bridge', ifname = interfaces, diff --git a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/310-gluon-client-bridge-local-node b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/310-gluon-client-bridge-local-node index 824d8d40..e67dc7d5 100755 --- a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/310-gluon-client-bridge-local-node +++ b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/310-gluon-client-bridge-local-node @@ -10,7 +10,6 @@ local uci = require('simple-uci').cursor() local next_node = site.next_node({}) -uci:delete('network', 'local_node_dev') uci:section('network', 'device', 'local_node_dev', { type = 'veth', name = 'local-node', @@ -31,7 +30,6 @@ if next_node.ip6 then ip6 = next_node.ip6 .. '/128' end -uci:delete('network', 'local_node') uci:section('network', 'interface', 'local_node', { ifname = 'local-node', proto = 'static', diff --git a/package/gluon-core/files/lib/gluon/upgrade/001-reset-uci b/package/gluon-core/files/lib/gluon/upgrade/001-reset-uci new file mode 100755 index 00000000..4981390d --- /dev/null +++ b/package/gluon-core/files/lib/gluon/upgrade/001-reset-uci @@ -0,0 +1,23 @@ +#!/bin/sh + +NETWORK_CFG='/etc/config/network' +NETWORK_SAVED="${NETWORK_CFG}_gluon-old" + +SYSTEM_CFG='/etc/config/system' +SYSTEM_SAVED="${SYSTEM_CFG}_gluon-old" + +# Make sure everything is saved before we move away the config files +uci commit + +# Save old configs (unless there is already a saved config, +# which means that the previous upgrade was interrupted) +if [ -s "$NETWORK_CFG" ] && ! [ -s "$NETWORK_SAVED" ]; then + mv -f "$NETWORK_CFG" "$NETWORK_SAVED" +fi +if [ -s "$SYSTEM_CFG" ] && ! [ -s "$SYSTEM_SAVED" ]; then + mv -f "$SYSTEM_CFG" "$SYSTEM_SAVED" +fi + +# Generate a new network config +rm -f /etc/board.json "$NETWORK_CFG" "$SYSTEM_CFG" +config_generate diff --git a/package/gluon-core/files/lib/gluon/upgrade/998-commit b/package/gluon-core/files/lib/gluon/upgrade/998-commit index 8b4be6a9..9e781f34 100755 --- a/package/gluon-core/files/lib/gluon/upgrade/998-commit +++ b/package/gluon-core/files/lib/gluon/upgrade/998-commit @@ -4,3 +4,6 @@ uci -q batch <<-EOF delete gluon.core.reconfigure commit EOF + +# New config is saved, we can delete the old one +rm -f /etc/config/*_gluon-old diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/002-migrate-system b/package/gluon-core/luasrc/lib/gluon/upgrade/002-migrate-system new file mode 100755 index 00000000..b08dc8a3 --- /dev/null +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/002-migrate-system @@ -0,0 +1,31 @@ +#!/usr/bin/lua + +local uci = require('simple-uci').cursor() + +-- Migrate system section +local system = uci:get_all('system_gluon-old', '@system[0]') +if system then + uci:tset('system', '@system[0]', system) +end + +-- Migrate ntp section +local ntp = uci:get_all('system_gluon-old', 'ntp') +if ntp then + uci:tset('system', 'ntp', ntp) +end + +-- Migrate gpio_switch sections +-- +-- Only the value is copied from the old config, so updates to names and +-- pins are preserved +uci:foreach('system', 'gpio_switch', function(s) + local name = s['.name'] + local value = uci:get('system_gluon-old', name, 'value') + if value then + uci:set('system', name, 'value', value) + end +end) + +-- No other sections are migrated, so updated LED and RSSI configs can take effect + +uci:save('system') diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces index 6371cc61..56799616 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces @@ -79,9 +79,7 @@ else end -uci:delete('network', 'lan') -uci:delete('network', 'wan') - uci:delete_all('network', 'device') +uci:delete_all('network', 'interface') uci:save('network') diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/110-network b/package/gluon-core/luasrc/lib/gluon/upgrade/110-network index 79c50d27..8903c126 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/110-network +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/110-network @@ -3,8 +3,21 @@ local uci = require('simple-uci').cursor() local sysconfig = require 'gluon.sysconfig' +local wan = uci:get_all('network_gluon-old', 'wan') or {} +local wan6 = uci:get_all('network_gluon-old', 'wan6') or {} + +uci:section('network', 'interface', 'loopback', { + ifname = 'lo', + proto = 'static', + ipaddr = '127.0.0.1', + netmask = '255.0.0.0', +}) uci:section('network', 'interface', 'wan', { + proto = wan.proto or 'dhcp', + ipaddr = wan.ipaddr, + netmask = wan.netmask, + gateway = wan.gateway, ifname = sysconfig.wan_ifname, type = 'bridge', igmp_snooping = true, @@ -13,12 +26,10 @@ uci:section('network', 'interface', 'wan', { auto = true, }) -if not uci:get('network', 'wan', 'proto') then - uci:set('network', 'wan', 'proto', 'dhcp') -end - - uci:section('network', 'interface', 'wan6', { + proto = wan6.proto or 'dhcpv6', + ip6addr = wan6.ip6addr, + ip6gw = wan6.ip6gw, ifname = 'br-wan', peerdns = false, ip6table = 1, @@ -26,11 +37,6 @@ uci:section('network', 'interface', 'wan6', { reqprefix = 'no', }) -if not uci:get('network', 'wan6', 'proto') then - uci:set('network', 'wan6', 'proto', 'dhcpv6') -end - - uci:section('network', 'rule6', 'wan6_lookup', { mark = '0x01/0x01', lookup = 1, diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless b/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless index b0a5485f..604e33a8 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless @@ -106,8 +106,6 @@ end local function delete_ibss(radio_name) local name = 'ibss_' .. radio_name - uci:delete('network', name) - uci:delete('network', name .. '_vlan') uci:delete('wireless', name) end @@ -118,8 +116,6 @@ local function configure_mesh(config, radio, index, suffix, disabled) local macfilter = uci:get('wireless', name, 'macfilter') local maclist = uci:get('wireless', name, 'maclist') - uci:delete('network', name) - uci:delete('network', name .. '_vlan') uci:delete('wireless', name) if not config then diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-wan b/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-wan index cf6eff71..4f24cbc4 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-wan +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-wan @@ -3,23 +3,23 @@ local site = require 'gluon.site' local uci = require('simple-uci').cursor() +local disabled = uci:get('network_gluon-old', 'mesh_wan', 'disabled') +if disabled == nil then + disabled = not site.mesh_on_wan(false) +end + +local transitive = uci:get('network_gluon-old', 'mesh_wan', 'transitive') +if transitive == nil then + transitive = true +end + uci:section('network', 'interface', 'mesh_wan', { ifname = 'br-wan', - proto = 'gluon_wired', - index = 0, - vxlan = site.mesh.vxlan(true), + proto = 'gluon_wired', + index = 0, + vxlan = site.mesh.vxlan(true), + disabled = disabled, + transitive = transitive, }) -local enable = site.mesh_on_wan(false) -local old_auto = uci:get('network', 'mesh_wan', 'auto') -local old_disabled = uci:get('network', 'mesh_wan', 'disabled') -if old_auto ~= nil or old_disabled ~= nil then - enable = old_auto ~= '0' and old_disabled ~= '1' -end -uci:set('network', 'mesh_wan', 'disabled', not enable) - -if uci:get('network', 'mesh_wan', 'transitive') == nil then - uci:set('network', 'mesh_wan', 'transitive', true) -end - uci:save('network') diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/220-interface-lan b/package/gluon-core/luasrc/lib/gluon/upgrade/220-interface-lan index 55586435..cd38f804 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/220-interface-lan +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/220-interface-lan @@ -1,7 +1,6 @@ #!/usr/bin/lua local site = require 'gluon.site' -local util = require 'gluon.util' local sysconfig = require 'gluon.sysconfig' local uci = require('simple-uci').cursor() @@ -10,44 +9,30 @@ if not sysconfig.lan_ifname then os.exit(0) end +local type +if sysconfig.lan_ifname:match(' ') then + type = 'bridge' +end + +local disabled = uci:get('network_gluon-old', 'mesh_lan', 'disabled') +if disabled == nil then + disabled = not site.mesh_on_lan(false) +end + +local transitive = uci:get('network_gluon-old', 'mesh_lan', 'transitive') +if transitive == nil then + transitive = true +end + uci:section('network', 'interface', 'mesh_lan', { - ifname = sysconfig.lan_ifname, + ifname = sysconfig.lan_ifname, + type = type, igmp_snooping = false, - proto = 'gluon_wired', - index = 4, - vxlan = site.mesh.vxlan(true), + proto = 'gluon_wired', + index = 4, + vxlan = site.mesh.vxlan(true), + disabled = disabled, + transitive = transitive, }) -if sysconfig.lan_ifname:match(' ') then - uci:set('network', 'mesh_lan', 'type', 'bridge') -else - uci:delete('network', 'mesh_lan', 'type') -end - -local enable = site.mesh_on_lan(false) -local old_auto = uci:get('network', 'mesh_lan', 'auto') -local old_disabled = uci:get('network', 'mesh_lan', 'disabled') -if old_auto ~= nil or old_disabled ~= nil then - enable = old_auto ~= '0' and old_disabled ~= '1' -end - -if enable then - local interfaces = uci:get_list('network', 'client', 'ifname') - - if interfaces then - for lanif in sysconfig.lan_ifname:gmatch('%S+') do - if util.contains(interfaces, lanif) then - enable = false - break - end - end - end -end - -uci:set('network', 'mesh_lan', 'disabled', not enable) - -if uci:get('network', 'mesh_lan', 'transitive') == nil then - uci:set('network', 'mesh_lan', 'transitive', true) -end - uci:save('network') diff --git a/package/gluon-mesh-babel/luasrc/lib/gluon/upgrade/430-gluon-mesh-babel-add-mmfd-interface b/package/gluon-mesh-babel/luasrc/lib/gluon/upgrade/430-gluon-mesh-babel-add-mmfd-interface index 47807d95..073d288e 100755 --- a/package/gluon-mesh-babel/luasrc/lib/gluon/upgrade/430-gluon-mesh-babel-add-mmfd-interface +++ b/package/gluon-mesh-babel/luasrc/lib/gluon/upgrade/430-gluon-mesh-babel-add-mmfd-interface @@ -2,7 +2,6 @@ local uci = require('simple-uci').cursor() -uci:delete('network', 'mmfd') uci:section('network', 'interface', 'mmfd', { proto = 'static', ifname = 'mmfd0', diff --git a/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/310-gluon-mesh-batman-adv-mesh b/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/310-gluon-mesh-batman-adv-mesh index 40943207..977b44d1 100755 --- a/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/310-gluon-mesh-batman-adv-mesh +++ b/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/310-gluon-mesh-batman-adv-mesh @@ -9,14 +9,12 @@ local uci = require('simple-uci').cursor() uci:delete('batman-adv', 'bat0') uci:save('batman-adv') -local gw_mode = uci:get('network', 'gluon_bat0', 'gw_mode') or 'client' -uci:delete('network', 'gluon_bat0') +local gw_mode = uci:get('network_gluon-old', 'gluon_bat0', 'gw_mode') or 'client' uci:section('network', 'interface', 'gluon_bat0', { proto = 'gluon_bat0', gw_mode = gw_mode, }) -uci:delete('network', 'bat0') uci:section('network', 'interface', 'bat0', { ifname = 'bat0', proto = 'none', diff --git a/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/320-gluon-mesh-batman-adv-client-bridge b/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/320-gluon-mesh-batman-adv-client-bridge index fc14a6e6..1ea64049 100755 --- a/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/320-gluon-mesh-batman-adv-client-bridge +++ b/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/320-gluon-mesh-batman-adv-client-bridge @@ -21,7 +21,6 @@ uci:section('network', 'interface', 'client', { query_response_interval = 500, }) -uci:delete('network', 'local_node_route6') uci:section('network', 'route6', 'local_node_route6', { interface = 'client', target = site.prefix6(), diff --git a/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-mac-addresses b/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-mac-addresses index d323c863..61153e10 100755 --- a/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-mac-addresses +++ b/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-mac-addresses @@ -8,8 +8,6 @@ local uci = require('simple-uci').cursor() -- fix up potentially duplicate MAC addresses (for meshing) if not site.mesh.vxlan(true) then uci:set('network', 'wan', 'macaddr', util.generate_mac(0)) -else - uci:delete('network', 'wan', 'macaddr') end uci:set('network', 'mesh_lan', 'macaddr', util.generate_mac(4)) uci:save('network') diff --git a/package/gluon-mesh-vpn-wireguard/luasrc/lib/gluon/upgrade/400-mesh-vpn-wireguard b/package/gluon-mesh-vpn-wireguard/luasrc/lib/gluon/upgrade/400-mesh-vpn-wireguard index dfadc95b..05e1d9e9 100755 --- a/package/gluon-mesh-vpn-wireguard/luasrc/lib/gluon/upgrade/400-mesh-vpn-wireguard +++ b/package/gluon-mesh-vpn-wireguard/luasrc/lib/gluon/upgrade/400-mesh-vpn-wireguard @@ -3,7 +3,7 @@ local uci = require('simple-uci').cursor() local site = require 'gluon.site' -local private_key = uci:get("network", 'wg_mesh', "private_key") +local private_key = uci:get("network_gluon-old", 'wg_mesh', "private_key") if not private_key or not private_key:match("^" .. ("[%a%d+/]"):rep(42) .. "[AEIMQUYcgkosw480]=$") then private_key = "generate" From 05c29512ec030792c7f8218211a1b44a1caa0de6 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 28 Dec 2021 20:41:29 +0100 Subject: [PATCH 11/67] gluon-core: sysconfig: avoid unnecessary writes Do not write files when the content is unchanged. Avoids a few unnecessary filesystem writes when resetting ifname sysconfigs on each upgrade. --- package/gluon-core/luasrc/usr/lib/lua/gluon/sysconfig.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/sysconfig.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/sysconfig.lua index 93eb6ed1..7caf05c6 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/sysconfig.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/sysconfig.lua @@ -11,6 +11,10 @@ local function get(_, name) end local function set(_, name, val) + if val == get(nil, name) then + return + end + if val then local f = io.open(sysconfigdir .. name, 'w+') f:write(val, '\n') From 4b8251c988868f2d6fbd6375092199110e2443b2 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 23 Jan 2022 13:39:35 +0100 Subject: [PATCH 12/67] gluon-core: initialize interfaces role configuration The new configuration generates sections iface_single/lan/wan in /etc/config/gluon. These sections usually refer to a sysconfig-controlled interface list, but adding custom sections with verbatim interfaces names is also possible. Each interface section contains a list of roles. The supported roles are 'client', 'uplink' and 'mesh'. Multiple roles can be configured on the same interface (for example the old 'mesh_on_wan' setting would become 'uplink'+'mesh'). 'client' is subsumed by any other role configured on the same interface ('client'+'mesh' is equivalent to 'mesh'). This property is important, as it allows the Wired Mesh settings in gluon-web-network to simply add and remove the mesh role without having to care what other roles are set - so in the default setup, this would switch between 'client' and 'client'+'mesh' for the LAN interface. By default, the WAN interface has role 'uplink' and the LAN interface 'client'; if only a single interface exists, the roles from the WAN interface are used by default. The default for each of the three interfaces (WAN/LAN/single) can be changed separated in site.conf, superseding the old mesh_on_wan, mesh_on_lan and single_as_lan settings. --- package/gluon-core/check_site.lua | 11 +++- .../lib/gluon/upgrade/021-interface-roles | 66 +++++++++++++++++++ 2 files changed, 74 insertions(+), 3 deletions(-) create mode 100755 package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles diff --git a/package/gluon-core/check_site.lua b/package/gluon-core/check_site.lua index 4cb44d5b..103cb929 100644 --- a/package/gluon-core/check_site.lua +++ b/package/gluon-core/check_site.lua @@ -74,6 +74,11 @@ need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false) need_boolean(in_domain({'mesh', 'vxlan'}), false) -need_boolean(in_site({'mesh_on_wan'}), false) -need_boolean(in_site({'mesh_on_lan'}), false) -need_boolean(in_site({'single_as_lan'}), false) +local interfaces_roles = {'client', 'uplink', 'mesh'} +for _, config in ipairs({'wan', 'lan', 'single'}) do + need_array_of(in_site({'interfaces', config, 'default_roles'}), interfaces_roles, false) +end + +obsolete({'mesh_on_wan'}, 'Use interfaces.wan.default_roles.') +obsolete({'mesh_on_lan'}, 'Use interfaces.lan.default_roles.') +obsolete({'single_as_lan'}, 'Use interfaces.single.default_roles.') diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles b/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles new file mode 100755 index 00000000..182c8903 --- /dev/null +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles @@ -0,0 +1,66 @@ +#!/usr/bin/lua + +local site = require 'gluon.site' +local sysconfig = require 'gluon.sysconfig' +local uci = require('simple-uci').cursor() +local util = require 'gluon.util' + +-- Defaults from site.conf +local roles = { + lan = site.interfaces.lan.roles({'client'}), + wan = site.interfaces.wan.roles({'uplink'}), +} +roles.single = site.interfaces.single.roles(roles.wan) + +-- Migration of Mesh-on-WAN/LAN setting from Gluon 2021.1 and older (to be removed in 2024) +-- +-- Wired meshing is enabled for single interfaces if either of the settings +-- was previously enabled +local mesh_lan_disabled = uci:get('network_gluon-old', 'mesh_lan', 'disabled') +local mesh_wan_disabled = uci:get('network_gluon-old', 'mesh_wan', 'disabled') +if mesh_wan_disabled == '0' then + util.add_to_set(roles.wan, 'mesh') + util.add_to_set(roles.single, 'mesh') +elseif mesh_wan_disabled == '1' then + util.remove_from_set(roles.wan, 'mesh') + util.remove_from_set(roles.single, 'mesh') +end +if mesh_lan_disabled == '0' then + util.add_to_set(roles.lan, 'mesh') + util.add_to_set(roles.single, 'mesh') +elseif mesh_lan_disabled == '1' then + util.remove_from_set(roles.lan, 'mesh') + util.remove_from_set(roles.single, 'mesh') +end + +-- Migration of single to WAN/LAN or vice-versa (an interface was added or removed) +-- We identify the WAN with the single interface in this case +-- +-- These settings only take effect when the section that is the target of the +-- migration does not exist yet. +if uci:get('gluon', 'iface_wan') then + roles.single = uci:get_list('gluon', 'iface_wan', 'role') +end +if uci:get('gluon', 'iface_single') then + roles.wan = uci:get_list('gluon', 'iface_single', 'role') +end + +-- Non-existing interfaces are nil, so they will not be added to the table +local interfaces = { + lan = sysconfig.lan_ifname, + wan = sysconfig.wan_ifname, + single = sysconfig.single_ifname, +} + +for iface in pairs(interfaces) do + local section_name = 'iface_' .. iface + if not uci:get('gluon', section_name) then + uci:section('gluon', 'interface', section_name, { + -- / prefix refers to sysconfig ifnames + name = '/' .. iface, + role = roles[iface], + }) + end +end + +uci:save('gluon') From c779d123692956badec1686df1d9ff1c4d86828e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 23 Jan 2022 14:43:35 +0100 Subject: [PATCH 13/67] treewide: use interface roles as basis for network configuration With the new role-based interface configuration, it would be better to rename the wan/wan6 interfaces to uplink/uplink6, but that would cause unnecessary churn for the firewall configuration, so it is left for a later update. As all interfaces with the 'uplink' role are in the br-wan bridge, it is not possible to assign these to the 'mesh' role independently - instead, br-wan is added as a mesh interface as soon as a single interface has both the 'uplink' and 'mesh' roles. The UCI section for this configuration is now called 'mesh_uplink' instead of 'mesh_wan'. For all interfaces that have the 'mesh', but not the 'uplink' role a second configuration 'mesh_other' is created. If there is more than one such interface, all these interfaces are bridged as well (creating a bridge 'br-mesh_other'). This replaces the 'mesh_lan' section with its optional 'br-mesh_lan' bridge, but can also include interfaces that were not considered "LAN" when interfaces roles are modified (via site.conf or manually). --- .../upgrade/300-gluon-client-bridge-network | 8 +--- .../luasrc/lib/gluon/upgrade/110-network | 4 +- .../lib/gluon/upgrade/210-interface-mesh | 48 +++++++++++++++++++ .../lib/gluon/upgrade/210-interface-wan | 25 ---------- .../lib/gluon/upgrade/220-interface-lan | 38 --------------- .../lib/gluon/upgrade/300-firewall-rules | 4 +- .../luasrc/usr/lib/lua/gluon/util.lua | 28 +++++++++++ .../330-gluon-mesh-batman-adv-mac-addresses | 4 +- 8 files changed, 85 insertions(+), 74 deletions(-) create mode 100755 package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-mesh delete mode 100755 package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-wan delete mode 100755 package/gluon-core/luasrc/lib/gluon/upgrade/220-interface-lan diff --git a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network index b344b2b3..3d4dbac3 100755 --- a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network +++ b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network @@ -6,12 +6,8 @@ local util = require 'gluon.util' local uci = require('simple-uci').cursor() -local interfaces = { 'local-port' } -if sysconfig.lan_ifname and uci:get_bool('network', 'mesh_lan', 'disabled') then - for lanif in sysconfig.lan_ifname:gmatch('%S+') do - util.add_to_set(interfaces, lanif) - end -end +local interfaces = util.get_role_interfaces(uci, 'client', true) +util.add_to_set(interfaces, 'local-port') uci:section('network', 'interface', 'client', { type = 'bridge', diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/110-network b/package/gluon-core/luasrc/lib/gluon/upgrade/110-network index 8903c126..ac084e6a 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/110-network +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/110-network @@ -1,7 +1,7 @@ #!/usr/bin/lua local uci = require('simple-uci').cursor() -local sysconfig = require 'gluon.sysconfig' +local util = require 'gluon.util' local wan = uci:get_all('network_gluon-old', 'wan') or {} local wan6 = uci:get_all('network_gluon-old', 'wan6') or {} @@ -18,7 +18,7 @@ uci:section('network', 'interface', 'wan', { ipaddr = wan.ipaddr, netmask = wan.netmask, gateway = wan.gateway, - ifname = sysconfig.wan_ifname, + ifname = util.get_role_interfaces(uci, 'uplink'), type = 'bridge', igmp_snooping = true, multicast_querier = false, diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-mesh b/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-mesh new file mode 100755 index 00000000..7e2f8471 --- /dev/null +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-mesh @@ -0,0 +1,48 @@ +#!/usr/bin/lua + +local site = require 'gluon.site' +local uci = require('simple-uci').cursor() +local util = require 'gluon.util' + +local mesh_interfaces = util.get_role_interfaces(uci, 'mesh') +local uplink_interfaces = util.get_role_interfaces(uci, 'uplink') + +local mesh_interfaces_uplink = {} +local mesh_interfaces_other = {} +for _, iface in ipairs(mesh_interfaces) do + if util.contains(uplink_interfaces, iface) then + table.insert(mesh_interfaces_uplink, iface) + else + table.insert(mesh_interfaces_other, iface) + end +end + +if #mesh_interfaces_uplink > 0 then + uci:section('network', 'interface', 'mesh_uplink', { + ifname = 'br-wan', + proto = 'gluon_wired', + index = 0, + vxlan = site.mesh.vxlan(true), + }) +end + +if #mesh_interfaces_other > 0 then + local iftype, ifname + if #mesh_interfaces_other == 1 then + ifname = mesh_interfaces_other[1] + else + iftype = 'bridge' + ifname = mesh_interfaces_other + end + + uci:section('network', 'interface', 'mesh_other', { + ifname = ifname, + type = iftype, + igmp_snooping = false, + proto = 'gluon_wired', + index = 4, + vxlan = site.mesh.vxlan(true), + }) +end + +uci:save('network') diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-wan b/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-wan deleted file mode 100755 index 4f24cbc4..00000000 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/210-interface-wan +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/lua - -local site = require 'gluon.site' -local uci = require('simple-uci').cursor() - -local disabled = uci:get('network_gluon-old', 'mesh_wan', 'disabled') -if disabled == nil then - disabled = not site.mesh_on_wan(false) -end - -local transitive = uci:get('network_gluon-old', 'mesh_wan', 'transitive') -if transitive == nil then - transitive = true -end - -uci:section('network', 'interface', 'mesh_wan', { - ifname = 'br-wan', - proto = 'gluon_wired', - index = 0, - vxlan = site.mesh.vxlan(true), - disabled = disabled, - transitive = transitive, -}) - -uci:save('network') diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/220-interface-lan b/package/gluon-core/luasrc/lib/gluon/upgrade/220-interface-lan deleted file mode 100755 index cd38f804..00000000 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/220-interface-lan +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/lua - -local site = require 'gluon.site' -local sysconfig = require 'gluon.sysconfig' - -local uci = require('simple-uci').cursor() - -if not sysconfig.lan_ifname then - os.exit(0) -end - -local type -if sysconfig.lan_ifname:match(' ') then - type = 'bridge' -end - -local disabled = uci:get('network_gluon-old', 'mesh_lan', 'disabled') -if disabled == nil then - disabled = not site.mesh_on_lan(false) -end - -local transitive = uci:get('network_gluon-old', 'mesh_lan', 'transitive') -if transitive == nil then - transitive = true -end - -uci:section('network', 'interface', 'mesh_lan', { - ifname = sysconfig.lan_ifname, - type = type, - igmp_snooping = false, - proto = 'gluon_wired', - index = 4, - vxlan = site.mesh.vxlan(true), - disabled = disabled, - transitive = transitive, -}) - -uci:save('network') diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/300-firewall-rules b/package/gluon-core/luasrc/lib/gluon/upgrade/300-firewall-rules index 605f6684..ef616aef 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/300-firewall-rules +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/300-firewall-rules @@ -86,9 +86,9 @@ local wired_mesh_ifaces = {} uci:foreach('network', 'interface', function(iface) -- Select all interfaces with proto gluon_wired except for - -- mesh_wan into this zone, as mesh_wan is the same + -- mesh_uplink into this zone, as mesh_uplink is the same -- interface as wan, which has its own zone - if iface['proto'] == 'gluon_wired' and iface['.name'] ~= 'mesh_wan' then + if iface['proto'] == 'gluon_wired' and iface['.name'] ~= 'mesh_uplink' then table.insert(wired_mesh_ifaces, iface['.name']) end end diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua index 48b8340e..7152bc4d 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua @@ -138,6 +138,34 @@ function M.get_mesh_devices(uconn) return devices end +-- Returns a list of all interfaces with a given role +-- +-- If exclusive is set to true, only interfaces that have no other role +-- are returned; this is used to ensure that the client role is not active +-- at the same time as any other role +function M.get_role_interfaces(uci, role, exclusive) + local ret = {} + + local function add(name) + -- Interface names with a / prefix refer to sysconfig interfaces + -- (lan_ifname/wan_ifname/single_ifname) + if string.sub(name, 1, 1) == '/' then + name = sysconfig[string.sub(name, 2) .. '_ifname'] or '' + end + for iface in string.gmatch(name, '%S+') do + M.add_to_set(ret, iface) + end + end + + uci:foreach('gluon', 'interface', function(s) + if M.contains(s.role, role) and (not exclusive or #s.role == 1) then + add(s.name) + end + end) + + return ret +end + -- Safe glob: returns an empty table when the glob fails because of -- a non-existing path function M.glob(pattern) diff --git a/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-mac-addresses b/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-mac-addresses index 61153e10..09639e34 100755 --- a/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-mac-addresses +++ b/package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-mac-addresses @@ -9,5 +9,7 @@ local uci = require('simple-uci').cursor() if not site.mesh.vxlan(true) then uci:set('network', 'wan', 'macaddr', util.generate_mac(0)) end -uci:set('network', 'mesh_lan', 'macaddr', util.generate_mac(4)) +if uci:get('network', 'mesh_other') then + uci:set('network', 'mesh_other', 'macaddr', util.generate_mac(4)) +end uci:save('network') From 316e96a467cd98c93758eadddc8ea284e4939704 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 28 Dec 2021 20:47:26 +0100 Subject: [PATCH 14/67] gluon-core, gluon-setup-mode: reset ifname sysconfigs on each update, introduce single_ifname Allow interface names to change on updates to handle hwconfig -> DSA and similar migrations. On devices with only a single interface, a sysconfig single_ifname is created instead of wan_ifname or lan_ifname to allow separate configuration in site.conf. --- .../luasrc/lib/gluon/upgrade/020-interfaces | 20 +++++-------------- .../luasrc/lib/gluon/upgrade/320-setup-ifname | 9 ++------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces index 56799616..b56a1e26 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces @@ -1,15 +1,7 @@ #!/usr/bin/lua -local sysconfig = require 'gluon.sysconfig' - --- Are we already set up? -if sysconfig.lan_ifname or sysconfig.wan_ifname then - os.exit(0) -end - - local platform = require 'gluon.platform' -local site = require 'gluon.site' +local sysconfig = require 'gluon.sysconfig' local json = require 'jsonc' local uci = require('simple-uci').cursor() @@ -69,13 +61,11 @@ end if wan_ifname and lan_ifname then sysconfig.wan_ifname = wan_ifname sysconfig.lan_ifname = lan_ifname + sysconfig.single_ifname = nil else - local single_ifname = lan_ifname or wan_ifname - if site.single_as_lan(false) then - sysconfig.lan_ifname = single_ifname - else - sysconfig.wan_ifname = single_ifname - end + sysconfig.wan_ifname = nil + sysconfig.lan_ifname = nil + sysconfig.single_ifname = lan_ifname or wan_ifname end diff --git a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname b/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname index 53d60d1c..145d371e 100755 --- a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname +++ b/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname @@ -3,13 +3,8 @@ local platform = require 'gluon.platform' local sysconfig = require 'gluon.sysconfig' - -if sysconfig.setup_ifname then - os.exit(0) -end - if platform.is_outdoor_device() then - sysconfig.setup_ifname = sysconfig.wan_ifname or sysconfig.lan_ifname + sysconfig.setup_ifname = sysconfig.single_ifname or sysconfig.wan_ifname else - sysconfig.setup_ifname = sysconfig.lan_ifname or sysconfig.wan_ifname + sysconfig.setup_ifname = sysconfig.single_ifname or sysconfig.lan_ifname end From 6dcee2e324bf9b2f1a49672d635808da6619c1b6 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 23 Jan 2022 17:34:29 +0100 Subject: [PATCH 15/67] gluon-web-network: update wired mesh settings for new role-based configuration --- package/gluon-web-network/i18n/de.po | 3 ++ package/gluon-web-network/i18n/fr.po | 3 ++ .../i18n/gluon-web-network.pot | 3 ++ .../gluon/config-mode/model/admin/network.lua | 47 ++++++++++--------- 4 files changed, 33 insertions(+), 23 deletions(-) diff --git a/package/gluon-web-network/i18n/de.po b/package/gluon-web-network/i18n/de.po index 4a6bc8b5..77b3a6a3 100644 --- a/package/gluon-web-network/i18n/de.po +++ b/package/gluon-web-network/i18n/de.po @@ -28,6 +28,9 @@ msgstr "PoE-Passthrough aktivieren" msgid "Enable PoE Power Port %s" msgstr "PoE-Ausgabe auf Port %s aktivieren" +msgid "Enable meshing on the Ethernet interface" +msgstr "Mesh auf dem Ethernet-Port aktivieren" + msgid "Enable meshing on the LAN interface" msgstr "Mesh auf dem LAN-Port aktivieren" diff --git a/package/gluon-web-network/i18n/fr.po b/package/gluon-web-network/i18n/fr.po index 292d6e25..97067343 100644 --- a/package/gluon-web-network/i18n/fr.po +++ b/package/gluon-web-network/i18n/fr.po @@ -28,6 +28,9 @@ msgstr "" msgid "Enable PoE Power Port %s" msgstr "" +msgid "Enable meshing on the Ethernet interface" +msgstr "" + msgid "Enable meshing on the LAN interface" msgstr "Activer le réseau MESH sur le port LAN" diff --git a/package/gluon-web-network/i18n/gluon-web-network.pot b/package/gluon-web-network/i18n/gluon-web-network.pot index 913b78b3..a75929df 100644 --- a/package/gluon-web-network/i18n/gluon-web-network.pot +++ b/package/gluon-web-network/i18n/gluon-web-network.pot @@ -19,6 +19,9 @@ msgstr "" msgid "Enable PoE Power Port %s" msgstr "" +msgid "Enable meshing on the Ethernet interface" +msgstr "" + msgid "Enable meshing on the LAN interface" msgstr "" diff --git a/package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua b/package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua index dab31ec0..df92c965 100644 --- a/package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua +++ b/package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua @@ -76,36 +76,37 @@ end s = f:section(Section) -local mesh_wan = s:option(Flag, "mesh_wan", translate("Enable meshing on the WAN interface")) -mesh_wan.default = not uci:get_bool("network", "mesh_wan", "disabled") +local wired_mesh_help = { + single = translate('Enable meshing on the Ethernet interface'), + wan = translate('Enable meshing on the WAN interface'), + lan = translate('Enable meshing on the LAN interface'), +} -function mesh_wan:write(data) - uci:set("network", "mesh_wan", "disabled", not data) -end +local function wired_mesh(iface) + if not sysconfig[iface .. '_ifname'] then return end + local iface_roles = uci:get_list('gluon', 'iface_' .. iface, 'role') -if sysconfig.lan_ifname then - s = f:section(Section) + local option = s:option(Flag, 'mesh_' .. iface, wired_mesh_help[iface]) + option.default = util.contains(iface_roles, 'mesh') ~= false - local mesh_lan = s:option(Flag, "mesh_lan", translate("Enable meshing on the LAN interface")) - mesh_lan.default = not uci:get_bool("network", "mesh_lan", "disabled") - - function mesh_lan:write(data) - uci:set("network", "mesh_lan", "disabled", not data) - - local interfaces = uci:get_list("network", "client", "ifname") - - for lanif in sysconfig.lan_ifname:gmatch('%S+') do - if data then - util.remove_from_set(interfaces, lanif) - else - util.add_to_set(interfaces, lanif) - end + function option:write(data) + local roles = uci:get_list('gluon', 'iface_' .. iface, 'role') + if data then + util.add_to_set(roles, 'mesh') + else + util.remove_from_set(roles, 'mesh') end + uci:set_list('gluon', 'iface_' .. iface, 'role', roles) - uci:set_list("network", "client", "ifname", interfaces) + -- Reconfigure on next reboot + uci:set('gluon', 'core', 'reconfigure', true) end end +wired_mesh('single') +wired_mesh('wan') +wired_mesh('lan') + local section uci:foreach("system", "gpio_switch", function(si) if si[".name"]:match("poe") then @@ -160,7 +161,7 @@ function f:write() uci:delete("network", "wan6", "ip6gw") end - + uci:commit('gluon') uci:commit("network") uci:commit('system') end From a671b5081c19707d1fc94f2ca8815d1a6ecf1c6c Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 23 Jan 2022 23:12:37 +0100 Subject: [PATCH 16/67] gluon-core: preserve explicitly marked network and system sections A section can be marked as preseved by setting the gluon_preserve option to 1. In addition the following conditions must hold: - The preserved section must not already exist after OpenWrt's and Gluons setup scripts run. Modifying existing sections is currently unsupported. - Preserved sections must be named, so it can be detected whether a section conflicts with a preexisting one. --- .../lib/gluon/upgrade/997-migrate-preserved | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 package/gluon-core/luasrc/lib/gluon/upgrade/997-migrate-preserved diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/997-migrate-preserved b/package/gluon-core/luasrc/lib/gluon/upgrade/997-migrate-preserved new file mode 100755 index 00000000..c40bbc9f --- /dev/null +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/997-migrate-preserved @@ -0,0 +1,19 @@ +#!/usr/bin/lua + +local uci = require('simple-uci').cursor() + +for _, config in ipairs({'system', 'network'}) do + uci:foreach(config .. '_gluon-old', nil, function(s) + if s.gluon_preserve ~= '1' then return end + + -- Unnamed sections can't be preserved + if s['.anonymous'] then return end + + -- We don't allow overwriting existing sections + if uci:get(config, s['.name']) then return end + + uci:section(config, s['.type'], s['.name'], s) + end) + + uci:save(config) +end From 210cacdf55d2a0017b7360dd059240033e2470e3 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 24 Jan 2022 00:18:02 +0100 Subject: [PATCH 17/67] docs: update for role-based interface configuration --- docs/dev/{wan.rst => uplink.rst} | 15 ++++++----- docs/features/multidomain.rst | 4 +-- docs/features/private-wlan.rst | 4 +-- docs/features/wired-mesh.rst | 4 +-- docs/index.rst | 2 +- docs/user/site.rst | 46 +++++++++++++++++++++++++++----- 6 files changed, 53 insertions(+), 22 deletions(-) rename docs/dev/{wan.rst => uplink.rst} (86%) diff --git a/docs/dev/wan.rst b/docs/dev/uplink.rst similarity index 86% rename from docs/dev/wan.rst rename to docs/dev/uplink.rst index ec9d942b..4d48168d 100644 --- a/docs/dev/wan.rst +++ b/docs/dev/uplink.rst @@ -1,5 +1,5 @@ -WAN support -=========== +Uplink support +============== As the WAN port of a node will be connected to a user's private network, it is essential that the node only uses the WAN when it is absolutely necessary. @@ -11,11 +11,12 @@ There are two cases in which the WAN port is used: After the VPN connection has been established, the node should be able to reach the mesh's DNS servers and use these for all other name resolution. -If the device does not feature a WAN port, the LAN port is configured as WAN port. -In case such a device has multiple LAN ports, all these can be used as WAN. -Devices, which feature a "hybrid" port (labelled as WAN/LAN), this port is used as WAN. - -This behavior can be reversed using the ``single_as_lan`` site.conf option. +If a device has only a single Ethernet port (or group of ports), it will be +used as an uplink port even when it is not labelled as "WAN" by default. This +behavior can be controlled using the ``interfaces.single.default_roles`` +site.conf option. It is also possible to alter the interface assignment after +installation by modifying ``/etc/config/gluon`` and running +``gluon-reconfigure``. Routing tables ~~~~~~~~~~~~~~ diff --git a/docs/features/multidomain.rst b/docs/features/multidomain.rst index 80cae0de..43f343bb 100644 --- a/docs/features/multidomain.rst +++ b/docs/features/multidomain.rst @@ -130,9 +130,7 @@ site.conf only variables - authorized_keys - default_domain - poe_passthrough - - mesh_on_wan - - mesh_on_lan - - single_as_lan + - interfaces.*.default_roles - setup_mode.skip - autoupdater.branch - mesh_vpn.enabled diff --git a/docs/features/private-wlan.rst b/docs/features/private-wlan.rst index 3c26c8f8..41664b73 100644 --- a/docs/features/private-wlan.rst +++ b/docs/features/private-wlan.rst @@ -1,8 +1,8 @@ Private WLAN ============ -It is possible to set up a private WLAN that bridges the WAN port and is separated from the mesh network. -Please note that you should not enable ``mesh_on_wan`` simultaneously. +It is possible to set up a private WLAN that bridges the uplink port and is separated from the mesh network. +Please note that you should not enable Wired Mesh on the uplink port at the same time. The private WLAN is encrypted using WPA2 by default. On devices with enough flash and a supported radio, WPA3 or WPA2/WPA3 mixed-mode can be used instead of WPA2. For this to work, the ``wireless-encryption-wpa3`` diff --git a/docs/features/wired-mesh.rst b/docs/features/wired-mesh.rst index 7f99c3c0..b48ec072 100644 --- a/docs/features/wired-mesh.rst +++ b/docs/features/wired-mesh.rst @@ -50,8 +50,8 @@ Configuration Both Mesh-on-WAN and Mesh-on-LAN can be configured on the "Network" page of the *Advanced settings* (if the package ``gluon-web-network`` is installed). -It is also possible to enable Mesh-on-WAN and Mesh-on-LAN by default by -adding ``mesh_on_wan = true`` and ``mesh_on_lan = true`` to ``site.conf``. +It is also possible to enable Mesh-on-WAN and Mesh-on-LAN by default by adding +the ``mesh`` role to the ``interfaces.*.default_roles`` options in site.conf. Commandline =========== diff --git a/docs/index.rst b/docs/index.rst index d8e39465..72648a9a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -39,7 +39,7 @@ Several Freifunk communities in Germany use Gluon as the foundation of their Fre dev/hardware dev/packages dev/upgrade - dev/wan + dev/uplink dev/mac_addresses dev/site_library dev/build diff --git a/docs/user/site.rst b/docs/user/site.rst index 79e7ca1e..5b2e0eeb 100644 --- a/docs/user/site.rst +++ b/docs/user/site.rst @@ -399,17 +399,49 @@ mesh_vpn }, } -mesh_on_wan \: optional - Enables the mesh on the WAN port (``true`` or ``false``). +interfaces \: optional + Default setup for Ethernet ports. :: - mesh_on_wan = true, + interfaces = { + lan = { + default_roles = { 'client', 'mesh' }, + }, + wan = { + default_roles = { 'uplink', 'mesh' }, + }, + single = { + default_roles = { 'uplink', 'mesh' }, + }, + }, -mesh_on_lan \: optional - Enables the mesh on the LAN port (``true`` or ``false``). - :: + For devices that have two distinct Ethernet ports or port groups (often + labelled WAN and LAN), the ``lan`` and ``wan`` sections are used. When there + is only one port (group), ``single`` is used instead. - mesh_on_lan = true, + Available interface roles: + + - ``client``: Port allows regular clients to connect to the mesh + - ``uplink``: Port is used to establish Mesh VPN connections + - ``mesh``: Wired meshing to another Gluon or Gluon-compatible node + + The ``client`` role requires exclusive control over an interface. When + the ``client`` role is assigned to an interface at the same time as other + roles (like ``'client', 'mesh'`` in the above example), the other roles take + precedence (enabling ``mesh``, but not ``client`` in the example). + + Such a default configuration still fulfills a purpose (and is in fact the + recommended way to enable "Mesh-on-LAN" by default): The "LAN interface + meshing" checkbox in the advanced network settings will only add or remove + the ``mesh`` role, so the ``client`` role must already be in the configuration + to make the LAN port a regular client interface when the checkbox is disabled. + + All interface settings are optional. If unset, the following defaults are + used: + + - ``lan``: ``{ 'client' }`` + - ``wan``: ``{ 'uplink' }`` + - ``single``: Same as ``wan`` poe_passthrough \: optional Enable PoE passthrough by default on hardware with such a feature. From 073e559dc54c1b9d198559e21e1ba57586c936ed Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 23 Feb 2022 19:10:13 +0100 Subject: [PATCH 18/67] gluon-mesh-babel: do not allow disabling VXLAN (#2376) With Babel, wired meshing cannot run on the same logical interface as non-mesh traffic, so using VXLAN is mandatory. --- package/gluon-mesh-babel/check_site.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/gluon-mesh-babel/check_site.lua b/package/gluon-mesh-babel/check_site.lua index 5a7bf95a..acafaa6e 100644 --- a/package/gluon-mesh-babel/check_site.lua +++ b/package/gluon-mesh-babel/check_site.lua @@ -5,3 +5,5 @@ need_string_match(in_domain({'next_node', 'ip6'}), '^[%x:]+$', false) need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false) need_string_match(in_domain({'next_node', 'mac'}), '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$', false) + +need_value(in_domain({'mesh', 'vxlan'}), true, false) From 31124ac6876539f00af0ececcdb424c894fcef79 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 23 Feb 2022 21:50:15 +0100 Subject: [PATCH 19/67] patches: refresh "packages" patches (#2400) --- ...mplify-Config.in.patch => 0002-fastd-simplify-Config.in.patch} | 0 ...tch => 0003-fastd-disable-GMAC-based-methods-by-default.patch} | 0 ...3-fastd-update-to-v22.patch => 0004-fastd-update-to-v22.patch} | 0 ...d-add-L2TP-variant.patch => 0005-fastd-add-L2TP-variant.patch} | 0 ...riant.patch => 0006-fastd-fix-start-of-non-L2TP-variant.patch} | 0 ...-make-L2TP-support-a-config-option-instead-of-a-variant.patch} | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename patches/packages/packages/{0001-fastd-simplify-Config.in.patch => 0002-fastd-simplify-Config.in.patch} (100%) rename patches/packages/packages/{0002-fastd-disable-GMAC-based-methods-by-default.patch => 0003-fastd-disable-GMAC-based-methods-by-default.patch} (100%) rename patches/packages/packages/{0003-fastd-update-to-v22.patch => 0004-fastd-update-to-v22.patch} (100%) rename patches/packages/packages/{0004-fastd-add-L2TP-variant.patch => 0005-fastd-add-L2TP-variant.patch} (100%) rename patches/packages/packages/{0005-fastd-fix-start-of-non-L2TP-variant.patch => 0006-fastd-fix-start-of-non-L2TP-variant.patch} (100%) rename patches/packages/packages/{0006-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch => 0007-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch} (100%) diff --git a/patches/packages/packages/0001-fastd-simplify-Config.in.patch b/patches/packages/packages/0002-fastd-simplify-Config.in.patch similarity index 100% rename from patches/packages/packages/0001-fastd-simplify-Config.in.patch rename to patches/packages/packages/0002-fastd-simplify-Config.in.patch diff --git a/patches/packages/packages/0002-fastd-disable-GMAC-based-methods-by-default.patch b/patches/packages/packages/0003-fastd-disable-GMAC-based-methods-by-default.patch similarity index 100% rename from patches/packages/packages/0002-fastd-disable-GMAC-based-methods-by-default.patch rename to patches/packages/packages/0003-fastd-disable-GMAC-based-methods-by-default.patch diff --git a/patches/packages/packages/0003-fastd-update-to-v22.patch b/patches/packages/packages/0004-fastd-update-to-v22.patch similarity index 100% rename from patches/packages/packages/0003-fastd-update-to-v22.patch rename to patches/packages/packages/0004-fastd-update-to-v22.patch diff --git a/patches/packages/packages/0004-fastd-add-L2TP-variant.patch b/patches/packages/packages/0005-fastd-add-L2TP-variant.patch similarity index 100% rename from patches/packages/packages/0004-fastd-add-L2TP-variant.patch rename to patches/packages/packages/0005-fastd-add-L2TP-variant.patch diff --git a/patches/packages/packages/0005-fastd-fix-start-of-non-L2TP-variant.patch b/patches/packages/packages/0006-fastd-fix-start-of-non-L2TP-variant.patch similarity index 100% rename from patches/packages/packages/0005-fastd-fix-start-of-non-L2TP-variant.patch rename to patches/packages/packages/0006-fastd-fix-start-of-non-L2TP-variant.patch diff --git a/patches/packages/packages/0006-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch b/patches/packages/packages/0007-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch similarity index 100% rename from patches/packages/packages/0006-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch rename to patches/packages/packages/0007-fastd-make-L2TP-support-a-config-option-instead-of-a-variant.patch From 6ecc0e9fd65ab5e158991548db27a054e197cd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20F=C3=B6rster?= Date: Wed, 16 Mar 2022 15:28:49 +0100 Subject: [PATCH 20/67] docs: fix invalid fritztools link --- docs/user/supported_devices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index f80b1ef3..b53aacf6 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -329,7 +329,7 @@ Footnotes developer documentation: :ref:`device-class-definition`. .. [#avmflash] - For instructions on how to flash AVM devices, visit https://fritzfla.sh + For instructions on how to flash AVM devices, visit https://fritz-tools.readthedocs.io .. [#eva_ramboot] For instructions on how to flash AVM NAND devices, see the respective From 205ebc858447825b04234566053d8d9e9a717e4b Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 20 Mar 2022 01:43:10 +0100 Subject: [PATCH 21/67] modules: update openwrt 180b750c02 hostapd: add STA extended capabilities to get_clients 411c73f748 hostapd: add op-class to get_status output e44a781e11 hostapd: add beacon_interval to get_status ubus output 95b0b8725c hostapd: remove unused mac_buff allocation 3731ffa0ee hostapd: report bssid, ssid and channel over ubus 53c60d4bfa hostapd: ubus: add notification for BSS transition response 88075c87dc hostapd: ubus: add BSS transtiton request method b1c3539868 openssl: bump to 1.1.1n 864bba55d8 uboot-bcm4908: use "xxd" from staging_dir 92020d4242 tools: xxd: use more convenient source tarball 17e9553284 tools: add xxd (from vim) f44f8b07b0 base-files: call "sync" after initial setup e8a806c49e bcm4908: include U-Boot in images 45b3f2aa0f uboot-bcm4908: add package with BCM4908 U-Boot 604274c24b x86: legacy: enable pata_sis driver 13c9f1f37d bcm4908: support "rootfs_data" on U-Boot devices e12ffac02d bcm4908: fix USB PHY support f1e1daa6e8 u-boot.mk: add LOCALVERSION (explicitly specify OpenWrt build) 0327104686 tools/libressl: update to version 3.4.2 8ed3b5b04b tools/libressl: update to 3.4.1 2736a5df94 tools/libressl: update to 3.3.4 49b2e6365d tools/libressl: update to 3.3.3 2d69d098e0 kernel: bump 5.4 to 5.4.182 7bd583e5f3 uboot-envtools: mvebu: update uci defaults for Turris Omnia b2896d413e ipq806x: base-files: asrock: fix bootcount include 952de38ef4 Revert "ramips: increase spi-max-frequency for ipTIME mt7620 devices" abf8209d7f hostapd: fix radius problem due to invalid attributes 610b2cff60 ipq806x: base-files: asrock: fix bootcount include b99d7aecc8 wolfssl: fix API breakage of SSL_get_verify_result 7612ecb201 ramips: mt7621: do memory detection on KSEG1 7fc336484b rpcd: backport 802.11ax support d1c15c41d9 OpenWrt v21.02.2: revert to branch defaults 30e2782e06 OpenWrt v21.02.2: adjust config defaults bf0c965af0 ramips: fix NAND flash driver ECC bit position mask adb65008c8 kernel: backport fix for initializing skb->cb in the bridge code to 5.4 b7af850bd2 tools/mtools: update to 4.0.35 5d553d8767 tools/fakeroot: fix unresolved symbols on arm64 macOS c8d6a7c84e tools/fakeroot: fix build on MacOS arm64 83bf22ba2e tools/fakeroot: explicitly pass CPP variable 230ec4c69c bcm4908: backport watchdog and I2C changes 87b9ba9ed9 bcm4908: backport first 5.18 DTS changes e6a718239f bcm4908: backport bcm_sf2 patch for better LED registers support e6aaa061d0 bcm4908: backport BCM4908 pinctrl driver 59e7ae8d65 tcpdump: Fix CVE-2018-16301 de948a0bce glibc: update to latest 2.33 HEAD 0c0db6e66b hostapd: Apply SAE/EAP-pwd side-channel attack update 2 5b13b0b02c wolfssl: update to 5.1.1-stable 7d376e6e52 libs/wolfssl: add SAN (Subject Alternative Name) support 5ea2e1d5ba wolfssl: enable ECC Curve 25519 by default 4108d02a29 ustream-ssl: update to Git version 2022-01-16 32d50a1281 mbedtls: Update to version 2.16.12 c6ddf8d502 kernel: bump 5.4 to 5.4.179 a4c0c031b8 ath79: Add support for OpenMesh OM5P-AC v2 6d266ef158 imagebuilder: fix local packages/ folder --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 5654db74..c95256c4 100644 --- a/modules +++ b/modules @@ -2,7 +2,7 @@ GLUON_FEEDS='packages routing gluon' OPENWRT_REPO=https://github.com/openwrt/openwrt.git OPENWRT_BRANCH=openwrt-21.02 -OPENWRT_COMMIT=97b95ef8b9186518cda6f2d3cec8a01860fae2e7 +OPENWRT_COMMIT=180b750c02dd9dd066cf67ee7c3480eb0ec36b70 PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git PACKAGES_PACKAGES_BRANCH=openwrt-21.02 From 016fddb69ccad8a90e8b924d989e5ea2594f0410 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 20 Mar 2022 01:43:17 +0100 Subject: [PATCH 22/67] modules: update packages ac99fde54 haproxy: update to version 2.2.22 ee4267e97 tree: bump to 2.0.2 f01cf663b curl: Fix compiling curl wolfSSL IPv6 disabled 185c5e365 bind: bump to 9.18.1 919dd8013 libnetfilter-log: update to 1.0.2 8e9f10223 libxml2: update to 2.9.13 793e7ee48 auc: don't segfault on invalid URL 31e2e7ccb auc: fall back to 'sdcard' image 8999b60db auc: accept both 'y' and 'Y' as confirmation from user 1adcda368 auc: add '-n' parameter for dry-run facfdaca2 attendedsysupgrade-common: update to 2021 aa41482d3 yq: Update to 4.22.1 8518b2d5d yq: Update to 4.21.1 f550d9066 syslog-ng: update to version 3.36.1 b2ec8c84f tvheadend: bind to LAN IP by default e061d8eff dockerd: fix compilation with glibc fd30ce33f docker: fix compilation with glibc a11359b88 yggdrasil: bump to 0.4.3 1d7d46db0 i2pd: Update package c384dbb19 i2pd: add service reload support 938187fa2 coova-chilli: remove kmod dep on binary package 109f2770a cache-domains: Fixed hotplug script not running 5562cef26 nextdns: Update to version 1.37.10 5f20a9171 golang: Update to 1.17.8 1a0cb5ce4 curl: update to 7.82.0 701ca2532 python-twisted: Update to 22.2.0 4c0748396 python-twisted: Update to 22.1.0, refresh patches 3e75dc582 mdnsresponder: Fix nullpointer dereference while parsing interface list 9722b1ec0 crowdsec-firewall-bouncer: remove crowdsec package dependency 5b51bb3a5 kcptun: bump to v20210922 81ed00124 samplicator: fix Wformat warning da82b8c9c ocserv: updated to 1.1.6 a8b73c250 openconnect: updated to 8.20 e208f42c5 yq: Update to 4.20.2 e2bf8e1d8 MarkupSafe: update to version 2.1.0 41fe385fd domoticz: update to 2021.1 e9dee2684 minizip: update to 3.0.2 697115688 minizip: update to 3.0.1 adc6fcc88 minizip: update to 3.0.0 584c0c437 expat: import patches for CVEs 5f3226dc1 nfdump: update to 1.6.23 e7715b18b htpdate: drop www.freebsd.org from default server list 4d0e0f414 nano: update to 6.2 45009c340 unbound: update to version 1.15.0 9ba9579a1 yq: Update to 4.20.1 a5de4042c pcapplusplus: Add new package 10a805492 vnstat2: update to version 2.9 42f35cdda vnstat2: add hotplug script for adding interfaces f8820d2ae vnstat2: fix all interfaces being monitored when none are configured 86f85cde4 vnstat2: update to version 2.8 f4a390c59 php7: update to 7.4.28 5eb97e05e php8: update to 8.0.16 b409127e6 slide-switch: Update to 0.9.7 4919a791a golang: Update to 1.17.7, refresh patch 43276c649 tvheadend: fix first-run 362c8c4df ksmbd-tools: update to 3.4.4 41ca56ff2 ksmbd-tools: Fix ksmbd service is semi-killed at system startup c4bb2fadc ksmbd: update to 3.4.4 06ffe5c4d ksmbd: update to 3.4.2 c7e0be3a3 ksmbd: update to 3.4.1 d5f588268 dockerd: Update to 20.10.12 66dda3aa2 docker: Update to 20.10.12 845d2203b yq: Update to 4.19.1 4e8267602 dtc: drop package 845b9a1df knot: update to 3.1.6 d286939b7 knot: update to 3.1.5 38eaee347 nano: update to 6.1 0329b2c11 xray-core: Update to 1.5.3 d18542ecf ruby: update to 3.0.3 a507620a1 https-dns-proxy: init script refactoring 5dcf0b57c slide-switch: Update to 0.9.6 4bd6bc41c ffmpeg: update to version 4.3.3 ac4ecdf85 tinyionice: add package 1a40a0a0b yq: Update to 4.18.1 32e85322c yq: Update to 4.17.2 675755537 apache2: security update to version 2.4.52 74f9ae028 bind: bump to 9.18.0 b29655996 crowdsec: update from latest upstream release 1.3.0 3b28c6f38 wg-installer: use babeld add_interface function 1026a1fd4 crowdsec-firewall-bouncer: fix name in initd to start the process 9137583d3 nano: Add a plus variant with more features 2cd892879 https-dns-proxy: update to 2021-11-22-1 8d8cf2628 dawn: update to 2022-01-17 f921cc4b7 python-dns: update to version 2.1.0 df7568303 prosody: update to version 0.11.13 14b623f73 telegraf: Update package to version 1.21.3 82c35fa92 telegraf: Move config file to /etc/telegraf.conf because /etc/config is the default uci folder. Also marking it as configuration file prevents overwriting it on updates. 989aecf2b telegraf: Add package for telegraf 299684dd5 ffmpeg: update to 4.3.2 213aaa1f3 clamav: update to version 0.104.2 9c476ee99 clamav: update to 0.104.0 294196303 node: January 10th 2022 Security Releases fc835bcaa tvheadend: fix conffiles section 48bf1a0d0 lighttpd: update to lighttpd 1.4.64 release hash 82339309f lighttpd: update to lighttpd 1.4.63 release hash 527f2b920 lighttpd: update to lighttpd 1.4.62 release hash 4f990b7cd tvheadend: fix typo in uriparser aeb8aad5c wg-installer: fix multiple namespaces e29f38650 php8: update to 8.0.15 d7c78f83b tvheadend: disable uriparser c7f25b25d python3: Update to 3.9.10, refresh patches b9bfe1ef1 wg-installer: remove unused dependency 9a836f430 wg-installer: create wireguard key if it does not exist 317ba6a43 wg-installer: install cronjob a430932a7 wg-installer: check if a key is already inserted 0aaa90629 wg-installer: rework code dea64c08e wg-installer: cosmetic changes --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index c95256c4..01b76c45 100644 --- a/modules +++ b/modules @@ -6,7 +6,7 @@ OPENWRT_COMMIT=180b750c02dd9dd066cf67ee7c3480eb0ec36b70 PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git PACKAGES_PACKAGES_BRANCH=openwrt-21.02 -PACKAGES_PACKAGES_COMMIT=444b64e36cfb9d1dbbb6733bd713aacd2f91a821 +PACKAGES_PACKAGES_COMMIT=921af7fdda9db13ff6fbd31faf71a3ebc0269403 PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git PACKAGES_ROUTING_BRANCH=openwrt-21.02 From 1c1b5f1f26a82478cc34c2b1e6a282da94f71df0 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 20 Mar 2022 01:43:19 +0100 Subject: [PATCH 23/67] modules: update routing 5971f19 cjdns: pass for some build warnings (#738) b88e322 cjdns: fix uci-defaults (#714) 6501c70 mrd6: Makefle reordering fb03ab0 mcproxy: include PKG_MIRROR_HASH, refresh patches 3b84442 pimbd: include PKG_MIRROR_HASH 65ae8ea minimalist-pcproxy: include PKG_MIRROR_HASH 4dfa42e mrd6: include PKG_MIRROR_HASH fd76bed oonf-dlep-radio: refactor define Package/oonf-dlep-radio 3c70d01 oonf-dlep-radio: refactor Makefile (package versioning, downloading) 550502c oonf-dlep-proxy: add PKG_MIRROR_HASH b99b6fa oonf-dlep-proxy: fix compilation with Ninja e2eaefe oonf-dlep-radio: add PKG_MIRROR_HASH 0de13bc opennds: Release v9.6.0 (for 21.02) 10d3ffd olsrd: fix setting default interface config 9e2383e batman-adv: Merge bugfixes from 2022.0 bb0f31a babeld: remove unused return variable bcc3588 babeld: add add_interface function --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 01b76c45..d5b46e38 100644 --- a/modules +++ b/modules @@ -10,7 +10,7 @@ PACKAGES_PACKAGES_COMMIT=921af7fdda9db13ff6fbd31faf71a3ebc0269403 PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git PACKAGES_ROUTING_BRANCH=openwrt-21.02 -PACKAGES_ROUTING_COMMIT=c2e138d49fa4796ab03f0eadb7b4d37aac75498a +PACKAGES_ROUTING_COMMIT=5971f1937c76c771081f2b83de8e7263a28837b2 PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git PACKAGES_GLUON_COMMIT=308166e3c6b2d571606dd1dbfadd2bb8e31d8f90 From df114faec0c0d0b8b4844462adb3aba5db7adbc2 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:02:56 +0200 Subject: [PATCH 24/67] ath79-generic: Add support for OpenMesh A60 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi (11n) * 3T3R 5 GHz Wi-Fi (11ac) * multi-color LED (controlled via red/green/blue GPIOs) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x ethernet - eth0 + Label: Ethernet 1 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as WAN interface - eth1 + Label: Ethernet 2 + AR8031 ethernet PHY (SGMII) + 10/100/1000 Mbps Ethernet + used as LAN interface * 1x USB * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin --- docs/user/supported_devices.rst | 4 + ...5-ath79-Add-support-for-OpenMesh-A60.patch | 337 ++++++++++++++++++ targets/ath79-generic | 9 + 3 files changed, 350 insertions(+) create mode 100644 patches/openwrt/0005-ath79-Add-support-for-OpenMesh-A60.patch diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index b53aacf6..181670ad 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -33,6 +33,10 @@ ath79-generic - Omega [#modular_ethernet]_ +* OpenMesh + + - A60 + * Plasma Cloud - PA300 diff --git a/patches/openwrt/0005-ath79-Add-support-for-OpenMesh-A60.patch b/patches/openwrt/0005-ath79-Add-support-for-OpenMesh-A60.patch new file mode 100644 index 00000000..1e137632 --- /dev/null +++ b/patches/openwrt/0005-ath79-Add-support-for-OpenMesh-A60.patch @@ -0,0 +1,337 @@ +From: Sven Eckelmann +Date: Mon, 23 Nov 2020 13:41:34 +0100 +Subject: ath79: Add support for OpenMesh A60 + +Device specifications: +====================== + +* Qualcomm/Atheros QCA9558 ver 1 rev 0 +* 720/600/240 MHz (CPU/DDR/AHB) +* 128 MB of RAM +* 16 MB of SPI NOR flash + - 2x 7 MB available; but one of the 7 MB regions is the recovery image +* 3T3R 2.4 GHz Wi-Fi (11n) +* 3T3R 5 GHz Wi-Fi (11ac) +* multi-color LED (controlled via red/green/blue GPIOs) +* 1x GPIO-button (reset) +* external h/w watchdog (enabled by default)) +* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) +* 2x ethernet + - eth0 + + Label: Ethernet 1 + + AR8035 ethernet PHY (RGMII) + + 10/100/1000 Mbps Ethernet + + 802.3af POE + + used as WAN interface + - eth1 + + Label: Ethernet 2 + + AR8031 ethernet PHY (SGMII) + + 10/100/1000 Mbps Ethernet + + used as LAN interface +* 1x USB +* internal antennas + +Flashing instructions: +====================== + +Various methods can be used to install the actual image on the flash. +Two easy ones are: + +ap51-flash +---------- + +The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be +used to transfer the image to the u-boot when the device boots up. + +initramfs from TFTP +------------------- + +The serial console must be used to access the u-boot shell during bootup. +It can then be used to first boot up the initramfs image from a TFTP server +(here with the IP 192.168.1.21): + + setenv serverip 192.168.1.21 + setenv ipaddr 192.168.1.1 + tftpboot 0c00000 .bin && bootm $fileaddr + +The actual sysupgrade image can then be transferred (on the LAN port) to the +device via + + scp .bin root@192.168.1.1:/tmp/ + +On the device, the sysupgrade must then be started using + + sysupgrade -n /tmp/.bin + +Signed-off-by: Sven Eckelmann +(cherry picked from commit eaf2e32c12655d7fb58e158086a784393dc6f69a) + +diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 +index abcb99663dfd8e5d1ad0ee757e17972d63c856c7..0791d58b04cd108fcd2190bcf3c39f715f0b511f 100644 +--- a/package/boot/uboot-envtools/files/ath79 ++++ b/package/boot/uboot-envtools/files/ath79 +@@ -49,6 +49,7 @@ netgear,wnr2200-16m|\ + netgear,wnr612-v2|\ + ocedo,koala|\ + ocedo,raccoon|\ ++openmesh,a60|\ + openmesh,mr600-v1|\ + openmesh,mr600-v2|\ + openmesh,mr900-v1|\ +diff --git a/target/linux/ath79/dts/qca9558_openmesh_a60.dts b/target/linux/ath79/dts/qca9558_openmesh_a60.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..473f055b492f6dffb0c460fd13e7ad9b604373c6 +--- /dev/null ++++ b/target/linux/ath79/dts/qca9558_openmesh_a60.dts +@@ -0,0 +1,8 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca9558_openmesh_a60.dtsi" ++ ++/ { ++ compatible = "openmesh,a60", "qca,qca9558"; ++ model = "OpenMesh A60"; ++}; +diff --git a/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi +new file mode 100644 +index 0000000000000000000000000000000000000000..9938e5f4c013575c686edce5699f3541942133d3 +--- /dev/null ++++ b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi +@@ -0,0 +1,180 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca955x.dtsi" ++ ++#include ++#include ++ ++/ { ++ chosen { ++ /delete-property/ bootargs; ++ }; ++ ++ aliases { ++ serial0 = &uart; ++ led-boot = &led_status_green; ++ led-failsafe = &led_status_green; ++ led-running = &led_status_green; ++ led-upgrade = &led_status_green; ++ label-mac-device = ð0; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ status_blue { ++ label = "blue:status"; ++ gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ status_red { ++ label = "red:status"; ++ gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ led_status_green: status_green { ++ label = "green:status"; ++ gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ watchdog { ++ compatible = "linux,wdt-gpio"; ++ gpios = <&gpio 16 GPIO_ACTIVE_LOW>; ++ hw_algo = "toggle"; ++ /* hw_margin_ms is actually 300s but driver limits it to 60s */ ++ hw_margin_ms = <60000>; ++ always-running; ++ }; ++}; ++ ++&usb_phy1 { ++ status = "okay"; ++}; ++ ++&usb1 { ++ status = "okay"; ++}; ++ ++&spi { ++ status = "okay"; ++ ++ flash@0 { ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <40000000>; ++ ++ /* partitions are passed via bootloader */ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "u-boot"; ++ reg = <0x000000 0x040000>; ++ read-only; ++ }; ++ ++ partition@40000 { ++ label = "u-boot-env"; ++ reg = <0x040000 0x010000>; ++ }; ++ ++ partition@50000 { ++ label = "custom"; ++ reg = <0x050000 0x060000>; ++ read-only; ++ }; ++ ++ partition@b0000 { ++ label = "inactive"; ++ reg = <0x0b0000 0x7a0000>; ++ }; ++ ++ partition@850000 { ++ label = "inactive2"; ++ reg = <0x850000 0x7a0000>; ++ }; ++ ++ art: partition@ff0000 { ++ label = "ART"; ++ reg = <0xff0000 0x010000>; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++&mdio0 { ++ status = "okay"; ++ ++ phy-mask = <0x6>; ++ ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ eee-broken-100tx; ++ eee-broken-1000t; ++ }; ++ ++ phy2: ethernet-phy@2 { ++ reg = <2>; ++ eee-broken-100tx; ++ eee-broken-1000t; ++ at803x-override-sgmii-link-check; ++ }; ++}; ++ ++ð0 { ++ status = "okay"; ++ ++ pll-data = <0x82000101 0x80000101 0x80001313>; ++ ++ mtd-mac-address = <&art 0x0>; ++ ++ phy-mode = "rgmii-id"; ++ phy-handle = <&phy1>; ++ ++ gmac-config { ++ device = <&gmac>; ++ rgmii-enabled = <1>; ++ rxd-delay = <3>; ++ rxdv-delay = <3>; ++ txd-delay = <0>; ++ txen-delay = <0>; ++ }; ++}; ++ ++ð1 { ++ status = "okay"; ++ ++ pll-data = <0x03000101 0x80000101 0x80001313>; ++ ++ mtd-mac-address = <&art 0x6>; ++ ++ qca955x-sgmii-fixup; ++ ++ phy-handle = <&phy2>; ++}; ++ ++&wmac { ++ status = "okay"; ++ ++ mtd-cal-data = <&art 0x1000>; ++ mtd-mac-address = <&art 0x0>; ++ mtd-mac-address-increment = <2>; ++}; ++ ++&pcie0 { ++ status = "okay"; ++}; +diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network +index d4f53e7dae16b84955d318b9d79b6912ee156bdb..4b83ac7d32fc372cd3b493e8ec427c04e0f2e0d1 100755 +--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network ++++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network +@@ -172,6 +172,7 @@ ath79_setup_interfaces() + comfast,cf-e120a-v3|\ + comfast,cf-e314n-v2|\ + compex,wpj531-16m|\ ++ openmesh,a60|\ + openmesh,om2p-v4|\ + openmesh,om2p-hs-v4|\ + plasmacloud,pa300|\ +diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +index 69735f336070a48ddad76c72c2876bcd775c56a1..b4c8a78a7fe4ba5bd3ca1f9c6e2b5e51e7fd1882 100644 +--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata ++++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +@@ -99,6 +99,7 @@ case "$FIRMWARE" in + caldata_extract "art" 0x5000 0x844 + ath10k_patch_mac $(mtd_get_mac_binary art 0xc) + ;; ++ openmesh,a60|\ + openmesh,mr1750-v1|\ + openmesh,mr1750-v2|\ + openmesh,om5p-ac-v2) +diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +index 1240ef51e88ed2e5d24088746596da085c01ab5c..f7862bb032fbce56be77e9db8ae2e37bf5da30ea 100644 +--- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +@@ -65,6 +65,7 @@ platform_do_upgrade() { + jjplus,ja76pf2) + redboot_fis_do_upgrade "$1" linux + ;; ++ openmesh,a60|\ + openmesh,mr600-v1|\ + openmesh,mr600-v2|\ + openmesh,mr900-v1|\ +diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk +index 304e58980062465ba7955e5fe45dbd6b0097937b..c669eb2cdb3f868c320412801723ceb112b4089f 100644 +--- a/target/linux/ath79/image/generic.mk ++++ b/target/linux/ath79/image/generic.mk +@@ -1640,6 +1640,16 @@ define Device/openmesh_common_256k + openmesh-image ce_type=$$$$(OPENMESH_CE_TYPE) | append-metadata + endef + ++define Device/openmesh_a60 ++ $(Device/openmesh_common_64k) ++ SOC := qca9558 ++ DEVICE_MODEL := A60 ++ DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct kmod-usb2 ++ OPENMESH_CE_TYPE := A60 ++ SUPPORTED_DEVICES += a60 ++endef ++TARGET_DEVICES += openmesh_a60 ++ + define Device/openmesh_mr600-v1 + $(Device/openmesh_common_64k) + SOC := ar9344 diff --git a/targets/ath79-generic b/targets/ath79-generic index cd005100..03329254 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -88,6 +88,15 @@ device('ocedo-raccoon', 'ocedo_raccoon', { -- setup via integrated (USB-)tty is possible as well device('onion-omega', 'onion_omega') + +-- OpenMesh + +device('openmesh-a60', 'openmesh_a60', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, +}) + + -- Plasma Cloud device('plasma-cloud-pa300', 'plasmacloud_pa300') From 767b4123cf2d64b78e0f5c678e9f367fe829cb01 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:04:31 +0200 Subject: [PATCH 25/67] ath79-generic: Add support for OpenMesh A40 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi (11n) * 2T2R 5 GHz Wi-Fi (11ac) * multi-color LED (controlled via red/green/blue GPIOs) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x ethernet - eth0 + Label: Ethernet 1 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as WAN interface - eth1 + Label: Ethernet 2 + AR8035 ethernet PHY (SGMII) + 10/100/1000 Mbps Ethernet + used as LAN interface * 1x USB * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin --- docs/user/supported_devices.rst | 1 + ...6-ath79-Add-support-for-OpenMesh-A40.patch | 151 ++++++++++++++++++ targets/ath79-generic | 5 + 3 files changed, 157 insertions(+) create mode 100644 patches/openwrt/0006-ath79-Add-support-for-OpenMesh-A40.patch diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 181670ad..24ea09c3 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -35,6 +35,7 @@ ath79-generic * OpenMesh + - A40 - A60 * Plasma Cloud diff --git a/patches/openwrt/0006-ath79-Add-support-for-OpenMesh-A40.patch b/patches/openwrt/0006-ath79-Add-support-for-OpenMesh-A40.patch new file mode 100644 index 00000000..3b22780f --- /dev/null +++ b/patches/openwrt/0006-ath79-Add-support-for-OpenMesh-A40.patch @@ -0,0 +1,151 @@ +From: Sven Eckelmann +Date: Mon, 23 Nov 2020 13:41:34 +0100 +Subject: ath79: Add support for OpenMesh A40 + +Device specifications: +====================== + +* Qualcomm/Atheros QCA9558 ver 1 rev 0 +* 720/600/240 MHz (CPU/DDR/AHB) +* 128 MB of RAM +* 16 MB of SPI NOR flash + - 2x 7 MB available; but one of the 7 MB regions is the recovery image +* 2T2R 2.4 GHz Wi-Fi (11n) +* 2T2R 5 GHz Wi-Fi (11ac) +* multi-color LED (controlled via red/green/blue GPIOs) +* 1x GPIO-button (reset) +* external h/w watchdog (enabled by default)) +* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) +* 2x ethernet + - eth0 + + Label: Ethernet 1 + + AR8035 ethernet PHY (RGMII) + + 10/100/1000 Mbps Ethernet + + 802.3af POE + + used as WAN interface + - eth1 + + Label: Ethernet 2 + + AR8035 ethernet PHY (SGMII) + + 10/100/1000 Mbps Ethernet + + used as LAN interface +* 1x USB +* internal antennas + +Flashing instructions: +====================== + +Various methods can be used to install the actual image on the flash. +Two easy ones are: + +ap51-flash +---------- + +The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be +used to transfer the image to the u-boot when the device boots up. + +initramfs from TFTP +------------------- + +The serial console must be used to access the u-boot shell during bootup. +It can then be used to first boot up the initramfs image from a TFTP server +(here with the IP 192.168.1.21): + + setenv serverip 192.168.1.21 + setenv ipaddr 192.168.1.1 + tftpboot 0c00000 .bin && bootm $fileaddr + +The actual sysupgrade image can then be transferred (on the LAN port) to the +device via + + scp .bin root@192.168.1.1:/tmp/ + +On the device, the sysupgrade must then be started using + + sysupgrade -n /tmp/.bin + +Signed-off-by: Sven Eckelmann +(cherry picked from commit 9a172797e593c061f6759a37eaeba2956ad8d72f) + +diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 +index 0791d58b04cd108fcd2190bcf3c39f715f0b511f..a37057953bc1e9b7fdf2be02136142d0fc145054 100644 +--- a/package/boot/uboot-envtools/files/ath79 ++++ b/package/boot/uboot-envtools/files/ath79 +@@ -49,6 +49,7 @@ netgear,wnr2200-16m|\ + netgear,wnr612-v2|\ + ocedo,koala|\ + ocedo,raccoon|\ ++openmesh,a40|\ + openmesh,a60|\ + openmesh,mr600-v1|\ + openmesh,mr600-v2|\ +diff --git a/target/linux/ath79/dts/qca9558_openmesh_a40.dts b/target/linux/ath79/dts/qca9558_openmesh_a40.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..d2b817031a9db6846de0632a64962a0197fa2c6f +--- /dev/null ++++ b/target/linux/ath79/dts/qca9558_openmesh_a40.dts +@@ -0,0 +1,8 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca9558_openmesh_a60.dtsi" ++ ++/ { ++ compatible = "openmesh,a40", "qca,qca9558"; ++ model = "OpenMesh A40"; ++}; +diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network +index 4b83ac7d32fc372cd3b493e8ec427c04e0f2e0d1..c2932c1737d97f3eb732620041664f5060d16946 100755 +--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network ++++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network +@@ -172,6 +172,7 @@ ath79_setup_interfaces() + comfast,cf-e120a-v3|\ + comfast,cf-e314n-v2|\ + compex,wpj531-16m|\ ++ openmesh,a40|\ + openmesh,a60|\ + openmesh,om2p-v4|\ + openmesh,om2p-hs-v4|\ +diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +index b4c8a78a7fe4ba5bd3ca1f9c6e2b5e51e7fd1882..b70a87054b10fbe708d9aa8603ecdb591fc92591 100644 +--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata ++++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +@@ -99,6 +99,7 @@ case "$FIRMWARE" in + caldata_extract "art" 0x5000 0x844 + ath10k_patch_mac $(mtd_get_mac_binary art 0xc) + ;; ++ openmesh,a40|\ + openmesh,a60|\ + openmesh,mr1750-v1|\ + openmesh,mr1750-v2|\ +diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +index f7862bb032fbce56be77e9db8ae2e37bf5da30ea..e979c11bb91cb20fd4168b8921499f03572d3512 100644 +--- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +@@ -65,6 +65,7 @@ platform_do_upgrade() { + jjplus,ja76pf2) + redboot_fis_do_upgrade "$1" linux + ;; ++ openmesh,a40|\ + openmesh,a60|\ + openmesh,mr600-v1|\ + openmesh,mr600-v2|\ +diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk +index c669eb2cdb3f868c320412801723ceb112b4089f..c63900dc701bbc21dce12086f7045d7d450fc5f3 100644 +--- a/target/linux/ath79/image/generic.mk ++++ b/target/linux/ath79/image/generic.mk +@@ -1640,6 +1640,16 @@ define Device/openmesh_common_256k + openmesh-image ce_type=$$$$(OPENMESH_CE_TYPE) | append-metadata + endef + ++define Device/openmesh_a40 ++ $(Device/openmesh_common_64k) ++ SOC := qca9558 ++ DEVICE_MODEL := A40 ++ DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct kmod-usb2 ++ OPENMESH_CE_TYPE := A60 ++ SUPPORTED_DEVICES += a40 ++endef ++TARGET_DEVICES += openmesh_a40 ++ + define Device/openmesh_a60 + $(Device/openmesh_common_64k) + SOC := qca9558 diff --git a/targets/ath79-generic b/targets/ath79-generic index 03329254..70ec2942 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -91,6 +91,11 @@ device('onion-omega', 'onion_omega') -- OpenMesh +device('openmesh-a40', 'openmesh_a40', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, +}) + device('openmesh-a60', 'openmesh_a60', { packages = ATH10K_PACKAGES_QCA9880, factory = false, From e2ccf753427cffe4e522809985ff836473cd636c Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:12:54 +0200 Subject: [PATCH 26/67] ath79-generic: Add support for OpenMesh MR600 v1 Device specifications: ====================== * Qualcomm/Atheros AR9344 rev 2 * 560/450/225 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi * 2T2R 5 GHz Wi-Fi * 4x GPIO-LEDs (2x wifi, 1x wps, 1x power) * 1x GPIO-button (reset) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-mr600" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 1 + targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 24ea09c3..db781ce6 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -37,6 +37,7 @@ ath79-generic - A40 - A60 + - MR600 (v1) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 70ec2942..d9297f9e 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -101,6 +101,12 @@ device('openmesh-a60', 'openmesh_a60', { factory = false, }) +device('openmesh-mr600-v1', 'openmesh_mr600-v1', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-mr600'}, +}) + -- Plasma Cloud From dd7eac7e7f8e6ba2eb0aa83c2aea58a13c73b7bb Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:14:16 +0200 Subject: [PATCH 27/67] ath79-generic: Add support for OpenMesh MR600 v2 Device specifications: ====================== * Qualcomm/Atheros AR9344 rev 2 * 560/450/225 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi * 2T2R 5 GHz Wi-Fi * 8x GPIO-LEDs (6x wifi, 1x wps, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-mr600v2" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index db781ce6..d06f4792 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -37,7 +37,7 @@ ath79-generic - A40 - A60 - - MR600 (v1) + - MR600 (v1, v2) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index d9297f9e..1293ee56 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -107,6 +107,12 @@ device('openmesh-mr600-v1', 'openmesh_mr600-v1', { manifest_aliases = {'openmesh-mr600'}, }) +device('openmesh-mr600-v2', 'openmesh_mr600-v2', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-mr600v2'}, +}) + -- Plasma Cloud From 9d794294b0393d832a8944442cbf05bab0ea4a14 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:15:50 +0200 Subject: [PATCH 28/67] ath79-generic: Add support for OpenMesh MR900 v1 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi * 3T3R 5 GHz Wi-Fi * 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-mr900" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 1 + targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index d06f4792..0fad523f 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -38,6 +38,7 @@ ath79-generic - A40 - A60 - MR600 (v1, v2) + - MR900 (v1) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 1293ee56..f3fd9bef 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -113,6 +113,12 @@ device('openmesh-mr600-v2', 'openmesh_mr600-v2', { manifest_aliases = {'openmesh-mr600v2'}, }) +device('openmesh-mr900-v1', 'openmesh_mr900-v1', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-mr900'}, +}) + -- Plasma Cloud From 0de095fe9f7b795c6df216189c717be49acfe5cf Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:16:51 +0200 Subject: [PATCH 29/67] ath79-generic: Add support for OpenMesh MR900 v2 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi * 3T3R 5 GHz Wi-Fi * 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-mr900v2" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 0fad523f..f0f600a7 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -38,7 +38,7 @@ ath79-generic - A40 - A60 - MR600 (v1, v2) - - MR900 (v1) + - MR900 (v1, v2) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index f3fd9bef..2458967d 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -119,6 +119,12 @@ device('openmesh-mr900-v1', 'openmesh_mr900-v1', { manifest_aliases = {'openmesh-mr900'}, }) +device('openmesh-mr900-v2', 'openmesh_mr900-v2', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-mr900v2'}, +}) + -- Plasma Cloud From 39750f19f84f4b36e4322f08c1ba50a4fbcd1cac Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:18:13 +0200 Subject: [PATCH 30/67] ath79-generic: Add support for OpenMesh MR1750 v1 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi (11n) * 3T3R 5 GHz Wi-Fi (11ac) * 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-mr1750" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 1 + targets/ath79-generic | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index f0f600a7..355d905b 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -39,6 +39,7 @@ ath79-generic - A60 - MR600 (v1, v2) - MR900 (v1, v2) + - MR1750 (v1) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 2458967d..4e5bbc81 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -125,6 +125,13 @@ device('openmesh-mr900-v2', 'openmesh_mr900-v2', { manifest_aliases = {'openmesh-mr900v2'}, }) +device('openmesh-mr1750-v1', 'openmesh_mr1750-v1', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-mr1750'}, +}) + -- Plasma Cloud From bc71c915d270bb8c455e0f800c62efc05961a12d Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:19:29 +0200 Subject: [PATCH 31/67] ath79-generic: Add support for OpenMesh MR1750 v2 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 3T3R 2.4 GHz Wi-Fi (11n) * 3T3R 5 GHz Wi-Fi (11ac) * 6x GPIO-LEDs (2x wifi, 2x status, 1x lan, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 1x ethernet - AR8035 ethernet PHY (RGMII) - 10/100/1000 Mbps Ethernet - 802.3af POE - used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-mr1750v2" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 355d905b..54a2b464 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -39,7 +39,7 @@ ath79-generic - A60 - MR600 (v1, v2) - MR900 (v1, v2) - - MR1750 (v1) + - MR1750 (v1, v2) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 4e5bbc81..6cb92e36 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -132,6 +132,13 @@ device('openmesh-mr1750-v1', 'openmesh_mr1750-v1', { manifest_aliases = {'openmesh-mr1750'}, }) +device('openmesh-mr1750-v2', 'openmesh_mr1750-v2', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-mr1750v2'}, +}) + -- Plasma Cloud From 47eda6a50179751856fbf0f5b9e79cc1f5007cbb Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:20:38 +0200 Subject: [PATCH 32/67] ath79-generic: Add support for OpenMesh OM2P v1 Device specifications: ====================== * Qualcomm/Atheros AR7240 rev 2 * 350/350/175 MHz (CPU/DDR/AHB) * 32 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 1T1R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + 18-24V passive POE (mode B) + used as WAN interface - eth1 + builtin switch port 4 + used as LAN interface * 12-24V 1A DC * external antenna The device itself requires the mtdparts from the uboot arguments to properly boot the flashed image and to support dual-boot (primary + recovery image). Unfortunately, the name of the mtd device in mtdparts is still using the legacy name "ar7240-nor0" which must be supplied using the Linux-specfic DT parameter linux,mtd-name to overwrite the generic name "spi0.0". Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-om2p" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 1 + ...-set-spi-nor-mtd-name-via-devicetree.patch | 135 ++++++++ ...h79-Add-support-for-OpenMesh-OM2P-v1.patch | 316 ++++++++++++++++++ targets/ath79-generic | 6 + 4 files changed, 458 insertions(+) create mode 100644 patches/openwrt/0007-ath79-Allow-to-set-spi-nor-mtd-name-via-devicetree.patch create mode 100644 patches/openwrt/0008-ath79-Add-support-for-OpenMesh-OM2P-v1.patch diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 54a2b464..9748822c 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -40,6 +40,7 @@ ath79-generic - MR600 (v1, v2) - MR900 (v1, v2) - MR1750 (v1, v2) + - OM2P (v1) * Plasma Cloud diff --git a/patches/openwrt/0007-ath79-Allow-to-set-spi-nor-mtd-name-via-devicetree.patch b/patches/openwrt/0007-ath79-Allow-to-set-spi-nor-mtd-name-via-devicetree.patch new file mode 100644 index 00000000..6507aa7f --- /dev/null +++ b/patches/openwrt/0007-ath79-Allow-to-set-spi-nor-mtd-name-via-devicetree.patch @@ -0,0 +1,135 @@ +From: Sven Eckelmann +Date: Thu, 31 Dec 2020 00:25:10 +0100 +Subject: ath79: Allow to set spi-nor mtd name via devicetree + +On ar71xx, it was possible to overwrite the name of the spi-nor mtd device +identifier using the flash_platform_data which each mach-*.c could adjust +for its devices. A similar feature was introduced for mtd-physmap in +devicetree's. The property linux,mtd-name can be used to set the name and +provide a stable identifier for mtdpart from the bootloader. + +But this feature is not yet available upstream for spi-nor devices which +also might receive their partition layout from the bootloader. But the +OpenWrt pistachio support for this property can simply be imported into +ath79 to gain this support. + +Signed-off-by: Sven Eckelmann +(cherry picked from commit 7f074fe1a79f27d30560c35778d963bc520e9a3e) + +diff --git a/target/linux/ath79/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/ath79/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch +new file mode 100644 +index 0000000000000000000000000000000000000000..af032df51e6dbc3824a45a8efaa1ce8db2261b2a +--- /dev/null ++++ b/target/linux/ath79/patches-5.10/401-mtd-nor-support-mtd-name-from-device-tree.patch +@@ -0,0 +1,51 @@ ++From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001 ++From: Abhimanyu Vishwakarma ++Date: Sat, 25 Feb 2017 16:42:50 +0000 ++Subject: mtd: nor: support mtd name from device tree ++ ++Signed-off-by: Abhimanyu Vishwakarma ++ ++--- a/drivers/mtd/spi-nor/core.c +++++ b/drivers/mtd/spi-nor/core.c ++@@ -3088,6 +3088,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, ++ struct device *dev = nor->dev; ++ struct mtd_info *mtd = &nor->mtd; ++ struct device_node *np = spi_nor_get_flash_node(nor); +++ const char __maybe_unused *of_mtd_name = NULL; ++ int ret; ++ int i; ++ ++@@ -3142,7 +3143,12 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, ++ if (ret) ++ return ret; ++ ++- if (!mtd->name) +++#ifdef CONFIG_MTD_OF_PARTS +++ of_property_read_string(np, "linux,mtd-name", &of_mtd_name); +++#endif +++ if (of_mtd_name) +++ mtd->name = of_mtd_name; +++ else if (!mtd->name) ++ mtd->name = dev_name(dev); ++ mtd->priv = nor; ++ mtd->type = MTD_NORFLASH; ++--- a/drivers/mtd/mtdcore.c +++++ b/drivers/mtd/mtdcore.c ++@@ -762,6 +762,17 @@ int del_mtd_device(struct mtd_info *mtd) ++ */ ++ static void mtd_set_dev_defaults(struct mtd_info *mtd) ++ { +++#ifdef CONFIG_MTD_OF_PARTS +++ const char __maybe_unused *of_mtd_name = NULL; +++ struct device_node *np; +++ +++ np = mtd_get_of_node(mtd); +++ if (np && !mtd->name) { +++ of_property_read_string(np, "linux,mtd-name", &of_mtd_name); +++ if (of_mtd_name) +++ mtd->name = of_mtd_name; +++ } else +++#endif ++ if (mtd->dev.parent) { ++ if (!mtd->owner && mtd->dev.parent->driver) ++ mtd->owner = mtd->dev.parent->driver->owner; +diff --git a/target/linux/ath79/patches-5.4/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/ath79/patches-5.4/401-mtd-nor-support-mtd-name-from-device-tree.patch +new file mode 100644 +index 0000000000000000000000000000000000000000..a02b632e8c48f4a2df7d66b732aa60dd6788b6b1 +--- /dev/null ++++ b/target/linux/ath79/patches-5.4/401-mtd-nor-support-mtd-name-from-device-tree.patch +@@ -0,0 +1,54 @@ ++From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001 ++From: Abhimanyu Vishwakarma ++Date: Sat, 25 Feb 2017 16:42:50 +0000 ++Subject: mtd: nor: support mtd name from device tree ++ ++Signed-off-by: Abhimanyu Vishwakarma ++--- ++ drivers/mtd/spi-nor/spi-nor.c | 8 +++++++- ++ 1 file changed, 7 insertions(+), 1 deletion(-) ++ ++--- a/drivers/mtd/spi-nor/spi-nor.c +++++ b/drivers/mtd/spi-nor/spi-nor.c ++@@ -4937,6 +4937,7 @@ int spi_nor_scan(struct spi_nor *nor, co ++ struct mtd_info *mtd = &nor->mtd; ++ struct device_node *np = spi_nor_get_flash_node(nor); ++ struct spi_nor_flash_parameter *params = &nor->params; +++ const char __maybe_unused *of_mtd_name = NULL; ++ int ret; ++ int i; ++ ++@@ -4999,7 +5000,12 @@ int spi_nor_scan(struct spi_nor *nor, co ++ /* Init flash parameters based on flash_info struct and SFDP */ ++ spi_nor_init_params(nor); ++ ++- if (!mtd->name) +++#ifdef CONFIG_MTD_OF_PARTS +++ of_property_read_string(np, "linux,mtd-name", &of_mtd_name); +++#endif +++ if (of_mtd_name) +++ mtd->name = of_mtd_name; +++ else if (!mtd->name) ++ mtd->name = dev_name(dev); ++ mtd->priv = nor; ++ mtd->type = MTD_NORFLASH; ++--- a/drivers/mtd/mtdcore.c +++++ b/drivers/mtd/mtdcore.c ++@@ -778,6 +778,17 @@ out_error: ++ */ ++ static void mtd_set_dev_defaults(struct mtd_info *mtd) ++ { +++#ifdef CONFIG_MTD_OF_PARTS +++ const char __maybe_unused *of_mtd_name = NULL; +++ struct device_node *np; +++ +++ np = mtd_get_of_node(mtd); +++ if (np && !mtd->name) { +++ of_property_read_string(np, "linux,mtd-name", &of_mtd_name); +++ if (of_mtd_name) +++ mtd->name = of_mtd_name; +++ } else +++#endif ++ if (mtd->dev.parent) { ++ if (!mtd->owner && mtd->dev.parent->driver) ++ mtd->owner = mtd->dev.parent->driver->owner; diff --git a/patches/openwrt/0008-ath79-Add-support-for-OpenMesh-OM2P-v1.patch b/patches/openwrt/0008-ath79-Add-support-for-OpenMesh-OM2P-v1.patch new file mode 100644 index 00000000..1a7dba45 --- /dev/null +++ b/patches/openwrt/0008-ath79-Add-support-for-OpenMesh-OM2P-v1.patch @@ -0,0 +1,316 @@ +From: Sven Eckelmann +Date: Mon, 23 Nov 2020 13:41:34 +0100 +Subject: ath79: Add support for OpenMesh OM2P v1 + +Device specifications: +====================== + +* Qualcomm/Atheros AR7240 rev 2 +* 350/350/175 MHz (CPU/DDR/AHB) +* 32 MB of RAM +* 16 MB of SPI NOR flash + - 2x 7 MB available; but one of the 7 MB regions is the recovery image +* 2x 10/100 Mbps Ethernet +* 1T1R 2.4 GHz Wi-Fi +* 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) +* 1x GPIO-button (reset) +* external h/w watchdog (enabled by default) +* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) +* 2x fast ethernet + - eth0 + + 18-24V passive POE (mode B) + + used as WAN interface + - eth1 + + builtin switch port 4 + + used as LAN interface +* 12-24V 1A DC +* external antenna + +The device itself requires the mtdparts from the uboot arguments to +properly boot the flashed image and to support dual-boot (primary + +recovery image). Unfortunately, the name of the mtd device in mtdparts is +still using the legacy name "ar7240-nor0" which must be supplied using the +Linux-specfic DT parameter linux,mtd-name to overwrite the generic name +"spi0.0". + +Flashing instructions: +====================== + +Various methods can be used to install the actual image on the flash. +Two easy ones are: + +ap51-flash +---------- + +The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be +used to transfer the image to the u-boot when the device boots up. + +initramfs from TFTP +------------------- + +The serial console must be used to access the u-boot shell during bootup. +It can then be used to first boot up the initramfs image from a TFTP server +(here with the IP 192.168.1.21): + + setenv serverip 192.168.1.21 + setenv ipaddr 192.168.1.1 + tftpboot 0c00000 .bin && bootm $fileaddr + +The actual sysupgrade image can then be transferred (on the LAN port) to the +device via + + scp .bin root@192.168.1.1:/tmp/ + +On the device, the sysupgrade must then be started using + + sysupgrade -n /tmp/.bin + +Signed-off-by: Sven Eckelmann +(cherry picked from commit 8143709c90c3aa0a84e14cf4a9dfbcb365b0d966) + +diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 +index a37057953bc1e9b7fdf2be02136142d0fc145054..f4ccb2faea4e5e6202413a76cd137065dc535fe7 100644 +--- a/package/boot/uboot-envtools/files/ath79 ++++ b/package/boot/uboot-envtools/files/ath79 +@@ -95,6 +95,7 @@ netgear,wndr4300tn|\ + netgear,wndr4300sw) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000" + ;; ++openmesh,om2p-v1|\ + openmesh,om2p-v2|\ + openmesh,om2p-v4|\ + openmesh,om2p-hs-v1|\ +diff --git a/target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts b/target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..24d406f7ecd2e14729587190de1aecf71029a1eb +--- /dev/null ++++ b/target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts +@@ -0,0 +1,154 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "ar7240.dtsi" ++ ++#include ++#include ++ ++/ { ++ compatible = "openmesh,om2p-v1", "qca,ar7240"; ++ model = "OpenMesh OM2P v1"; ++ ++ chosen { ++ /delete-property/ bootargs; ++ }; ++ ++ aliases { ++ led-boot = &led_power_blue; ++ led-failsafe = &led_power_blue; ++ led-running = &led_power_blue; ++ led-upgrade = &led_power_blue; ++ label-mac-device = ð0; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&switch_led_disable_pins>; ++ ++ led_power_blue: power_blue { ++ label = "blue:power"; ++ gpios = <&gpio 0 GPIO_ACTIVE_LOW>; ++ default-state = "on"; ++ }; ++ ++ wifi_green { ++ label = "green:wifi"; ++ gpios = <&gpio 13 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "phy0tpt"; ++ }; ++ ++ wifi_red { ++ label = "red:wifi"; ++ gpios = <&gpio 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wifi_yellow { ++ label = "yellow:wifi"; ++ gpios = <&gpio 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan_blue { ++ label = "blue:lan"; ++ gpios = <&gpio 16 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan_blue { ++ label = "blue:wan"; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ watchdog { ++ compatible = "linux,wdt-gpio"; ++ gpios = <&gpio 12 GPIO_ACTIVE_LOW>; ++ hw_algo = "toggle"; ++ /* hw_margin_ms is actually 300s but driver limits it to 60s */ ++ hw_margin_ms = <60000>; ++ always-running; ++ }; ++}; ++ ++&spi { ++ status = "okay"; ++ ++ flash@0 { ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <40000000>; ++ linux,mtd-name = "ar7240-nor0"; ++ ++ /* partitions are passed via bootloader */ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "u-boot"; ++ reg = <0x000000 0x040000>; ++ read-only; ++ }; ++ ++ partition@40000 { ++ label = "u-boot-env"; ++ reg = <0x040000 0x040000>; ++ }; ++ ++ partition@80000 { ++ label = "custom"; ++ reg = <0x080000 0x140000>; ++ read-only; ++ }; ++ ++ partition@1c0000 { ++ label = "inactive"; ++ reg = <0x1c0000 0x700000>; ++ }; ++ ++ partition@8c0000 { ++ label = "inactive2"; ++ reg = <0x8c0000 0x700000>; ++ }; ++ ++ art: partition@fc0000 { ++ label = "ART"; ++ reg = <0xfc0000 0x040000>; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++ð0 { ++ mtd-mac-address = <&art 0x0>; ++}; ++ ++ð1 { ++ status = "okay"; ++ ++ mtd-mac-address = <&art 0x6>; ++}; ++ ++&pcie { ++ status = "okay"; ++ ++ wifi@0,0 { ++ compatible = "pci168c,002a"; ++ reg = <0x0000 0 0 0 0>; ++ qca,no-eeprom; ++ #gpio-cells = <2>; ++ gpio-controller; ++ }; ++}; +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 3031b4703bfa885c5036856f0ba6a6dc332da4d8..f5384e7fc3859bab1d6c0422de7e173fad3abae2 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 +@@ -253,6 +253,10 @@ openmesh,om2p-hs-v4) + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0" + ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x02" + ;; ++openmesh,om2p-v1) ++ ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0" ++ ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x10" ++ ;; + pcs,cr3000) + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x04" +diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network +index c2932c1737d97f3eb732620041664f5060d16946..5626f79ee199865df4e9a4f04ce2ff9580bce012 100755 +--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network ++++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network +@@ -174,6 +174,7 @@ ath79_setup_interfaces() + compex,wpj531-16m|\ + openmesh,a40|\ + openmesh,a60|\ ++ openmesh,om2p-v1|\ + openmesh,om2p-v4|\ + openmesh,om2p-hs-v4|\ + plasmacloud,pa300|\ +diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +index 08d9e017a734e29c9b3be4c865e32f109847b4f5..cf07f138260170bcac789e617e09978776b3d2c5 100644 +--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom ++++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +@@ -128,6 +128,9 @@ case "$FIRMWARE" in + openmesh,mr600-v2) + caldata_extract "ART" 0x5000 0x440 + ;; ++ openmesh,om2p-v1) ++ caldata_extract "ART" 0x1000 0x440 ++ ;; + wd,mynet-n750) + caldata_extract "art" 0x5000 0x440 + ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac") +diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +index e979c11bb91cb20fd4168b8921499f03572d3512..e9203f3a5b624e1e9b46c474e95e27583bcb6765 100644 +--- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +@@ -73,6 +73,7 @@ platform_do_upgrade() { + openmesh,mr900-v2|\ + openmesh,mr1750-v1|\ + openmesh,mr1750-v2|\ ++ openmesh,om2p-v1|\ + openmesh,om2p-v2|\ + openmesh,om2p-v4|\ + openmesh,om2p-hs-v1|\ +diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk +index c63900dc701bbc21dce12086f7045d7d450fc5f3..8113b515368b253d0812fbbb86278e7fde63a038 100644 +--- a/target/linux/ath79/image/generic.mk ++++ b/target/linux/ath79/image/generic.mk +@@ -1722,6 +1722,16 @@ define Device/openmesh_mr1750-v2 + endef + TARGET_DEVICES += openmesh_mr1750-v2 + ++define Device/openmesh_om2p-v1 ++ $(Device/openmesh_common_256k) ++ SOC := ar7240 ++ DEVICE_MODEL := OM2P ++ DEVICE_VARIANT := v1 ++ OPENMESH_CE_TYPE := OM2P ++ SUPPORTED_DEVICES += om2p ++endef ++TARGET_DEVICES += openmesh_om2p-v1 ++ + define Device/openmesh_om2p-v2 + $(Device/openmesh_common_256k) + SOC := ar9330 diff --git a/targets/ath79-generic b/targets/ath79-generic index 6cb92e36..7be977df 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -139,6 +139,12 @@ device('openmesh-mr1750-v2', 'openmesh_mr1750-v2', { manifest_aliases = {'openmesh-mr1750v2'}, }) +device('openmesh-om2p-v1', 'openmesh_om2p-v1', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-om2p'}, +}) + -- Plasma Cloud From 5a64deec9ad74c551ba6c1ea7c3724ac7a8d45db Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:22:11 +0200 Subject: [PATCH 33/67] ath79-generic: Add support for OpenMesh OM2P v2 Device specifications: ====================== * Qualcomm/Atheros AR9330 rev 1 * 400/400/200 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 1T1R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + builtin switch port 1 + used as LAN interface - eth1 + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * external antenna Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-om2pv2" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 9748822c..ae4c7f87 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -40,7 +40,7 @@ ath79-generic - MR600 (v1, v2) - MR900 (v1, v2) - MR1750 (v1, v2) - - OM2P (v1) + - OM2P (v1, v2) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 7be977df..5dc188e5 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -145,6 +145,16 @@ device('openmesh-om2p-v1', 'openmesh_om2p-v1', { manifest_aliases = {'openmesh-om2p'}, }) +device('openmesh-om2p-v2', 'openmesh_om2p-v2', { + factory = false, + -- old name from OpenWrt 19.07.x; deacticated at the moment because + -- the physical ethernet port for this device changed between 19.07 + -- and 21.02. And automated update could therefore "break" the + -- device until someone physically changed the ethernet cable. + -- See https://github.com/freifunk-gluon/gluon/pull/2325#issuecomment-940749284 + --manifest_aliases = {'openmesh-om2pv2'}, +}) + -- Plasma Cloud From 0cca0f5e7f2ba104852eabf2d360ecea37e9a5fd Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:22:48 +0200 Subject: [PATCH 34/67] ath79-generic: Add support for OpenMesh OM2P v4 Device specifications: ====================== * Qualcomm/Atheros QCA9533 v2 * 650/600/217 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 1T1R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + Label: Ethernet 1 + 24V passive POE (mode B) - eth1 + Label: Ethernet 2 + 802.3af POE + builtin switch port 1 * 12-24V 1A DC * external antenna Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-om2pv4" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index ae4c7f87..5f34e22e 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -40,7 +40,7 @@ ath79-generic - MR600 (v1, v2) - MR900 (v1, v2) - MR1750 (v1, v2) - - OM2P (v1, v2) + - OM2P (v1, v2, v4) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 5dc188e5..5107a8ad 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -155,6 +155,12 @@ device('openmesh-om2p-v2', 'openmesh_om2p-v2', { --manifest_aliases = {'openmesh-om2pv2'}, }) +device('openmesh-om2p-v4', 'openmesh_om2p-v4', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-om2pv4'}, +}) + -- Plasma Cloud From 19026314d76401c6b3d9ec13ae7e062c16e7f438 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:23:46 +0200 Subject: [PATCH 35/67] ath79-generic: add support for OpenMesh OM2P-HS v1 Device specifications: ====================== * Qualcomm/Atheros AR9341 rev 1 * 535/400/200 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 2T2R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + 802.3af POE + builtin switch port 1 + used as LAN interface - eth1 + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-om2phs" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 1 + targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 5f34e22e..dd744609 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -41,6 +41,7 @@ ath79-generic - MR900 (v1, v2) - MR1750 (v1, v2) - OM2P (v1, v2, v4) + - OM2P-HS (v1) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 5107a8ad..4a901cf5 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -161,6 +161,12 @@ device('openmesh-om2p-v4', 'openmesh_om2p-v4', { manifest_aliases = {'openmesh-om2pv4'}, }) +device('openmesh-om2p-hs-v1', 'openmesh_om2p-hs-v1', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-om2p-hs'}, +}) + -- Plasma Cloud From ce324d11ecad46eefced6300bda82ea50470ad87 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:24:35 +0200 Subject: [PATCH 36/67] ath79-generic: add support for OpenMesh OM2P-HS v2 Device specifications: ====================== * Qualcomm/Atheros AR9341 rev 1 * 535/400/200 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 2T2R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + 802.3af POE + builtin switch port 1 + used as LAN interface - eth1 + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-om2phsv2" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index dd744609..0d94215e 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -41,7 +41,7 @@ ath79-generic - MR900 (v1, v2) - MR1750 (v1, v2) - OM2P (v1, v2, v4) - - OM2P-HS (v1) + - OM2P-HS (v1, v2) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 4a901cf5..4187e547 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -167,6 +167,12 @@ device('openmesh-om2p-hs-v1', 'openmesh_om2p-hs-v1', { manifest_aliases = {'openmesh-om2p-hs'}, }) +device('openmesh-om2p-hs-v2', 'openmesh_om2p-hs-v2', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-om2p-hsv2'}, +}) + -- Plasma Cloud From eed91a9be6b0d9f628531b265f8ef9f1a93a7457 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:25:20 +0200 Subject: [PATCH 37/67] ath79-generic: add support for OpenMesh OM2P-HS v3 Device specifications: ====================== * Qualcomm/Atheros AR9341 rev 1 * 535/400/200 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 2T2R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + 802.3af POE + builtin switch port 1 + used as LAN interface - eth1 + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-om2phsv3" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 0d94215e..fbfcf003 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -41,7 +41,7 @@ ath79-generic - MR900 (v1, v2) - MR1750 (v1, v2) - OM2P (v1, v2, v4) - - OM2P-HS (v1, v2) + - OM2P-HS (v1, v2, v3) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 4187e547..d08913c5 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -173,6 +173,12 @@ device('openmesh-om2p-hs-v2', 'openmesh_om2p-hs-v2', { manifest_aliases = {'openmesh-om2p-hsv2'}, }) +device('openmesh-om2p-hs-v3', 'openmesh_om2p-hs-v3', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-om2p-hsv3'}, +}) + -- Plasma Cloud From 03d894f33a151d730801963bd328f67c2c02c73a Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:25:55 +0200 Subject: [PATCH 38/67] ath79-generic: Add support for OpenMesh OM2P-HS v4 Device specifications: ====================== * Qualcomm/Atheros QCA9533 v2 * 650/600/217 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 2T2R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + 24V passive POE (mode B) + used as WAN interface - eth1 + 802.3af POE + builtin switch port 1 + used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-om2phsv4" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index fbfcf003..ceb973e8 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -41,7 +41,7 @@ ath79-generic - MR900 (v1, v2) - MR1750 (v1, v2) - OM2P (v1, v2, v4) - - OM2P-HS (v1, v2, v3) + - OM2P-HS (v1, v2, v3, v4) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index d08913c5..2e2e3573 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -179,6 +179,12 @@ device('openmesh-om2p-hs-v3', 'openmesh_om2p-hs-v3', { manifest_aliases = {'openmesh-om2p-hsv3'}, }) +device('openmesh-om2p-hs-v4', 'openmesh_om2p-hs-v4', { + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-om2p-hsv4'}, +}) + -- Plasma Cloud From d427c94ee0fff8edfdc7900673cabd89b4521122 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:26:49 +0200 Subject: [PATCH 39/67] ath79-generic: Add support for OpenMesh OM2P-LC Device specifications: ====================== * Qualcomm/Atheros AR9330 rev 1 * 400/400/200 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 1T1R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + builtin switch port 1 + used as LAN interface - eth1 + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin --- docs/user/supported_devices.rst | 1 + targets/ath79-generic | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index ceb973e8..57ed445e 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -42,6 +42,7 @@ ath79-generic - MR1750 (v1, v2) - OM2P (v1, v2, v4) - OM2P-HS (v1, v2, v3, v4) + - OM2P-LC * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 2e2e3573..9b8ceb5b 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -185,6 +185,10 @@ device('openmesh-om2p-hs-v4', 'openmesh_om2p-hs-v4', { manifest_aliases = {'openmesh-om2p-hsv4'}, }) +device('openmesh-om2p-lc', 'openmesh_om2p-lc', { + factory = false, +}) + -- Plasma Cloud From e0abce03e69403b343c1f1e6e62743fda0a50003 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:27:40 +0200 Subject: [PATCH 40/67] ath79-generic: Add support for OpenMesh OM5P Device specifications: ====================== * Qualcomm/Atheros AR9344 rev 2 * 560/450/225 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 2T2R 5 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + builtin switch port 1 + used as LAN interface - eth1 + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas WAN/LAN LEDs appear to be wrong in ar71xx and have been swapped here. Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin --- docs/user/supported_devices.rst | 1 + targets/ath79-generic | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 57ed445e..f9cf9691 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -43,6 +43,7 @@ ath79-generic - OM2P (v1, v2, v4) - OM2P-HS (v1, v2, v3, v4) - OM2P-LC + - OM5P * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 9b8ceb5b..63f0d53e 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -189,6 +189,10 @@ device('openmesh-om2p-lc', 'openmesh_om2p-lc', { factory = false, }) +device('openmesh-om5p', 'openmesh_om5p', { + factory = false, +}) + -- Plasma Cloud From 6e35f6b95ab035de364fca8e14b54bc4ddc3ebbf Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:29:53 +0200 Subject: [PATCH 41/67] ath79-generic: Add support for OpenMesh OM5P-AC v1 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi (11n) * 2T2R 5 GHz Wi-Fi (11ac) * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring * 2x ethernet - eth0 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as LAN interface - eth1 + AR8035 ethernet PHY (SGMII) + 10/100/1000 Mbps Ethernet + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-om5p-ac" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 1 + ...-Add-support-for-OpenMesh-OM5P-AC-v1.patch | 348 ++++++++++++++++++ targets/ath79-generic | 7 + 3 files changed, 356 insertions(+) create mode 100644 patches/openwrt/0009-ath79-Add-support-for-OpenMesh-OM5P-AC-v1.patch diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index f9cf9691..919e70e9 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -44,6 +44,7 @@ ath79-generic - OM2P-HS (v1, v2, v3, v4) - OM2P-LC - OM5P + - OM5P-AC (v1) * Plasma Cloud diff --git a/patches/openwrt/0009-ath79-Add-support-for-OpenMesh-OM5P-AC-v1.patch b/patches/openwrt/0009-ath79-Add-support-for-OpenMesh-OM5P-AC-v1.patch new file mode 100644 index 00000000..e5fbe2d8 --- /dev/null +++ b/patches/openwrt/0009-ath79-Add-support-for-OpenMesh-OM5P-AC-v1.patch @@ -0,0 +1,348 @@ +From: Sven Eckelmann +Date: Mon, 23 Nov 2020 13:41:34 +0100 +Subject: ath79: Add support for OpenMesh OM5P-AC v1 + +Device specifications: +====================== + +* Qualcomm/Atheros QCA9558 ver 1 rev 0 +* 720/600/240 MHz (CPU/DDR/AHB) +* 128 MB of RAM +* 16 MB of SPI NOR flash + - 2x 7 MB available; but one of the 7 MB regions is the recovery image +* 2T2R 2.4 GHz Wi-Fi (11n) +* 2T2R 5 GHz Wi-Fi (11ac) +* 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) +* external h/w watchdog (enabled by default)) +* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) +* TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring +* 2x ethernet + - eth0 + + AR8035 ethernet PHY (RGMII) + + 10/100/1000 Mbps Ethernet + + 802.3af POE + + used as LAN interface + - eth1 + + AR8035 ethernet PHY (SGMII) + + 10/100/1000 Mbps Ethernet + + 18-24V passive POE (mode B) + + used as WAN interface +* 12-24V 1A DC +* internal antennas + +Flashing instructions: +====================== + +Various methods can be used to install the actual image on the flash. +Two easy ones are: + +ap51-flash +---------- + +The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be +used to transfer the image to the u-boot when the device boots up. + +initramfs from TFTP +------------------- + +The serial console must be used to access the u-boot shell during bootup. +It can then be used to first boot up the initramfs image from a TFTP server +(here with the IP 192.168.1.21): + + setenv serverip 192.168.1.21 + setenv ipaddr 192.168.1.1 + tftpboot 0c00000 .bin && bootm $fileaddr + +The actual sysupgrade image can then be transferred (on the LAN port) to the +device via + + scp .bin root@192.168.1.1:/tmp/ + +On the device, the sysupgrade must then be started using + + sysupgrade -n /tmp/.bin + +Signed-off-by: Sven Eckelmann +(cherry picked from commit 97f561725962ddb8823b2e01563a0f37f7930477) + +diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 +index f4ccb2faea4e5e6202413a76cd137065dc535fe7..08c066c3494e8ea6fa5db639e11caa6406f3c6f9 100644 +--- a/package/boot/uboot-envtools/files/ath79 ++++ b/package/boot/uboot-envtools/files/ath79 +@@ -58,6 +58,7 @@ openmesh,mr900-v2|\ + openmesh,mr1750-v1|\ + openmesh,mr1750-v2|\ + openmesh,om5p|\ ++openmesh,om5p-ac-v1|\ + openmesh,om5p-ac-v2|\ + samsung,wam250|\ + ubnt,nanostation-m|\ +diff --git a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..ae69992abf583168a0ab9a017a9aee33758dd4d8 +--- /dev/null ++++ b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts +@@ -0,0 +1,199 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "qca955x.dtsi" ++ ++#include ++#include ++ ++/ { ++ compatible = "openmesh,om5p-ac-v1", "qca,qca9558"; ++ model = "OpenMesh OM5P-AC v1"; ++ ++ chosen { ++ /delete-property/ bootargs; ++ }; ++ ++ aliases { ++ serial0 = &uart; ++ led-boot = &led_power_blue; ++ led-failsafe = &led_power_blue; ++ led-running = &led_power_blue; ++ led-upgrade = &led_power_blue; ++ label-mac-device = ð0; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led_power_blue: power_blue { ++ label = "blue:power"; ++ gpios = <&gpio 18 GPIO_ACTIVE_LOW>; ++ default-state = "on"; ++ }; ++ ++ wan_blue { ++ label = "blue:wan"; ++ gpios = <&gpio 19 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan_blue { ++ label = "blue:lan"; ++ gpios = <&gpio 20 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wifi_green { ++ label = "green:wifi"; ++ gpios = <&gpio 21 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "phy0tpt"; ++ }; ++ ++ wifi_yellow { ++ label = "yellow:wifi"; ++ gpios = <&gpio 22 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wifi_red { ++ label = "red:wifi"; ++ gpios = <&gpio 23 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ i2c { ++ compatible = "i2c-gpio"; ++ gpios = <&gpio 11 GPIO_ACTIVE_HIGH /* sda */ ++ &gpio 12 GPIO_ACTIVE_HIGH /* scl */ ++ >; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c-gpio,scl-open-drain; ++ i2c-gpio,sda-open-drain; ++ ++ tmp423a@4c { ++ compatible = "ti,tmp423"; ++ reg = <0x4c>; ++ }; ++ }; ++ ++ watchdog { ++ compatible = "linux,wdt-gpio"; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ hw_algo = "toggle"; ++ /* hw_margin_ms is actually 300s but driver limits it to 60s */ ++ hw_margin_ms = <60000>; ++ always-running; ++ }; ++}; ++ ++&spi { ++ status = "okay"; ++ ++ flash@0 { ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <40000000>; ++ ++ /* partitions are passed via bootloader */ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "u-boot"; ++ reg = <0x000000 0x040000>; ++ read-only; ++ }; ++ ++ partition@40000 { ++ label = "u-boot-env"; ++ reg = <0x040000 0x010000>; ++ }; ++ ++ partition@50000 { ++ label = "custom"; ++ reg = <0x050000 0x060000>; ++ read-only; ++ }; ++ ++ partition@b0000 { ++ label = "inactive"; ++ reg = <0x0b0000 0x7a0000>; ++ }; ++ ++ partition@850000 { ++ label = "inactive2"; ++ reg = <0x850000 0x7a0000>; ++ }; ++ ++ art: partition@ff0000 { ++ label = "ART"; ++ reg = <0xff0000 0x010000>; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++&mdio0 { ++ status = "okay"; ++ ++ phy-mask = <0x6>; ++ ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ eee-broken-100tx; ++ eee-broken-1000t; ++ }; ++ ++ phy2: ethernet-phy@2 { ++ reg = <2>; ++ eee-broken-100tx; ++ eee-broken-1000t; ++ at803x-override-sgmii-link-check; ++ }; ++}; ++ ++ð0 { ++ status = "okay"; ++ ++ pll-data = <0x82000101 0x80000101 0x80001313>; ++ ++ mtd-mac-address = <&art 0x0>; ++ ++ phy-mode = "rgmii-id"; ++ phy-handle = <&phy1>; ++ ++ gmac-config { ++ device = <&gmac>; ++ rgmii-enabled = <1>; ++ rxd-delay = <3>; ++ rxdv-delay = <3>; ++ txd-delay = <0>; ++ txen-delay = <0>; ++ }; ++}; ++ ++ð1 { ++ status = "okay"; ++ ++ pll-data = <0x03000101 0x80000101 0x80001313>; ++ ++ mtd-mac-address = <&art 0x6>; ++ ++ qca955x-sgmii-fixup; ++ ++ phy-handle = <&phy2>; ++}; ++ ++&wmac { ++ status = "okay"; ++ ++ mtd-cal-data = <&art 0x1000>; ++ mtd-mac-address = <&art 0x0>; ++ mac-address-increment = <2>; ++}; ++ ++&pcie1 { ++ status = "okay"; ++}; +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 f5384e7fc3859bab1d6c0422de7e173fad3abae2..68ea4281a56bff44147c7792990cc1e26bc10a7c 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 +@@ -257,6 +257,10 @@ openmesh,om2p-v1) + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0" + ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x10" + ;; ++openmesh,om5p-ac-v1) ++ ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" ++ ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" ++ ;; + pcs,cr3000) + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x04" +diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +index b70a87054b10fbe708d9aa8603ecdb591fc92591..00dbeec6a51457c23ba97aa627bf14acd8349f74 100644 +--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata ++++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +@@ -158,6 +158,10 @@ case "$FIRMWARE" in + ;; + "ath10k/cal-pci-0000:01:00.0.bin") + case $board in ++ openmesh,om5p-ac-v1) ++ caldata_extract "ART" 0x5000 0x844 ++ ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ++ ;; + sitecom,wlr-8100) + caldata_extract "art" 0x5000 0x844 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +1) +diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +index e9203f3a5b624e1e9b46c474e95e27583bcb6765..2cac42c9feaed3c0360091a5b7959e741d4a0473 100644 +--- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +@@ -82,6 +82,7 @@ platform_do_upgrade() { + openmesh,om2p-hs-v4|\ + openmesh,om2p-lc|\ + openmesh,om5p|\ ++ openmesh,om5p-ac-v1|\ + openmesh,om5p-ac-v2) + PART_NAME="inactive" + platform_do_upgrade_openmesh "$1" +diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk +index 8113b515368b253d0812fbbb86278e7fde63a038..75dbc1c03b5c42b81463bf7c4ddd4aa5803afd69 100644 +--- a/target/linux/ath79/image/generic.mk ++++ b/target/linux/ath79/image/generic.mk +@@ -1810,6 +1810,17 @@ define Device/openmesh_om5p + endef + TARGET_DEVICES += openmesh_om5p + ++define Device/openmesh_om5p-ac-v1 ++ $(Device/openmesh_common_64k) ++ SOC := qca9558 ++ DEVICE_MODEL := OM5P-AC ++ DEVICE_VARIANT := v1 ++ DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct ++ OPENMESH_CE_TYPE := OM5PAC ++ SUPPORTED_DEVICES += om5p-ac ++endef ++TARGET_DEVICES += openmesh_om5p-ac-v1 ++ + define Device/openmesh_om5p-ac-v2 + $(Device/openmesh_common_64k) + SOC := qca9558 diff --git a/targets/ath79-generic b/targets/ath79-generic index 63f0d53e..0c11bc8c 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -193,6 +193,13 @@ device('openmesh-om5p', 'openmesh_om5p', { factory = false, }) +device('openmesh-om5p-ac-v1', 'openmesh_om5p-ac-v1', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-om5p-ac'}, +}) + -- Plasma Cloud From 4ff8f2f77049e2e8b9938a0e73bb061f7cda3632 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:30:24 +0200 Subject: [PATCH 42/67] ath79-generic: Add support for OpenMesh OM5P-AC v2 Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/200 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi (11n) * 2T2R 5 GHz Wi-Fi (11ac) * 4x GPIO-LEDs (3x wifi, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring * 2x ethernet - eth0 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as LAN interface - eth1 + AR8031 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas This device support is based on the partially working stub from commit 53c474abbdfe ("ath79: add new OF only target for QCA MIPS silicon"). Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin Gluon image name change ======================= The device had the image name "openmesh-om5p-acv2" in older versions of Gluon. This had to be changed with the new name in the device trees of the ath79 device tree. --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 919e70e9..6e78ff56 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -44,7 +44,7 @@ ath79-generic - OM2P-HS (v1, v2, v3, v4) - OM2P-LC - OM5P - - OM5P-AC (v1) + - OM5P-AC (v1, v2) * Plasma Cloud diff --git a/targets/ath79-generic b/targets/ath79-generic index 0c11bc8c..5ca21e9f 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -200,6 +200,13 @@ device('openmesh-om5p-ac-v1', 'openmesh_om5p-ac-v1', { manifest_aliases = {'openmesh-om5p-ac'}, }) +device('openmesh-om5p-ac-v2', 'openmesh_om5p-ac-v2', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, + -- old name from OpenWrt 19.07.x + manifest_aliases = {'openmesh-om5p-acv2'}, +}) + -- Plasma Cloud From 979cc0a2edbd7f1465f3c25f0fc1b1365ecebd8a Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 10 Oct 2021 17:28:55 +0200 Subject: [PATCH 43/67] ath79-generic: Add support for OpenMesh OM5P-AN Device specifications: ====================== * Qualcomm/Atheros AR9344 rev 2 * 560/450/225 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 1T1R 2.4 GHz Wi-Fi * 2T2R 5 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring * 2x ethernet - eth0 + AR8035 ethernet PHY + 10/100/1000 Mbps Ethernet + 802.3af POE + used as LAN interface - eth1 + 10/100 Mbps Ethernet + builtin switch port 1 + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 .bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp .bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/.bin --- docs/user/supported_devices.rst | 1 + ...h79-Add-support-for-OpenMesh-OM5P-AN.patch | 365 ++++++++++++++++++ targets/ath79-generic | 4 + 3 files changed, 370 insertions(+) create mode 100644 patches/openwrt/0010-ath79-Add-support-for-OpenMesh-OM5P-AN.patch diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 6e78ff56..5c788cdd 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -45,6 +45,7 @@ ath79-generic - OM2P-LC - OM5P - OM5P-AC (v1, v2) + - OM5P-AN * Plasma Cloud diff --git a/patches/openwrt/0010-ath79-Add-support-for-OpenMesh-OM5P-AN.patch b/patches/openwrt/0010-ath79-Add-support-for-OpenMesh-OM5P-AN.patch new file mode 100644 index 00000000..bfa278de --- /dev/null +++ b/patches/openwrt/0010-ath79-Add-support-for-OpenMesh-OM5P-AN.patch @@ -0,0 +1,365 @@ +From: Sven Eckelmann +Date: Mon, 23 Nov 2020 13:41:34 +0100 +Subject: ath79: Add support for OpenMesh OM5P-AN + +Device specifications: +====================== + +* Qualcomm/Atheros AR9344 rev 2 +* 560/450/225 MHz (CPU/DDR/AHB) +* 64 MB of RAM +* 16 MB of SPI NOR flash + - 2x 7 MB available; but one of the 7 MB regions is the recovery image +* 1T1R 2.4 GHz Wi-Fi +* 2T2R 5 GHz Wi-Fi +* 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) +* 1x GPIO-button (reset) +* external h/w watchdog (enabled by default) +* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) +* TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring +* 2x ethernet + - eth0 + + AR8035 ethernet PHY + + 10/100/1000 Mbps Ethernet + + 802.3af POE + + used as LAN interface + - eth1 + + 10/100 Mbps Ethernet + + builtin switch port 1 + + 18-24V passive POE (mode B) + + used as WAN interface +* 12-24V 1A DC +* internal antennas + +Flashing instructions: +====================== + +Various methods can be used to install the actual image on the flash. +Two easy ones are: + +ap51-flash +---------- + +The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be +used to transfer the image to the u-boot when the device boots up. + +initramfs from TFTP +------------------- + +The serial console must be used to access the u-boot shell during bootup. +It can then be used to first boot up the initramfs image from a TFTP server +(here with the IP 192.168.1.21): + + setenv serverip 192.168.1.21 + setenv ipaddr 192.168.1.1 + tftpboot 0c00000 .bin && bootm $fileaddr + +The actual sysupgrade image can then be transferred (on the LAN port) to the +device via + + scp .bin root@192.168.1.1:/tmp/ + +On the device, the sysupgrade must then be started using + + sysupgrade -n /tmp/.bin + +Signed-off-by: Sven Eckelmann +(cherry picked from commit 72ef5945508193228544bcd7fcfe81b32e8dc042) + +diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 +index 08c066c3494e8ea6fa5db639e11caa6406f3c6f9..78e5fc0a2be25e1ed676ac647214f237f29b4667 100644 +--- a/package/boot/uboot-envtools/files/ath79 ++++ b/package/boot/uboot-envtools/files/ath79 +@@ -58,6 +58,7 @@ openmesh,mr900-v2|\ + openmesh,mr1750-v1|\ + openmesh,mr1750-v2|\ + openmesh,om5p|\ ++openmesh,om5p-an|\ + openmesh,om5p-ac-v1|\ + openmesh,om5p-ac-v2|\ + samsung,wam250|\ +diff --git a/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts b/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..6950ba3a2936cf8c9b12a22c966dc3b9215f2227 +--- /dev/null ++++ b/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts +@@ -0,0 +1,216 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include "ar9344.dtsi" ++ ++#include ++#include ++ ++/ { ++ compatible = "openmesh,om5p-an", "qca,ar9344"; ++ model = "OpenMesh OM5P-AN"; ++ ++ chosen { ++ /delete-property/ bootargs; ++ }; ++ ++ aliases { ++ led-boot = &led_power_blue; ++ led-failsafe = &led_power_blue; ++ led-running = &led_power_blue; ++ led-upgrade = &led_power_blue; ++ label-mac-device = ð0; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 4 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&led_lan_wan_blue_pin>; ++ ++ led_power_blue: power_blue { ++ label = "blue:power"; ++ gpios = <&gpio 13 GPIO_ACTIVE_LOW>; ++ default-state = "on"; ++ }; ++ ++ wan_blue { ++ label = "blue:wan"; ++ gpios = <&gpio 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan_blue { ++ label = "blue:lan"; ++ gpios = <&gpio 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wifi_green { ++ label = "green:wifi"; ++ gpios = <&gpio 16 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "phy0tpt"; ++ }; ++ ++ wifi_yellow { ++ label = "yellow:wifi"; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wifi_red { ++ label = "red:wifi"; ++ gpios = <&gpio 19 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ i2c { ++ compatible = "i2c-gpio"; ++ gpios = <&gpio 21 GPIO_ACTIVE_HIGH /* sda */ ++ &gpio 20 GPIO_ACTIVE_HIGH /* scl */ ++ >; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c-gpio,scl-open-drain; ++ i2c-gpio,sda-open-drain; ++ ++ tmp423a@4c { ++ compatible = "ti,tmp423"; ++ reg = <0x4c>; ++ }; ++ }; ++ ++ watchdog { ++ compatible = "linux,wdt-gpio"; ++ gpios = <&gpio 11 GPIO_ACTIVE_LOW>; ++ hw_algo = "toggle"; ++ /* hw_margin_ms is actually 300s but driver limits it to 60s */ ++ hw_margin_ms = <60000>; ++ always-running; ++ }; ++}; ++ ++&ref { ++ clock-frequency = <40000000>; ++}; ++ ++&pinmux { ++ led_lan_wan_blue_pin: pinmux_lan_wan_blue_pin { ++ pinctrl-single,bits = <0xc 0x0 0xffff0000>; ++ }; ++}; ++ ++&spi { ++ status = "okay"; ++ ++ flash@0 { ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <40000000>; ++ ++ /* partitions are passed via bootloader */ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "u-boot"; ++ reg = <0x000000 0x040000>; ++ read-only; ++ }; ++ ++ partition@40000 { ++ label = "u-boot-env"; ++ reg = <0x040000 0x010000>; ++ }; ++ ++ partition@50000 { ++ label = "custom"; ++ reg = <0x050000 0x060000>; ++ read-only; ++ }; ++ ++ partition@b0000 { ++ label = "inactive"; ++ reg = <0x0b0000 0x7a0000>; ++ }; ++ ++ partition@850000 { ++ label = "inactive2"; ++ reg = <0x850000 0x7a0000>; ++ }; ++ ++ art: partition@ff0000 { ++ label = "ART"; ++ reg = <0xff0000 0x010000>; ++ read-only; ++ }; ++ }; ++ }; ++}; ++ ++&mdio0 { ++ status = "okay"; ++ ++ phy-mask = <0x80>; ++ ++ phy7: ethernet-phy@7 { ++ reg = <7>; ++ eee-broken-100tx; ++ eee-broken-1000t; ++ }; ++}; ++ ++ð0 { ++ status = "okay"; ++ ++ pll-data = <0x02000000 0x00000101 0x00001313>; ++ ++ mtd-mac-address = <&art 0x0>; ++ ++ phy-mode = "rgmii-id"; ++ phy-handle = <&phy7>; ++ ++ gmac-config { ++ device = <&gmac>; ++ rgmii-gmac0 = <1>; ++ rxd-delay = <2>; ++ rxdv-delay = <2>; ++ switch-phy-swap = <1>; ++ }; ++}; ++ ++ð1 { ++ status = "okay"; ++ ++ mtd-mac-address = <&art 0x0>; ++ mac-address-increment = <1>; ++}; ++ ++&wmac { ++ status = "okay"; ++ ++ mtd-cal-data = <&art 0x1000>; ++ mtd-mac-address = <&art 0x0>; ++ mac-address-increment = <2>; ++}; ++ ++&pcie { ++ status = "okay"; ++ ++ wifi@0,0 { ++ compatible = "pci168c,0030"; ++ reg = <0x0000 0 0 0 0>; ++ qca,no-eeprom; ++ mtd-mac-address = <&art 0x0>; ++ mac-address-increment = <16>; ++ }; ++}; +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 68ea4281a56bff44147c7792990cc1e26bc10a7c..403ca9edd940d76bf9695cc18fe0c8cdd7e22967 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 +@@ -261,6 +261,10 @@ openmesh,om5p-ac-v1) + ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" + ;; ++openmesh,om5p-an) ++ ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" ++ ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x02" ++ ;; + pcs,cr3000) + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x04" +diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +index cf07f138260170bcac789e617e09978776b3d2c5..fbce7d672b2306094544aacf527257e7e6a6ba8c 100644 +--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom ++++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +@@ -125,7 +125,8 @@ case "$FIRMWARE" in + caldata_extract "art" 0x1000 0x1000 + ;; + openmesh,mr600-v1|\ +- openmesh,mr600-v2) ++ openmesh,mr600-v2|\ ++ openmesh,om5p-an) + caldata_extract "ART" 0x5000 0x440 + ;; + openmesh,om2p-v1) +diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +index 2cac42c9feaed3c0360091a5b7959e741d4a0473..67e53c5fdebf29e71b920753be829fa4e41ca207 100644 +--- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +@@ -83,7 +83,8 @@ platform_do_upgrade() { + openmesh,om2p-lc|\ + openmesh,om5p|\ + openmesh,om5p-ac-v1|\ +- openmesh,om5p-ac-v2) ++ openmesh,om5p-ac-v2|\ ++ openmesh,om5p-an) + PART_NAME="inactive" + platform_do_upgrade_openmesh "$1" + ;; +diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk +index 75dbc1c03b5c42b81463bf7c4ddd4aa5803afd69..000fec405e161dc4906e88dd967f73c2df95f296 100644 +--- a/target/linux/ath79/image/generic.mk ++++ b/target/linux/ath79/image/generic.mk +@@ -1832,6 +1832,15 @@ define Device/openmesh_om5p-ac-v2 + endef + TARGET_DEVICES += openmesh_om5p-ac-v2 + ++define Device/openmesh_om5p-an ++ $(Device/openmesh_common_64k) ++ SOC := ar9344 ++ DEVICE_MODEL := OM5P-AN ++ OPENMESH_CE_TYPE := OM5P ++ SUPPORTED_DEVICES += om5p-an ++endef ++TARGET_DEVICES += openmesh_om5p-an ++ + define Device/pcs_cap324 + SOC := ar9344 + DEVICE_VENDOR := PowerCloud Systems diff --git a/targets/ath79-generic b/targets/ath79-generic index 5ca21e9f..93390980 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -207,6 +207,10 @@ device('openmesh-om5p-ac-v2', 'openmesh_om5p-ac-v2', { manifest_aliases = {'openmesh-om5p-acv2'}, }) +device('openmesh-om5p-an', 'openmesh_om5p-an', { + factory = false, +}) + -- Plasma Cloud From 6bca6e4eaab282baddc2e04f43aa50ae9a13ed16 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 22 Mar 2022 00:28:30 +0100 Subject: [PATCH 44/67] modules: update packages (#2411) 762794d14 usteer: add package 89cea2a6e zerotier: update to 1.8.6 f7554858e zerotier: update to 1.8.4 7673192a9 zerotier: update to 1.8.3 56c457058 zerotier: update to 1.8.2 614b4e003 zerotier: update to 1.8.1 52fcc9bf6 zerotier: add respawn procd param 1e1d5f5d6 zerotier: add option to copy config 748d87c88 zerotier: fix cross compile in macOS --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index d5b46e38..b2c60ea8 100644 --- a/modules +++ b/modules @@ -6,7 +6,7 @@ OPENWRT_COMMIT=180b750c02dd9dd066cf67ee7c3480eb0ec36b70 PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git PACKAGES_PACKAGES_BRANCH=openwrt-21.02 -PACKAGES_PACKAGES_COMMIT=921af7fdda9db13ff6fbd31faf71a3ebc0269403 +PACKAGES_PACKAGES_COMMIT=762794d143b6734b706d07944598c04074685f99 PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git PACKAGES_ROUTING_BRANCH=openwrt-21.02 From d9c7b1c6fc913465d0f6ae429c8007edc42721cb Mon Sep 17 00:00:00 2001 From: "J. Burfeind" Date: Wed, 23 Mar 2022 20:14:51 +0100 Subject: [PATCH 45/67] ath79-generic: (re)add AVM Fritz!WLAN Repeater 450e (#2420) Gone due to commit 45c84a117bf8 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 4 ++++ targets/ath79-generic | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index b53aacf6..dbc52da7 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -4,6 +4,10 @@ Supported Devices & Architectures ath79-generic -------------- +* AVM + + - Fritz!WLAN Repeater 450E [#avmflash]_ + * devolo - WiFi pro 1200e [#lan_as_wan]_ diff --git a/targets/ath79-generic b/targets/ath79-generic index cd005100..b2cb3bc7 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -22,6 +22,12 @@ local ATH10K_PACKAGES_QCA9888 = { '-ath10k-firmware-qca9888-ct', } +-- AVM + +device('avm-fritz-wlan-repeater-450e', 'avm_fritz450e', { + factory = false, +}) + -- devolo device('devolo-wifi-pro-1200e', 'devolo_dvl1200e', { From 7ebc88147ee96342a9de6a6774fe8f7a85925f78 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 23 Mar 2022 20:26:56 +0100 Subject: [PATCH 46/67] docs: move release notes TOC to sub page (#2408) This allows us to organize the TOC a bit better by adding sections per major version. We can even increase the maxdepth to 2 now, which looks great in my opinion. In addition, the full list of releases is not shown in the sidebar anymore when viewing a completely different part of the documentation, which took up more than half of the total sidebar entries. --- docs/index.rst | 56 +------------------ docs/releases/index.rst | 118 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 55 deletions(-) create mode 100644 docs/releases/index.rst diff --git a/docs/index.rst b/docs/index.rst index 72648a9a..daa91d1d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -78,61 +78,7 @@ Several Freifunk communities in Germany use Gluon as the foundation of their Fre :caption: Releases :maxdepth: 1 - releases/v2021.1.1 - releases/v2021.1 - releases/v2020.2.3 - releases/v2020.2.2 - releases/v2020.2.1 - releases/v2020.2 - releases/v2020.1.4 - releases/v2020.1.3 - releases/v2020.1.2 - releases/v2020.1.1 - releases/v2020.1 - releases/v2019.1.3 - releases/v2019.1.2 - releases/v2019.1.1 - releases/v2019.1 - releases/v2018.2.4 - releases/v2018.2.3 - releases/v2018.2.2 - releases/v2018.2.1 - releases/v2018.2 - releases/v2018.1.4 - releases/v2018.1.3 - releases/v2018.1.2 - releases/v2018.1.1 - releases/v2018.1 - releases/v2017.1.8 - releases/v2017.1.7 - releases/v2017.1.6 - releases/v2017.1.5 - releases/v2017.1.4 - releases/v2017.1.3 - releases/v2017.1.2 - releases/v2017.1.1 - releases/v2017.1 - releases/v2016.2.7 - releases/v2016.2.6 - releases/v2016.2.5 - releases/v2016.2.4 - releases/v2016.2.3 - releases/v2016.2.2 - releases/v2016.2.1 - releases/v2016.2 - releases/v2016.1.6 - releases/v2016.1.5 - releases/v2016.1.4 - releases/v2016.1.3 - releases/v2016.1.2 - releases/v2016.1.1 - releases/v2016.1 - releases/v2015.1.2 - releases/v2015.1.1 - releases/v2015.1 - releases/v2014.4 - releases/v2014.3.1 - releases/v2014.3 + releases/index License ------- diff --git a/docs/releases/index.rst b/docs/releases/index.rst new file mode 100644 index 00000000..ddda8511 --- /dev/null +++ b/docs/releases/index.rst @@ -0,0 +1,118 @@ +Release Notes +============= + +.. toctree:: + :caption: Gluon 2021.1 + :maxdepth: 2 + + v2021.1.1 + v2021.1 + +.. toctree:: + :caption: Gluon 2020.2 + :maxdepth: 2 + + v2020.2.3 + v2020.2.2 + v2020.2.1 + v2020.2 + +.. toctree:: + :caption: Gluon 2020.1 + :maxdepth: 2 + + v2020.1.4 + v2020.1.3 + v2020.1.2 + v2020.1.1 + v2020.1 + +.. toctree:: + :caption: Gluon 2019.1 + :maxdepth: 2 + + v2019.1.3 + v2019.1.2 + v2019.1.1 + v2019.1 + +.. toctree:: + :caption: Gluon 2018.2 + :maxdepth: 2 + + v2018.2.4 + v2018.2.3 + v2018.2.2 + v2018.2.1 + v2018.2 + +.. toctree:: + :caption: Gluon 2018.1 + :maxdepth: 2 + + v2018.1.4 + v2018.1.3 + v2018.1.2 + v2018.1.1 + v2018.1 + +.. toctree:: + :caption: Gluon 2017.1 + :maxdepth: 2 + + v2017.1.8 + v2017.1.7 + v2017.1.6 + v2017.1.5 + v2017.1.4 + v2017.1.3 + v2017.1.2 + v2017.1.1 + v2017.1 + +.. toctree:: + :caption: Gluon 2016.2 + :maxdepth: 2 + + v2016.2.7 + v2016.2.6 + v2016.2.5 + v2016.2.4 + v2016.2.3 + v2016.2.2 + v2016.2.1 + v2016.2 + +.. toctree:: + :caption: Gluon 2016.1 + :maxdepth: 2 + + v2016.1.6 + v2016.1.5 + v2016.1.4 + v2016.1.3 + v2016.1.2 + v2016.1.1 + v2016.1 + +.. toctree:: + :caption: Gluon 2015.1 + :maxdepth: 2 + + v2015.1.2 + v2015.1.1 + v2015.1 + +.. toctree:: + :caption: Gluon 2014.4 + :maxdepth: 2 + + v2014.4 + +.. toctree:: + :caption: Gluon 2014.3 + :maxdepth: 2 + + v2014.3.1 + v2014.3 + From 866bf11903c905955c111df145cfa9472fbedf70 Mon Sep 17 00:00:00 2001 From: Sebastian Schaper <36594927+s-2@users.noreply.github.com> Date: Wed, 23 Mar 2022 23:35:39 +0100 Subject: [PATCH 47/67] ath79-generic: add support for D-Link DAP-2660 A1 (#2414) Signed-off-by: Sebastian Schaper --- docs/user/supported_devices.rst | 4 ++++ targets/ath79-generic | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index dbc52da7..7bc8723d 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -17,6 +17,10 @@ ath79-generic - WiFi pro 1750i - WiFi pro 1750x +* D-Link + + - DAP-2660 A1 [#lan_as_wan]_ + * Enterasys - WS-AP3705i diff --git a/targets/ath79-generic b/targets/ath79-generic index b2cb3bc7..86b70378 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -61,6 +61,14 @@ device('devolo-wifi-pro-1750x', 'devolo_dvl1750x', { }) +-- D-Link + +device('d-link-dap-2660-a1', 'dlink_dap-2660-a1', { + factory_ext = '.img', + packages = ATH10K_PACKAGES_QCA9880, +}) + + -- Enterasys device('enterasys-ws-ap3705', 'enterasys_ws-ap3705i', { From fc21c51ab2080ca0ec934fec725e8d8a2ece214e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 23 Mar 2022 23:40:24 +0100 Subject: [PATCH 48/67] ci: build all targets on changes in scripts/ The scripts directory contains most of our build system, so changing it should trigger a build of all targets. --- .github/filters.yml | 22 ++++++++++++++++++++++ contrib/actions/generate-target-filters.py | 1 + 2 files changed, 23 insertions(+) diff --git a/.github/filters.yml b/.github/filters.yml index 0a812af9..4ef57a1b 100644 --- a/.github/filters.yml +++ b/.github/filters.yml @@ -4,6 +4,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -12,6 +13,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -20,6 +22,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk", "targets/bcm27xx.inc" @@ -29,6 +32,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk", "targets/bcm27xx.inc" @@ -38,6 +42,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -46,6 +51,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -54,6 +60,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -62,6 +69,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -70,6 +78,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -78,6 +87,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -86,6 +96,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -94,6 +105,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -102,6 +114,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -110,6 +123,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -118,6 +132,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -126,6 +141,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -134,6 +150,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk", "targets/x86.inc" @@ -143,6 +160,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ], @@ -151,6 +169,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk", "targets/x86.inc" @@ -160,6 +179,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk", "targets/x86.inc", @@ -171,6 +191,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk", "targets/bcm27xx.inc" @@ -180,6 +201,7 @@ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk" ] diff --git a/contrib/actions/generate-target-filters.py b/contrib/actions/generate-target-filters.py index b74bfe4e..d3a0adf1 100755 --- a/contrib/actions/generate-target-filters.py +++ b/contrib/actions/generate-target-filters.py @@ -13,6 +13,7 @@ common = [ "modules", "Makefile", "patches/**", + "scripts/**", "targets/generic", "targets/targets.mk", ] From 7d75cfddfc24a90ff4a7481ebb568d0c615616e0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 24 Mar 2022 06:47:40 +0100 Subject: [PATCH 49/67] scripts: target_lib: remove profile override support (#2423) No legacy OpenWrt targets exist anymore which require the .config profile name to differ from the image name. --- scripts/target_config_lib.lua | 6 ++---- scripts/target_lib.lua | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index c2237f72..ccda8e42 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -155,8 +155,6 @@ if #lib.devices > 0 then handle_target_pkgs(lib.target_packages) for _, dev in ipairs(lib.devices) do - local profile = dev.options.profile or dev.name - local device_pkgs = {} local function handle_pkgs(pkgs) for _, pkg in ipairs(pkgs) do @@ -172,10 +170,10 @@ if #lib.devices > 0 then handle_pkgs(dev.options.packages or {}) handle_pkgs(site_packages(dev.image)) - local profile_config = string.format('%s_DEVICE_%s', openwrt_config_target, profile) + local profile_config = string.format('%s_DEVICE_%s', openwrt_config_target, dev.name) lib.config( 'TARGET_DEVICE_' .. profile_config, true, - string.format("unable to enable device '%s'", profile) + string.format("unable to enable device '%s'", dev.name) ) lib.config( 'TARGET_DEVICE_PACKAGES_' .. profile_config, diff --git a/scripts/target_lib.lua b/scripts/target_lib.lua index 1c2395e6..b8dd933e 100644 --- a/scripts/target_lib.lua +++ b/scripts/target_lib.lua @@ -31,7 +31,6 @@ M.images = {} local default_options = { - profile = false, factory = '-squashfs-factory', factory_ext = '.bin', sysupgrade = '-squashfs-sysupgrade', From 9c13c4755ed3afb262f32cba020932818210ee81 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 24 Mar 2022 06:48:10 +0100 Subject: [PATCH 50/67] gluon.mk: print source file name in GluonSrcDiet (#2424) luasrcdiet will not print the name of its input file when an error occurs. To facilitate debugging, echo the name before calling it, so it is visible with V=s or BUILD_LOG=1. --- package/gluon.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/gluon.mk b/package/gluon.mk index 40f9274f..df8e2637 100644 --- a/package/gluon.mk +++ b/package/gluon.mk @@ -67,6 +67,7 @@ define GluonSrcDiet ifdef CONFIG_GLUON_MINIFY # Use cp + rm instead of mv to preserve destination permissions set -e; $(FIND) $(2) -type f | while read src; do \ + echo "Minifying $$$$src..."; \ luasrcdiet --noopt-binequiv -o "$$$$src.tmp" "$$$$src"; \ cp "$$$$src.tmp" "$$$$src"; \ rm "$$$$src.tmp"; \ From a76d0f2210d18917a4161f7d2de52841496e9caf Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Thu, 24 Mar 2022 10:34:53 +0100 Subject: [PATCH 51/67] modules: update openwrt f65edc9b99 zlib: backport security fix for a reproducible crash in compressor fdd862f9ac sunxi: cortexa7: fix ethernet link detection on a20-olinuxino-lime2 4910ffa8e9 mvebu: udpu: include LM75 kmod by default d38f7ec56f mvebu: udpu: fix initramfs booting 56d69ee70d ath79: fix label MAC address for Ubiquiti UniFi c6256a6533 ramips: remove kmod-mt7663-firmware-sta from device packages 28343cfb7d kernel: backport DSA patches fixing null-pointer dereference --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index b2c60ea8..6a948389 100644 --- a/modules +++ b/modules @@ -2,7 +2,7 @@ GLUON_FEEDS='packages routing gluon' OPENWRT_REPO=https://github.com/openwrt/openwrt.git OPENWRT_BRANCH=openwrt-21.02 -OPENWRT_COMMIT=180b750c02dd9dd066cf67ee7c3480eb0ec36b70 +OPENWRT_COMMIT=f65edc9b990c2bcc10c9e9fca29253adc6fe316d PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git PACKAGES_PACKAGES_BRANCH=openwrt-21.02 From ec2a6a790e051569534680d52e7a479bbe059526 Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Thu, 24 Mar 2022 10:35:06 +0100 Subject: [PATCH 52/67] modules: update packages c2aeec5ef xray-core: Update to 1.5.4 5eb1ab8a6 yq: Update to 4.23.1 a7a93cfcc python3: Update to 3.9.11, refresh patches --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 6a948389..6d7092e2 100644 --- a/modules +++ b/modules @@ -6,7 +6,7 @@ OPENWRT_COMMIT=f65edc9b990c2bcc10c9e9fca29253adc6fe316d PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git PACKAGES_PACKAGES_BRANCH=openwrt-21.02 -PACKAGES_PACKAGES_COMMIT=762794d143b6734b706d07944598c04074685f99 +PACKAGES_PACKAGES_COMMIT=08a442fe9f7bc2bf1a967d702514c0e136ecde08 PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git PACKAGES_ROUTING_BRANCH=openwrt-21.02 From da43083e01ad9f725877b80a2628f67e56281bf9 Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Thu, 24 Mar 2022 10:35:08 +0100 Subject: [PATCH 53/67] modules: update routing fc0b140 opennds: Release v9.7.0 (for 21.02) --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 6d7092e2..da06aa08 100644 --- a/modules +++ b/modules @@ -10,7 +10,7 @@ PACKAGES_PACKAGES_COMMIT=08a442fe9f7bc2bf1a967d702514c0e136ecde08 PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git PACKAGES_ROUTING_BRANCH=openwrt-21.02 -PACKAGES_ROUTING_COMMIT=5971f1937c76c771081f2b83de8e7263a28837b2 +PACKAGES_ROUTING_COMMIT=fc0b140689271efcd913059826b6f9567da2a3e0 PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git PACKAGES_GLUON_COMMIT=308166e3c6b2d571606dd1dbfadd2bb8e31d8f90 From aa5355f662139020768221626316e1a4163d758e Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Wed, 23 Mar 2022 17:31:18 +0100 Subject: [PATCH 54/67] ath79-generic: (re)add support for UniFi AP Gone due to commit 45c84a1 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 4 ++++ targets/ath79-generic | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index b53aacf6..aac9ab43 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -54,6 +54,10 @@ ath79-generic - TL-WDR4300 (v1) - WBS210 (v2.0) +* Ubiquiti + + - UniFi AP + ath79-nand ---------- diff --git a/targets/ath79-generic b/targets/ath79-generic index cd005100..39fce838 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -135,3 +135,11 @@ device('tp-link-tl-wdr3600-v1', 'tplink_tl-wdr3600-v1') device('tp-link-tl-wdr4300-v1', 'tplink_tl-wdr4300-v1') device('tp-link-wbs210-v2', 'tplink_wbs210-v2') + +-- Ubiquiti + +device('ubiquiti-unifi-ap', 'ubnt_unifi', { + manifest_aliases = { + 'ubiquiti-unifi', + }, +}) From 71d3f4cad1f7d8259af856674f3e6d30272352be Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Thu, 24 Mar 2022 12:08:26 +0100 Subject: [PATCH 55/67] ath79-generic: (re)add support for UniFi AP LR Gone due to commit 45c84a1 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 1 + targets/ath79-generic | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index aac9ab43..ae9f9773 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -57,6 +57,7 @@ ath79-generic * Ubiquiti - UniFi AP + - UniFi AP LR ath79-nand ---------- diff --git a/targets/ath79-generic b/targets/ath79-generic index 39fce838..ed0bbbea 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -139,6 +139,9 @@ device('tp-link-wbs210-v2', 'tplink_wbs210-v2') -- Ubiquiti device('ubiquiti-unifi-ap', 'ubnt_unifi', { + aliases = { + 'ubiquiti-unifi-ap-lr', + }, manifest_aliases = { 'ubiquiti-unifi', }, From a5ada094bfe4b25352f8225913dd0644c4ad66e4 Mon Sep 17 00:00:00 2001 From: "J. Burfeind" Date: Thu, 24 Mar 2022 19:21:45 +0100 Subject: [PATCH 56/67] ath79-generic: (re)add support for CPE210 v1.x (#2410) Gone due to commit 45c84a117bf8 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 1 + package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces | 1 + package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua | 1 + targets/ath79-generic | 6 ++++++ 4 files changed, 9 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 98009326..d6ca03c1 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -68,6 +68,7 @@ ath79-generic - Archer A7 (v5) - Archer C6 (v2) + - CPE210 (v1.0, v1.1) - CPE220 (v3.0) - CPE510 (v2.0) - CPE510 (v3.0) diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces index b56a1e26..fcc1fa38 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces @@ -43,6 +43,7 @@ local lan_ifname = iface_exists(lan_interfaces) local wan_ifname = iface_exists(wan_interfaces) if platform.match('ath79', 'generic', { + 'tplink,cpe210-v1', 'tplink,wbs210-v2', }) then lan_ifname, wan_ifname = wan_ifname, lan_ifname diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua index df0eda08..6c74777b 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua @@ -27,6 +27,7 @@ function M.is_outdoor_device() 'devolo,dvl1750x', 'plasmacloud,pa300', 'plasmacloud,pa300e', + 'tplink,cpe210-v1', 'tplink,cpe220-v3', 'tplink,cpe510-v2', 'tplink,cpe510-v3', diff --git a/targets/ath79-generic b/targets/ath79-generic index 41502b7e..03e0d741 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -261,6 +261,12 @@ device('tp-link-archer-d50-v1', 'tplink_archer-d50-v1', { broken = true, -- 64M ath9k + ath10k & power LED not working }) +device('tp-link-cpe210-v1', 'tplink_cpe210-v1', { + manifest_aliases = { + 'tp-link-cpe210-v1.0', -- Upgrade from OpenWrt 19.07 + 'tp-link-cpe210-v1.1', -- Upgrade from OpenWrt 19.07 + }, +}) device('tp-link-cpe220-v3', 'tplink_cpe220-v3') device('tp-link-cpe510-v2', 'tplink_cpe510-v2') device('tp-link-cpe510-v3', 'tplink_cpe510-v3') From fd8d5a3cdbd6852b800c87911861d7da52b6e6e1 Mon Sep 17 00:00:00 2001 From: "J. Burfeind" Date: Fri, 25 Mar 2022 18:21:24 +0100 Subject: [PATCH 57/67] ath79-generic: (re)add support for CPE210 v2.x (#2429) Gone due to commit 45c84a117bf8 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 2 +- package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces | 1 + package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua | 1 + targets/ath79-generic | 5 +++++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 11550b2d..b32c1a10 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -68,7 +68,7 @@ ath79-generic - Archer A7 (v5) - Archer C6 (v2) - - CPE210 (v1.0, v1.1) + - CPE210 (v1.0, v1.1, v2.0) - CPE220 (v3.0) - CPE510 (v2.0) - CPE510 (v3.0) diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces index fcc1fa38..f76ab8ce 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces @@ -44,6 +44,7 @@ local wan_ifname = iface_exists(wan_interfaces) if platform.match('ath79', 'generic', { 'tplink,cpe210-v1', + 'tplink,cpe210-v2', 'tplink,wbs210-v2', }) then lan_ifname, wan_ifname = wan_ifname, lan_ifname diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua index 6c74777b..22901aa6 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua @@ -28,6 +28,7 @@ function M.is_outdoor_device() 'plasmacloud,pa300', 'plasmacloud,pa300e', 'tplink,cpe210-v1', + 'tplink,cpe210-v2', 'tplink,cpe220-v3', 'tplink,cpe510-v2', 'tplink,cpe510-v3', diff --git a/targets/ath79-generic b/targets/ath79-generic index 7a2075b9..11b54538 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -267,6 +267,11 @@ device('tp-link-cpe210-v1', 'tplink_cpe210-v1', { 'tp-link-cpe210-v1.1', -- Upgrade from OpenWrt 19.07 }, }) +device('tp-link-cpe210-v2', 'tplink_cpe210-v2', { + manifest_aliases = { + 'tp-link-cpe210-v2.0', -- Upgrade from OpenWrt 19.07 + }, +}) device('tp-link-cpe220-v3', 'tplink_cpe220-v3') device('tp-link-cpe510-v2', 'tplink_cpe510-v2') device('tp-link-cpe510-v3', 'tplink_cpe510-v3') From d1b801b202b139a8eba6f0c0f5a772f89d526c37 Mon Sep 17 00:00:00 2001 From: "J. Burfeind" Date: Fri, 25 Mar 2022 20:37:12 +0100 Subject: [PATCH 58/67] ath79-generic: (re)add support for tl-wr1043nd-v3 (#2415) Gone due to commit 45c84a1 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 1 + targets/ath79-generic | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index b32c1a10..c852ce8f 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -75,6 +75,7 @@ ath79-generic - EAP225-Outdoor (v1) - TL-WDR3600 (v1) - TL-WDR4300 (v1) + - TL-WR1043N/ND (v3) - WBS210 (v2.0) * Ubiquiti diff --git a/targets/ath79-generic b/targets/ath79-generic index 11b54538..20aad303 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -283,6 +283,12 @@ device('tp-link-eap225-outdoor-v1', 'tplink_eap225-outdoor-v1', { device('tp-link-tl-wdr3600-v1', 'tplink_tl-wdr3600-v1') device('tp-link-tl-wdr4300-v1', 'tplink_tl-wdr4300-v1') +device('tp-link-tl-wr1043nd-v3', 'tplink_tl-wr1043nd-v3', { + manifest_aliases = { + 'tp-link-tl-wr1043n-nd-v3', -- upgrade from OpenWrt 19.07 + }, +}) + device('tp-link-wbs210-v2', 'tplink_wbs210-v2') -- Ubiquiti From 9751744797a2840dbb81fd400ebaa862d61b46ec Mon Sep 17 00:00:00 2001 From: Sebastian Schaper <36594927+s-2@users.noreply.github.com> Date: Fri, 25 Mar 2022 22:23:55 +0100 Subject: [PATCH 59/67] ath79: migrate D-Link DAP-1330 and DIR-550 from ar71xx (#2417) also add DAP-1365, which is a different case variant of DAP-1330 Signed-off-by: Sebastian Schaper --- docs/user/supported_devices.rst | 4 ++++ targets/ath79-generic | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index c852ce8f..003cdf8b 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -19,7 +19,11 @@ ath79-generic * D-Link + - DAP-1330 A1 [#lan_as_wan]_ + - DAP-1365 A1 [#lan_as_wan]_ - DAP-2660 A1 [#lan_as_wan]_ + - DIR-505 A1 [#lan_as_wan]_ + - DIR-505 A2 [#lan_as_wan]_ * Enterasys diff --git a/targets/ath79-generic b/targets/ath79-generic index 20aad303..74ed2273 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -63,11 +63,22 @@ device('devolo-wifi-pro-1750x', 'devolo_dvl1750x', { -- D-Link +device('d-link-dap-1330-a1', 'dlink_dap-1330-a1') +device('d-link-dap-1365-a1', 'dlink_dap-1365-a1') + device('d-link-dap-2660-a1', 'dlink_dap-2660-a1', { factory_ext = '.img', packages = ATH10K_PACKAGES_QCA9880, }) +device('d-link-dir-505', 'dlink_dir-505', { + factory = false, + manifest_aliases = { + 'd-link-dir-505-rev-a1', -- Upgrade from OpenWrt 19.07 + 'd-link-dir-505-rev-a2', -- Upgrade from OpenWrt 19.07 + }, +}) + -- Enterasys From 1bfad8ff02238d08cce819249fd06b268142819d Mon Sep 17 00:00:00 2001 From: "J. Burfeind" Date: Fri, 25 Mar 2022 23:39:19 +0100 Subject: [PATCH 60/67] ath79-generic: (re)add support for CPE510 v1.x (#2430) Gone due to commit 45c84a117bf8 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 1 + package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces | 1 + package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua | 1 + targets/ath79-generic | 6 ++++++ 4 files changed, 9 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 003cdf8b..a7a8be1b 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -74,6 +74,7 @@ ath79-generic - Archer C6 (v2) - CPE210 (v1.0, v1.1, v2.0) - CPE220 (v3.0) + - CPE510 (v1.0, v1.1) - CPE510 (v2.0) - CPE510 (v3.0) - EAP225-Outdoor (v1) diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces index f76ab8ce..3bd1864c 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces @@ -45,6 +45,7 @@ local wan_ifname = iface_exists(wan_interfaces) if platform.match('ath79', 'generic', { 'tplink,cpe210-v1', 'tplink,cpe210-v2', + 'tplink,cpe510-v1', 'tplink,wbs210-v2', }) then lan_ifname, wan_ifname = wan_ifname, lan_ifname diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua index 22901aa6..680f5611 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua @@ -30,6 +30,7 @@ function M.is_outdoor_device() 'tplink,cpe210-v1', 'tplink,cpe210-v2', 'tplink,cpe220-v3', + 'tplink,cpe510-v1', 'tplink,cpe510-v2', 'tplink,cpe510-v3', 'tplink,eap225-outdoor-v1', diff --git a/targets/ath79-generic b/targets/ath79-generic index 74ed2273..b2e73d53 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -284,6 +284,12 @@ device('tp-link-cpe210-v2', 'tplink_cpe210-v2', { }, }) device('tp-link-cpe220-v3', 'tplink_cpe220-v3') +device('tp-link-cpe510-v1', 'tplink_cpe510-v1', { + manifest_aliases = { + 'tp-link-cpe510-v1.0', -- upgrade from OpenWrt 19.07 + 'tp-link-cpe510-v1.1', -- upgrade from OpenWrt 19.07 + }, +}) device('tp-link-cpe510-v2', 'tplink_cpe510-v2') device('tp-link-cpe510-v3', 'tplink_cpe510-v3') From 087c15ae0c867443d196344c4dc253ebe8611cda Mon Sep 17 00:00:00 2001 From: "J. Burfeind" Date: Sat, 26 Mar 2022 10:52:35 +0100 Subject: [PATCH 61/67] ath79-generic: (re)add support for UniFi AC Mesh (#2428) Gone due to commit 45c84a117bf8 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 1 + package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua | 1 + targets/ath79-generic | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index a7a8be1b..3e485aa9 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -85,6 +85,7 @@ ath79-generic * Ubiquiti + - UniFi AC Mesh - UniFi AP - UniFi AP LR diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua index 680f5611..737cf826 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua @@ -35,6 +35,7 @@ function M.is_outdoor_device() 'tplink,cpe510-v3', 'tplink,eap225-outdoor-v1', 'tplink,wbs210-v2', + 'ubnt,unifiac-mesh', }) then return true diff --git a/targets/ath79-generic b/targets/ath79-generic index b2e73d53..f23738d8 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -310,6 +310,11 @@ device('tp-link-wbs210-v2', 'tplink_wbs210-v2') -- Ubiquiti +device('ubiquiti-unifi-ac-mesh', 'ubnt_unifiac-mesh', { + factory = false, + packages = ATH10K_PACKAGES_QCA9880, +}) + device('ubiquiti-unifi-ap', 'ubnt_unifi', { aliases = { 'ubiquiti-unifi-ap-lr', From 39c3c7adf3f47c39e48ecff3304c5f526e909fbc Mon Sep 17 00:00:00 2001 From: "J. Burfeind" Date: Sat, 26 Mar 2022 11:11:32 +0100 Subject: [PATCH 62/67] ath79-generic: (re)add support for UniFi AP PRO (#2416) Ubiquiti UniFi AP PRO Gone due to commit 45c84a1 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 1 + package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces | 1 + .../luasrc/lib/gluon/upgrade/320-setup-ifname | 6 +++++- targets/ath79-generic | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 3e485aa9..5ecee37a 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -88,6 +88,7 @@ ath79-generic - UniFi AC Mesh - UniFi AP - UniFi AP LR + - UniFi AP PRO ath79-nand ---------- diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces index 3bd1864c..25542d19 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces @@ -47,6 +47,7 @@ if platform.match('ath79', 'generic', { 'tplink,cpe210-v2', 'tplink,cpe510-v1', 'tplink,wbs210-v2', + 'ubnt,unifi-ap-pro', }) then lan_ifname, wan_ifname = wan_ifname, lan_ifname elseif platform.match('lantiq') then diff --git a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname b/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname index 145d371e..195663dd 100755 --- a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname +++ b/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname @@ -3,7 +3,11 @@ local platform = require 'gluon.platform' local sysconfig = require 'gluon.sysconfig' -if platform.is_outdoor_device() then +if platform.is_outdoor_device() or + platform.match('ath79', 'generic', { + 'ubnt,unifi-ap-pro', + }) +then sysconfig.setup_ifname = sysconfig.single_ifname or sysconfig.wan_ifname else sysconfig.setup_ifname = sysconfig.single_ifname or sysconfig.lan_ifname diff --git a/targets/ath79-generic b/targets/ath79-generic index f23738d8..5dceddfd 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -323,3 +323,5 @@ device('ubiquiti-unifi-ap', 'ubnt_unifi', { 'ubiquiti-unifi', }, }) + +device('ubiquiti-unifi-ap-pro', 'ubnt_unifi-ap-pro') From f19cec2df42f57a277d1d475f9c62a9db1455e59 Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Sat, 26 Mar 2022 12:44:29 +0100 Subject: [PATCH 63/67] modules: update openwrt 30e6f28853 ath79: fix TPLINK_HWREV field for TL-WR1043ND v4 --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index da06aa08..d1d95209 100644 --- a/modules +++ b/modules @@ -2,7 +2,7 @@ GLUON_FEEDS='packages routing gluon' OPENWRT_REPO=https://github.com/openwrt/openwrt.git OPENWRT_BRANCH=openwrt-21.02 -OPENWRT_COMMIT=f65edc9b990c2bcc10c9e9fca29253adc6fe316d +OPENWRT_COMMIT=30e6f288531fce02c67e7f391f28021ca5ddf065 PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git PACKAGES_PACKAGES_BRANCH=openwrt-21.02 From 00510b0ee99138c12f8f366a3fafc65ec8c92af9 Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Sat, 26 Mar 2022 12:44:39 +0100 Subject: [PATCH 64/67] modules: update packages ee69afe6f nano: provide nano-full with most features enabled 951ef6747 netatalk: update to version 3.1.13 --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index d1d95209..e15d0787 100644 --- a/modules +++ b/modules @@ -6,7 +6,7 @@ OPENWRT_COMMIT=30e6f288531fce02c67e7f391f28021ca5ddf065 PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git PACKAGES_PACKAGES_BRANCH=openwrt-21.02 -PACKAGES_PACKAGES_COMMIT=08a442fe9f7bc2bf1a967d702514c0e136ecde08 +PACKAGES_PACKAGES_COMMIT=ee69afe6f1c0ff9d257b5478ae6d50b18e023519 PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git PACKAGES_ROUTING_BRANCH=openwrt-21.02 From 4ea3478ba0011665026fa3ceb1dcd9252d1f80c4 Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Fri, 25 Mar 2022 13:33:42 +0100 Subject: [PATCH 65/67] ath79-generic: (re)add support for tl-wr1043nd-v4 Gone due to commit 45c84a117bf8 ("ar71xx: drop target") --- docs/user/supported_devices.rst | 2 +- targets/ath79-generic | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 5ecee37a..5f59b263 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -80,7 +80,7 @@ ath79-generic - EAP225-Outdoor (v1) - TL-WDR3600 (v1) - TL-WDR4300 (v1) - - TL-WR1043N/ND (v3) + - TL-WR1043N/ND (v3, v4) - WBS210 (v2.0) * Ubiquiti diff --git a/targets/ath79-generic b/targets/ath79-generic index 5dceddfd..4cd7f7fe 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -305,6 +305,11 @@ device('tp-link-tl-wr1043nd-v3', 'tplink_tl-wr1043nd-v3', { 'tp-link-tl-wr1043n-nd-v3', -- upgrade from OpenWrt 19.07 }, }) +device('tp-link-tl-wr1043nd-v4', 'tplink_tl-wr1043nd-v4', { + manifest_aliases = { + 'tp-link-tl-wr1043n-nd-v4', -- upgrade from OpenWrt 19.07 + }, +}) device('tp-link-wbs210-v2', 'tplink_wbs210-v2') From e60b3eb386e1df3d48ee0f0bf8fe4cccbfe2397a Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 26 Mar 2022 22:43:42 +0100 Subject: [PATCH 66/67] modules: update to latest version (#2433) * modules: update openwrt cd17ca7d6f ath79: fix link for long cables with OCEDO Raccoon * modules: update routing 7c7d11e olsrd: set lqm via ipc --- modules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules b/modules index e15d0787..27efc295 100644 --- a/modules +++ b/modules @@ -2,7 +2,7 @@ GLUON_FEEDS='packages routing gluon' OPENWRT_REPO=https://github.com/openwrt/openwrt.git OPENWRT_BRANCH=openwrt-21.02 -OPENWRT_COMMIT=30e6f288531fce02c67e7f391f28021ca5ddf065 +OPENWRT_COMMIT=cd17ca7d6f305ff93ee5436b883bc5ad3767e3a7 PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git PACKAGES_PACKAGES_BRANCH=openwrt-21.02 @@ -10,7 +10,7 @@ PACKAGES_PACKAGES_COMMIT=ee69afe6f1c0ff9d257b5478ae6d50b18e023519 PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git PACKAGES_ROUTING_BRANCH=openwrt-21.02 -PACKAGES_ROUTING_COMMIT=fc0b140689271efcd913059826b6f9567da2a3e0 +PACKAGES_ROUTING_COMMIT=7c7d11e2904494820d5c28249bff8abd46493184 PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git PACKAGES_GLUON_COMMIT=308166e3c6b2d571606dd1dbfadd2bb8e31d8f90 From 8fdda51f9801db26962606c8b809f99f6dc0608d Mon Sep 17 00:00:00 2001 From: "Manu.WTF" <43337106+Dark4MD@users.noreply.github.com> Date: Tue, 29 Mar 2022 17:54:08 +0200 Subject: [PATCH 67/67] ath79-generic: (re)add support for archer-c7-v2 (#2437) --- docs/user/supported_devices.rst | 1 + targets/ath79-generic | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index 5f59b263..035b5819 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -72,6 +72,7 @@ ath79-generic - Archer A7 (v5) - Archer C6 (v2) + - Archer C7 (v2) - CPE210 (v1.0, v1.1, v2.0) - CPE220 (v3.0) - CPE510 (v1.0, v1.1) diff --git a/targets/ath79-generic b/targets/ath79-generic index 4cd7f7fe..0bd73699 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -266,6 +266,10 @@ device('tp-link-archer-c6-v2', 'tplink_archer-c6-v2', { packages = ATH10K_PACKAGES_QCA9888, }) +device('tp-link-archer-c7-v2', 'tplink_archer-c7-v2', { + packages = ATH10K_PACKAGES_QCA9880, +}) + device('tp-link-archer-d50-v1', 'tplink_archer-d50-v1', { packages = ATH10K_PACKAGES_QCA9880, factory = false,