ath79: add support for Senao Engenius EnStationAC v1
[openwrt/staging/wigyori.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,eap300-v2|\
27 engenius,ecb1200|\
28 engenius,ecb1750|\
29 engenius,ecb350-v1|\
30 engenius,enh202-v1|\
31 engenius,ens202ext-v1|\
32 engenius,enstationac-v1|\
33 etactica,eg200|\
34 glinet,gl-ar750s-nor|\
35 glinet,gl-ar750s-nor-nand|\
36 librerouter,librerouter-v1|\
37 netgear,ex6400|\
38 netgear,ex7300|\
39 netgear,wndr4300-v2|\
40 netgear,wndr4500-v3|\
41 netgear,wnr1000-v2|\
42 netgear,wnr2000-v3|\
43 netgear,wnr2200-8m|\
44 netgear,wnr2200-16m|\
45 netgear,wnr612-v2|\
46 ocedo,koala|\
47 ocedo,raccoon|\
48 openmesh,om5p-ac-v2|\
49 samsung,wam250|\
50 ubnt,nanostation-m|\
51 yuncore,a770|\
52 yuncore,a782|\
53 yuncore,xd4200|\
54 zyxel,nbg6616)
55 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
56 ;;
57 buffalo,wzr-hp-ag300h)
58 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
59 ;;
60 domywifi,dw33d)
61 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
62 ;;
63 glinet,gl-ar150)
64 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
65 ;;
66 glinet,gl-ar300m-lite|\
67 glinet,gl-ar300m-nand|\
68 glinet,gl-ar300m-nor|\
69 glinet,gl-ar300m16)
70 idx="$(find_mtd_index u-boot-env)"
71 [ -n "$idx" ] && \
72 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
73 ;;
74 netgear,wndr3700|\
75 netgear,wndr3700-v2|\
76 netgear,wndrmac-v1)
77 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
78 ;;
79 netgear,wndr3700-v4|\
80 netgear,wndr4300|\
81 netgear,wndr4300tn|\
82 netgear,wndr4300sw)
83 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
84 ;;
85 plasmacloud,pa300|\
86 plasmacloud,pa300e)
87 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
88 ;;
89 qihoo,c301)
90 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
91 ;;
92 wallys,dr531)
93 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
94 ;;
95 esac
96
97 config_load ubootenv
98 config_foreach ubootenv_add_app_config ubootenv
99
100 exit 0