ath79: Add support for OpenMesh MR600 v2
[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 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,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,om5p|\
54 openmesh,om5p-ac-v2|\
55 samsung,wam250|\
56 ubnt,nanostation-m|\
57 yuncore,a770|\
58 yuncore,a782|\
59 yuncore,xd4200|\
60 zyxel,nbg6616)
61 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
62 ;;
63 buffalo,wzr-hp-ag300h)
64 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
65 ;;
66 domywifi,dw33d)
67 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
68 ;;
69 glinet,gl-ar150)
70 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
71 ;;
72 glinet,gl-ar300m-lite|\
73 glinet,gl-ar300m-nand|\
74 glinet,gl-ar300m-nor|\
75 glinet,gl-ar300m16)
76 idx="$(find_mtd_index u-boot-env)"
77 [ -n "$idx" ] && \
78 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
79 ;;
80 netgear,wndr3700|\
81 netgear,wndr3700-v2|\
82 netgear,wndrmac-v1)
83 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
84 ;;
85 netgear,wndr3700-v4|\
86 netgear,wndr4300|\
87 netgear,wndr4300tn|\
88 netgear,wndr4300sw)
89 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
90 ;;
91 openmesh,om2p-v2|\
92 openmesh,om2p-v4|\
93 openmesh,om2p-hs-v1|\
94 openmesh,om2p-hs-v2|\
95 openmesh,om2p-hs-v3|\
96 openmesh,om2p-hs-v4|\
97 openmesh,om2p-lc|\
98 plasmacloud,pa300|\
99 plasmacloud,pa300e)
100 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
101 ;;
102 qihoo,c301)
103 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
104 ;;
105 wallys,dr531)
106 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
107 ;;
108 esac
109
110 config_load ubootenv
111 config_foreach ubootenv_add_app_config ubootenv
112
113 exit 0