02041da976d13a09db6290be7de788cb2552006f
[openwrt/openwrt.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 alfa-network,r36m-e4g|\
19 alfa-network,tube-e4g)
20 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
21 ;;
22 all0256n-4M|\
23 all0256n-8M|\
24 all5002)
25 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
26 ;;
27 linkits7688|\
28 miwifi-nano|\
29 sk-wb8|\
30 wsr-1166|\
31 wsr-600|\
32 zbt-wg2626)
33 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
34 ;;
35 xiaomi,mir3p|\
36 xiaomi,mir3g)
37 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
38 ;;
39 esac
40
41 config_load ubootenv
42 config_foreach ubootenv_add_app_config ubootenv
43
44 exit 0