2012-06-04 21:55:49 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2012 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
|
|
|
[ -e /etc/config/ubootenv ] && exit 0
|
|
|
|
|
|
|
|
touch /etc/config/ubootenv
|
|
|
|
|
|
|
|
. /lib/uboot-envtools.sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
|
2017-03-17 15:21:30 +00:00
|
|
|
board=$(board_name)
|
2012-06-04 21:55:49 +00:00
|
|
|
|
|
|
|
case "$board" in
|
2017-04-08 09:16:21 +00:00
|
|
|
bt,homehub-v2b)
|
2014-07-13 07:17:54 +00:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
|
|
|
|
;;
|
2017-04-08 09:16:21 +00:00
|
|
|
bt,homehub-v3a)
|
2016-04-26 11:43:11 +00:00
|
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
|
|
|
|
;;
|
2017-04-08 09:16:21 +00:00
|
|
|
siemens,gigaset-sx76x)
|
2016-12-13 21:09:07 +00:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
|
|
|
|
;;
|
2017-04-08 09:16:21 +00:00
|
|
|
zyxel,p-2812hnu-f1)
|
2015-10-05 10:28:39 +00:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
|
|
|
|
;;
|
2017-04-08 09:16:21 +00:00
|
|
|
buffalo,wbmr-300hpd)
|
2020-09-15 06:24:22 +00:00
|
|
|
idx="$(find_mtd_index u-boot-env)"
|
2016-06-12 10:39:35 +00:00
|
|
|
[ -n "$idx" ] && \
|
|
|
|
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2"
|
|
|
|
;;
|
2012-06-04 21:55:49 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
config_load ubootenv
|
|
|
|
config_foreach ubootenv_add_app_config ubootenv
|
|
|
|
|
|
|
|
exit 0
|