uboot-envtools: add support for YunCore CPE830
[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-an | \
40 om5p-ac | \
41 om5p-acv2 | \
42 om5p | \
43 tube2h | \
44 wndr3700)
45 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
46 ;;
47 alfa-ap96 | \
48 all0315n | \
49 om2p | \
50 om2pv2 | \
51 om2p-hs | \
52 om2p-hsv2 | \
53 om2p-hsv3 | \
54 om2p-lc)
55 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
56 ;;
57 dr531)
58 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
59 ;;
60 dap-2695-a1 | \
61 wzr-hp-ag300h)
62 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
63 ;;
64 qihoo-c301)
65 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
66 ;;
67 esac
68
69 config_load ubootenv
70 config_foreach ubootenv_add_app_config ubootenv
71
72 exit 0