aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-11-01 14:03:25 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-11-01 18:00:57 +0000
commitb0703590359b876228d4603ca75af82ba87a6f5b (patch)
tree92a1ccb3d8c5f478e3932e0879801b99df982715 /target
parent5a0348fdc3c01af24bc2a867ab2f71125615b1f0 (diff)
downloadupstream-b0703590359b876228d4603ca75af82ba87a6f5b.tar.gz
upstream-b0703590359b876228d4603ca75af82ba87a6f5b.tar.bz2
upstream-b0703590359b876228d4603ca75af82ba87a6f5b.zip
mediatek: mt7623: make use of find_mmc_part
Use find_mmc_part instead of previously introduced get_partition_by_name which requires a custom kernel patch. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
index 11da6314dc..29c4bf1e03 100755
--- a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
@@ -89,13 +89,13 @@ platform_do_upgrade() {
blockdev --rereadpt /dev/$rootdev || return 1
export_partdevice fitpart 3
[ "$fitpart" ] || return 1
- dd if=/dev/zero of=/dev/$fitpart bs=4096 count=1 2>/dev/null
+ dd if=/dev/zero of=$fitpart bs=4096 count=1 2>/dev/null
blockdev --rereadpt /dev/$rootdev
- get_image "$1" | dd of=/dev/$fitpart
+ get_image "$1" | dd of=$fitpart
blockdev --rereadpt /dev/$rootdev
- local datapart=$(get_partition_by_name $rootdev "rootfs_data")
+ local datapart=$(find_mmc_part "rootfs_data" $rootdev)
[ "$datapart" ] || return 0
- dd if=/dev/zero of=/dev/$datapart bs=4096 count=1 2>/dev/null
+ dd if=/dev/zero of=$datapart bs=4096 count=1 2>/dev/null
echo $datapart > /tmp/sysupgrade.datapart
;;
@@ -175,7 +175,7 @@ platform_copy_config_mmc() {
[ -e "$UPGRADE_BACKUP" ] || return
local datapart=$(cat /tmp/sysupgrade.datapart)
[ "$datapart" ] || echo "no rootfs_data partition, cannot keep configuration." >&2
- dd if="$UPGRADE_BACKUP" of=/dev/$datapart
+ dd if="$UPGRADE_BACKUP" of=$datapart
sync
}