mediatek: filogic: convert MT7981 RFB to fitblk
authorDaniel Golle <daniel@makrotopia.org>
Fri, 9 Aug 2024 02:48:13 +0000 (03:48 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 28 Aug 2024 14:11:51 +0000 (15:11 +0100)
Use fitblk driver instead of deprecated uImage.FIT partition parser.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh

index 5b51dfd671c228f30004223bf65dfd151deea3e4..ab53f96cde844e494ccf07cebc4718d76411af07 100644 (file)
@@ -6,6 +6,11 @@
        compatible = "mediatek,mt7981-rfb", "mediatek,mt7981";
 
        fragment@0 {
+               target = <&chosen>;
+               rootdisk-spim-nand = <&ubi_rootdisk>;
+       };
+
+       fragment@1 {
                target = <&spi0>;
                __overlay__ {
                        status = "okay";
                                        partition@580000 {
                                                label = "ubi";
                                                reg = <0x580000 0x4000000>;
+                                               compatible = "linux,ubi";
+
+                                               volumes {
+                                                       ubi_rootdisk: ubi-volume-fit {
+                                                               volname = "fit";
+                                                       };
+                                               };
                                        };
                                };
                        };
                };
        };
 
-       fragment@1 {
+       fragment@2 {
                target = <&wifi>;
                __overlay__ {
                        mediatek,mtd-eeprom = <&factory 0x0>;
index b2bb6929562ebd58550477cdbf8838d8bb38d489..791b56113a8dfb20e42364878df007f0d308350d 100644 (file)
@@ -15,8 +15,9 @@
                serial0 = &uart0;
        };
 
-       chosen {
+       chosen: chosen {
                stdout-path = "serial0:115200n8";
+               bootargs-append = " root=/dev/fit0 rootwait";
        };
 
        memory {
index 2398040e33f71a3dddb284756f93eaa4a46cae6b..dedb3a4a1fa588bcacc9074fa85a9b7c380a46e6 100755 (executable)
@@ -71,6 +71,7 @@ platform_do_upgrade() {
        bananapi,bpi-r4-poe|\
        cmcc,rax3000m|\
        jdcloud,re-cp-03|\
+       mediatek,mt7981-rfb|\
        mediatek,mt7988a-rfb|\
        nokia,ea0326gmp|\
        openwrt,one|\
@@ -114,7 +115,6 @@ platform_do_upgrade() {
                ;;
        h3c,magic-nx30-pro|\
        jcg,q30-pro|\
-       mediatek,mt7981-rfb|\
        netcore,n60|\
        qihoo,360t7|\
        xiaomi,mi-router-ax3000t-ubootmod|\