mediatek: filogic: convert Xiaomi WR30U to fitblk
authorDaniel Golle <daniel@makrotopia.org>
Thu, 8 Aug 2024 15:42:15 +0000 (16:42 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 28 Aug 2024 14:11:51 +0000 (15:11 +0100)
Use fitblk driver instead of deprecated partition parser.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u-ubootmod.dts
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh

index 6d0f3feb45b23737b53a4b0d9decafb19ead0846..b22bbed37952cf5215338d8b730efd4b8a93383b 100644 (file)
@@ -6,11 +6,23 @@
 / {
        model = "Xiaomi Mi Router WR30U (OpenWrt U-Boot layout)";
        compatible = "xiaomi,mi-router-wr30u-ubootmod", "mediatek,mt7981";
+
+       chosen {
+               bootargs-append = " root=/dev/fit0 rootwait";
+               rootdisk = <&ubi_rootdisk>;
+       };
 };
 
 &partitions {
        partition@600000 {
                label = "ubi";
                reg = <0x600000 0x7000000>;
+               compatible = "linux,ubi";
+
+               volumes {
+                       ubi_rootdisk: ubi-volume-fit {
+                               volname = "fit";
+                       };
+               };
        };
 };
index a160811b2042e09ead69341831c01252f8828301..034f94b51553aab21cdc79f78a22fce01434b8b8 100755 (executable)
@@ -83,7 +83,8 @@ platform_do_upgrade() {
        tplink,tl-xdr6088|\
        tplink,tl-xtr8488|\
        xiaomi,mi-router-ax3000t-ubootmod|\
-       xiaomi,redmi-router-ax6000-ubootmod)
+       xiaomi,redmi-router-ax6000-ubootmod|\
+       xiaomi,mi-router-wr30u-ubootmod)
                fit_do_upgrade "$1"
                ;;
        acer,predator-w6|\
@@ -117,8 +118,7 @@ platform_do_upgrade() {
                CI_ROOTPART="rootfs"
                emmc_do_upgrade "$1"
                ;;
-       netcore,n60|\
-       xiaomi,mi-router-wr30u-ubootmod)
+       netcore,n60)
                CI_KERNPART="fit"
                nand_do_upgrade "$1"
                ;;