0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-03-10 04:40:11 +00:00
openwrt/package/boot/uboot-envtools/files/qualcommax_ipq60xx
Robert Marko 1bb1b03f69 uboot-envtools: ipq60xx: code simplification
Do the same code simplification as was done for ipq807x to avoid code
duplication.

Link: https://github.com/openwrt/openwrt/pull/17907
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-09 20:34:40 +01:00

38 lines
752 B
Plaintext

[ -e /etc/config/ubootenv ] && exit 0
touch /etc/config/ubootenv
. /lib/uboot-envtools.sh
. /lib/functions.sh
board=$(board_name)
ubootenv_add_mtd() {
local idx="$(find_mtd_index "${1}")"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "${2}" "${3}" "${4}"
}
case "$board" in
8devices,mango-dvk|\
8devices,mango-dvk-sfp|\
cambiumnetworks,xe3-4)
ubootenv_add_mtd "0:APPSBLENV" "0x0" "0x10000" "0x10000"
;;
linksys,mr7350)
ubootenv_add_mtd "u_env" "0x0" "0x40000" "0x20000"
;;
netgear,wax214|\
tplink,eap610-outdoor)
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