From: Daniel Golle Date: Thu, 18 Jul 2024 10:56:13 +0000 (+0100) Subject: mediatek: fix platform_copy_config() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b39375ae4cab359553e681fc3aacdf516cacf5ea;p=openwrt%2Fstaging%2Fneocturne.git mediatek: fix platform_copy_config() Also use env variables exported by export_fitblk_rootdev() in platform_copy_config(). Fixes: 4448d6325f ("mediatek: make use of common uImage.FIT upgrade functions") Signed-off-by: Daniel Golle --- diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index eb11a3b551..e059048d12 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -218,11 +218,9 @@ platform_copy_config() { bananapi,bpi-r3-mini|\ bananapi,bpi-r4|\ bananapi,bpi-r4-poe) - case "$(fitblk_get_bootdev)" in - mmcblk*) + if [ "$CI_METHOD" = "emmc" ]; then emmc_copy_config - ;; - esac + fi ;; acer,predator-w6|\ glinet,gl-mt2500|\ 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 a9a39f8e83..61025fb380 100755 --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -86,7 +86,7 @@ platform_check_image() { platform_copy_config() { case "$(board_name)" in bananapi,bpi-r64) - if fitblk_get_bootdev | grep -q mmc; then + if [ "$CI_METHOD" = "emmc" ]; then emmc_copy_config fi ;;