From 1ae3c53466942e05d2ab91c9432c65156f7228a1 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 23 Feb 2024 16:03:00 +0000 Subject: [PATCH] mediatek: filogic: switch TP-LINK XDR series to fitblk Instead of using the deprecated FIT partition parser, use the new fitblk driver instead. Signed-off-by: Daniel Golle --- .../mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi | 11 ++++++++++- .../filogic/base-files/lib/upgrade/platform.sh | 6 +++--- target/linux/mediatek/image/filogic.mk | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi index c851853286a..1649b0775de 100644 --- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi +++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi @@ -17,6 +17,8 @@ }; chosen { + bootargs = "root=/dev/fit0 rootwait"; + rootdisk = <&ubi_rootdisk>; stdout-path = "serial0:115200n8"; }; @@ -217,8 +219,15 @@ }; partition@580000 { - label = "ubi"; + compatible = "linux,ubi"; reg = <0x580000 0x7800000>; + label = "ubi"; + + volumes { + ubi_rootdisk: ubi-volume-fit { + volname = "fit"; + }; + }; }; }; }; diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 380606412db..6f69706d79b 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -83,6 +83,9 @@ platform_do_upgrade() { bananapi,bpi-r3|\ bananapi,bpi-r3-mini|\ bananapi,bpi-r4|\ + tplink,tl-xdr4288|\ + tplink,tl-xdr6086|\ + tplink,tl-xdr6088|\ xiaomi,redmi-router-ax6000-ubootmod) [ -e /dev/fit0 ] && fitblk /dev/fit0 [ -e /dev/fitrw ] && fitblk /dev/fitrw @@ -132,9 +135,6 @@ platform_do_upgrade() { mediatek,mt7981-rfb|\ netcore,n60|\ qihoo,360t7|\ - tplink,tl-xdr4288|\ - tplink,tl-xdr6086|\ - tplink,tl-xdr6088|\ xiaomi,mi-router-ax3000t-ubootmod|\ xiaomi,mi-router-wr30u-ubootmod) CI_KERNPART="fit" diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index c3de23f5e8c..818a7cef95b 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -930,7 +930,7 @@ define Device/tplink_tl-xdr-common fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k IMAGE/sysupgrade.itb := append-kernel | \ fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | append-metadata - DEVICE_PACKAGES := kmod-usb3 kmod-mt7986-firmware mt7986-wo-firmware + DEVICE_PACKAGES := fitblk kmod-usb3 kmod-mt7986-firmware mt7986-wo-firmware ARTIFACTS := preloader.bin bl31-uboot.fip ARTIFACT/preloader.bin := mt7986-bl2 spim-nand-ddr3 endef