Functions ubootenv_add_mtd, ubootenv_add_sys_mtd and ubootenv_add_mmc can be shared so make them common. Signed-off-by: Paweł Owoc <frut3k7@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18818 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
38 lines
753 B
Text
38 lines
753 B
Text
[ -e /etc/config/ubootenv ] && exit 0
|
|
|
|
touch /etc/config/ubootenv
|
|
|
|
. /lib/uboot-envtools.sh
|
|
. /lib/functions.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
8devices,mango-dvk|\
|
|
8devices,mango-dvk-sfp|\
|
|
cambiumnetworks,xe3-4)
|
|
ubootenv_add_mtd "0:APPSBLENV" "0x0" "0x10000" "0x10000"
|
|
;;
|
|
glinet,gl-ax1800|\
|
|
glinet,gl-axt1800|\
|
|
linksys,mr7350|\
|
|
linksys,mr7500)
|
|
ubootenv_add_mtd "u_env" "0x0" "0x40000" "0x20000"
|
|
;;
|
|
netgear,wax214|\
|
|
netgear,wax610|\
|
|
netgear,wax610y|\
|
|
tplink,eap610-outdoor|\
|
|
tplink,eap623od-hd-v1|\
|
|
tplink,eap625-outdoor-hd-v1)
|
|
ubootenv_add_mtd "0:appsblenv" "0x0" "0x40000" "0x20000"
|
|
;;
|
|
yuncore,fap650)
|
|
ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x10000"
|
|
;;
|
|
esac
|
|
|
|
config_load ubootenv
|
|
config_foreach ubootenv_add_app_config
|
|
|
|
exit 0
|