ramips: add image checks
authorChen Minqiang <ptpt52@gmail.com>
Thu, 11 Jan 2018 15:43:09 +0000 (23:43 +0800)
committerMathias Kresin <dev@kresin.me>
Mon, 15 Jan 2018 20:45:43 +0000 (21:45 +0100)
As long as we can't enforce image metadata, we need to use (platform)
image checks to have at least soem kind of validation.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
target/linux/ramips/base-files/lib/upgrade/platform.sh

index cd210013248d1ef63dc9463ea588bd64fb670866..e2ab3a643e5ed6e9edb3ab523fe58210327d5a77 100755 (executable)
@@ -264,9 +264,11 @@ platform_check_image() {
                ;;
        hc5962|\
        mir3g|\
-       r6220)
-               # these boards use metadata images
-               return 0
+       r6220|\
+       ubnt-erx|\
+       ubnt-erx-sfp)
+               nand_do_platform_check "$board" "$1"
+               return $?;
                ;;
        re350-v1)
                [ "$magic" != "01000000" ] && {
@@ -275,11 +277,6 @@ platform_check_image() {
                }
                return 0
                ;;
-       ubnt-erx|\
-       ubnt-erx-sfp)
-               nand_do_platform_check "$board" "$1"
-               return $?;
-               ;;
        wcr-1166ds|\
        wsr-1166)
                [ "$magic" != "48445230" ] && {