Upstream refresh for v1.5.0-rc1 : Upstream 19.07 : 4fb6b8c553f692eeb5bcb203e0f8ee8df0...
[librecmc/librecmc.git] / package / boot / uboot-envtools / files / mvebu
1 #!/bin/sh
2 #
3 # Copyright (C) 2014-2016 OpenWrt.org
4 # Copyright (C) 2016 LEDE-Project.org
5 #
6
7 [ -e /etc/config/ubootenv ] && exit 0
8
9 touch /etc/config/ubootenv
10
11 . /lib/uboot-envtools.sh
12 . /lib/functions.sh
13
14 board=$(board_name)
15
16 case "$board" in
17 cznic,turris-omnia)
18         ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000"
19         ;;
20 globalscale,espressobin|\
21 globalscale,espressobin-emmc|\
22 globalscale,espressobin-v7|\
23 globalscale,espressobin-v7-emmc|\
24 marvell,armada8040-mcbin)
25         ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
26         ;;
27 linksys,caiman|\
28 linksys,cobra|\
29 linksys,shelby)
30         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
31         ;;
32 linksys,mamba)
33         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
34         ;;
35 linksys,rango|\
36 linksys,venom)
37         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
38         ;;
39 esac
40
41 config_load ubootenv
42 config_foreach ubootenv_add_app_config ubootenv
43
44 exit 0