[][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/mt7986/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7986/base-files/lib/upgrade/platform.sh
index 2ee99c7..4a1573a 100644
--- a/target/linux/mediatek/mt7986/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/mt7986/base-files/lib/upgrade/platform.sh
@@ -1,3 +1,5 @@
+RAMFS_COPY_BIN='mkfs.f2fs blkid blockdev'
+
platform_do_upgrade() {
local board=$(board_name)
@@ -5,6 +7,9 @@
*snand*)
nand_do_upgrade "$1"
;;
+ *emmc*)
+ mtk_mmc_do_upgrade "$1"
+ ;;
*)
default_do_upgrade "$1"
;;
@@ -20,7 +25,8 @@
[ "$#" -gt 1 ] && return 1
case "$board" in
- *snand*)
+ *snand* |\
+ *emmc*)
# tar magic `ustar`
magic="$(dd if="$1" bs=1 skip=257 count=5 2>/dev/null)"
@@ -42,4 +48,3 @@
return 0
}
-