aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-12-01 21:32:27 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-12-02 20:43:12 +0000
commitc9db3ed58ed01d80d6f8e59cbb202af4110e64dc (patch)
tree9abe4976acb16f8e7c2d97d785690dbadb6a3742 /target/linux/mediatek
parentfebc2b831f633d8d6648267952bd43c35689c36f (diff)
downloadupstream-c9db3ed58ed01d80d6f8e59cbb202af4110e64dc.tar.gz
upstream-c9db3ed58ed01d80d6f8e59cbb202af4110e64dc.tar.bz2
upstream-c9db3ed58ed01d80d6f8e59cbb202af4110e64dc.zip
mediatek: mt7622: switch to generic eMMC sysupgrade
Use functions in newly introduced emmc.sh for sysupgrade of the BananaPi BPi-R64. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/mediatek')
-rw-r--r--target/linux/mediatek/Makefile2
-rwxr-xr-xtarget/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh21
2 files changed, 5 insertions, 18 deletions
diff --git a/target/linux/mediatek/Makefile b/target/linux/mediatek/Makefile
index d42d0eacd7..fb2951cc9b 100644
--- a/target/linux/mediatek/Makefile
+++ b/target/linux/mediatek/Makefile
@@ -6,7 +6,7 @@ ARCH:=arm
BOARD:=mediatek
BOARDNAME:=MediaTek Ralink ARM
SUBTARGETS:=mt7622 mt7623 mt7629
-FEATURES:=dt-overlay fpu gpio nand pci pcie separate_ramdisk squashfs usb
+FEATURES:=dt-overlay emmc fpu gpio nand pci pcie separate_ramdisk squashfs usb
KERNEL_PATCHVER:=5.10
diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
index b9fa055854..e6afb9547c 100755
--- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
@@ -12,12 +12,9 @@ platform_do_upgrade() {
export_partdevice rootdev 0
case "$rootdev" in
mmc*)
- sync
- export UPGRADE_MMC_PARTDEV=$(find_mmc_part "production" $rootdev)
- [ "$UPGRADE_MMC_PARTDEV" ] || return 1
- export UPGRADE_MMC_IMAGE_BLOCKS=$(($(get_image "$1" | fwtool -i /dev/null -T - | dd of=$UPGRADE_MMC_PARTDEV bs=512 2>&1 | grep "records out" | cut -d' ' -f1)))
- [ "$UPGRADE_MMC_IMAGE_BLOCKS" ] || return 0
- dd if=/dev/zero of=$UPGRADE_MMC_PARTDEV bs=512 seek=$UPGRADE_MMC_IMAGE_BLOCKS count=8
+ CI_ROOTDEV="$rootdev"
+ CI_KERNPART="production"
+ emmc_do_upgrade "$1"
;;
*)
CI_KERNPART="fit"
@@ -86,23 +83,13 @@ platform_check_image() {
return 0
}
-platform_copy_config_mmc() {
- if [ ! -e "$UPGRADE_BACKUP" ] ||
- [ ! -e "$UPGRADE_MMC_PARTDEV" ] ||
- [ ! "$UPGRADE_MMC_IMAGE_BLOCKS" ]; then
- return
- fi
- dd if="$UPGRADE_BACKUP" of="$UPGRADE_MMC_PARTDEV" bs=512 seek=$UPGRADE_MMC_IMAGE_BLOCKS
- sync
-}
-
platform_copy_config() {
case "$(board_name)" in
bananapi,bpi-r64)
export_bootdevice
export_partdevice rootdev 0
if echo $rootdev | grep -q mmc; then
- platform_copy_config_mmc
+ emmc_copy_config
fi
;;
esac