uboot-envtools: ath79: add support for ALFA Network N5Q
[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,r36a|\
21 allnet,all-wap02860ac|\
22 arduino,yun|\
23 buffalo,bhr-4grv2|\
24 devolo,magic-2-wifi|\
25 engenius,ecb1750|\
26 engenius,enh202-v1|\
27 engenius,ens202ext-v1|\
28 etactica,eg200|\
29 glinet,gl-ar750s-nor|\
30 glinet,gl-ar750s-nor-nand|\
31 librerouter,librerouter-v1|\
32 netgear,ex6400|\
33 netgear,ex7300|\
34 netgear,wndr4300-v2|\
35 netgear,wndr4500-v3|\
36 netgear,wnr1000-v2|\
37 netgear,wnr2000-v3|\
38 netgear,wnr2200-8m|\
39 netgear,wnr2200-16m|\
40 netgear,wnr612-v2|\
41 ocedo,koala|\
42 ocedo,raccoon|\
43 openmesh,om5p-ac-v2|\
44 samsung,wam250|\
45 ubnt,nanostation-m|\
46 yuncore,a770|\
47 yuncore,a782|\
48 yuncore,xd4200|\
49 zyxel,nbg6616)
50 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
51 ;;
52 buffalo,wzr-hp-ag300h)
53 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
54 ;;
55 domywifi,dw33d)
56 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
57 ;;
58 glinet,gl-ar150)
59 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
60 ;;
61 glinet,gl-ar300m-lite|\
62 glinet,gl-ar300m-nand|\
63 glinet,gl-ar300m-nor|\
64 glinet,gl-ar300m16)
65 idx="$(find_mtd_index u-boot-env)"
66 [ -n "$idx" ] && \
67 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
68 ;;
69 netgear,wndr3700|\
70 netgear,wndr3700-v2|\
71 netgear,wndrmac-v1)
72 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
73 ;;
74 netgear,wndr3700-v4|\
75 netgear,wndr4300|\
76 netgear,wndr4300tn|\
77 netgear,wndr4300sw)
78 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
79 ;;
80 qihoo,c301)
81 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
82 ;;
83 wallys,dr531)
84 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
85 ;;
86 esac
87
88 config_load ubootenv
89 config_foreach ubootenv_add_app_config ubootenv
90
91 exit 0