mvebu: use device-tree board detection
[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 case "$(board_name)" in
12 cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
13 platform_check_image_sdcard "$ARGV"
14 ;;
15 *)
16 return 0
17 ;;
18 esac
19 }
20
21 platform_do_upgrade() {
22 case "$(board_name)" in
23 linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom)
24 platform_do_upgrade_linksys "$ARGV"
25 ;;
26 cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
27 platform_do_upgrade_sdcard "$ARGV"
28 ;;
29 *)
30 default_do_upgrade "$ARGV"
31 ;;
32 esac
33 }
34 platform_copy_config() {
35 case "$(board_name)" in
36 linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom)
37 platform_copy_config_linksys
38 ;;
39 cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
40 platform_copy_config_sdcard "$ARGV"
41 ;;
42 esac
43 }