diff options
Diffstat (limited to 'target/linux/mediatek/mt7622')
-rwxr-xr-x | target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh | 34 |
1 files changed, 23 insertions, 11 deletions
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 2c1460650f..cdae06e630 100755 --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -10,16 +10,24 @@ platform_do_upgrade() { bananapi,bpi-r64) export_bootdevice export_partdevice rootdev 0 - local fitpart=$(get_partition_by_name $rootdev "production") - [ "$fitpart" ] || return 1 - dd if=/dev/zero of=/dev/$fitpart bs=4096 count=1 2>/dev/null - blockdev --rereadpt /dev/$rootdev - get_image "$1" | dd of=/dev/$fitpart - blockdev --rereadpt /dev/$rootdev - local datapart=$(get_partition_by_name $rootdev "rootfs_data") - [ "$datapart" ] || return 0 - dd if=/dev/zero of=/dev/$datapart bs=4096 count=1 2>/dev/null - echo $datapart > /tmp/sysupgrade.datapart + case "$rootdev" in + mmc*) + local fitpart=$(get_partition_by_name $rootdev "production") + [ "$fitpart" ] || return 1 + dd if=/dev/zero of=/dev/$fitpart bs=4096 count=1 2>/dev/null + blockdev --rereadpt /dev/$rootdev + get_image "$1" | dd of=/dev/$fitpart + blockdev --rereadpt /dev/$rootdev + local datapart=$(get_partition_by_name $rootdev "rootfs_data") + [ "$datapart" ] || return 0 + dd if=/dev/zero of=/dev/$datapart bs=4096 count=1 2>/dev/null + echo $datapart > /tmp/sysupgrade.datapart + ;; + *) + CI_KERNPART="fit" + nand_do_upgrade "$1" + ;; + esac ;; buffalo,wsr-2533dhp2) local magic="$(get_magic_long "$1")" @@ -87,7 +95,11 @@ platform_copy_config_mmc() { platform_copy_config() { case "$(board_name)" in bananapi,bpi-r64) - platform_copy_config_mmc + export_bootdevice + export_partdevice rootdev 0 + if echo $rootdev | grep -q mmc; then + platform_copy_config_mmc + fi ;; esac } |