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