2012-06-05 05:55:49 +08:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2012 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
|
|
|
[ -e /etc/config/ubootenv ] && exit 0
|
|
|
|
|
|
|
|
touch /etc/config/ubootenv
|
|
|
|
|
2014-07-13 15:17:54 +08:00
|
|
|
. /lib/functions/lantiq.sh
|
2012-06-05 05:55:49 +08:00
|
|
|
. /lib/uboot-envtools.sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
|
|
|
|
board=$(lantiq_board_name)
|
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
GIGASX76X)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
|
|
|
|
;;
|
2014-07-13 15:17:54 +08:00
|
|
|
BTHOMEHUBV2B)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
|
|
|
|
;;
|
2016-04-26 19:43:11 +08:00
|
|
|
BTHOMEHUBV3A)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
|
|
|
|
;;
|
2015-10-05 18:28:39 +08:00
|
|
|
P2812HNUF1)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
|
|
|
|
;;
|
2016-06-12 18:39:35 +08:00
|
|
|
WBMR300)
|
|
|
|
idx="$(find_mtd_index ubootconfig)"
|
|
|
|
[ -n "$idx" ] && \
|
|
|
|
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2"
|
|
|
|
;;
|
2012-06-05 05:55:49 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
config_load ubootenv
|
|
|
|
config_foreach ubootenv_add_app_config ubootenv
|
|
|
|
|
|
|
|
exit 0
|