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/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, diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index bbfb1fb7b9..6054c4ead4 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -345,6 +345,38 @@ endef $(eval $(call KernelPackage,drm-gem-shmem-helper)) +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 @@ -577,6 +609,24 @@ endef $(eval $(call KernelPackage,drm-panthor)) +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 diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile index b8e7abaf17..b92dfea6c7 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/110-r8125-print-link-speed-and-duplex-mode.patch b/package/kernel/r8125/patches/110-r8125-print-link-speed-and-duplex-mode.patch index df649c9ae9..a3b3562149 100644 --- a/package/kernel/r8125/patches/110-r8125-print-link-speed-and-duplex-mode.patch +++ b/package/kernel/r8125/patches/110-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)) diff --git a/package/kernel/r8125/patches/120-add-LED-configuration-from-OF.patch b/package/kernel/r8125/patches/120-add-LED-configuration-from-OF.patch index ae42ef4044..0b3cf90132 100644 --- a/package/kernel/r8125/patches/120-add-LED-configuration-from-OF.patch +++ b/package/kernel/r8125/patches/120-add-LED-configuration-from-OF.patch @@ -8,7 +8,7 @@ #include #include #include -@@ -13666,6 +13667,25 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri +@@ -14755,6 +14756,25 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri tp->imr_reg[i] = (u16)(IMR1_8125 + (i - 1) * 4); } @@ -34,7 +34,7 @@ static void rtl8125_init_software_variable(struct net_device *dev) { -@@ -14300,6 +14320,8 @@ rtl8125_init_software_variable(struct ne +@@ -15358,6 +15378,8 @@ rtl8125_init_software_variable(struct ne else if (tp->InitRxDescType == RX_DESC_RING_TYPE_4) tp->rtl8125_rx_config &= ~EnableRxDescV4_1; diff --git a/package/kernel/r8125/patches/130-add-devname-configuration-from-OF.patch b/package/kernel/r8125/patches/130-add-devname-configuration-from-OF.patch index 133f84b0ec..1f93ccd75b 100644 --- a/package/kernel/r8125/patches/130-add-devname-configuration-from-OF.patch +++ b/package/kernel/r8125/patches/130-add-devname-configuration-from-OF.patch @@ -1,6 +1,6 @@ --- a/src/r8125_n.c +++ b/src/r8125_n.c -@@ -15345,6 +15345,7 @@ rtl8125_init_board(struct pci_dev *pdev, +@@ -16423,6 +16423,7 @@ rtl8125_init_board(struct pci_dev *pdev, void __iomem *ioaddr; struct net_device *dev; struct rtl8125_private *tp; @@ -8,7 +8,7 @@ int rc = -ENOMEM, i, pm_cap; assert(ioaddr_out != NULL); -@@ -15359,6 +15360,9 @@ rtl8125_init_board(struct pci_dev *pdev, +@@ -16437,6 +16438,9 @@ rtl8125_init_board(struct pci_dev *pdev, goto err_out; } 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 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() { 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 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) 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/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/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 39a7a94a41..2c90912fc4 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -2977,6 +2977,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 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" 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 { diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 5cfe63b0c9..42576451f3 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))) @@ -2871,14 +2847,15 @@ 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 := 3145728 - KERNEL_INITRAMFS := $$(KERNEL) | \ - ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar + KERNEL_SIZE := 6144k IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_PACKAGES += -wpad-basic-openssl -uboot-envtools - DEFAULT := n + 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 endef define Device/ubnt_edgerouter-x 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 66f8f195a2..ddf3779229 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,8 +8,10 @@ board_config_update case "$(board_name)" in - zte,e8820s|\ - iptime,ax2004m) + ubnt,edgerouter-x|\ + ubnt,edgerouter-x-sfp|\ + iptime,ax2004m|\ + zte,e8820s) ucidef_set_compat_version "2.0" ;; tplink,er605-v2) 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" }