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