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>
This commit is contained in:
parent
febc2b831f
commit
c9db3ed58e
|
@ -6,7 +6,7 @@ ARCH:=arm
|
||||||
BOARD:=mediatek
|
BOARD:=mediatek
|
||||||
BOARDNAME:=MediaTek Ralink ARM
|
BOARDNAME:=MediaTek Ralink ARM
|
||||||
SUBTARGETS:=mt7622 mt7623 mt7629
|
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
|
KERNEL_PATCHVER:=5.10
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,9 @@ platform_do_upgrade() {
|
||||||
export_partdevice rootdev 0
|
export_partdevice rootdev 0
|
||||||
case "$rootdev" in
|
case "$rootdev" in
|
||||||
mmc*)
|
mmc*)
|
||||||
sync
|
CI_ROOTDEV="$rootdev"
|
||||||
export UPGRADE_MMC_PARTDEV=$(find_mmc_part "production" $rootdev)
|
CI_KERNPART="production"
|
||||||
[ "$UPGRADE_MMC_PARTDEV" ] || return 1
|
emmc_do_upgrade "$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_KERNPART="fit"
|
CI_KERNPART="fit"
|
||||||
|
@ -86,23 +83,13 @@ platform_check_image() {
|
||||||
return 0
|
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() {
|
platform_copy_config() {
|
||||||
case "$(board_name)" in
|
case "$(board_name)" in
|
||||||
bananapi,bpi-r64)
|
bananapi,bpi-r64)
|
||||||
export_bootdevice
|
export_bootdevice
|
||||||
export_partdevice rootdev 0
|
export_partdevice rootdev 0
|
||||||
if echo $rootdev | grep -q mmc; then
|
if echo $rootdev | grep -q mmc; then
|
||||||
platform_copy_config_mmc
|
emmc_copy_config
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue