diff options
author | Mathias Kresin <dev@kresin.me> | 2018-05-07 22:41:04 +0200 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2018-05-17 07:40:19 +0200 |
commit | f7ec385c1381db731cd5f1d22fe31149ffcbbb5e (patch) | |
tree | d6d54c02093558fa29f09033497baef67e97074f /target/linux/ath79/base-files/lib | |
parent | f77db1a59036d896139e6cddcdb62bf38f2f9ff6 (diff) | |
download | upstream-f7ec385c1381db731cd5f1d22fe31149ffcbbb5e.tar.gz upstream-f7ec385c1381db731cd5f1d22fe31149ffcbbb5e.tar.bz2 upstream-f7ec385c1381db731cd5f1d22fe31149ffcbbb5e.zip |
ath79: add and enforce image metadata
Add metadata to images and make the metdata mandatory.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/ath79/base-files/lib')
-rw-r--r-- | target/linux/ath79/base-files/lib/upgrade/platform.sh | 21 |
1 files changed, 2 insertions, 19 deletions
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() { |