47bc88b16dc1c3ad5473c0f32ab52c2b74518cd5
[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/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-hsv4|\
56 om2p-lc|\
57 om2pv2|\
58 om2pv4)
59 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
60 ;;
61 dap-2695-a1|\
62 wzr-hp-ag300h)
63 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
64 ;;
65 dr531)
66 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
67 ;;
68 qihoo-c301)
69 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
70 ;;
71 esac
72
73 config_load ubootenv
74 config_foreach ubootenv_add_app_config ubootenv
75
76 exit 0