mediatek: fix platform_copy_config()
authorDaniel Golle <daniel@makrotopia.org>
Thu, 18 Jul 2024 10:56:13 +0000 (11:56 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 18 Jul 2024 12:05:46 +0000 (13:05 +0100)
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 <daniel@makrotopia.org>
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh

index eb11a3b5515bedeb35d00760677a2407642b052d..e059048d12952fe860cfa66b10bab177eadc570a 100755 (executable)
@@ -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|\
index a9a39f8e838f85960a48f1f4a40ca364889b6698..61025fb380df83e685f561c55019a3a15627c392 100755 (executable)
@@ -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
                ;;