uboot-envtools: add support for ALFA Network R36A
[openwrt/staging/dedeckeh.git] / package / boot / uboot-envtools / files / ar71xx
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 a40|\
17 a60|\
18 alfa-ap120c|\
19 all0258n|\
20 ap121f|\
21 ap90q|\
22 ap91-5g|\
23 arduino-yun|\
24 cap324|\
25 cap4200ag|\
26 carambola2|\
27 cpe830|\
28 cpe870|\
29 cr3000|\
30 cr5000|\
31 eap300v2|\
32 ens202ext|\
33 gl-ar300m|\
34 hornet-ub|\
35 hornet-ub-x2|\
36 jwap230|\
37 mr1750|\
38 mr1750v2|\
39 mr600|\
40 mr600v2|\
41 mr900|\
42 mr900v2|\
43 n5q|\
44 nbg6716|\
45 om5p|\
46 om5p-ac|\
47 om5p-acv2|\
48 om5p-an|\
49 r36a|\
50 sr3200|\
51 tube2h|\
52 wndr3700|\
53 xd3200)
54 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
55 ;;
56 alfa-ap96|\
57 all0315n|\
58 om2p|\
59 om2p-hs|\
60 om2p-hsv2|\
61 om2p-hsv3|\
62 om2p-hsv4|\
63 om2p-lc|\
64 om2pv2|\
65 om2pv4)
66 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
67 ;;
68 dap-2695-a1|\
69 wzr-hp-ag300h)
70 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
71 ;;
72 dr342|\
73 dr531)
74 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
75 ;;
76 rambutan)
77 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
78 ubootenv_add_uci_config "/dev/mtd1" "0x100000" "0x20000" "0x20000"
79 ;;
80 qihoo-c301)
81 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
82 ;;
83 wi2a-ac200i)
84 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x8000" "0x10000"
85 ;;
86 esac
87
88 config_load ubootenv
89 config_foreach ubootenv_add_app_config ubootenv
90
91 exit 0