ath79: add support for ZiKing CPE46B
[openwrt/staging/stintel.git] / package / boot / uboot-envtools / files / ath79
1 #
2 # Copyright (C) 2011-2014 OpenWrt.org
3 #
4
5 [ -e /etc/config/ubootenv ] && exit 0
6
7 touch /etc/config/ubootenv
8
9 . /lib/uboot-envtools.sh
10 . /lib/functions.sh
11
12 board=$(board_name)
13
14 case "$board" in
15 alfa-network,ap121f|\
16 alfa-network,ap121fe|\
17 alfa-network,n2q|\
18 alfa-network,n5q|\
19 alfa-network,pi-wifi4|\
20 alfa-network,r36a|\
21 allnet,all-wap02860ac|\
22 arduino,yun|\
23 buffalo,bhr-4grv2|\
24 devolo,magic-2-wifi|\
25 engenius,eap1200h|\
26 engenius,eap300-v2|\
27 engenius,eap350-v1|\
28 engenius,eap600|\
29 engenius,ecb1200|\
30 engenius,ecb1750|\
31 engenius,ecb350-v1|\
32 engenius,ecb600|\
33 engenius,enh202-v1|\
34 engenius,ens202ext-v1|\
35 engenius,enstationac-v1|\
36 etactica,eg200|\
37 glinet,gl-ar750s-nor|\
38 glinet,gl-ar750s-nor-nand|\
39 librerouter,librerouter-v1|\
40 netgear,ex6400|\
41 netgear,ex7300|\
42 netgear,wndr4300-v2|\
43 netgear,wndr4500-v3|\
44 netgear,wnr1000-v2|\
45 netgear,wnr2000-v3|\
46 netgear,wnr2200-8m|\
47 netgear,wnr2200-16m|\
48 netgear,wnr612-v2|\
49 ocedo,koala|\
50 ocedo,raccoon|\
51 openmesh,mr600-v1|\
52 openmesh,mr600-v2|\
53 openmesh,mr900-v1|\
54 openmesh,mr900-v2|\
55 openmesh,mr1750-v1|\
56 openmesh,mr1750-v2|\
57 openmesh,om5p|\
58 openmesh,om5p-ac-v2|\
59 samsung,wam250|\
60 ubnt,nanostation-m|\
61 yuncore,a770|\
62 yuncore,a782|\
63 yuncore,xd4200|\
64 ziking,cpe46b|\
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 buffalo,wzr-hp-g300nh-rb|\
72 buffalo,wzr-hp-g300nh-s)
73 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
74 ;;
75 domywifi,dw33d)
76 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
77 ;;
78 glinet,gl-ar150)
79 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
80 ;;
81 glinet,gl-ar300m-lite|\
82 glinet,gl-ar300m-nand|\
83 glinet,gl-ar300m-nor|\
84 glinet,gl-ar300m16)
85 idx="$(find_mtd_index u-boot-env)"
86 [ -n "$idx" ] && \
87 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
88 ;;
89 netgear,wndr3700|\
90 netgear,wndr3700-v2|\
91 netgear,wndrmac-v1)
92 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
93 ;;
94 netgear,wndr3700-v4|\
95 netgear,wndr4300|\
96 netgear,wndr4300tn|\
97 netgear,wndr4300sw)
98 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
99 ;;
100 openmesh,om2p-v2|\
101 openmesh,om2p-v4|\
102 openmesh,om2p-hs-v1|\
103 openmesh,om2p-hs-v2|\
104 openmesh,om2p-hs-v3|\
105 openmesh,om2p-hs-v4|\
106 openmesh,om2p-lc|\
107 plasmacloud,pa300|\
108 plasmacloud,pa300e)
109 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
110 ;;
111 qihoo,c301)
112 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
113 ;;
114 wallys,dr531)
115 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
116 ;;
117 esac
118
119 config_load ubootenv
120 config_foreach ubootenv_add_app_config ubootenv
121
122 exit 0