From b39375ae4cab359553e681fc3aacdf516cacf5ea Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 18 Jul 2024 11:56:13 +0100 Subject: [PATCH] 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 --- .../mediatek/filogic/base-files/lib/upgrade/platform.sh | 6 ++---- .../mediatek/mt7622/base-files/lib/upgrade/platform.sh | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) 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 ;; -- 2.30.2