From 580748fd47d29b2d830840ea18a96ab8f16d3448 Mon Sep 17 00:00:00 2001 From: Szabolcs Hubai Date: Wed, 3 Feb 2021 07:56:38 +0100 Subject: [PATCH 01/31] ramips: rt305x: use lzma-loader for ZyXEL Keenetic Lite rev.B Fixes boot loader LZMA decompression issue, reported by GitHub user KOLANICH at [0]. The reported LZMA ERROR has date of 2020-07-20, soon after the device support landed: Ralink UBoot Version: 3.5.2.4_ZyXEL .... 3: System Boot system code via Flash. Image Name: MIPS OpenWrt Linux-4.14.187 Created: 2020-07-20 3:39:11 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1472250 Bytes = 1.4 MB Load Address: 80000000 Entry Point: 80000000 Verifying Checksum ... OK Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover [0] https://github.com/openwrt/openwrt/commit/fea232ae8feb6af780fd4fa78ebe9231778bf75a#commitcomment-45016560 Fixes: 4dc9ad4af8c921494d20b303b6772fc6b5af3a69 ("ramips: add support for ZyXEL Keenetic Lite Rev.B") Signed-off-by: Szabolcs Hubai (cherry picked from commit dd3c1ad8ee9ee361285cb9142bdcb35bc3a30ac7) --- target/linux/ramips/image/rt305x.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 429afc7833..210ae2f8b7 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -1196,6 +1196,7 @@ endef TARGET_DEVICES += zyxel_keenetic define Device/zyxel_keenetic-lite-b + $(Device/uimage-lzma-loader) SOC := rt5350 IMAGE_SIZE := 7872k DEVICE_VENDOR := ZyXEL From 80acc9b7379a98cbfda707d26cb46103ede657b8 Mon Sep 17 00:00:00 2001 From: Daniel Engberg Date: Fri, 19 Mar 2021 12:18:02 +0100 Subject: [PATCH 02/31] ramips: Fix booting on MQmaker WiTi board This fixes the dreaded "lzma error 1" also reported on similar devices Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3057 Fixes: FS#3057 Signed-off-by: Daniel Engberg (cherry picked from commit e83f7e5d76ebf74aa0a1f686d2941950fa5f22e2) --- target/linux/ramips/image/mt7621.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 25ca1b87f0..80ab4b1af5 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -845,6 +845,7 @@ TARGET_DEVICES += mikrotik_routerboard-m33g define Device/mqmaker_witi $(Device/dsa-migration) + $(Device/uimage-lzma-loader) IMAGE_SIZE := 16064k DEVICE_VENDOR := MQmaker DEVICE_MODEL := WiTi From 76d74057206dd0b30ba9eb380910be70f732991d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= Date: Sat, 20 Mar 2021 20:15:14 +0100 Subject: [PATCH 03/31] ramips: Fix booting on MTC WR1201 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the dreaded "lzma error 1" also reported on similar devices Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3057 Fixes: FS#3057 Signed-off-by: René van Dorst (cherry picked from commit 12f3d1466ad783fded1747fa2ee521a9bea1ff73) --- target/linux/ramips/image/mt7621.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 80ab4b1af5..a55f9bceb7 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -857,6 +857,7 @@ TARGET_DEVICES += mqmaker_witi define Device/mtc_wr1201 $(Device/dsa-migration) + $(Device/uimage-lzma-loader) IMAGE_SIZE := 16000k DEVICE_VENDOR := MTC DEVICE_MODEL := Wireless Router WR1201 From f2b7e6675988e2eb2bddb4e506a686c5283263a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Sat, 10 Apr 2021 18:42:42 +0200 Subject: [PATCH 04/31] uboot-envtools: mvebu: add Buffalo LS421DE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Buffalo Linkstation LS421DE NAS lacks an uboot env config file. Create it via scripts. Signed-off-by: Daniel González Cabanelas (cherry picked from commit 4f8da19572cf1adc480dca42251a4cded0cb3c7c) --- package/boot/uboot-envtools/files/mvebu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index afa058a39f..92b144330f 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -14,6 +14,9 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in +buffalo,ls421de) + ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" + ;; cznic,turris-omnia) if grep -q 'U-Boot 2015.10-rc2' /dev/mtd0; then ubootenv_add_uci_config "/dev/mtd0" "0xc0000" "0x10000" "0x40000" From f965235bb5b74bbfc9f048223716c123669688e3 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Thu, 25 Mar 2021 13:26:15 +0100 Subject: [PATCH 05/31] mvebu: Fix sysupgrade for GL.iNet GL-MV1000 The GL.iNet GL-MV1000 is booting from eMMC and the images for it are in theory sysupgrade compatible. But the platform upgrade scripts were not adjusted to select the mmcblock device as upgrade target. This resulted in a failed sysupgrade because the mtd device (NOR flash) was instead tried to be modified by the sysupgrade script. Fixes: 050c24f05c85 ("mvebu: add support for GL.iNet GL-MV1000") Signed-off-by: Sven Eckelmann (cherry picked from commit 07e5e03711d55f94db738446ef9eddc8163b53a6) --- .../linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh index 1153fd8f38..d78f4e884a 100755 --- a/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh +++ b/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh @@ -9,6 +9,7 @@ REQUIRE_IMAGE_METADATA=1 platform_check_image() { case "$(board_name)" in + glinet,gl-mv1000|\ globalscale,espressobin|\ globalscale,espressobin-emmc|\ globalscale,espressobin-ultra|\ @@ -24,6 +25,7 @@ platform_check_image() { platform_do_upgrade() { case "$(board_name)" in + glinet,gl-mv1000|\ globalscale,espressobin|\ globalscale,espressobin-emmc|\ globalscale,espressobin-ultra|\ @@ -41,6 +43,7 @@ platform_do_upgrade() { } platform_copy_config() { case "$(board_name)" in + glinet,gl-mv1000|\ globalscale,espressobin|\ globalscale,espressobin-emmc|\ globalscale,espressobin-ultra|\ From d530ff37bf3343ed40d02d88122f2f3ca44a9d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Sun, 4 Apr 2021 23:06:46 +0200 Subject: [PATCH 06/31] mvebu: armada 370: dts: fix the crypto engine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The crypto engine in Armada 370 SoCs is currently broken. It can be checked installing the required packages for testing openssl with hw acceleration: opkg install openssl-util opkg install kmod-cryptodev opkg install libopenssl-devcrypto After configuring /etc/ssl/openssl.cnf to let openssl use the crypto engine for digest operations, and performing some checksums.. md5sum 10M-file.bin openssl md5 10M-file.bin ...we can see they don't match. There might be an alignment or size constraint issue caused by the idle-sram area. Use the whole crypto sram and disable the idle-sram area to fix it. Also disable the idle support by adding the broken-idle property to prevent accessing the disabled idle-sram. We don't care about disabling the idle support since it is already broken in Armada 370 causing a huge performance loss because it disables permanently the L2 cache. This was reported in the Openwrt forum and elsewhere by Debian users with different board models. Signed-off-by: Daniel González Cabanelas (cherry picked from commit 2e1ebe96c61424d0829bb1c8b5ec44aaa8bea8af) --- ...317-armada-370-dts-fix-crypto-engine.patch | 29 +++++++++++++++++++ ...320-armada-370-dts-fix-crypto-engine.patch | 29 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 target/linux/mvebu/patches-5.10/317-armada-370-dts-fix-crypto-engine.patch create mode 100644 target/linux/mvebu/patches-5.4/320-armada-370-dts-fix-crypto-engine.patch diff --git a/target/linux/mvebu/patches-5.10/317-armada-370-dts-fix-crypto-engine.patch b/target/linux/mvebu/patches-5.10/317-armada-370-dts-fix-crypto-engine.patch new file mode 100644 index 0000000000..19378870ef --- /dev/null +++ b/target/linux/mvebu/patches-5.10/317-armada-370-dts-fix-crypto-engine.patch @@ -0,0 +1,29 @@ +--- a/arch/arm/boot/dts/armada-370.dtsi ++++ b/arch/arm/boot/dts/armada-370.dtsi +@@ -234,7 +234,7 @@ + clocks = <&gateclk 23>; + clock-names = "cesa0"; + marvell,crypto-srams = <&crypto_sram>; +- marvell,crypto-sram-size = <0x7e0>; ++ marvell,crypto-sram-size = <0x800>; + }; + }; + +@@ -255,12 +255,17 @@ + * cpuidle workaround. + */ + idle-sram@0 { ++ status = "disabled"; + reg = <0x0 0x20>; + }; + }; + }; + }; + ++&coherencyfab { ++ broken-idle; ++}; ++ + /* + * Default UART pinctrl setting without RTS/CTS, can be overwritten on + * board level if a different configuration is used. diff --git a/target/linux/mvebu/patches-5.4/320-armada-370-dts-fix-crypto-engine.patch b/target/linux/mvebu/patches-5.4/320-armada-370-dts-fix-crypto-engine.patch new file mode 100644 index 0000000000..19378870ef --- /dev/null +++ b/target/linux/mvebu/patches-5.4/320-armada-370-dts-fix-crypto-engine.patch @@ -0,0 +1,29 @@ +--- a/arch/arm/boot/dts/armada-370.dtsi ++++ b/arch/arm/boot/dts/armada-370.dtsi +@@ -234,7 +234,7 @@ + clocks = <&gateclk 23>; + clock-names = "cesa0"; + marvell,crypto-srams = <&crypto_sram>; +- marvell,crypto-sram-size = <0x7e0>; ++ marvell,crypto-sram-size = <0x800>; + }; + }; + +@@ -255,12 +255,17 @@ + * cpuidle workaround. + */ + idle-sram@0 { ++ status = "disabled"; + reg = <0x0 0x20>; + }; + }; + }; + }; + ++&coherencyfab { ++ broken-idle; ++}; ++ + /* + * Default UART pinctrl setting without RTS/CTS, can be overwritten on + * board level if a different configuration is used. From d33f4f856566bf7a5b44d6169fd673719bbdfcc6 Mon Sep 17 00:00:00 2001 From: David Bentham Date: Sun, 4 Apr 2021 13:08:43 +0100 Subject: [PATCH 07/31] ramips: reduce spi-max-frequency for Xiaomi MI Router 4AG Reduce spi-max-frequency for Xiaomi MI Router 4AG model Xiaomi MI Router 4AG MTD uses two flash chips (no specific on router versions when produced from factory) - GD25Q128C and W25Q128BV. These flash chips are capable of high frequency, but due to poor board design or manufacture process. We are seeing the following errors in the linux kernel bootup: `spi-nor spi0.0: unrecognized JEDEC id bytes: cc 60 1c cc 60 1c spi-nor: probe of spi0.0 failed with error -2` This causes the partitions not to be detected `VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6` Then creates a bootloop and a bricked router. The solution to limit this race condition is to reduce the frequency from 80 mhz to 50 mhz. Signed-off-by: David Bentham (cherry picked from commit 17e690017d76c49070bc99d6a376b1926259c5ff) --- target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi index c86bdadf55..cc5abf09b6 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi @@ -49,7 +49,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { From 09a23b9261f86e6d82c5b3cf55060a7ece997c15 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 4 Apr 2021 18:32:30 -0700 Subject: [PATCH 08/31] toolchain/gdb: fix compilation with ccache For some reason, one of the configure checks results in some infinite loop and ends up spawning endless gcc processes, causing OOM. Just pass a configure var to avoid it. Same fix as 6e23813c1ed7494a9da3b5e59cfcafd71097c420 Signed-off-by: Rosen Penev (cherry picked from commit fc093c3f9cce80ea60e3752f6629f999ec186765) --- toolchain/gdb/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index 3bcc9d1238..05e3c7de3c 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -22,6 +22,7 @@ HOST_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/toolchain-build.mk HOST_CONFIGURE_VARS += \ + acx_cv_cc_gcc_supports_ada=false \ gdb_cv_func_sigsetjmp=yes HOST_CONFIGURE_ARGS = \ From 75d0a0da150a4434562a6ae30fabb62b8c138fc7 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 5 Apr 2021 18:34:19 +0200 Subject: [PATCH 09/31] glibc: update to latest git HEAD (BZ #27468, BZ #27511) e78ea9bd26 Update Nios II libm-test-ulps. 98bb18f52a malloc: Fix a realloc crash with heap tagging [BZ 27468] fc4ecce85b S390: Also check vector support in memmove ifunc-selector [BZ #27511] Signed-off-by: Hans Dedecker (cherry picked from commit d49f1acff1a79992c474fceaeac066671f838a2c) --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index 01b15a5cd2..fa6a792f61 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -12,8 +12,8 @@ PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=db32fc27e7bdfb5468200a94e9152bcc1c971d25 -PKG_MIRROR_HASH:=e02f8b7df03d675db6279b99212c8a645aa50f1ae7789fafd7bc1987145a4c92 +PKG_SOURCE_VERSION:=e78ea9bd26199497b9f047e421f16284297629cf +PKG_MIRROR_HASH:=1e08d10f04333cc6cd82c6cfc4c83a37db6b7ce1523b3f6e56673178379a9c2c PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz From f33139c4d5f4b616ca9439ed1390dd2049245333 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Sat, 17 Apr 2021 21:24:39 +0200 Subject: [PATCH 10/31] glibc: update to latest 2.33 commit 12ff80b312 Remove PR_TAGGED_ADDR_ENABLE from sys/prctl.h 1bf38e7260 Fix SXID_ERASE behavior in setuid programs (BZ #27471) a7b8e8ec9b Enhance setuid-tunables test ee16c81063 tst-env-setuid: Use support_capture_subprogram_self_sgid 267e174f19 support: Add capability to fork an sgid child 249c486ce8 support: Pass environ to child process 45b2c57d34 support: Typo and formatting fixes e07abf59b2 tunables: Fix comparison of tunable values 3e9ca60a58 linux: always update select timeout (BZ #27706) 8380ca5833 linux: Normalize and return timeout on select (BZ #27651) 85e4dc415a libsupport: Add support_select_normalizes_timeout b5b4aa62c1 libsupport: Add support_select_modifies_timeout 3d525dd639 misc: Fix tst-select timeout handling (BZ#27648) 830674605f tst: Provide test for select Signed-off-by: Hans Dedecker (cherry picked from commit b3728f2cbd22c033ff852695eb6832c4040af37e) --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index fa6a792f61..549778a440 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -12,8 +12,8 @@ PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=e78ea9bd26199497b9f047e421f16284297629cf -PKG_MIRROR_HASH:=1e08d10f04333cc6cd82c6cfc4c83a37db6b7ce1523b3f6e56673178379a9c2c +PKG_SOURCE_VERSION:=12ff80b312c11b0284df7a1c5cb9be6418f85228 +PKG_MIRROR_HASH:=84b7715886320794f9787976b20c868f5d6967e0ab08e6c821a8d42103c0721b PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz From 8437c24f0976596a0eb1c7d19d0f5262df06312f Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 15 Apr 2021 00:30:24 +0200 Subject: [PATCH 11/31] ath79: fix 10 Mbit PLL data for TP-Link EAP2xx Fix the PLL register value for 10 Mbit/s link modes on TP-Link EAP boards using a AR8033 SGMII PHY. Otherwise, 10 Mbit/s links do not transfer data. Reported-by: Tom Herbers Tested-by: Tom Herbers Signed-off-by: David Bauer (cherry picked from commit bbff6239e2ea273388f4ca0f8586945ff5f36271) --- target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi index cc9e0b7ff6..a6aefc7b55 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi @@ -112,6 +112,7 @@ phy-handle = <&phy4>; phy-mode = "sgmii"; + pll-data = <0x03000000 0x00000101 0x00001313>; mtd-mac-address = <&info 0x8>; From cc6ad94fb920a5577239d60d42d8f1ec8d9b668c Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 14 Apr 2021 23:58:25 +0200 Subject: [PATCH 12/31] ath79: fix 10 Mbit PLL data for UniFi AC Fix the PLL register value for 10 Mbit/s link modes on the UniFi AC Lite / Mesh / LR. Otherwise, 10 Mbit/s links do not transfer data. Signed-off-by: David Bauer (cherry picked from commit 956407292dc5fd41f2d8c7cc7e9ec77eb6444c1e) --- target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi index b9a5b55cd6..b41e90abe8 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi @@ -24,4 +24,6 @@ mtd-mac-address = <&art 0x0>; phy-mode = "sgmii"; phy-handle = <&phy4>; + + pll-data = <0x03000000 0x00000101 0x00001313>; }; From 6552f31acdb14bca5e6b51c82ef63fd08d3b7a9f Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Sat, 3 Apr 2021 22:59:15 +0800 Subject: [PATCH 13/31] ramips: mt7530 swconfig: fix race condition in register access The mt7530_{r,w}32 operation over MDIO uses 3 mdiobus operations and does not hold a lock, which causes a race condition when multiple threads try to access a register, they may get unexpected results. To avoid this, handle the MDIO lock manually, and use the unlocked __mdiobus_{read,write} in the critical section. This fixes the "Ghost VLAN" artifact[1] in MT7530/7621 when the VLAN operation and the swconfig LED link status poll race between each other. [1] https://forum.openwrt.org/t/mysterious-vlan-ids-on-mt7621-device/64495 Signed-off-by: DENG Qingfang (cherry picked from commit f99c9cd9c4d4c49a676d678327546fd41690fe2a) --- .../files/drivers/net/ethernet/ralink/mt7530.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c index be1b8a6d8e..b4632d3990 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c @@ -290,9 +290,11 @@ mt7530_r32(struct mt7530_priv *priv, u32 reg) if (priv->bus) { u16 high, low; - mdiobus_write(priv->bus, 0x1f, 0x1f, (reg >> 6) & 0x3ff); - low = mdiobus_read(priv->bus, 0x1f, (reg >> 2) & 0xf); - high = mdiobus_read(priv->bus, 0x1f, 0x10); + mutex_lock(&priv->bus->mdio_lock); + __mdiobus_write(priv->bus, 0x1f, 0x1f, (reg >> 6) & 0x3ff); + low = __mdiobus_read(priv->bus, 0x1f, (reg >> 2) & 0xf); + high = __mdiobus_read(priv->bus, 0x1f, 0x10); + mutex_unlock(&priv->bus->mdio_lock); return (high << 16) | (low & 0xffff); } @@ -307,9 +309,11 @@ static void mt7530_w32(struct mt7530_priv *priv, u32 reg, u32 val) { if (priv->bus) { - mdiobus_write(priv->bus, 0x1f, 0x1f, (reg >> 6) & 0x3ff); - mdiobus_write(priv->bus, 0x1f, (reg >> 2) & 0xf, val & 0xffff); - mdiobus_write(priv->bus, 0x1f, 0x10, val >> 16); + mutex_lock(&priv->bus->mdio_lock); + __mdiobus_write(priv->bus, 0x1f, 0x1f, (reg >> 6) & 0x3ff); + __mdiobus_write(priv->bus, 0x1f, (reg >> 2) & 0xf, val & 0xffff); + __mdiobus_write(priv->bus, 0x1f, 0x10, val >> 16); + mutex_unlock(&priv->bus->mdio_lock); return; } From 36ee555c5fe0dcb77f6bcec72d8be223ba897b48 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 19 Mar 2021 22:32:12 +0000 Subject: [PATCH 14/31] umdns: add syscalls needed on Aarch64 Now that ujail supports seccomp also on Aarch64, add missing syscall 'fstat' to the list of allowed syscalls. Signed-off-by: Daniel Golle (cherry picked from commit d28880cdd86e10142fd86936f5da188eaeeaf9eb) --- package/network/services/umdns/files/umdns.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package/network/services/umdns/files/umdns.json b/package/network/services/umdns/files/umdns.json index 14affd776c..4d5ed886d0 100644 --- a/package/network/services/umdns/files/umdns.json +++ b/package/network/services/umdns/files/umdns.json @@ -24,6 +24,7 @@ "pipe", "poll", "fcntl64", + "fstat", "epoll_create", "epoll_create1", "epoll_ctl", From 1a0afbd6f21fa44a57ce643dcc99dad654231855 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 10 Apr 2021 17:30:49 +0100 Subject: [PATCH 15/31] umdns: add missing syscalls to seccomp filter Looks like 'openat', 'pipe2' and 'ppoll' are now needed, possibly due to changes on libraries used by umdns now using slightly different calls. Found using /etc/init.d/umdns trace now use umdns, ie. cover all ubus call etc., then /etc/init.d/umdns stop find list of syscalls traced in /tmp/umdns.*.json Fixes: FS#3355 ("UMDNS: does not start on master with seccomp") Signed-off-by: Daniel Golle (cherry picked from commit 00a85a163405fdf9bee4d8c3f0ee87ca9ed259d6) --- .../network/services/umdns/files/umdns.json | 57 ++++++++++--------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/package/network/services/umdns/files/umdns.json b/package/network/services/umdns/files/umdns.json index 4d5ed886d0..5533b7c512 100644 --- a/package/network/services/umdns/files/umdns.json +++ b/package/network/services/umdns/files/umdns.json @@ -3,41 +3,44 @@ "syscalls": [ { "names": [ - "read", - "write", - "writev", - "open", - "close", - "time", - "brk", - "ioctl", - "uname", "bind", + "brk", + "clock_gettime", + "close", "connect", - "getsockname", - "recvmsg", - "recvfrom", - "sendmsg", - "sendto", - "setsockopt", - "socket", - "pipe", - "poll", - "fcntl64", - "fstat", "epoll_create", "epoll_create1", "epoll_ctl", - "epoll_wait", "epoll_pwait", - "rt_sigaction", - "sigreturn", - "rt_sigreturn", - "rt_sigprocmask", - "exit_group", + "epoll_wait", "exit", + "exit_group", "fcntl", - "clock_gettime" + "fcntl64", + "fstat", + "getsockname", + "ioctl", + "open", + "openat", + "pipe", + "pipe2", + "poll", + "ppoll", + "read", + "recvfrom", + "recvmsg", + "rt_sigaction", + "rt_sigprocmask", + "rt_sigreturn", + "sendmsg", + "sendto", + "setsockopt", + "sigreturn", + "socket", + "time", + "uname", + "write", + "writev" ], "action": "SCMP_ACT_ALLOW" } From 8bbf5bc4b0f27d6f71b5746da8579390ff9be9e4 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Thu, 7 Jan 2021 17:30:49 +0100 Subject: [PATCH 16/31] uboot-imx6: define 'BUILD_DEVICES' for Toradex Apalis Without 'BUILD_DEVICES' defined, the U-Boot related package won't be automatically selected when building for Toradex Apalis device. Signed-off-by: Piotr Dymacz (cherry picked from commit 8c3383799a496fda5cfa31000b65c9b8565cf575) --- package/boot/uboot-imx6/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-imx6/Makefile b/package/boot/uboot-imx6/Makefile index 79acd4abf7..da069b532e 100644 --- a/package/boot/uboot-imx6/Makefile +++ b/package/boot/uboot-imx6/Makefile @@ -24,6 +24,7 @@ define U-Boot/apalis_imx6 NAME:=Toradex Apalis UBOOT_IMAGE:=SPL u-boot.img u-boot-with-spl.imx UBOOT_MAKE_FLAGS:=SPL u-boot.img u-boot-with-spl.imx + BUILD_DEVICES:=apalis endef define U-Boot/mx6cuboxi From ab610f5af30bbdd937f4e8d93bb718b25b589d00 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Thu, 1 Apr 2021 14:36:33 +0100 Subject: [PATCH 17/31] zram-swap: bail out early if the kernel doesn't support swap Since KERNEL_SWAP is only enabled by default for !SMALL_FLASH targets, we need to check if the current kernel supports swap before trying to configure zram-swap, as opkg can't check for kernel dependencies. Signed-off-by: Rui Salvaterra (cherry picked from commit 565dfeb1280343fb3f838581169e5d7a1c947862) --- package/system/zram-swap/files/zram.init | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/system/zram-swap/files/zram.init b/package/system/zram-swap/files/zram.init index 685648aae5..d97e85efa5 100755 --- a/package/system/zram-swap/files/zram.init +++ b/package/system/zram-swap/files/zram.init @@ -150,6 +150,11 @@ zram_compact() start() { + [ -e /proc/swaps ] || { + logger -s -t zram_start -p daemon.crit "kernel doesn't support swap" + return 1 + } + if [ $( grep -cs zram /proc/swaps ) -ne 0 ]; then logger -s -t zram_start -p daemon.notice "[OK] zram swap is already mounted" return 1 From eaf19220b67d83c4c596fa21890abf5af9b4a610 Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov Date: Sun, 28 Mar 2021 10:45:08 +0200 Subject: [PATCH 18/31] base-files: fix status display command If service() is called w/o parameter then the status display for services with multiple instances is incorrect. E.g. samba4 or wpad have 2 instances. root@OpenWrt:~# /etc/init.d/samba4 status running root@OpenWrt:~# /etc/init.d/wpad status running Before change: /etc/init.d/samba4 enabled stopped /etc/init.d/wpad enabled stopped After change: /etc/init.d/samba4 enabled running /etc/init.d/wpad enabled running Signed-off-by: Alexander Egorenkov (cherry picked from commit 9318f61556c5443eb66eec7e26715b00f0df86fc) --- package/base-files/files/etc/shinit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/etc/shinit b/package/base-files/files/etc/shinit index 8c64e81563..0a1ebcc832 100644 --- a/package/base-files/files/etc/shinit +++ b/package/base-files/files/etc/shinit @@ -22,7 +22,7 @@ service() { printf "%-30s\t%10s\t%10s\n" "$F" \ $( $($F enabled) && echo "enabled" || echo "disabled" ) \ $( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \ - | jsonfilter -q -e "@.$(basename $F).instances[*].running")" = "true" ] \ + | jsonfilter -q -e "@.$(basename $F).instances[*].running" | uniq)" = "true" ] \ && echo "running" || echo "stopped" ) done; return 1 From f1ba3a8d91734d73ab710d6cc1b688a13a0909d8 Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Fri, 19 Feb 2021 00:22:26 +0100 Subject: [PATCH 19/31] uboot-envtools: add support for ZyXEL GS-1900-8HP v1 and v2 This adds the necessary nuts and bolts for the uboot settings for both the ZyXEL GS1900-8HP v1 and v2. Signed-off-by: Stijn Segers (cherry picked from commit b5bc53813d28cb4229f9800a36c1e600a239e6a9) --- package/boot/uboot-envtools/files/realtek | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/boot/uboot-envtools/files/realtek b/package/boot/uboot-envtools/files/realtek index cce0628ffc..9573e8944f 100644 --- a/package/boot/uboot-envtools/files/realtek +++ b/package/boot/uboot-envtools/files/realtek @@ -11,6 +11,8 @@ case "$board" in d-link,dgs-1210-16|\ d-link,dgs-1210-28|\ d-link,dgs-1210-10p|\ +zyxel,gs1900-8hp-v1|\ +zyxel,gs1900-8hp-v2|\ zyxel,gs1900-10hp) idx="$(find_mtd_index u-boot-env)" [ -n "$idx" ] && \ From ddd0176255369653d7aea5916654e66a1db5a2a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Thu, 11 Mar 2021 13:35:38 +0100 Subject: [PATCH 20/31] realtek: drop ethtool log noise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Demote a number of debugging printk's to pr_debug to avoid log nosie. Several of these functions are called as a result of userspace activity. This can cause a lot of log noise when userspace does periodic polling. Most of this could probably be removed completely, but let's keep it for now since these drivers are still in development. Signed-off-by: Bjørn Mork Tested-by: Stijn Tintel (cherry picked from commit ba220ad2fd915aaed2e9c850a84078c5c5977d3e) --- .../files-5.4/drivers/net/dsa/rtl83xx/dsa.c | 2 +- .../drivers/net/ethernet/rtl838x_eth.c | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c index e0832c42b8..af6d92cbc2 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c @@ -310,7 +310,7 @@ static int rtl83xx_phylink_mac_link_state(struct dsa_switch *ds, int port, link = priv->r->get_port_reg_le(priv->r->mac_link_sts); if (link & BIT_ULL(port)) state->link = 1; - pr_info("%s: link state: %llx\n", __func__, link & BIT_ULL(port)); + pr_debug("%s: link state: %llx\n", __func__, link & BIT_ULL(port)); state->duplex = 0; if (priv->r->get_port_reg_le(priv->r->mac_link_dup_sts) & BIT_ULL(port)) diff --git a/target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c index 7931daff07..2f678b7384 100644 --- a/target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c @@ -855,7 +855,7 @@ static int rtl838x_eth_open(struct net_device *ndev) struct ring_b *ring = priv->membase; int i, err; - pr_info("%s called: RX rings %d(length %d), TX rings %d(length %d)\n", + pr_debug("%s called: RX rings %d(length %d), TX rings %d(length %d)\n", __func__, priv->rxrings, priv->rxringlen, TXRINGS, TXRINGLEN); spin_lock_irqsave(&priv->lock, flags); @@ -1342,7 +1342,7 @@ static void rtl838x_validate(struct phylink_config *config, { __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; - pr_info("In %s\n", __func__); + pr_debug("In %s\n", __func__); if (!phy_interface_mode_is_rgmii(state->interface) && state->interface != PHY_INTERFACE_MODE_1000BASEX && @@ -1404,7 +1404,7 @@ static void rtl838x_mac_an_restart(struct phylink_config *config) if (priv->family_id != RTL8380_FAMILY_ID) return; - pr_info("In %s\n", __func__); + pr_debug("In %s\n", __func__); /* Restart by disabling and re-enabling link */ sw_w32(0x6192D, priv->r->mac_force_mode_ctrl + priv->cpu_port * 4); mdelay(20); @@ -1419,7 +1419,7 @@ static int rtl838x_mac_pcs_get_state(struct phylink_config *config, struct rtl838x_eth_priv *priv = netdev_priv(dev); int port = priv->cpu_port; - pr_info("In %s\n", __func__); + pr_debug("In %s\n", __func__); state->link = priv->r->get_mac_link_sts(port) ? 1 : 0; state->duplex = priv->r->get_mac_link_dup_sts(port) ? 1 : 0; @@ -1456,7 +1456,7 @@ static void rtl838x_mac_link_down(struct phylink_config *config, struct net_device *dev = container_of(config->dev, struct net_device, dev); struct rtl838x_eth_priv *priv = netdev_priv(dev); - pr_info("In %s\n", __func__); + pr_debug("In %s\n", __func__); /* Stop TX/RX to port */ sw_w32_mask(0x03, 0, priv->r->mac_port_ctrl(priv->cpu_port)); } @@ -1468,7 +1468,7 @@ static void rtl838x_mac_link_up(struct phylink_config *config, unsigned int mode struct net_device *dev = container_of(config->dev, struct net_device, dev); struct rtl838x_eth_priv *priv = netdev_priv(dev); - pr_info("In %s\n", __func__); + pr_debug("In %s\n", __func__); /* Restart TX/RX to port */ sw_w32_mask(0, 0x03, priv->r->mac_port_ctrl(priv->cpu_port)); } @@ -1479,7 +1479,7 @@ static void rtl838x_set_mac_hw(struct net_device *dev, u8 *mac) unsigned long flags; spin_lock_irqsave(&priv->lock, flags); - pr_info("In %s\n", __func__); + pr_debug("In %s\n", __func__); sw_w32((mac[0] << 8) | mac[1], priv->r->mac); sw_w32((mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5], priv->r->mac + 4); @@ -1547,7 +1547,7 @@ static int rtl838x_get_link_ksettings(struct net_device *ndev, { struct rtl838x_eth_priv *priv = netdev_priv(ndev); - pr_info("%s called\n", __func__); + pr_debug("%s called\n", __func__); return phylink_ethtool_ksettings_get(priv->phylink, cmd); } @@ -1556,7 +1556,7 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, { struct rtl838x_eth_priv *priv = netdev_priv(ndev); - pr_info("%s called\n", __func__); + pr_debug("%s called\n", __func__); return phylink_ethtool_ksettings_set(priv->phylink, cmd); } @@ -1678,7 +1678,7 @@ static int rtl931x_mdio_write(struct mii_bus *bus, int mii_id, static int rtl838x_mdio_reset(struct mii_bus *bus) { - pr_info("%s called\n", __func__); + pr_debug("%s called\n", __func__); /* Disable MAC polling the PHY so that we can start configuration */ sw_w32(0x00000000, RTL838X_SMI_POLL_CTRL); @@ -1693,7 +1693,7 @@ static int rtl839x_mdio_reset(struct mii_bus *bus) { return 0; - pr_info("%s called\n", __func__); + pr_debug("%s called\n", __func__); /* BUG: The following does not work, but should! */ /* Disable MAC polling the PHY so that we can start configuration */ sw_w32(0x00000000, RTL839X_SMI_PORT_POLLING_CTRL); @@ -1710,7 +1710,7 @@ static int rtl931x_mdio_reset(struct mii_bus *bus) sw_w32(0x00000000, RTL931X_SMI_PORT_POLLING_CTRL); sw_w32(0x00000000, RTL931X_SMI_PORT_POLLING_CTRL + 4); - pr_info("%s called\n", __func__); + pr_debug("%s called\n", __func__); return 0; } @@ -1767,7 +1767,7 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) struct device_node *mii_np; int ret; - pr_info("%s called\n", __func__); + pr_debug("%s called\n", __func__); mii_np = of_get_child_by_name(priv->pdev->dev.of_node, "mdio-bus"); if (!mii_np) { @@ -1827,7 +1827,7 @@ err_put_node: static int rtl838x_mdio_remove(struct rtl838x_eth_priv *priv) { - pr_info("%s called\n", __func__); + pr_debug("%s called\n", __func__); if (!priv->mii_bus) return 0; From 71131cb9c56451440a00fa11a8d28627368bb6ea Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 24 Feb 2021 22:03:39 +0100 Subject: [PATCH 21/31] realtek: Add generic zyxel_gs1900 image definition Add a new common device definition for the Zyxel GS1900 line of switches. Signed-off-by: Hauke Mehrtens (cherry picked from commit c6c8d597e18300cd679bf5ea88a46ed18709da01) --- target/linux/realtek/image/Makefile | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 424726c8a9..759653d4b5 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -84,37 +84,37 @@ define Device/netgear_gs110tpp-v1 endef TARGET_DEVICES += netgear_gs110tpp-v1 -define Device/zyxel_gs1900-10hp +define Device/zyxel_gs1900 SOC := rtl8380 IMAGE_SIZE := 6976k DEVICE_VENDOR := ZyXEL - DEVICE_MODEL := GS1900-10HP UIMAGE_MAGIC := 0x83800000 - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers AAZI | uImage gzip + KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers $$$$(ZYXEL_VERS) | \ + uImage gzip +endef + +define Device/zyxel_gs1900-10hp + $(Device/zyxel_gs1900) + DEVICE_MODEL := GS1900-10HP + ZYXEL_VERS := AAZI endef TARGET_DEVICES += zyxel_gs1900-10hp define Device/zyxel_gs1900-8hp-v1 - SOC := rtl8380 - IMAGE_SIZE := 6976k - DEVICE_VENDOR := ZyXEL + $(Device/zyxel_gs1900) DEVICE_MODEL := GS1900-8HP DEVICE_VARIANT := v1 + ZYXEL_VERS := AAHI DEVICE_PACKAGES += lua-rs232 - UIMAGE_MAGIC := 0x83800000 - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers AAHI | uImage gzip endef TARGET_DEVICES += zyxel_gs1900-8hp-v1 define Device/zyxel_gs1900-8hp-v2 - SOC := rtl8380 - IMAGE_SIZE := 6976k - DEVICE_VENDOR := ZyXEL + $(Device/zyxel_gs1900) DEVICE_MODEL := GS1900-8HP DEVICE_VARIANT := v2 + ZYXEL_VERS := AAHI DEVICE_PACKAGES += lua-rs232 - UIMAGE_MAGIC := 0x83800000 - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers AAHI | uImage gzip endef TARGET_DEVICES += zyxel_gs1900-8hp-v2 From 0fc789b7241517fbf8edd80eeef1e82e1bf7e37e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 27 Jan 2021 22:16:11 +0100 Subject: [PATCH 22/31] realtek: Add ZyXEL GS1900-8 The ZyXEL GS1900-8 is a 8 port switch without any PoE functionality or SFP ports, but otherwise similar to the other GS1900 switches. Specifications -------------- * Device: ZyXEL GS1900-8 v1.2 * SoC: Realtek RTL8380M 500 MHz MIPS 4KEc * Flash: Macronix MX25L12835F 16 MiB * RAM: Nanya NT5TU128M8GE-AC 128 MiB DDR2 SDRAM * Ethernet: 8x 10/100/1000 Mbit * LEDs: 1 PWR LED (green, not configurable) 1 SYS LED (green, configurable) 8 ethernet port status LEDs (green, SoC controlled) * Buttons: 1 on-off glide switch at the back (not configurable) 1 reset button at the right side, behind the air-vent (not configurable) 1 reset button on front panel (configurable) * Power 12V 1A barrel connector * UART: 1 serial header (JP2) with populated standard pin connector on the left side of the PCB, towards the back. Pins are labelled: + VCC (3.3V) + TX (really RX) + RX (really TX) + GND the labelling is done from the usb2serial connector's point of view, so RX/ TX are mixed up. Serial connection parameters for both devices: 115200 8N1. Installation ------------ Instructions are identical to those for the GS1900-10HP and GS1900-8HP. * Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10). * Set up a TFTP server on your client and make it serve the initramfs image. * Connect serial, power up the switch, interrupt U-boot by hitting the space bar, and enable the network: > rtk network on * Since the GS1900-10HP is a dual-partition device, you want to keep the OEM firmware on the backup partition for the time being. OpenWrt can only boot off the first partition anyway (hardcoded in the DTS). To make sure we are manipulating the first partition, issue the following commands: > setsys bootpartition 0 > savesys * Download the image onto the device and boot from it: > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-generic-zyxel_gs1900-8-initramfs-kernel.bin > bootm * Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it: > sysupgrade /tmp/openwrt-realtek-generic-zyxel_gs1900-8-squashfs-sysupgrade.bin Signed-off-by: Hauke Mehrtens (cherry picked from commit e6ba970b6ef2289a2a4d3dd6c0c158ee8d10160f) --- package/boot/uboot-envtools/files/realtek | 1 + target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts | 12 ++++++++++++ target/linux/realtek/image/Makefile | 7 +++++++ 3 files changed, 20 insertions(+) create mode 100644 target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts diff --git a/package/boot/uboot-envtools/files/realtek b/package/boot/uboot-envtools/files/realtek index 9573e8944f..a91ca82604 100644 --- a/package/boot/uboot-envtools/files/realtek +++ b/package/boot/uboot-envtools/files/realtek @@ -11,6 +11,7 @@ case "$board" in d-link,dgs-1210-16|\ d-link,dgs-1210-28|\ d-link,dgs-1210-10p|\ +zyxel,gs1900-8|\ zyxel,gs1900-8hp-v1|\ zyxel,gs1900-8hp-v2|\ zyxel,gs1900-10hp) diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts new file mode 100644 index 0000000000..e9c5efe603 --- /dev/null +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl8380_zyxel_gs1900.dtsi" + +/ { + compatible = "zyxel,gs1900-8", "realtek,rtl838x-soc"; + model = "ZyXEL GS1900-8 Switch"; +}; + +&gpio1 { + /delete-node/ poe_enable; +}; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 759653d4b5..d867d2a3d9 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -100,6 +100,13 @@ define Device/zyxel_gs1900-10hp endef TARGET_DEVICES += zyxel_gs1900-10hp +define Device/zyxel_gs1900-8 + $(Device/zyxel_gs1900) + DEVICE_MODEL := GS1900-8 + ZYXEL_VERS := AAHH +endef +TARGET_DEVICES += zyxel_gs1900-8 + define Device/zyxel_gs1900-8hp-v1 $(Device/zyxel_gs1900) DEVICE_MODEL := GS1900-8HP From 209f2386a57d19eae9d7d5daa192d2f81c3a9202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Sat, 13 Mar 2021 17:45:49 +0100 Subject: [PATCH 23/31] realtek: fix link-state interrupt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This bug was the root cause for the failing sfp driver. Acked-by: Birger Koblitz Signed-off-by: Bjørn Mork (cherry picked from commit b8e473d18c6af2abf0d047247fdbe6d178228ac0) --- .../realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c index 698f2892ea..197a96f8ad 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c @@ -555,7 +555,6 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev) int err = 0, i; struct rtl838x_switch_priv *priv; struct device *dev = &pdev->dev; - u64 irq_mask; u64 bpdu_mask; pr_debug("Probing RTL838X switch device\n"); @@ -650,9 +649,9 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev) /* Enable link and media change interrupts. Are the SERDES masks needed? */ sw_w32_mask(0, 3, priv->r->isr_glb_src); - - priv->r->set_port_reg_le(irq_mask, priv->r->isr_port_link_sts_chg); - priv->r->set_port_reg_le(irq_mask, priv->r->imr_port_link_sts_chg); + + priv->r->set_port_reg_le(priv->irq_mask, priv->r->isr_port_link_sts_chg); + priv->r->set_port_reg_le(priv->irq_mask, priv->r->imr_port_link_sts_chg); priv->link_state_irq = platform_get_irq(pdev, 0); pr_info("LINK state irq: %d\n", priv->link_state_irq); From d9b3edef4d84df70a62795cbad2012acc2ee6cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Sat, 13 Mar 2021 17:45:50 +0100 Subject: [PATCH 24/31] realtek: need to handle PHY_INTERFACE_MODE_NA for sfps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From the validate docs in include/linux/phylink.h: When state->interface is PHY_INTERFACE_MODE_NA, phylink expects the MAC driver to return all supported link modes. Tested-by: Birger Koblitz Signed-off-by: Bjørn Mork (cherry picked from commit 785d830e889ba18793acf369e447d704269169af) --- target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c index af6d92cbc2..2c49ea27a1 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c @@ -245,6 +245,7 @@ static void rtl83xx_phylink_validate(struct dsa_switch *ds, int port, pr_debug("In %s port %d", __func__, port); if (!phy_interface_mode_is_rgmii(state->interface) && + state->interface != PHY_INTERFACE_MODE_NA && state->interface != PHY_INTERFACE_MODE_1000BASEX && state->interface != PHY_INTERFACE_MODE_MII && state->interface != PHY_INTERFACE_MODE_REVMII && From ec7cd3808de1f6a830c9e99c2f30b85d80cd4046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Sat, 13 Mar 2021 17:45:51 +0100 Subject: [PATCH 25/31] realtek: re-enable sfp driver for ZyXEL GS1900-10HP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no need to define a static link or a phy for the sfp ports. Using phy-mode and managed properties to describe the link to the sfp phy. We have to keep the now unconnected virtual "phys" because the switch driver uses their "phy-is-integrated" property to figure out which ports to enable as fibre ports. Acked-by: Birger Koblitz Signed-off-by: Bjørn Mork (cherry picked from commit e8d391bd4650418182d96ca06ccd10d636efcbc3) --- .../realtek/dts/rtl8380_zyxel_gs1900-10hp.dts | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts index 92d0e25fc4..c16028788e 100644 --- a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts @@ -17,7 +17,7 @@ }; sfp0: sfp-p9 { - compatible = "_sff,sfp"; + compatible = "sff,sfp"; i2c-bus = <&i2c0>; los-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>; tx-fault-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>; @@ -36,7 +36,7 @@ }; sfp1: sfp-p10 { - compatible = "_sff,sfp"; + compatible = "sff,sfp"; i2c-bus = <&i2c1>; los-gpio = <&gpio1 33 GPIO_ACTIVE_HIGH>; tx-fault-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; @@ -55,29 +55,17 @@ port@24 { reg = <24>; label = "lan9"; - phy-mode = "rgmii-id"; - phy-handle = <&phy24>; + phy-mode = "1000base-x"; + managed = "in-band-status"; sfp = <&sfp0>; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; port@26 { reg = <26>; label = "lan10"; - phy-mode = "rgmii-id"; - phy-handle = <&phy26>; + phy-mode = "1000base-x"; + managed = "in-band-status"; sfp = <&sfp1>; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; }; }; From 66e470594adc43d0eb7a4ab969a376435d2e0863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Sat, 13 Mar 2021 17:45:52 +0100 Subject: [PATCH 26/31] realtek: enable HWMON for SFP sensors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds SFP sensors as a hwmon device, allowing readout of temperatures, DOM and other sensor readings available from the SFP. Example from a ZyXEL GS1900-10HP with a DOM capable 1000Base-SX SFP: root@gs1900-10hp:~# grep . /sys/class/hwmon/hwmon0/* /sys/class/hwmon/hwmon0/curr1_crit:90 /sys/class/hwmon/hwmon0/curr1_crit_alarm:0 /sys/class/hwmon/hwmon0/curr1_input:4 /sys/class/hwmon/hwmon0/curr1_label:bias /sys/class/hwmon/hwmon0/curr1_lcrit:0 /sys/class/hwmon/hwmon0/curr1_lcrit_alarm:0 /sys/class/hwmon/hwmon0/curr1_max:85 /sys/class/hwmon/hwmon0/curr1_max_alarm:0 /sys/class/hwmon/hwmon0/curr1_min:0 /sys/class/hwmon/hwmon0/curr1_min_alarm:0 /sys/class/hwmon/hwmon0/in0_crit:3795 /sys/class/hwmon/hwmon0/in0_crit_alarm:0 /sys/class/hwmon/hwmon0/in0_input:3317 /sys/class/hwmon/hwmon0/in0_label:VCC /sys/class/hwmon/hwmon0/in0_lcrit:2805 /sys/class/hwmon/hwmon0/in0_lcrit_alarm:0 /sys/class/hwmon/hwmon0/in0_max:3465 /sys/class/hwmon/hwmon0/in0_max_alarm:0 /sys/class/hwmon/hwmon0/in0_min:3135 /sys/class/hwmon/hwmon0/in0_min_alarm:0 /sys/class/hwmon/hwmon0/name:sfp_p10 /sys/class/hwmon/hwmon0/power1_crit:708 /sys/class/hwmon/hwmon0/power1_crit_alarm:0 /sys/class/hwmon/hwmon0/power1_input:259 /sys/class/hwmon/hwmon0/power1_label:TX_power /sys/class/hwmon/hwmon0/power1_lcrit:89 /sys/class/hwmon/hwmon0/power1_lcrit_alarm:0 /sys/class/hwmon/hwmon0/power1_max:501 /sys/class/hwmon/hwmon0/power1_max_alarm:0 /sys/class/hwmon/hwmon0/power1_min:126 /sys/class/hwmon/hwmon0/power1_min_alarm:0 /sys/class/hwmon/hwmon0/power2_crit:1259 /sys/class/hwmon/hwmon0/power2_crit_alarm:0 /sys/class/hwmon/hwmon0/power2_input:404 /sys/class/hwmon/hwmon0/power2_label:RX_power /sys/class/hwmon/hwmon0/power2_lcrit:6 /sys/class/hwmon/hwmon0/power2_lcrit_alarm:0 /sys/class/hwmon/hwmon0/power2_max:794 /sys/class/hwmon/hwmon0/power2_max_alarm:0 /sys/class/hwmon/hwmon0/power2_min:10 /sys/class/hwmon/hwmon0/power2_min_alarm:0 /sys/class/hwmon/hwmon0/temp1_crit:100000 /sys/class/hwmon/hwmon0/temp1_crit_alarm:0 /sys/class/hwmon/hwmon0/temp1_input:22547 /sys/class/hwmon/hwmon0/temp1_label:temperature /sys/class/hwmon/hwmon0/temp1_lcrit:-50000 /sys/class/hwmon/hwmon0/temp1_lcrit_alarm:0 /sys/class/hwmon/hwmon0/temp1_max:85000 /sys/class/hwmon/hwmon0/temp1_max_alarm:0 /sys/class/hwmon/hwmon0/temp1_min:-40000 /sys/class/hwmon/hwmon0/temp1_min_alarm:0 /sys/class/hwmon/hwmon0/uevent:OF_NAME=sfp-p10 /sys/class/hwmon/hwmon0/uevent:OF_FULLNAME=/sfp-p10 /sys/class/hwmon/hwmon0/uevent:OF_COMPATIBLE_0=sff,sfp /sys/class/hwmon/hwmon0/uevent:OF_COMPATIBLE_N=1 Tested-by: Birger Koblitz Signed-off-by: Bjørn Mork (cherry picked from commit 2a912fb63adc3fb3a1ee746589f6df4bb02e4296) --- target/linux/realtek/config-5.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/realtek/config-5.4 b/target/linux/realtek/config-5.4 index 2fbd904376..ed8c602337 100644 --- a/target/linux/realtek/config-5.4 +++ b/target/linux/realtek/config-5.4 @@ -82,6 +82,7 @@ CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y # CONFIG_HIGH_RES_TIMERS is not set +CONFIG_HWMON=y CONFIG_HZ=250 CONFIG_HZ_250=y CONFIG_HZ_PERIODIC=y From 037dc6b251248dc459a41d8602fa027e2bff5d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Sat, 13 Mar 2021 17:45:53 +0100 Subject: [PATCH 27/31] realtek: enabled Marvell and Realtek PHYs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rtl83xx-phy driver is necessary for proper configuration of the PHYs if U-Boot hasn't done that. 1000Base-T SFPs often contains a Marvell 88E1111 and will not work without this driver. Include it by default to support copper SFPs. Signed-off-by: Bjørn Mork (cherry picked from commit 07bf5aaa4c12d6e7eb797b3871a7586f90a46e67) --- target/linux/realtek/config-5.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/realtek/config-5.4 b/target/linux/realtek/config-5.4 index ed8c602337..51025d5d89 100644 --- a/target/linux/realtek/config-5.4 +++ b/target/linux/realtek/config-5.4 @@ -102,6 +102,7 @@ CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_I2C=y @@ -160,6 +161,7 @@ CONFIG_PINCTRL=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_SYSCON=y CONFIG_PSB6970_PHY=y +CONFIG_REALTEK_PHY=y CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y CONFIG_RESET_CONTROLLER=y From 37920d6ee16267c216e890f9d9487ef1ef1eff17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Sat, 13 Mar 2021 17:45:54 +0100 Subject: [PATCH 28/31] realtek: enable SerDes NWAY and SGMII negotiation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows copper SFPs to negotiate speeds lower than 1gig. Acked-by: Birger Koblitz Signed-off-by: Bjørn Mork (cherry picked from commit 963b2ae702510c11e912c9438fdb9222763a22d5) --- .../drivers/net/dsa/rtl83xx/common.c | 4 +- .../files-5.4/drivers/net/dsa/rtl83xx/dsa.c | 41 ++++++++++++++++++- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c index 197a96f8ad..6940afa7f2 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c @@ -368,8 +368,8 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) /* Enable PHY control via SoC */ if (priv->family_id == RTL8380_FAMILY_ID) { - /* Enable PHY control via SoC */ - sw_w32_mask(0, BIT(15), RTL838X_SMI_GLB_CTRL); + /* Enable SerDes NWAY and PHY control via SoC */ + sw_w32_mask(BIT(7), BIT(15), RTL838X_SMI_GLB_CTRL); } else { /* Disable PHY polling via SoC */ sw_w32_mask(BIT(7), 0, RTL839X_SMI_GLB_CTRL); diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c index 2c49ea27a1..987b47dc8f 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c @@ -344,6 +344,44 @@ static int rtl83xx_phylink_mac_link_state(struct dsa_switch *ds, int port, return 1; } + +static void rtl83xx_config_interface(int port, phy_interface_t interface) +{ + u32 old, int_shift, sds_shift; + + switch (port) { + case 24: + int_shift = 0; + sds_shift = 5; + break; + case 26: + int_shift = 3; + sds_shift = 0; + break; + default: + return; + } + + old = sw_r32(RTL838X_SDS_MODE_SEL); + switch (interface) { + case PHY_INTERFACE_MODE_1000BASEX: + if ((old >> sds_shift & 0x1f) == 4) + return; + sw_w32_mask(0x7 << int_shift, 1 << int_shift, RTL838X_INT_MODE_CTRL); + sw_w32_mask(0x1f << sds_shift, 4 << sds_shift, RTL838X_SDS_MODE_SEL); + break; + case PHY_INTERFACE_MODE_SGMII: + if ((old >> sds_shift & 0x1f) == 2) + return; + sw_w32_mask(0x7 << int_shift, 2 << int_shift, RTL838X_INT_MODE_CTRL); + sw_w32_mask(0x1f << sds_shift, 2 << sds_shift, RTL838X_SDS_MODE_SEL); + break; + default: + return; + } + pr_debug("configured port %d for interface %s\n", port, phy_modes(interface)); +} + static void rtl83xx_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state) @@ -377,10 +415,11 @@ static void rtl83xx_phylink_mac_config(struct dsa_switch *ds, int port, reg = sw_r32(priv->r->mac_force_mode_ctrl(port)); /* Auto-Negotiation does not work for MAC in RTL8390 */ if (priv->family_id == RTL8380_FAMILY_ID) { - if (mode == MLO_AN_PHY) { + if (mode == MLO_AN_PHY || phylink_autoneg_inband(mode)) { pr_debug("PHY autonegotiates\n"); reg |= BIT(2); sw_w32(reg, priv->r->mac_force_mode_ctrl(port)); + rtl83xx_config_interface(port, state->interface); return; } } From 81c1e0ab0061dfd768f5adf82ff9ebf257c630e2 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 22 Mar 2021 20:58:16 +0100 Subject: [PATCH 29/31] realtek: add ZYXEL_VERS to DEVICE_VARS Otherwise, the last defined value will be set for all devices. Fixes: c6c8d597e183 ("realtek: Add generic zyxel_gs1900 image definition") Signed-off-by: Adrian Schmutzler (cherry picked from commit 851dadc257b7223f879a3733507e83cfcaae1af1) --- target/linux/realtek/image/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index d867d2a3d9..18e5fedb9b 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -6,6 +6,8 @@ include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR = 0x80000000 KERNEL_ENTRY = 0x80000400 +DEVICE_VARS += ZYXEL_VERS + define Build/zyxel-vers ( echo VERS;\ for hw in $(1); do\ From 41a8bea72eb0503d2ded258761bc6334fee4a1c1 Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Sun, 28 Feb 2021 22:50:15 +0100 Subject: [PATCH 30/31] realtek: rename partitions in Netgear DTSI Switch the Netgear DTSI for the Realtek target from the OEM partition naming scheme to accepted OpenWrt naming practices. A quick git grep for 'u-boot-env' e.g. in the OpenWrt tree turns up almost 500 hits whereas grepping for 'bdinfo' (the OEM equivalent) returns a meagre 14. Signed-off-by: Stijn Segers (cherry picked from commit 1601b39b6197963e85c441a043702e022779f371) --- target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi index 2cda3c15a3..d31eb74001 100644 --- a/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi +++ b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi @@ -47,31 +47,31 @@ #size-cells = <1>; partition@0 { - label = "loader"; + label = "u-boot"; reg = <0x0000000 0x00e0000>; read-only; }; partition@e0000 { - label = "bdinfo"; + label = "u-boot-env"; reg = <0x00e0000 0x0010000>; read-only; }; partition@f0000 { - label = "sysinfo"; + label = "u-boot-env2"; reg = <0x00f0000 0x0010000>; read-only; }; partition@100000 { - label = "jffs2_cfg"; + label = "jffs"; reg = <0x0100000 0x0100000>; read-only; }; partition@200000 { - label = "jffs2_log"; + label = "jffs2"; reg = <0x0200000 0x0100000>; read-only; }; From 59980f7aaf585e65f87730b2f77d55662c362f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Tue, 6 Apr 2021 11:43:05 +0200 Subject: [PATCH 31/31] realtek: allow writing to "u-boot-env2" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit U-Boot uses the "bootpartition" variable stored in "u-boot-env2" to select the active system partition. Allow updates to enable system switching from OpenWrt. Signed-off-by: Bjørn Mork (cherry picked from commit 11d24ffe961570533a4fc54a7511d30c17290623) --- target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi | 1 - target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi | 1 - target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts | 1 - target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts | 1 - target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi | 1 - 5 files changed, 5 deletions(-) diff --git a/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi index d31eb74001..0d34ca5dc2 100644 --- a/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi +++ b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi @@ -61,7 +61,6 @@ partition@f0000 { label = "u-boot-env2"; reg = <0x00f0000 0x0010000>; - read-only; }; partition@100000 { diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi b/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi index c4441ec30e..d61ac3b2b8 100644 --- a/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi @@ -79,7 +79,6 @@ partition@50000 { label = "u-boot-env2"; reg = <0x50000 0x10000>; - read-only; }; partition@60000 { label = "jffs"; diff --git a/target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts b/target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts index 681d699e8a..fdcc01fdac 100644 --- a/target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts +++ b/target/linux/realtek/dts/rtl8382_allnet_all-sg8208m.dts @@ -79,7 +79,6 @@ partition@90000 { label = "u-boot-env2"; reg = <0x90000 0x10000>; - read-only; }; partition@a0000 { diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts index a2ebdad11b..e2f5e7a4c0 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts @@ -77,7 +77,6 @@ partition@c0000 { label = "u-boot-env2"; reg = <0x000c0000 0x40000>; - read-only; }; partition@280000 { label = "firmware"; diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi index e41c6f9f22..a14738c8a9 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210.dtsi @@ -61,7 +61,6 @@ partition@c0000 { label = "u-boot-env2"; reg = <0x000c0000 0x40000>; - read-only; }; partition@280000 { label = "firmware";