6c076a1e5f427ba3c188ff8d3620e4f130e2ed33
[openwrt/staging/yousong.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/ar71xx.sh
11 . /lib/uboot-envtools.sh
12 . /lib/functions.sh
13
14 board=$(ar71xx_board_name)
15
16 case "$board" in
17 alfa-ap120c|\
18 all0258n|\
19 ap90q|\
20 cap324|\
21 cap4200ag|\
22 carambola2|\
23 cpe830|\
24 cpe870|\
25 cr3000|\
26 cr5000|\
27 eap300v2|\
28 gl-ar300m|\
29 hornet-ub|\
30 hornet-ub-x2|\
31 jwap230|\
32 mr1750|\
33 mr1750v2|\
34 mr600|\
35 mr600v2|\
36 mr900|\
37 mr900v2|\
38 nbg6716|\
39 om5p|\
40 om5p-ac|\
41 om5p-acv2|\
42 om5p-an|\
43 sr3200|\
44 tube2h|\
45 wndr3700|\
46 xd3200)
47 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
48 ;;
49 alfa-ap96|\
50 all0315n|\
51 om2p|\
52 om2p-hs|\
53 om2p-hsv2|\
54 om2p-hsv3|\
55 om2p-lc|\
56 om2pv2)
57 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
58 ;;
59 dap-2695-a1|\
60 wzr-hp-ag300h)
61 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
62 ;;
63 dr531)
64 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
65 ;;
66 qihoo-c301)
67 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
68 ;;
69 esac
70
71 config_load ubootenv
72 config_foreach ubootenv_add_app_config ubootenv
73
74 exit 0