From ffd5cca73eb1f8bcdeae06de7efc7638c49499ab Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 9 Aug 2024 03:48:13 +0100 Subject: [PATCH] mediatek: filogic: convert MT7981 RFB to fitblk Use fitblk driver instead of deprecated uImage.FIT partition parser. Signed-off-by: Daniel Golle --- .../boot/dts/mediatek/mt7981-rfb-spim-nand.dtso | 14 +++++++++++++- .../arch/arm64/boot/dts/mediatek/mt7981-rfb.dts | 3 ++- .../filogic/base-files/lib/upgrade/platform.sh | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso index 5b51dfd671..ab53f96cde 100644 --- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso +++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso @@ -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"; @@ -50,13 +55,20 @@ 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>; diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts index b2bb692956..791b56113a 100644 --- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts +++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts @@ -15,8 +15,9 @@ serial0 = &uart0; }; - chosen { + chosen: chosen { stdout-path = "serial0:115200n8"; + bootargs-append = " root=/dev/fit0 rootwait"; }; memory { diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 2398040e33..dedb3a4a1f 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -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|\ -- 2.30.2