ramips: add U-Boot env support for ALFA Network AC1200RM
[openwrt/staging/wigyori.git] / package / boot / uboot-envtools / files / ramips
1 #!/bin/sh
2 #
3 # Copyright (C) 2011-2012 OpenWrt.org
4 #
5
6 [ -e /etc/config/ubootenv ] && exit 0
7
8 touch /etc/config/ubootenv
9
10 . /lib/uboot-envtools.sh
11 . /lib/functions.sh
12
13 board=$(board_name)
14
15 case "$board" in
16 alfa-network,ac1200rm|\
17 alfa-network,awusfree1)
18 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
19 ;;
20 all0239-3g|\
21 all0256n-4M|\
22 all0256n-8M|\
23 all5002)
24 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
25 ;;
26 linkits7688|\
27 miwifi-nano|\
28 sk-wb8|\
29 wsr-1166|\
30 wsr-600|\
31 zbt-wg2626)
32 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
33 ;;
34 mir3g)
35 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
36 ;;
37 esac
38
39 config_load ubootenv
40 config_foreach ubootenv_add_app_config ubootenv
41
42 exit 0