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