ath79: sysupgrade: drop unused platform checks
[openwrt/staging/mkresin.git] / target / linux / ath79 / base-files / lib / upgrade / platform.sh
1 #
2 # Copyright (C) 2011 OpenWrt.org
3 #
4
5 PART_NAME=firmware
6 RAMFS_COPY_BIN='nandwrite'
7
8 CI_BLKSZ=65536
9 CI_LDADR=0x80060000
10
11 PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD=0
12
13 platform_check_image() {
14 local board=$(board_name)
15 local magic="$(get_magic_word "$1")"
16 local magic_long="$(get_magic_long "$1")"
17
18 [ "$#" -gt 1 ] && return 1
19
20 case "$board" in
21 "ubnt,unifi")
22 [ "$magic" != "2705" ] && {
23 echo "Invalid image type."
24 return 1
25 }
26
27 return 0
28 ;;
29 esac
30
31 echo "Sysupgrade is not yet supported on $board."
32 return 1
33 }
34
35 platform_do_upgrade() {
36 local board=$(board_name)
37
38 case "$board" in
39 *)
40 default_do_upgrade "$ARGV"
41 ;;
42 esac
43 }