mediatke: add support for elecom-wrc-2533gent
[openwrt/staging/jow.git] / target / linux / mediatek / mt7622 / base-files / lib / upgrade / platform.sh
index f2264592a466b414ba197c79ceafc70d4792dedd..c5b4cf306bba2027ea96db306c6eab340e677f0e 100755 (executable)
@@ -8,14 +8,23 @@ platform_do_upgrade() {
        esac
 }
 
-PART_NAME=firmware
+PART_NAME=Kernel
 
 platform_check_image() {
        local board=$(board_name)
+       local magic="$(get_magic_long "$1")"
 
        [ "$#" -gt 1 ] && return 1
 
        case "$board" in
+       elecom,wrc-2533gent)
+               [ "$magic" != "d00dfeed" ] && {
+                       echo "Invalid image type."
+                       return 1
+               }
+               return 0
+               ;;
+
        *)
                echo "Sysupgrade is not supported on your board yet."
                return 1