uboot-envtools: add support for GL.iNet GL-AR750
[openwrt/staging/wigyori.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 gl-ar750|\
35 hornet-ub|\
36 hornet-ub-x2|\
37 jwap230|\
38 mr1750|\
39 mr1750v2|\
40 mr600|\
41 mr600v2|\
42 mr900|\
43 mr900v2|\
44 n5q|\
45 nbg6716|\
46 om5p|\
47 om5p-ac|\
48 om5p-acv2|\
49 om5p-an|\
50 r36a|\
51 sr3200|\
52 tube2h|\
53 wndr3700|\
54 xd3200)
55 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
56 ;;
57 alfa-ap96|\
58 all0315n|\
59 om2p|\
60 om2p-hs|\
61 om2p-hsv2|\
62 om2p-hsv3|\
63 om2p-hsv4|\
64 om2p-lc|\
65 om2pv2|\
66 om2pv4)
67 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
68 ;;
69 dap-2695-a1|\
70 wzr-hp-ag300h)
71 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
72 ;;
73 dr342|\
74 dr531)
75 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
76 ;;
77 rambutan)
78 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
79 ubootenv_add_uci_config "/dev/mtd1" "0x100000" "0x20000" "0x20000"
80 ;;
81 qihoo-c301)
82 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
83 ;;
84 wi2a-ac200i)
85 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x8000" "0x10000"
86 ;;
87 esac
88
89 config_load ubootenv
90 config_foreach ubootenv_add_app_config ubootenv
91
92 exit 0