uboot-envtools: add support for ESPRESSObin and MACCHIATObin
[openwrt/staging/wigyori.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 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
24 ;;
25 armada-385-turris-omnia)
26 ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000"
27 ;;
28 armada-xp-linksys-mamba)
29 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
30 ;;
31 globalscale,espressobin|\
32 marvell,armada8040-mcbin)
33 ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
34 ;;
35 esac
36
37 config_load ubootenv
38 config_foreach ubootenv_add_app_config ubootenv
39
40 exit 0