mediatek: mt7623: get rid of fitblk_get_bootdev
authorDaniel Golle <daniel@makrotopia.org>
Sun, 11 Aug 2024 17:14:40 +0000 (18:14 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 12 Aug 2024 18:20:49 +0000 (19:20 +0100)
Also migrate mt7623 to new fitblk support scripts which simplify
sysupgrade when using uImage.FIT. This had been forgotten previously.

Fixes: 4448d6325f ("mediatek: make use of common uImage.FIT upgrade functions")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh

index 9cfb15cf3d4787d683fb70c70fc9c955f35bc281..bce6709a58abd9a2028bd98aa8590a6662021091 100755 (executable)
@@ -1,4 +1,5 @@
 REQUIRE_IMAGE_METADATA=1
+RAMFS_COPY_BIN='fitblk'
 
 # Legacy full system upgrade including preloader for MediaTek SoCs on eMMC or SD
 legacy_mtk_mmc_full_upgrade() {
@@ -83,11 +84,7 @@ platform_do_upgrade() {
        case "$board" in
        bananapi,bpi-r2|\
        unielec,u7623-02)
-               [ -e /dev/fit0 ] && fitblk /dev/fit0
-               [ -e /dev/fitrw ] && fitblk /dev/fitrw
-               bootdev="$(fitblk_get_bootdev)"
-               EMMC_KERN_DEV="/dev/$bootdev"
-               emmc_do_upgrade "$1"
+               fit_do_upgrade "$1"
                ;;
        unielec,u7623-02-emmc-512m)
                local magic="$(get_magic_long "$1")"