mediatek: mt7623: validate uImage.FIT
authorDaniel Golle <[email protected]>
Mon, 21 Apr 2025 18:04:45 +0000 (19:04 +0100)
committerDaniel Golle <[email protected]>
Mon, 21 Apr 2025 18:04:45 +0000 (19:04 +0100)
Validate the uImage.FIT instead of only checking the image magic.

Signed-off-by: Daniel Golle <[email protected]>
target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh

index ce40e26afbb1d475f511a62c58fd7ee70a1f2f05..c8ad97665160ad26aaf321d956e54f28802a30ed 100755 (executable)
@@ -123,10 +123,8 @@ platform_check_image() {
        case "$(board_name)" in
        bananapi,bpi-r2|\
        unielec,u7623-02)
-               [ "$magic" != "d00dfeed" ] && {
-                       echo "Invalid image type."
-                       return 1
-               }
+               fit_check_image "$1"
+               return $?
                ;;
        unielec,u7623-02-emmc-512m)
                # Can always upgrade to the new-style full image