08af78d716cd29bd0dba27c2a9abe5bd3d85ba35
[openwrt/openwrt.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 arduino-yun|\
23 cap324|\
24 cap4200ag|\
25 carambola2|\
26 cpe830|\
27 cpe870|\
28 cr3000|\
29 cr5000|\
30 eap300v2|\
31 ens202ext|\
32 gl-ar300m|\
33 hornet-ub|\
34 hornet-ub-x2|\
35 jwap230|\
36 mr1750|\
37 mr1750v2|\
38 mr600|\
39 mr600v2|\
40 mr900|\
41 mr900v2|\
42 nbg6716|\
43 om5p|\
44 om5p-ac|\
45 om5p-acv2|\
46 om5p-an|\
47 sr3200|\
48 tube2h|\
49 wndr3700|\
50 xd3200)
51 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
52 ;;
53 alfa-ap96|\
54 all0315n|\
55 om2p|\
56 om2p-hs|\
57 om2p-hsv2|\
58 om2p-hsv3|\
59 om2p-hsv4|\
60 om2p-lc|\
61 om2pv2|\
62 om2pv4)
63 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
64 ;;
65 dap-2695-a1|\
66 wzr-hp-ag300h)
67 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
68 ;;
69 dr531)
70 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
71 ;;
72 rambutan)
73 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
74 ubootenv_add_uci_config "/dev/mtd1" "0x100000" "0x20000" "0x20000"
75 ;;
76 qihoo-c301)
77 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
78 ;;
79 wi2a-ac200i)
80 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x8000" "0x10000"
81 ;;
82 esac
83
84 config_load ubootenv
85 config_foreach ubootenv_add_app_config ubootenv
86
87 exit 0