[][OpenWrt Dev][Add dual-boot features for fstools]

[Description]
Add a new feature for fstools that disables splitting rootfs_data partition
from rootfs partition for rootdisk-type devices.
Also add partition key parsing support (PARTUUID=/PARTLABEL=)

[Release-log]
N/A

Change-Id: Id57707c9b586fc5acdca416e114bdd4dbeadd0f4
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/5595597
diff --git a/openwrt_patches-21.02/120-fstools-split-libblkid-tiny-as-dependency.patch b/openwrt_patches-21.02/120-fstools-split-libblkid-tiny-as-dependency.patch
new file mode 100644
index 0000000..227c3c0
--- /dev/null
+++ b/openwrt_patches-21.02/120-fstools-split-libblkid-tiny-as-dependency.patch
@@ -0,0 +1,50 @@
+--- a/package/system/fstools/Makefile
++++ b/package/system/fstools/Makefile
+@@ -36,10 +36,16 @@ CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_UBIFS_EXTROOT),-DCMAKE_UBIFS_EXTROOT=y)
+ CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_FULL_ACCESS_TIME),-DCMAKE_OVL_MOUNT_FULL_ACCESS_TIME=y)
+ CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB),-DCMAKE_OVL_MOUNT_COMPRESS_ZLIB=y)
+ 
++define Package/libfstools-bootparam
++  SECTION:=libs
++  CATEGORY:=Libraries
++  TITLE:=Boot parameter library for OpenWrt filesystem tools
++endef
++
+ define Package/fstools
+   SECTION:=base
+   CATEGORY:=Base system
+-  DEPENDS:=+ubox +USE_GLIBC:librt +NAND_SUPPORT:ubi-utils
++  DEPENDS:=+ubox +USE_GLIBC:librt +NAND_SUPPORT:ubi-utils +libfstools-bootparam
+   TITLE:=OpenWrt filesystem tools
+   MENU:=1
+ endef
+@@ -79,7 +85,7 @@ define Package/block-mount
+   SECTION:=base
+   CATEGORY:=Base system
+   TITLE:=Block device mounting and checking
+-  DEPENDS:=+ubox +libubox +libuci +libblobmsg-json +libjson-c
++  DEPENDS:=+ubox +libubox +libuci +libblobmsg-json +libjson-c +libfstools-bootparam
+ endef
+ 
+ define Package/blockd
+@@ -89,6 +95,12 @@ define Package/blockd
+   DEPENDS:=+block-mount +fstools +libubus +kmod-fs-autofs4 +libblobmsg-json +libjson-c
+ endef
+ 
++define Package/libfstools-bootparam/install
++	$(INSTALL_DIR) $(1)/lib
++
++	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libfstools-bootparam.so $(1)/lib/
++endef
++
+ define Package/fstools/install
+ 	$(INSTALL_DIR) $(1)/sbin $(1)/lib
+ 
+@@ -132,6 +144,7 @@ define Build/InstallDev
+ 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libubi-utils.a $(1)/usr/lib/
+ endef
+ 
++$(eval $(call BuildPackage,libfstools-bootparam))
+ $(eval $(call BuildPackage,fstools))
+ $(eval $(call BuildPackage,snapshot-tool))
+ $(eval $(call BuildPackage,block-mount))