diff options
author | Daniel Golle <daniel@makrotopia.org> | 2021-12-01 21:33:25 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-12-02 20:43:17 +0000 |
commit | c47e82d255ef461e7b426f6ada067affc2836e32 (patch) | |
tree | a715dac2f29b66fee9cc062dfd5feeaf1b19d70b /target/linux/mediatek/mt7623 | |
parent | c9db3ed58ed01d80d6f8e59cbb202af4110e64dc (diff) | |
download | upstream-c47e82d255ef461e7b426f6ada067affc2836e32.tar.gz upstream-c47e82d255ef461e7b426f6ada067affc2836e32.tar.bz2 upstream-c47e82d255ef461e7b426f6ada067affc2836e32.zip |
mediatek: mt7623: switch to BPi-R2 to generic eMMC sysugprade
Make use of new functions in emmc.sh to implement sysupgrade on the
BananaPi BPi-R2.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/mediatek/mt7623')
-rwxr-xr-x | target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh | 19 |
1 files changed, 3 insertions, 16 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 0afc15afc9..452a533db0 100755 --- a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh @@ -84,14 +84,11 @@ platform_do_upgrade() { case "$board" in bananapi,bpi-r2) - sync export_bootdevice export_partdevice fitpart 3 [ "$fitpart" ] || return 1 - export UPGRADE_MMC_PARTDEV="/dev/$fitpart" - 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 + EMMC_KERN_DEV="/dev/$fitpart" + emmc_do_upgrade "$1" ;; unielec,u7623-02-emmc-512m) @@ -166,20 +163,10 @@ 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-r2) - platform_copy_config_mmc + emmc_copy_config ;; unielec,u7623-02-emmc-512m) # platform_do_upgrade() will have set $recoverydev |