ramips: drop old image validation code
[openwrt/openwrt.git] / target / linux / ramips / base-files / lib / upgrade / platform.sh
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4
5 PART_NAME=firmware
6 REQUIRE_IMAGE_METADATA=1
7
8 platform_check_image() {
9 return 0
10 }
11
12 platform_pre_upgrade() {
13 local board=$(board_name)
14
15 case "$board" in
16 mikrotik,rbm11g|\
17 mikrotik,rbm33g)
18 [ -z "$(rootfs_type)" ] && mtd erase firmware
19 ;;
20 esac
21 }
22
23 platform_nand_pre_upgrade() {
24 local board=$(board_name)
25
26 case "$board" in
27 ubnt-erx|\
28 ubnt-erx-sfp)
29 platform_upgrade_ubnt_erx "$ARGV"
30 ;;
31 esac
32 }
33
34 platform_do_upgrade() {
35 local board=$(board_name)
36
37 case "$board" in
38 hc5962|\
39 mir3g|\
40 r6220|\
41 ubnt-erx|\
42 ubnt-erx-sfp)
43 nand_do_upgrade "$ARGV"
44 ;;
45 *)
46 default_do_upgrade "$ARGV"
47 ;;
48 esac
49 }