[][Refactor eMMC image of MT7986]

[Description]
Refactor eMMC image of MT7986.
The whole image format is changed:
 - Kernel and rootfs reside in individual partitions.
 - rootfs_data split from rootfs partition using loop device with offset.
 - Upgrading firmware usig tarball with saving config files supported.
 - No recovery partition needed.
 - No GPT partition offset and size restricted.

Important note:
Please select the following packages to make emmc firmware upgrading work:
e2fsprogs mkf2fs blkid blockdev losetup kmod-fs-ext4 kmod-fs-f2fs

[Release-log]
N/A

Change-Id: I9c8c3800ae45c0316a30b2fc0bc825fd71b0f24e
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/5258148
diff --git a/target/linux/mediatek/image/mt7986.mk b/target/linux/mediatek/image/mt7986.mk
index 7aac59d..65031a9 100644
--- a/target/linux/mediatek/image/mt7986.mk
+++ b/target/linux/mediatek/image/mt7986.mk
@@ -64,9 +64,11 @@
   DEVICE_MODEL := mt7986a-ax6000-emmc-rfb
   DEVICE_DTS := mt7986a-emmc-rfb
   DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
-  DEVICE_PACKAGES := mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 kmod-mmc
-  IMAGES := sysupgrade-emmc.bin.gz
-  IMAGE/sysupgrade-emmc.bin.gz := sysupgrade-emmc | gzip | append-metadata
+  SUPPORTED_DEVICES := mediatek,mt7986a-emmc-rfb
+  DEVICE_PACKAGES := mkf2fs e2fsprogs blkid blockdev losetup kmod-fs-ext4 \
+		     kmod-mmc kmod-fs-f2fs kmod-fs-vfat kmod-nls-cp437 \
+		     kmod-nls-iso8859-1
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 endef
 TARGET_DEVICES += mt7986a-ax6000-emmc-rfb
 
@@ -209,9 +211,11 @@
   DEVICE_MODEL := mt7986b-ax6000-emmc-rfb
   DEVICE_DTS := mt7986b-emmc-rfb
   DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
-  DEVICE_PACKAGES := mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 kmod-mmc
-  IMAGES := sysupgrade-emmc.bin.gz
-  IMAGE/sysupgrade-emmc.bin.gz := sysupgrade-emmc | gzip | append-metadata
+  SUPPORTED_DEVICES := mediatek,mt7986b-emmc-rfb
+  DEVICE_PACKAGES := mkf2fs e2fsprogs blkid blockdev losetup kmod-fs-ext4 \
+		     kmod-mmc kmod-fs-f2fs kmod-fs-vfat kmod-nls-cp437 \
+		     kmod-nls-iso8859-1
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 endef
 TARGET_DEVICES += mt7986b-ax6000-emmc-rfb