ramips: dont replace the board name
[oweals/openwrt.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 BTHOMEHUBV2B)
17         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
18         ;;
19 BTHOMEHUBV3A)
20         ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
21         ;;
22 GIGASX76X)
23         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
24         ;;
25 P2812HNUF1)
26         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
27         ;;
28 WBMR300)
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