uboot-envtools: add support for YunCore CPE870
[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 cpe870 | \
24 cr3000 | \
25 cr5000 | \
26 eap300v2 | \
27 gl-ar300m | \
28 hornet-ub | \
29 hornet-ub-x2 | \
30 jwap230 | \
31 mr1750 | \
32 mr1750v2 | \
33 mr600 | \
34 mr600v2 | \
35 mr900 | \
36 mr900v2 | \
37 nbg6716 | \
38 om5p-an | \
39 om5p-ac | \
40 om5p-acv2 | \
41 om5p | \
42 tube2h | \
43 wndr3700)
44 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
45 ;;
46 alfa-ap96 | \
47 all0315n | \
48 om2p | \
49 om2pv2 | \
50 om2p-hs | \
51 om2p-hsv2 | \
52 om2p-hsv3 | \
53 om2p-lc)
54 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
55 ;;
56 dr531)
57 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
58 ;;
59 dap-2695-a1 | \
60 wzr-hp-ag300h)
61 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
62 ;;
63 qihoo-c301)
64 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
65 ;;
66 esac
67
68 config_load ubootenv
69 config_foreach ubootenv_add_app_config ubootenv
70
71 exit 0