42903f75a2ea1f58244c9ad25076d8cf6eb49e43
[openwrt/staging/jow.git] / target / linux / mediatek / mt7622 / base-files / lib / upgrade / platform.sh
1 platform_do_upgrade() {
2 local board=$(board_name)
3
4 case "$board" in
5 *)
6 default_do_upgrade "$1"
7 ;;
8 esac
9 }
10
11 PART_NAME=firmware
12
13 platform_check_image() {
14 local board=$(board_name)
15 local magic="$(get_magic_long "$1")"
16
17 [ "$#" -gt 1 ] && return 1
18
19 case "$board" in
20 elecom,wrc-2533gent)
21 [ "$magic" != "d00dfeed" ] && {
22 echo "Invalid image type."
23 return 1
24 }
25 return 0
26 ;;
27
28 *)
29 echo "Sysupgrade is not supported on your board yet."
30 return 1
31 ;;
32 esac
33
34 return 0
35 }