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