mvebu: add support for Turris Omnia
[openwrt/openwrt.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 esac
32
33 config_load ubootenv
34 config_foreach ubootenv_add_app_config ubootenv
35
36 exit 0