60a1ffb6bcd38363f311d66520214397fb4b533d
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / ath79
1 #!/bin/sh
2 #
3 # Copyright (C) 2011-2014 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,ap121f|\
17 buffalo,bhr-4grv2|\
18 devolo,magic-2-wifi|\
19 domywifi,dw33d|\
20 engenius,ecb1750|\
21 etactica,eg200|\
22 glinet,gl-ar300m-lite|\
23 glinet,gl-ar300m-nand|\
24 glinet,gl-ar300m-nor|\
25 glinet,gl-ar300m16|\
26 glinet,gl-ar750s-nor|\
27 glinet,gl-ar750s-nor-nand|\
28 librerouter,librerouter-v1|\
29 netgear,ex6400|\
30 netgear,ex7300|\
31 netgear,wndr4300-v2|\
32 netgear,wndr4500-v3|\
33 netgear,wnr1000-v2|\
34 netgear,wnr2000-v3|\
35 netgear,wnr2200-8m|\
36 netgear,wnr2200-16m|\
37 netgear,wnr612-v2|\
38 ocedo,koala|\
39 ocedo,raccoon|\
40 openmesh,om5p-ac-v2|\
41 yuncore,a770|\
42 yuncore,a782|\
43 yuncore,xd4200)
44 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
45 ;;
46 buffalo,wzr-hp-ag300h)
47 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
48 ;;
49 glinet,gl-ar150)
50 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
51 ;;
52 netgear,wndr3700|\
53 netgear,wndr3700-v2)
54 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
55 ;;
56 netgear,wndr3700-v4|\
57 netgear,wndr4300)
58 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
59 ;;
60 qihoo,c301)
61 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
62 ;;
63 esac
64
65 config_load ubootenv
66 config_foreach ubootenv_add_app_config ubootenv
67
68 exit 0