mediatek: filogic: switch to fitblk for Xiaomi Redmi AX6000
authorFurong Xu <xfr@outlook.com>
Thu, 7 Mar 2024 02:56:18 +0000 (10:56 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Fri, 8 Mar 2024 07:28:30 +0000 (15:28 +0800)
Use the new fitblk driver.

Run-tested: filogic/mt7986a-xiaomi-redmi-router-ax6000-ubootmod

Signed-off-by: Furong Xu <xfr@outlook.com>
target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000-ubootmod.dts
target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh

index 152bbd20f8cb69a2e0740b0cac15a948b9b5c311..a296c768f0974f6e13b6aa4be05a1de7ecae3b36 100644 (file)
@@ -8,9 +8,20 @@
        compatible = "xiaomi,redmi-router-ax6000-ubootmod", "mediatek,mt7986a";
 };
 
+&chosen {
+       rootdisk = <&ubi_rootdisk>;
+};
+
 &partitions {
        partition@580000 {
-               label = "ubi";
+               compatible = "linux,ubi";
                reg = <0x580000 0x7a80000>;
+               label = "ubi";
+
+               volumes {
+                       ubi_rootdisk: ubi-volume-fit {
+                               volname = "fit";
+                       };
+               };
        };
 };
index 4d58fbd2cf7b9bef6224e4c91db83ee448e1f706..723c4f329683a7bf9ed051c82eee9ac36b68783a 100644 (file)
@@ -17,7 +17,7 @@
                led-upgrade = &led_status_rgb;
        };
 
-       chosen {
+       chosen: chosen {
                stdout-path = "serial0:115200n8";
        };
 
index 526de081610368fde50fbe1df95d68e39a40732b..abb692fb41db1f4cb45d3cc9990f1435bc318c78 100755 (executable)
@@ -82,7 +82,8 @@ platform_do_upgrade() {
                ;;
        bananapi,bpi-r3|\
        bananapi,bpi-r3-mini|\
-       bananapi,bpi-r4)
+       bananapi,bpi-r4|\
+       xiaomi,redmi-router-ax6000-ubootmod)
                [ -e /dev/fit0 ] && fitblk /dev/fit0
                [ -e /dev/fitrw ] && fitblk /dev/fitrw
                bootdev="$(fitblk_get_bootdev)"
@@ -132,8 +133,7 @@ platform_do_upgrade() {
        tplink,tl-xdr6086|\
        tplink,tl-xdr6088|\
        xiaomi,mi-router-ax3000t-ubootmod|\
-       xiaomi,mi-router-wr30u-ubootmod|\
-       xiaomi,redmi-router-ax6000-ubootmod)
+       xiaomi,mi-router-wr30u-ubootmod)
                CI_KERNPART="fit"
                nand_do_upgrade "$1"
                ;;