mediatek: enable rootwait for cmcc rax3000m emmc version
authorTianling Shen <cnsztl@immortalwrt.org>
Fri, 5 Apr 2024 07:44:24 +0000 (15:44 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 11 Aug 2024 17:18:39 +0000 (19:18 +0200)
Sometimes the mmc deivce may come up later than kernel attempts to
mount rootfs, resulting kernel panic. Enable rootwait to fix it.

Reported-by: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15077
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-mediatek/patches/437-add-cmcc_rax3000m.patch
target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-emmc.dtso
target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts

index 26e0e30a996628804da70cefd147df296ad7d48c..1d636b64a74e0e73b72fe9934d71996421375988 100644 (file)
 +serverip=192.168.1.254
 +loadaddr=0x46000000
 +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
-+bootargs=root=/dev/mmcblk0p65
++bootargs=root=/dev/mmcblk0p65 rootwait
 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
 +bootconf=config-1#mt7981b-cmcc-rax3000m-emmc
 +bootdelay=0
index c1c9c75c271ae318b067c9ef97d319cfbbf13488..df0a79eb1ee73a0cfc703e97f8787edbcb6a1343 100644 (file)
@@ -7,6 +7,13 @@
        compatible = "cmcc,rax3000m", "mediatek,mt7981";
 
        fragment@0 {
+               target = <&chosen>;
+               __overlay_ {
+                       bootargs-append = " rootwait";
+               };
+       };
+
+       fragment@1 {
                target = <&mmc0>;
                __overlay__ {
                        bus-width = <8>;
@@ -22,7 +29,7 @@
                };
        };
 
-       fragment@1 {
+       fragment@2 {
                target = <&pio>;
                __overlay__ {
                        mmc0_pins_default: mmc0-pins {
index 3f330f40fae43e946d3235367dd87a6781509258..bb0d43c1120b2809abe3b2fb81c4819511c72287 100644 (file)
@@ -21,7 +21,7 @@
                serial0 = &uart0;
        };
 
-       chosen {
+       chosen: chosen {
                stdout-path = "serial0:115200n8";
        };