ade55dd1cb142611c0ccf1cdd7a9ca34ca59829a
[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,quad-e4g|\
19 alfa-network,r36m-e4g|\
20 alfa-network,tube-e4g)
21 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
22 ;;
23 allnet,all0256n-4m|\
24 allnet,all0256n-8m|\
25 allnet,all5002)
26 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
27 ;;
28 buffalo,wsr-1166dhp|\
29 buffalo,wsr-600dhp|\
30 mediatek,linkit-smart-7688|\
31 samknows,whitebox-v8|\
32 xiaomi,miwifi-nano|\
33 zbtlink,zbt-wg2626)
34 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
35 ;;
36 xiaomi,mir3p|\
37 xiaomi,mir3g)
38 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
39 ;;
40 esac
41
42 config_load ubootenv
43 config_foreach ubootenv_add_app_config ubootenv
44
45 exit 0