ath79: add support for Senao Engenius EAP1200H
[openwrt/staging/stintel.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 alfa-network,ap121fe|\
18 alfa-network,n2q|\
19 alfa-network,n5q|\
20 alfa-network,pi-wifi4|\
21 alfa-network,r36a|\
22 allnet,all-wap02860ac|\
23 arduino,yun|\
24 buffalo,bhr-4grv2|\
25 devolo,magic-2-wifi|\
26 engenius,eap1200h|\
27 engenius,eap300-v2|\
28 engenius,eap350-v1|\
29 engenius,eap600|\
30 engenius,ecb1200|\
31 engenius,ecb1750|\
32 engenius,ecb350-v1|\
33 engenius,ecb600|\
34 engenius,enh202-v1|\
35 engenius,ens202ext-v1|\
36 engenius,enstationac-v1|\
37 etactica,eg200|\
38 glinet,gl-ar750s-nor|\
39 glinet,gl-ar750s-nor-nand|\
40 librerouter,librerouter-v1|\
41 netgear,ex6400|\
42 netgear,ex7300|\
43 netgear,wndr4300-v2|\
44 netgear,wndr4500-v3|\
45 netgear,wnr1000-v2|\
46 netgear,wnr2000-v3|\
47 netgear,wnr2200-8m|\
48 netgear,wnr2200-16m|\
49 netgear,wnr612-v2|\
50 ocedo,koala|\
51 ocedo,raccoon|\
52 openmesh,mr600-v1|\
53 openmesh,mr600-v2|\
54 openmesh,mr900-v1|\
55 openmesh,mr900-v2|\
56 openmesh,mr1750-v1|\
57 openmesh,mr1750-v2|\
58 openmesh,om5p|\
59 openmesh,om5p-ac-v2|\
60 samsung,wam250|\
61 ubnt,nanostation-m|\
62 yuncore,a770|\
63 yuncore,a782|\
64 yuncore,xd4200|\
65 zyxel,nbg6616)
66 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
67 ;;
68 buffalo,wzr-hp-ag300h)
69 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
70 ;;
71 domywifi,dw33d)
72 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
73 ;;
74 glinet,gl-ar150)
75 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
76 ;;
77 glinet,gl-ar300m-lite|\
78 glinet,gl-ar300m-nand|\
79 glinet,gl-ar300m-nor|\
80 glinet,gl-ar300m16)
81 idx="$(find_mtd_index u-boot-env)"
82 [ -n "$idx" ] && \
83 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
84 ;;
85 netgear,wndr3700|\
86 netgear,wndr3700-v2|\
87 netgear,wndrmac-v1)
88 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
89 ;;
90 netgear,wndr3700-v4|\
91 netgear,wndr4300|\
92 netgear,wndr4300tn|\
93 netgear,wndr4300sw)
94 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
95 ;;
96 openmesh,om2p-v2|\
97 openmesh,om2p-v4|\
98 openmesh,om2p-hs-v1|\
99 openmesh,om2p-hs-v2|\
100 openmesh,om2p-hs-v3|\
101 openmesh,om2p-hs-v4|\
102 openmesh,om2p-lc|\
103 plasmacloud,pa300|\
104 plasmacloud,pa300e)
105 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
106 ;;
107 qihoo,c301)
108 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
109 ;;
110 wallys,dr531)
111 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
112 ;;
113 esac
114
115 config_load ubootenv
116 config_foreach ubootenv_add_app_config ubootenv
117
118 exit 0