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