From f7ec385c1381db731cd5f1d22fe31149ffcbbb5e Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Mon, 7 May 2018 22:41:04 +0200 Subject: ath79: add and enforce image metadata Add metadata to images and make the metdata mandatory. Signed-off-by: Mathias Kresin --- .../linux/ath79/base-files/lib/upgrade/platform.sh | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'target/linux/ath79/base-files/lib') diff --git a/target/linux/ath79/base-files/lib/upgrade/platform.sh b/target/linux/ath79/base-files/lib/upgrade/platform.sh index 2d67785fd5..dfcf70487b 100644 --- a/target/linux/ath79/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/base-files/lib/upgrade/platform.sh @@ -3,27 +3,10 @@ # PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 platform_check_image() { - local board=$(board_name) - local magic="$(get_magic_word "$1")" - local magic_long="$(get_magic_long "$1")" - - [ "$#" -gt 1 ] && return 1 - - case "$board" in - "ubnt,unifi") - [ "$magic" != "2705" ] && { - echo "Invalid image type." - return 1 - } - - return 0 - ;; - esac - - echo "Sysupgrade is not yet supported on $board." - return 1 + return 0 } platform_do_upgrade() { -- cgit v1.2.3