mediatek: filogic: convert Zyxel EX5601-T0 to fitblk
authorDaniel Golle <daniel@makrotopia.org>
Thu, 8 Aug 2024 15:43:25 +0000 (16:43 +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/mt7986a-zyxel-ex5601-t0-ubootmod.dts
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh

index 62ce50ed232f15b4de428d07cf39b5e13bf8fc05..d56224397018fbc72c6f177818e02f711bf0357e 100644 (file)
 / {
        model = "Zyxel EX5601-T0 ubootmod";
        compatible = "zyxel,ex5601-t0-ubootmod", "mediatek,mt7986a";
+
        memory@40000000 {
                device_type = "memory";
                reg = <0x40000000 0x20000000>;
        };
+
+       chosen {
+               bootargs-append = " root=/dev/fit0 rootwait";
+               rootdisk = <&ubi_rootdisk>;
+       };
 };
 
 &nand_partitions {
                reg = <0x380000 0x0200000>;
                read-only;
        };
-                       
+
        partition@540000 {
                label = "zloader";
                reg = <0x540000 0x0040000>;
                read-only;
        };
-                       
+
        partition@580000 {
                label = "ubi";
                reg = <0x580000 0x1da80000>;
+               compatible = "linux,ubi";
+
+               volumes {
+                       ubi_rootdisk: ubi-volume-fit {
+                               volname = "fit";
+                       };
+               };
        };
 };
 
index 0fdbf6e9398e92efcbd9e70aee9dfdf9649343f2..bf4919653f4da1df50c32989bc5ea66f8dad2b0c 100755 (executable)
@@ -85,7 +85,8 @@ platform_do_upgrade() {
        tplink,tl-xtr8488|\
        xiaomi,mi-router-ax3000t-ubootmod|\
        xiaomi,redmi-router-ax6000-ubootmod|\
-       xiaomi,mi-router-wr30u-ubootmod)
+       xiaomi,mi-router-wr30u-ubootmod|\
+       zyxel,ex5601-t0-ubootmod)
                fit_do_upgrade "$1"
                ;;
        acer,predator-w6|\
@@ -136,11 +137,6 @@ platform_do_upgrade() {
                CI_ROOT_UBIPART=ubi
                nand_do_upgrade "$1"
                ;;
-        zyxel,ex5601-t0-ubootmod)
-               CI_KERNPART="fit"
-               CI_ROOTPART="ubi_rootfs"
-                nand_do_upgrade "$1"
-                ;;
        unielec,u7981-01*)
                local rootdev="$(cmdline_get_var root)"
                rootdev="${rootdev##*/}"