mediatek: filogic: switch TP-LINK XDR series to fitblk
authorDaniel Golle <daniel@makrotopia.org>
Fri, 23 Feb 2024 16:03:00 +0000 (16:03 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 9 Apr 2024 14:07:41 +0000 (15:07 +0100)
Instead of using the deprecated FIT partition parser, use the new
fitblk driver instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
target/linux/mediatek/image/filogic.mk

index c851853286a01d406fabdef540bf4f144b36c273..1649b0775de02f9e3235020d8377b95c8414e0c1 100644 (file)
@@ -17,6 +17,8 @@
        };
 
        chosen {
+               bootargs = "root=/dev/fit0 rootwait";
+               rootdisk = <&ubi_rootdisk>;
                stdout-path = "serial0:115200n8";
        };
 
                        };
 
                        partition@580000 {
-                               label = "ubi";
+                               compatible = "linux,ubi";
                                reg = <0x580000 0x7800000>;
+                               label = "ubi";
+
+                               volumes {
+                                       ubi_rootdisk: ubi-volume-fit {
+                                               volname = "fit";
+                                       };
+                               };
                        };
                };
        };
index 380606412db6a52c58c26734eb5ff5458d542b70..6f69706d79b7ac093ef463094155ebbaf2d4dc19 100755 (executable)
@@ -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"
index c3de23f5e8c432eec378b12ad25ebba14b8d668e..818a7cef95b7d4547593274d6056a3cdf81892de 100644 (file)
@@ -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