e33830e0a76ded5796452c49fcb91a21cdb404fa
[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-xp-linksys-mamba)
26 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
27 ;;
28 esac
29
30 config_load ubootenv
31 config_foreach ubootenv_add_app_config ubootenv
32
33 exit 0