From 685e979d470a09361defe1612b001dfc3b7d9832 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 5 Nov 2024 20:03:39 +0100 Subject: [PATCH 01/17] fritz-tools: fix mixed indentation Signed-off-by: David Bauer --- .../utils/fritz-tools/src/fritz_cal_extract.c | 140 +++++++++--------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/package/utils/fritz-tools/src/fritz_cal_extract.c b/package/utils/fritz-tools/src/fritz_cal_extract.c index 2978d86e0c..9899cd53c3 100644 --- a/package/utils/fritz-tools/src/fritz_cal_extract.c +++ b/package/utils/fritz-tools/src/fritz_cal_extract.c @@ -48,86 +48,86 @@ static inline size_t special_min(size_t a, size_t b) is an error reading or writing the files. */ static int inf(FILE *source, FILE *dest, size_t limit, size_t skip) { - int ret; - size_t have; - z_stream strm; - unsigned char in[CHUNK]; - unsigned char out[CHUNK]; + int ret; + size_t have; + z_stream strm; + unsigned char in[CHUNK]; + unsigned char out[CHUNK]; - /* allocate inflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); - if (ret != Z_OK) - return ret; + /* allocate inflate state */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit(&strm); + if (ret != Z_OK) + return ret; - /* decompress until deflate stream ends or end of file */ - do { - strm.avail_in = fread(in, 1, CHUNK, source); - if (ferror(source)) { - (void)inflateEnd(&strm); - return Z_ERRNO; - } - if (strm.avail_in == 0) - break; - strm.next_in = in; + /* decompress until deflate stream ends or end of file */ + do { + strm.avail_in = fread(in, 1, CHUNK, source); + if (ferror(source)) { + (void)inflateEnd(&strm); + return Z_ERRNO; + } + if (strm.avail_in == 0) + break; + strm.next_in = in; - /* run inflate() on input until output buffer not full */ - do { - strm.avail_out = CHUNK; - strm.next_out = out; - ret = inflate(&strm, Z_NO_FLUSH); - assert(ret != Z_STREAM_ERROR); /* state not clobbered */ - switch (ret) { - case Z_NEED_DICT: - ret = Z_DATA_ERROR; /* and fall through */ - case Z_DATA_ERROR: - case Z_MEM_ERROR: - (void)inflateEnd(&strm); - return ret; - } - have = special_min(limit, CHUNK - strm.avail_out) - skip; - if (fwrite(&out[skip], have, 1, dest) != 1 || ferror(dest)) { - (void)inflateEnd(&strm); - return Z_ERRNO; - } - skip = 0; - limit -= have; - } while (strm.avail_out == 0 && limit > 0); + /* run inflate() on input until output buffer not full */ + do { + strm.avail_out = CHUNK; + strm.next_out = out; + ret = inflate(&strm, Z_NO_FLUSH); + assert(ret != Z_STREAM_ERROR); /* state not clobbered */ + switch (ret) { + case Z_NEED_DICT: + ret = Z_DATA_ERROR; /* and fall through */ + case Z_DATA_ERROR: + case Z_MEM_ERROR: + (void)inflateEnd(&strm); + return ret; + } + have = special_min(limit, CHUNK - strm.avail_out) - skip; + if (fwrite(&out[skip], have, 1, dest) != 1 || ferror(dest)) { + (void)inflateEnd(&strm); + return Z_ERRNO; + } + skip = 0; + limit -= have; + } while (strm.avail_out == 0 && limit > 0); - /* done when inflate() says it's done */ - } while (ret != Z_STREAM_END && limit > 0); + /* done when inflate() says it's done */ + } while (ret != Z_STREAM_END && limit > 0); - /* clean up and return */ - (void)inflateEnd(&strm); - return (limit == 0 ? Z_OK : (ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR)); + /* clean up and return */ + (void)inflateEnd(&strm); + return (limit == 0 ? Z_OK : (ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR)); } /* report a zlib or i/o error */ static void zerr(int ret) { - switch (ret) { - case Z_ERRNO: - if (ferror(stdin)) - fputs("error reading stdin\n", stderr); - if (ferror(stdout)) - fputs("error writing stdout\n", stderr); - break; - case Z_STREAM_ERROR: - fputs("invalid compression level\n", stderr); - break; - case Z_DATA_ERROR: - fputs("invalid or incomplete deflate data\n", stderr); - break; - case Z_MEM_ERROR: - fputs("out of memory\n", stderr); - break; - case Z_VERSION_ERROR: - fputs("zlib version mismatch!\n", stderr); - } + switch (ret) { + case Z_ERRNO: + if (ferror(stdin)) + fputs("error reading stdin\n", stderr); + if (ferror(stdout)) + fputs("error writing stdout\n", stderr); + break; + case Z_STREAM_ERROR: + fputs("invalid compression level\n", stderr); + break; + case Z_DATA_ERROR: + fputs("invalid or incomplete deflate data\n", stderr); + break; + case Z_MEM_ERROR: + fputs("out of memory\n", stderr); + break; + case Z_VERSION_ERROR: + fputs("zlib version mismatch!\n", stderr); + } } static unsigned int get_num(char *str) From 09a8b4920cf117942561237d639d5101283a53c4 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 6 Nov 2024 10:38:20 +0100 Subject: [PATCH 02/17] procd: update to Git HEAD (2024-11-06) 109fa41b2321 system: fix description value from os-release Signed-off-by: Christian Marangi --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index e07f3ec81d..86de4babfd 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_MIRROR_HASH:=3d15a68fb614c4d7e129dc1bbe8a79adcb3115753c2fc95a36fd03855efc7a58 -PKG_SOURCE_DATE:=2024-10-20 -PKG_SOURCE_VERSION:=ef3ab8bc8fb18216793dd0c8106dd222c560453a +PKG_MIRROR_HASH:=0f494faf2811af6cd7332acda8049ad9713dcabc4b2885dc14acbd9f61920be1 +PKG_SOURCE_DATE:=2024-11-06 +PKG_SOURCE_VERSION:=109fa41b2321506280397e03757976c468832668 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From e29bc67f9d8451d3baf80da9358b3a01dc4b20b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 6 Nov 2024 10:00:56 +0100 Subject: [PATCH 03/17] kernel: r8125: update to v9.014.01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: https://github.com/openwrt/rtl8125/compare/9.013.02...9.014.01 Signed-off-by: Álvaro Fernández Rojas --- package/kernel/r8125/Makefile | 6 ++--- .../100-r8125_rss-silence-rxnfc-log.patch | 26 ------------------- ...125-print-link-speed-and-duplex-mode.patch | 10 +++---- 3 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 package/kernel/r8125/patches/100-r8125_rss-silence-rxnfc-log.patch diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile index ef95b52e67..647630393a 100644 --- a/package/kernel/r8125/Makefile +++ b/package/kernel/r8125/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8125 -PKG_VERSION:=9.013.02 -PKG_RELEASE:=4 +PKG_VERSION:=9.014.01 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION) -PKG_HASH:=d36410ee99c956f250d9cd08340d8c36567d190f420a8ee128ff6e51225aac0c +PKG_HASH:=f006aa95501738ca55c522812c9d1b473ac781675f3ad88ce341a09316b8aa13 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPLv2 diff --git a/package/kernel/r8125/patches/100-r8125_rss-silence-rxnfc-log.patch b/package/kernel/r8125/patches/100-r8125_rss-silence-rxnfc-log.patch deleted file mode 100644 index 58eb470037..0000000000 --- a/package/kernel/r8125/patches/100-r8125_rss-silence-rxnfc-log.patch +++ /dev/null @@ -1,26 +0,0 @@ -From cd20cf48c0ec2a01fd9f512e25218a6ac8131794 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Sat, 17 Aug 2024 22:07:23 +0200 -Subject: [PATCH] r8125_rss: silence rxnfc log -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This log is noisy and useless, just ignore it. - -Signed-off-by: Chukun Pan ---- - src/r8125_rss.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/r8125_rss.c -+++ b/src/r8125_rss.c -@@ -91,7 +91,7 @@ int rtl8125_get_rxnfc(struct net_device - struct rtl8125_private *tp = netdev_priv(dev); - int ret = -EOPNOTSUPP; - -- netif_info(tp, drv, tp->dev, "rss get rxnfc\n"); -+ netif_dbg(tp, drv, tp->dev, "rss get rxnfc\n"); - - if (!(dev->features & NETIF_F_RXHASH)) - return ret; diff --git a/package/kernel/r8125/patches/200-r8125-print-link-speed-and-duplex-mode.patch b/package/kernel/r8125/patches/200-r8125-print-link-speed-and-duplex-mode.patch index df649c9ae9..a3b3562149 100644 --- a/package/kernel/r8125/patches/200-r8125-print-link-speed-and-duplex-mode.patch +++ b/package/kernel/r8125/patches/200-r8125-print-link-speed-and-duplex-mode.patch @@ -18,7 +18,7 @@ Signed-off-by: Álvaro Fernández Rojas --- a/src/r8125.h +++ b/src/r8125.h -@@ -1563,6 +1563,8 @@ enum RTL8125_register_content { +@@ -1672,6 +1672,8 @@ enum RTL8125_register_content { LinkStatus = 0x02, FullDup = 0x01, @@ -37,7 +37,7 @@ Signed-off-by: Álvaro Fernández Rojas #include #include #include -@@ -5112,6 +5113,38 @@ rtl8125_link_down_patch(struct net_devic +@@ -5116,6 +5117,38 @@ rtl8125_link_down_patch(struct net_devic #endif } @@ -74,10 +74,10 @@ Signed-off-by: Álvaro Fernández Rojas +} + static void - _rtl8125_check_link_status(struct net_device *dev) + _rtl8125_check_link_status(struct net_device *dev, unsigned int link_state) { -@@ -5120,11 +5153,18 @@ _rtl8125_check_link_status(struct net_de - if (tp->link_ok(dev)) { +@@ -5128,11 +5161,18 @@ _rtl8125_check_link_status(struct net_de + if (link_state == R8125_LINK_STATE_ON) { rtl8125_link_on_patch(dev); - if (netif_msg_ifup(tp)) From 6691ff86b70a44ea6683aad85a0fc76fd03417b8 Mon Sep 17 00:00:00 2001 From: Edward Chow Date: Tue, 5 Mar 2024 01:24:10 +0800 Subject: [PATCH 04/17] ath79: linksys_ea4500-v3: take over the space for user data The last "syscfg" partition of the OEM firmware turns out to be a UBIFS used to store user data, just as the "rootfs_data" of OpenWrt, so it should be reasonable to absorb it into the "ubi" partition. Factory installations via either OEM firmware or tftp, or by forcibly flashing factory image to mtd5 (firmware) partition with mtd tool are confirmed working, but the UBI remaining inside "syscfg" partition could break upgrade. Fortunately, installing kmod-mtd-rw and erasing "syscfg" partition before upgrade is confirmed working, in which case, "ubi" will automatically expand to the blank space once occupied by the former mtd8 (syscfg), with the total block number increased, but the UBIFS for rootfs_data will not automatically claim the newly available space (since it is created when mtd8 still exists, and sysupgrade does not set "autoresize" flag to rootfs_data). These space will be claimed during the next upgrade, when rootfs_data is removed and created again. Fixes: 50f727b7737d1 ("ath79: add support for Linksys EA4500 v3") Signed-off-by: Edward Chow Link: https://github.com/openwrt/openwrt/pull/14791 Signed-off-by: Robert Marko --- target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts | 10 +++++----- target/linux/ath79/image/nand.mk | 8 +++++++- .../nand/base-files/etc/board.d/05_compat-version | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts b/target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts index 6c799efe33..1da46d7214 100644 --- a/target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts +++ b/target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts @@ -123,7 +123,7 @@ partition@2c0000 { label = "firmware"; - reg = <0x2c0000 0x5000000>; + reg = <0x2c0000 0x7d40000>; compatible = "fixed-partitions"; #address-cells = <1>; @@ -136,7 +136,7 @@ partition@400000 { label = "ubi"; - reg = <0x400000 0x4c00000>; + reg = <0x400000 0x7940000>; }; /* Original layout for secondary partitions */ @@ -151,11 +151,11 @@ }; */ }; - partition@52c0000 { + /* Original layout for user data partition */ + /* partition@52c0000 { label = "syscfg"; reg = <0x52c0000 0x2d40000>; - read-only; - }; + }; */ }; }; diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index a3bdedaf6d..d3c1120aa2 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -281,6 +281,12 @@ TARGET_DEVICES += glinet_gl-x1200-nor define Device/linksys_ea4500-v3 SOC := qca9558 + DEVICE_COMPAT_VERSION := 1.1 + DEVICE_COMPAT_MESSAGE := Partition table has been changed. Please \ + install kmod-mtd-rw and erase mtd8 (syscfg) before upgrade \ + to keep configures, or forcibly flash factory image to mtd5 \ + (firmware) partition with mtd tool to discard configures but \ + claim additional space immediately. DEVICE_VENDOR := Linksys DEVICE_MODEL := EA4500 DEVICE_VARIANT := v3 @@ -288,7 +294,7 @@ define Device/linksys_ea4500-v3 BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k - IMAGE_SIZE := 81920k + IMAGE_SIZE := 128256k IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata LINKSYS_HWNAME := EA4500V3 IMAGES += factory.img diff --git a/target/linux/ath79/nand/base-files/etc/board.d/05_compat-version b/target/linux/ath79/nand/base-files/etc/board.d/05_compat-version index 238927aa7b..4d826d978d 100644 --- a/target/linux/ath79/nand/base-files/etc/board.d/05_compat-version +++ b/target/linux/ath79/nand/base-files/etc/board.d/05_compat-version @@ -4,6 +4,7 @@ board_config_update case "$(board_name)" in + linksys,ea4500-v3|\ netgear,wndr4300-v2|\ netgear,wndr4500-v3) ucidef_set_compat_version "1.1" From 0a7b7ef27cfc00521a0f99de073a7168f1b79e8f Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 2 Nov 2024 20:22:35 +0000 Subject: [PATCH 05/17] kernel: modules: package driver for generic MIPI DBI TFT panels Package kmod-drm-panel-mipi-dbi as well as modules it depends on in order to support a wide range of MIPI DBI complaint SPI-connected TFT panels. See https://github.com/notro/panel-mipi-dbi/ for more information on how to use specific panels. Signed-off-by: Daniel Golle --- package/kernel/linux/modules/video.mk | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index 52fc55bbad..8b4585a624 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -311,6 +311,38 @@ endef $(eval $(call KernelPackage,drm-exec)) +define KernelPackage/drm-dma-helper + SUBMENU:=$(VIDEO_MENU) + HIDDEN:=1 + TITLE:=GEM DMA helper functions + DEPENDS:=@DISPLAY_SUPPORT +kmod-drm-kms-helper + KCONFIG:=CONFIG_DRM_GEM_DMA_HELPER + FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm_dma_helper.ko + AUTOLOAD:=$(call AutoProbe,drm_dma_helper) +endef + +define KernelPackage/drm-dma-helper/description + GEM DMA helper functions. +endef + +$(eval $(call KernelPackage,drm-dma-helper)) + +define KernelPackage/drm-mipi-dbi + SUBMENU:=$(VIDEO_MENU) + HIDDEN:=1 + TITLE:=MIPI DBI helpers + DEPENDS:=@DISPLAY_SUPPORT +kmod-backlight +kmod-drm-kms-helper + KCONFIG:=CONFIG_DRM_MIPI_DBI + FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm_mipi_dbi.ko + AUTOLOAD:=$(call AutoProbe,drm_mipi_dbi) +endef + +define KernelPackage/drm-mipi-dbi/description + MIPI Display Bus Interface (DBI) LCD controller support. +endef + +$(eval $(call KernelPackage,drm-mipi-dbi)) + define KernelPackage/drm-ttm SUBMENU:=$(VIDEO_MENU) TITLE:=GPU memory management subsystem @@ -484,6 +516,24 @@ endef $(eval $(call KernelPackage,drm-imx-ldb)) +define KernelPackage/drm-panel-mipi-dbi + SUBMENU:=$(VIDEO_MENU) + TITLE:=Generic MIPI DBI LCD panel + DEPENDS:=+kmod-drm-mipi-dbi +kmod-drm-dma-helper + KCONFIG:=CONFIG_DRM_PANEL_MIPI_DBI \ + CONFIG_DRM_FBDEV_EMULATION=y \ + CONFIG_DRM_FBDEV_OVERALLOC=100 + FILES:= \ + $(LINUX_DIR)/drivers/gpu/drm/tiny/panel-mipi-dbi.ko + AUTOLOAD:=$(call AutoProbe,panel-mipi-dbi) +endef + +define KernelPackage/drm-panel-mipi-dbi/description + Generic driver for MIPI Alliance Display Bus Interface +endef + +$(eval $(call KernelPackage,drm-panel-mipi-dbi)) + define KernelPackage/drm-radeon SUBMENU:=$(VIDEO_MENU) TITLE:=Radeon DRM support From a3ec35cadb77265c0e00c8d3789734586a6f7111 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 8 Nov 2024 09:13:54 +0100 Subject: [PATCH 06/17] wifi-scripts: add free-form "tags" array option for wifi-iface This allows annotating wifi interfaces in the config in a way that can be queried through wifi status. One example use case is to mark wifi interfaces for use with specific services without having to explicitly reference the (often unnamed) sections from elsewhere. Signed-off-by: Felix Fietkau --- .../config/wifi-scripts/files/lib/netifd/netifd-wireless.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/package/network/config/wifi-scripts/files/lib/netifd/netifd-wireless.sh b/package/network/config/wifi-scripts/files/lib/netifd/netifd-wireless.sh index 5b852e0937..c3772bb443 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/netifd-wireless.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/netifd-wireless.sh @@ -379,6 +379,7 @@ _wdev_common_device_config() { _wdev_common_iface_config() { config_add_string mode ssid encryption 'key:wpakey' config_add_boolean bridge_isolate + config_add_array tags } _wdev_common_vlan_config() { From 5f68e243338a653f44f079acc001de369aa42efa Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 8 Nov 2024 10:50:39 +0100 Subject: [PATCH 07/17] netifd: update to Git HEAD (2024-11-08) e93f6c3fc729 main: fix format string related warnings for log/debug printf functions 6ab44a2413f9 fix signed/unsigned comparison warnings 4fe997b61d7d system-dummy: add system_if_apply_settings_after_up 992d33cb42a6 ubus: add notifications on wireless device state changes 34eb11eb6f5c device/interface: add "tags" attribute from config to status dump Signed-off-by: Felix Fietkau --- package/network/config/netifd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 771d7dadaf..a4400c9516 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2024-10-06 -PKG_SOURCE_VERSION:=3c6265fdbd02ebd35fa3e7a58d6dfeed081a09d7 -PKG_MIRROR_HASH:=00b01243b99995dc52a047e5663cf5c7732f8defd6b726f73ac15e142b02b4fa +PKG_SOURCE_DATE:=2024-11-08 +PKG_SOURCE_VERSION:=34eb11eb6f5c62de480d6192f0ca840093127fee +PKG_MIRROR_HASH:=c4c2bc626426d2cd73c9ece54b22ada6ed6254afa992f51b8725312aca240cfd PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 From dc51c4355d48e91ed8fd06d70f0bf71b0b4bc4d2 Mon Sep 17 00:00:00 2001 From: Tim Lunn Date: Wed, 17 Apr 2024 10:49:49 +1000 Subject: [PATCH 08/17] rampis: mt7621: Convert Edgerouter-X dts to single kernel config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OEM layout for Edgerouter X provides for two 3MB kernel slots. As of linux 6.1 the kernel images no longer fit and as such Edgerouter X builds have been disabled in Main. Revise the layout to make kernel1 slot 6MB and drop kernel2 slot. This patch applies the required changes to the dts file. Signed-off-by: Tim Lunn Tested-by: Mauri Sandberg Link: https://github.com/openwrt/openwrt/pull/15194 Signed-off-by: Petr Štetiar --- target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi index 0902ad56b9..dc9908ba34 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi @@ -100,13 +100,8 @@ }; partition@140000 { - label = "kernel1"; - reg = <0x140000 0x300000>; - }; - - partition@440000 { - label = "kernel2"; - reg = <0x440000 0x300000>; + label = "kernel"; + reg = <0x140000 0x600000>; }; partition@740000 { From 5e355f1f9084c1b6de3151fbcde948d736292d6c Mon Sep 17 00:00:00 2001 From: Tim Lunn Date: Wed, 17 Apr 2024 12:51:22 +1000 Subject: [PATCH 09/17] rampis: mt7621: Edgerouter-X disable toggling of kernel slots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uboot selects which kernel slot to boot based on a flag in the factory mtd partition. Patch ubnt.sh to ensure always flash to kernel1 slot and update flag if required. Signed-off-by: Tim Lunn Tested-by: Mauri Sandberg Link: https://github.com/openwrt/openwrt/pull/15194 Signed-off-by: Petr Štetiar --- .../mt7621/base-files/lib/upgrade/ubnt.sh | 39 ++++--------------- 1 file changed, 7 insertions(+), 32 deletions(-) diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/ubnt.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/ubnt.sh index 748ec8e628..7e9d937d79 100644 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/ubnt.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/ubnt.sh @@ -8,32 +8,16 @@ UBNT_ERX_KERNEL_INDEX_OFFSET=160 -ubnt_get_target_kernel() { +ubnt_update_kernel_flag() { local factory_mtd=$1 - local current_kernel_index=$(hexdump -s $UBNT_ERX_KERNEL_INDEX_OFFSET -n 1 -e '/1 "%X "' ${factory_mtd}) + local kernel_index=$(hexdump -s $UBNT_ERX_KERNEL_INDEX_OFFSET -n 1 -e '/1 "%X "' ${factory_mtd}) - if [ $current_kernel_index == "0" ]; then - echo 'kernel2' - elif [ $current_kernel_index == "1" ]; then - echo 'kernel1' - fi -} - -ubnt_update_target_kernel() { - local factory_mtd=$1 - local kernel_part=$2 - - local new_kernel_index - if [ $kernel_part == "kernel1" ]; then - new_kernel_index="\x00" - elif [ $kernel_part == "kernel2" ]; then - new_kernel_index="\x01" - else - echo 'Unknown kernel image index' >&2 - return 1 + if [ $kernel_index = "0" ]; then + echo "Kernel flag already set to kernel slot 1" + return 0 fi - if ! (echo -e $new_kernel_index | dd of=${factory_mtd} bs=1 count=1 seek=$UBNT_ERX_KERNEL_INDEX_OFFSET); then + if ! (echo -e "\x00" | dd of=${factory_mtd} bs=1 count=1 seek=$UBNT_ERX_KERNEL_INDEX_OFFSET); then echo 'Failed to update kernel bootup index' >&2 return 1 fi @@ -46,15 +30,6 @@ platform_upgrade_ubnt_erx() { exit 1 fi - local kernel_part="$(ubnt_get_target_kernel ${factory_mtd})" - if [ -z "$kernel_part" ]; then - echo "cannot find factory partition" >&2 - exit 1 - fi - - # This is a global defined in nand.sh, sets partition kernel will be flashed into - CI_KERNPART=${kernel_part} - #Remove volume possibly left over from stock firmware local ubidev="$( nand_find_ubi "$CI_UBIPART" )" if [ -z "$ubidev" ]; then @@ -72,7 +47,7 @@ platform_upgrade_ubnt_erx() { [ -n "$troot_ubivol" ] && ubirmvol /dev/$ubidev -N troot || true fi - ubnt_update_target_kernel ${factory_mtd} ${kernel_part} || exit 1 + ubnt_update_kernel_flag ${factory_mtd} || exit 1 nand_do_upgrade "$1" } From 09a6bffb6e0a714f20d71043ae8382af4c5925b6 Mon Sep 17 00:00:00 2001 From: Tim Lunn Date: Wed, 17 Apr 2024 10:51:35 +1000 Subject: [PATCH 10/17] rampis: mt7621: resize Edgerouter-X kernel size to 6MB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the updated partition layout set in dts, set the KERNEL_SIZE parameter to 6MB allowing builds of Linux 6.1 and later to fit. Signed-off-by: Tim Lunn Tested-by: Mauri Sandberg Link: https://github.com/openwrt/openwrt/pull/15194 Signed-off-by: Petr Štetiar --- target/linux/ramips/image/mt7621.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 9654e237a8..27adb06bf7 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -2860,7 +2860,7 @@ define Device/ubnt_edgerouter_common DEVICE_VENDOR := Ubiquiti IMAGE_SIZE := 256768k FILESYSTEMS := squashfs - KERNEL_SIZE := 3145728 + KERNEL_SIZE := 6144k KERNEL_INITRAMFS := $$(KERNEL) | \ ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata From 70c371d91cda300d7c655f019cb2076d2dd537fb Mon Sep 17 00:00:00 2001 From: Tim Lunn Date: Thu, 18 Apr 2024 10:56:07 +1000 Subject: [PATCH 11/17] rampis: mt7621: Edgerouter-X set compat version message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refer user to the wiki page for instructions on how to migrate to the new kernel layout. Signed-off-by: Tim Lunn Tested-by: Mauri Sandberg Link: https://github.com/openwrt/openwrt/pull/15194 Signed-off-by: Petr Štetiar --- target/linux/ramips/image/mt7621.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 27adb06bf7..f4dacba894 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -2865,6 +2865,10 @@ define Device/ubnt_edgerouter_common ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_PACKAGES += -wpad-basic-mbedtls -uboot-envtools + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := Partition table has been changed due to kernel size restrictions. \ + Refer to the wiki page for instructions to migrate to the new layout: \ + https://openwrt.org/toh/ubiquiti/edgerouter_x_er-x_ka DEFAULT := n endef From 1bdbd511b27017157e92ffe128e66853d169dcbf Mon Sep 17 00:00:00 2001 From: Tim Lunn Date: Thu, 18 Apr 2024 10:57:17 +1000 Subject: [PATCH 12/17] rampis: mt7621: Edgerouter-X update compat version to 2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use compat version to indicate that the new layout for larger kernels is in place. This handled by the patch to ubnt.sh to always select the kernel1 slot for flashing and as active kernel slot. Signed-off-by: Tim Lunn Tested-by: Mauri Sandberg Link: https://github.com/openwrt/openwrt/pull/15194 Signed-off-by: Petr Štetiar --- .../ramips/mt7621/base-files/etc/board.d/05_compat-version | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/05_compat-version b/target/linux/ramips/mt7621/base-files/etc/board.d/05_compat-version index acc69021d0..156fb1735e 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/05_compat-version +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/05_compat-version @@ -8,6 +8,8 @@ board_config_update case "$(board_name)" in + ubnt,edgerouter-x|\ + ubnt,edgerouter-x-sfp|\ iptime,ax2004m) ucidef_set_compat_version "2.0" ;; From 71b4842e3bdaed91cd2daa4b28a208559c3de7c6 Mon Sep 17 00:00:00 2001 From: Tim Lunn Date: Thu, 18 Apr 2024 10:53:54 +1000 Subject: [PATCH 13/17] rampis: mt7621: Re-enable Edgerouter-X image builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the new layout providing 6MB for kernel there will be no issues with kernel size affecting build of images. Re-enable image builds for Edgerouter-X and X-SFP. Signed-off-by: Tim Lunn Tested-by: Mauri Sandberg Link: https://github.com/openwrt/openwrt/pull/15194 Signed-off-by: Petr Štetiar --- target/linux/ramips/image/mt7621.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index f4dacba894..b9692c5f3a 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -2869,7 +2869,6 @@ define Device/ubnt_edgerouter_common DEVICE_COMPAT_MESSAGE := Partition table has been changed due to kernel size restrictions. \ Refer to the wiki page for instructions to migrate to the new layout: \ https://openwrt.org/toh/ubiquiti/edgerouter_x_er-x_ka - DEFAULT := n endef define Device/ubnt_edgerouter-x From 4d90b79704efba57ab158c47ae6936ce4c1ef185 Mon Sep 17 00:00:00 2001 From: Tim Lunn Date: Fri, 19 Apr 2024 22:16:11 +1000 Subject: [PATCH 14/17] ramips: mt7621: Edgerouter-X drop factory image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Edgerouter-X factory images have not built automatically since 19.x due to images being over 3MB. While it was possible to build custom images with very stripped down config, this is no longer possible with the size increases of linux 6.1 and 6.6. Drop code for generation of factory images, if some dev later wishes to try custom images they can revert this commit. Signed-off-by: Tim Lunn Link: https://github.com/openwrt/openwrt/pull/15194 Signed-off-by: Petr Štetiar --- target/linux/ramips/image/mt7621.mk | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index b9692c5f3a..bebe40c216 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -229,30 +229,6 @@ define Build/belkin-header mv $@.new $@ endef -define Build/ubnt-erx-factory-image - if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \ - echo '21001:7' > $(1).compat; \ - $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \ - \ - $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \ - $(MKHASH) md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \ - $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \ - \ - echo "dummy" > $(1).rootfs; \ - $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \ - \ - $(MKHASH) md5 $(1).rootfs > $(1).md5; \ - $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \ - \ - echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \ - $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \ - \ - $(CP) $(1) $(BIN_DIR)/; \ - else \ - echo "WARNING: initramfs kernel image too big, cannot generate factory image (actual $$(stat -c%s $@); max $(KERNEL_SIZE))" >&2; \ - fi -endef - define Build/zytrx-header $(eval board=$(word 1,$(1))) $(eval version=$(word 2,$(1))) @@ -2861,8 +2837,6 @@ define Device/ubnt_edgerouter_common IMAGE_SIZE := 256768k FILESYSTEMS := squashfs KERNEL_SIZE := 6144k - KERNEL_INITRAMFS := $$(KERNEL) | \ - ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_PACKAGES += -wpad-basic-mbedtls -uboot-envtools DEVICE_COMPAT_VERSION := 2.0 From 5b406bccaccadb494cad139b3f69e17ab62d3968 Mon Sep 17 00:00:00 2001 From: Tim Lunn Date: Fri, 26 Apr 2024 11:27:45 +1000 Subject: [PATCH 15/17] rampis: mt7621: Edgerouter-X adjust IMAGE_SIZE to reflect new kernel size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IMAGE_SIZE was previously set to kernel1 + ubi size = 256768k, now kernel1 is 6MB adjust this value to add 3072k to total image size. Signed-off-by: Tim Lunn Link: https://github.com/openwrt/openwrt/pull/15194 Signed-off-by: Petr Štetiar --- target/linux/ramips/image/mt7621.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index bebe40c216..1dc1219d24 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -2834,7 +2834,7 @@ define Device/ubnt_edgerouter_common $(Device/dsa-migration) $(Device/uimage-lzma-loader) DEVICE_VENDOR := Ubiquiti - IMAGE_SIZE := 256768k + IMAGE_SIZE := 259840k FILESYSTEMS := squashfs KERNEL_SIZE := 6144k IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata From ca53f2d430ce1f9ff5a560291de1e93380963417 Mon Sep 17 00:00:00 2001 From: Andrew MacIntyre Date: Fri, 8 Nov 2024 23:44:13 +1100 Subject: [PATCH 16/17] vrx518_tc: allow larger MTU to support RFC4638 vrx518_tc currently sets the interface maximum MTU to the ethernet default of 1500 bytes by default via ether_setup() called from ptm_setup(). To support 1508 byte baby jumbo frames (RFC4638) for PPPoE connections over VDSL links as already supported by the VR9 ltq_ptm driver ([1], [2]) set the interface maximum MTU to MAX_MTU. MAX_MTU is defined in dcdp/inc/tc_common.h to 2002 bytes and this value is used in ptm_change_mtu() and elsewhere as the maximum MTU, however this is short circuited by checks against the interface maximum MTU. [1]: https://forum.openwrt.org/t/fritzbox-7530-and-rfc4638-baby-jumbo-frames/181327 [2]: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=8a2a20e71e2909f84dab47e51dfda9e292a6c1ae Signed-off-by: Andrew MacIntyre Link: https://github.com/openwrt/openwrt/pull/16856 Signed-off-by: Robert Marko --- ...-allow-larger-mtu-to-support-rfc4638.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/kernel/lantiq/vrx518_tc/patches/206-dcdp-ptm_tc-allow-larger-mtu-to-support-rfc4638.patch diff --git a/package/kernel/lantiq/vrx518_tc/patches/206-dcdp-ptm_tc-allow-larger-mtu-to-support-rfc4638.patch b/package/kernel/lantiq/vrx518_tc/patches/206-dcdp-ptm_tc-allow-larger-mtu-to-support-rfc4638.patch new file mode 100644 index 0000000000..35a709e9fa --- /dev/null +++ b/package/kernel/lantiq/vrx518_tc/patches/206-dcdp-ptm_tc-allow-larger-mtu-to-support-rfc4638.patch @@ -0,0 +1,34 @@ +From 3983dc1674fec43beb8ce9d9bfdd6302fef86eae Mon Sep 17 00:00:00 2001 +From: Andrew MacIntyre +Date: Mon, 4 Nov 2024 22:41:25 +1100 +Subject: [PATCH] vrx518_tc: allow larger MTU to support RFC4638 + +vrx518_tc currently sets the interface maximum MTU to the ethernet default +of 1500 bytes by default via ether_setup() called from ptm_setup(). + +To support 1508 byte baby jumbo frames (RFC4638) for PPPoE connections +over VDSL links as already supported by the VR9 ltq_ptm driver ([1], [2]) +set the interface maximum MTU to MAX_MTU. + +MAX_MTU is defined in dcdp/inc/tc_common.h to 2002 bytes and this value is +used in ptm_change_mtu() and elsewhere as the maximum MTU, however this is +short circuited by checks against the interface maximum MTU. + +[1]: https://forum.openwrt.org/t/fritzbox-7530-and-rfc4638-baby-jumbo-frames/181327 +[2]: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=8a2a20e71e2909f84dab47e51dfda9e292a6c1ae + +Signed-off-by: Andrew MacIntyre +--- + dcdp/ptm_tc.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/dcdp/ptm_tc.c 2023-12-17 16:11:22.503500398 +1100 ++++ b/dcdp/ptm_tc.c 2024-01-26 16:48:49.881623474 +1100 +@@ -657,6 +657,7 @@ static void ptm_setup(struct net_device + ether_setup(dev); + dev->watchdog_timeo = 10 * HZ; + dev->netdev_ops = &g_ptm_netdev_ops; ++ dev->max_mtu = MAX_MTU; + } + + static int ptm_dev_init(struct tc_priv *tc_priv, u32 id, From a7abc7ec3b61be553f33c49e5acc90a4d539d992 Mon Sep 17 00:00:00 2001 From: David Lutz Date: Tue, 5 Nov 2024 10:55:43 +0100 Subject: [PATCH 17/17] ath79: Add support for Sophos AP15C The Sophos AP15C uses the same hardware as the AP15, but has a reset button. Based on: commit 6f1efb289837 ("ath79: add support for Sophos AP100/AP55 family") author Andrew Powers-Holmes Fri, 3 Sep 2021 15:53:57 +0200 (23:53 +1000) committer Hauke Mehrtens Sat, 16 Apr 2022 16:59:29 +0200 (16:59 +0200) Unique to AP15C: - Reset button - External RJ45 serial console port Flashing instructions: This firmware can be flashed either via a compatible Sophos SG or XG firewall appliance, which does not require disassembling the device, or via the U-Boot console available on the internal UART header. To flash via XG appliance: - Register on Sophos' website for a no-cost Home Use XG firewall license - Download and install the XG software on a compatible PC or virtual machine, complete initial appliance setup, and enable SSH console access - Connect the target AP device to the XG appliance's LAN interface - Approve the AP from the XG Web UI and wait until it shows as Active (this can take 3-5 minutes) - Connect to the XG appliance over SSH and access the Advanced Console (Menu option 5, then menu option 3) - Run `sudo awetool` and select the menu option to connect to an AP via SSH. When prompted to enable SSH on the target AP, select Yes. - Wait 2-3 minutes, then select the AP from the awetool menu again. This will connect you to a root shell on the target AP. - Copy the firmware to /tmp/openwrt.bin on the target AP via SCP/TFTP/etc - Run `mtd -r write /tmp/openwrt.bin astaro_image` - When complete, the access point will reboot to OpenWRT. To flash via U-Boot serial console: - Configure a TFTP server on your PC, and set IP address 192.168.99.8 with netmask 255.255.255.0 - Copy the firmware .bin to the TFTP server and rename to 'uImage_AP15C' - Open the target AP's enclosure and locate the 4-pin 3.3V UART header [4] - Connect the AP ethernet to your PC's ethernet port - Connect a terminal to the UART at 115200 8/N/1 as usual - Power on the AP and press a key to cancel autoboot when prompted - Run the following commands at the U-Boot console: - `tftpboot` - `cp.b $fileaddr 0x9f070000 $filesize` - `boot` - The access point will boot to OpenWRT. Signed-off-by: David Lutz --- package/boot/uboot-envtools/files/ath79 | 1 + .../linux/ath79/dts/qca9557_sophos_ap15c.dts | 159 ++++++++++++++++++ .../generic/base-files/etc/board.d/02_network | 1 + target/linux/ath79/image/generic.mk | 8 + 4 files changed, 169 insertions(+) create mode 100644 target/linux/ath79/dts/qca9557_sophos_ap15c.dts diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 1d9d3bcfaa..c6d23ce73d 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -163,6 +163,7 @@ ruckus,zf7372) ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x40000" "0x10000" ;; sophos,ap15|\ +sophos,ap15c|\ sophos,ap55|\ sophos,ap55c|\ sophos,ap100|\ diff --git a/target/linux/ath79/dts/qca9557_sophos_ap15c.dts b/target/linux/ath79/dts/qca9557_sophos_ap15c.dts new file mode 100644 index 0000000000..68d02e97a5 --- /dev/null +++ b/target/linux/ath79/dts/qca9557_sophos_ap15c.dts @@ -0,0 +1,159 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca955x.dtsi" + +#include +#include +#include + +/ { + compatible = "sophos,ap15c", "qca,qca9557"; + model = "Sophos AP15C"; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_yellow; + led-running = &led_status_green; + led-upgrade = &led_status_yellow; + label-mac-device = ð0; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: status_green { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led_status_yellow: status_yellow { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + 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 = "art"; + reg = <0x050000 0x010000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: calibration@1000 { + reg = <0x1000 0x440>; + }; + }; + }; + + partition@60000 { + label = "config"; + reg = <0x060000 0x010000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_201a: macaddr@201a { + reg = <0x201a 0x6>; + }; + }; + }; + + partition@70000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x070000 0xf90000>; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0x10>; + + phy4: ethernet-phy@4 { + reg = <4>; + eee-broken-100tx; + eee-broken-1000t; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0xa6000000 0xa0000101 0xa0001313>; + + nvmem-cells = <&macaddr_config_201a>; + nvmem-cell-names = "mac-address"; + + phy-mode = "rgmii-id"; + phy-handle = <&phy4>; + + gmac_config: gmac-config { + device = <&gmac>; + + rgmii-enabled = <1>; + + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <3>; + txd-delay = <3>; + }; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&cal_art_1000>; + nvmem-cell-names = "calibration"; +}; 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 8474c1c4c2..8f79a3fad8 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -76,6 +76,7 @@ ath79_setup_interfaces() ruckus,zf7351|\ siemens,ws-ap3610|\ sophos,ap15|\ + sophos,ap15c|\ sophos,ap55|\ sophos,ap55c|\ sophos,ap100|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index c075f050db..0173f5cb16 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -2972,6 +2972,14 @@ define Device/sophos_ap15 endef TARGET_DEVICES += sophos_ap15 +define Device/sophos_ap15c + SOC := qca9557 + DEVICE_VENDOR := Sophos + DEVICE_MODEL := AP15C + IMAGE_SIZE := 15936k +endef +TARGET_DEVICES += sophos_ap15c + define Device/sophos_ap55 SOC := qca9558 DEVICE_VENDOR := Sophos