ef8065a44e60c6aaf53209c2f610fc380b1105dc
[openwrt/openwrt.git] / target / linux / mvebu / base-files / lib / upgrade / platform.sh
1 #
2 # Copyright (C) 2014-2016 OpenWrt.org
3 # Copyright (C) 2016 LEDE-Project.org
4 #
5
6 RAMFS_COPY_BIN='fw_printenv fw_setenv'
7 RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
8 REQUIRE_IMAGE_METADATA=1
9
10 platform_check_image() {
11 return 0
12 }
13
14 platform_do_upgrade() {
15 case "$(board_name)" in
16 armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
17 platform_do_upgrade_linksys "$ARGV"
18 ;;
19 armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro)
20 platform_do_upgrade_sdcard "$ARGV"
21 ;;
22 *)
23 default_do_upgrade "$ARGV"
24 ;;
25 esac
26 }
27 platform_copy_config() {
28 case "$(board_name)" in
29 armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
30 platform_copy_config_linksys
31 ;;
32 armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro)
33 platform_copy_config_sdcard "$ARGV"
34 ;;
35 esac
36 }