v1.5 branch refresh based upon upstream master @ c8677ca89e53e3be7988d54280fce166cc894a7e
[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 armada-385-linksys-caiman|\
18 armada-385-linksys-cobra|\
19 armada-385-linksys-shelby)
20         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
21         ;;
22 armada-385-linksys-rango|\
23 armada-385-linksys-venom)
24         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
25         ;;
26 armada-385-turris-omnia)
27         ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000"
28         ;;
29 armada-xp-linksys-mamba)
30         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
31         ;;
32 globalscale,espressobin|\
33 marvell,armada8040-mcbin)
34         ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
35         ;;
36 esac
37
38 config_load ubootenv
39 config_foreach ubootenv_add_app_config ubootenv
40
41 exit 0