81af7e804f8a87eae4233e42a25caa0c64fe2083
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / lantiq
1 #
2 # Copyright (C) 2012 OpenWrt.org
3 #
4
5 [ -e /etc/config/ubootenv ] && exit 0
6
7 touch /etc/config/ubootenv
8
9 . /lib/uboot-envtools.sh
10 . /lib/functions.sh
11
12 board=$(board_name)
13
14 case "$board" in
15 bt,homehub-v2b)
16 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
17 ;;
18 bt,homehub-v3a)
19 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
20 ;;
21 siemens,gigaset-sx76x)
22 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
23 ;;
24 zyxel,p-2812hnu-f1)
25 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
26 ;;
27 buffalo,wbmr-300hpd)
28 idx="$(find_mtd_index u-boot-env)"
29 [ -n "$idx" ] && \
30 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2"
31 ;;
32 esac
33
34 config_load ubootenv
35 config_foreach ubootenv_add_app_config ubootenv
36
37 exit 0