[][In dual image, the root_fs_data volume cannot be mounted rightly when  image is damaged]

[Description]
Fix the issue of ubi rootfs mount for dual image.

[Release-log]
N/A


Change-Id: I3ab43f186090bac294e93bc83bbda86be87f49b9
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7160286
diff --git a/target/linux/mediatek/patches-5.4/0961-dual-image-mount-rootfs.patch b/target/linux/mediatek/patches-5.4/0961-dual-image-mount-rootfs.patch
new file mode 100755
index 0000000..99f72c0
--- /dev/null
+++ b/target/linux/mediatek/patches-5.4/0961-dual-image-mount-rootfs.patch
@@ -0,0 +1,27 @@
+Index: linux-5.4.224/init/do_mounts.c
+===================================================================
+--- linux-5.4.224.orig/init/do_mounts.c
++++ linux-5.4.224/init/do_mounts.c
+@@ -576,7 +576,8 @@ void __init mount_root(void)
+ 	}
+ #endif
+ #ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
+-	if (!mount_ubi_rootfs())
++	extern bool dual_boot;
++	if (!dual_boot && !mount_ubi_rootfs())
+ 		return;
+ #endif
+ #ifdef CONFIG_BLOCK
+Index: linux-5.4.224/kernel/boot_param.c
+===================================================================
+--- linux-5.4.224.orig/kernel/boot_param.c
++++ linux-5.4.224/kernel/boot_param.c
+@@ -10,7 +10,7 @@
+ 
+ #define BOOT_PARAM_STR_MAX_LEN			256
+ 
+-static bool dual_boot;
++bool dual_boot;
+ module_param(dual_boot, bool, 0444);
+ 
+ static bool no_split_rootfs_data;