ath79: add support for Senao WatchGuard AP300
[openwrt/staging/stintel.git] / target / linux / ath79 / generic / base-files / lib / upgrade / platform.sh
1 #
2 # Copyright (C) 2011 OpenWrt.org
3 #
4
5 PART_NAME=firmware
6 REQUIRE_IMAGE_METADATA=1
7
8 RAMFS_COPY_BIN='fw_printenv fw_setenv'
9 RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
10
11 platform_check_image() {
12 local board=$(board_name)
13
14 case "$board" in
15 jjplus,ja76pf2|\
16 ubnt,routerstation|\
17 ubnt,routerstation-pro)
18 platform_check_image_redboot_fis "$1"
19 ;;
20 *)
21 return 0
22 ;;
23 esac
24 }
25
26 platform_do_upgrade() {
27 local board=$(board_name)
28
29 case "$board" in
30 adtran,bsap1800-v2|\
31 adtran,bsap1840)
32 platform_do_upgrade_redboot_fis "$1" vmlinux_2
33 ;;
34 allnet,all-wap02860ac|\
35 araknis,an-300-ap-i-n|\
36 araknis,an-500-ap-i-ac|\
37 araknis,an-700-ap-i-ac|\
38 engenius,eap1200h|\
39 engenius,eap300-v2|\
40 engenius,eap600|\
41 engenius,ecb600|\
42 engenius,ens202ext-v1|\
43 engenius,enstationac-v1|\
44 watchguard,ap300)
45 IMAGE_LIST="tar tzf $1"
46 IMAGE_CMD="tar xzOf $1"
47 KERNEL_PART="loader"
48 ROOTFS_PART="fwconcat0"
49 KERNEL_FILE="uImage-lzma.bin"
50 ROOTFS_FILE="root.squashfs"
51 platform_do_upgrade_failsafe_datachk "$1"
52 ;;
53 jjplus,ja76pf2)
54 platform_do_upgrade_redboot_fis "$1" linux
55 ;;
56 openmesh,a40|\
57 openmesh,a60|\
58 openmesh,mr600-v1|\
59 openmesh,mr600-v2|\
60 openmesh,mr900-v1|\
61 openmesh,mr900-v2|\
62 openmesh,mr1750-v1|\
63 openmesh,mr1750-v2|\
64 openmesh,om2p-v1|\
65 openmesh,om2p-v2|\
66 openmesh,om2p-v4|\
67 openmesh,om2p-hs-v1|\
68 openmesh,om2p-hs-v2|\
69 openmesh,om2p-hs-v3|\
70 openmesh,om2p-hs-v4|\
71 openmesh,om2p-lc|\
72 openmesh,om5p|\
73 openmesh,om5p-ac-v1|\
74 openmesh,om5p-ac-v2|\
75 openmesh,om5p-an)
76 PART_NAME="inactive"
77 platform_do_upgrade_openmesh "$1"
78 ;;
79 plasmacloud,pa300|\
80 plasmacloud,pa300e)
81 PART_NAME="inactive"
82 platform_do_upgrade_dualboot_datachk "$1"
83 ;;
84 ubnt,routerstation|\
85 ubnt,routerstation-pro)
86 platform_do_upgrade_redboot_fis "$1" kernel
87 ;;
88 *)
89 default_do_upgrade "$1"
90 ;;
91 esac
92 }