[openwrt/openwrt] mediatek: mt7623: validate uImage.FIT

LEDE Commits lede-commits at lists.infradead.org
Mon Apr 21 11:06:12 PDT 2025


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/493b0cd8176ac53ba6377c09d8eb591afe6e0cd3

commit 493b0cd8176ac53ba6377c09d8eb591afe6e0cd3
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Apr 21 19:04:45 2025 +0100

    mediatek: mt7623: validate uImage.FIT
    
    Validate the uImage.FIT instead of only checking the image magic.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
index ce40e26afb..c8ad976651 100755
--- a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
@@ -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




More information about the lede-commits mailing list