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

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

index 9019eb690050ccbaf4a038513761464b9aa61d61..841397d4ef8a70850407c1518ad9017b12c95162 100755 (executable)
@@ -69,11 +69,8 @@ platform_check_image() {
                return $?
                ;;
        *)
-               [ "$magic" != "d00dfeed" ] && {
-                       echo "Invalid image type."
-                       return 1
-               }
-               return 0
+               fit_check_image "$1"
+               return $?
                ;;
        esac