mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
Specifications: SoC: MediaTek MT7981B RF Chipset: MT7976C @2.4GHz 2T2R MT7976C @5ghz 2T2R RAM: 512MB DDR4 RAM Flash: SPI-NAND 128 MiB Ethernet: 2 x 1GbE PHY Reset Button: 1 Power on/off switch dip: 1 Power Source: Standard PoE 802.3af/at LED Indicator: 5x Single-color LED indicator (GPIO Control) Signed-off-by: 800246@emplustech.com <cp.chang@emplustech.com>
53 lines
1.1 KiB
Plaintext
53 lines
1.1 KiB
Plaintext
#
|
|
# Copyright (C) 2021 OpenWrt.org
|
|
#
|
|
|
|
[ -e /etc/config/ubootenv ] && exit 0
|
|
|
|
touch /etc/config/ubootenv
|
|
|
|
. /lib/uboot-envtools.sh
|
|
. /lib/functions.sh
|
|
. /lib/functions/uci-defaults.sh
|
|
. /lib/functions/system.sh
|
|
. /lib/rap211g-envtools.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
edgecore,eap111|\
|
|
edgecore,eap112|\
|
|
senao,iap2300m|\
|
|
emplus,wap588m|\
|
|
senao,jeap6500)
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000"
|
|
;;
|
|
sonicfi,rap630w-211g)
|
|
#env_dev=$(cat /sys/module/boot_param/parameters/env_part 2>/dev/null)
|
|
env_dev=$(get_boot_param "boot_param.env_part")
|
|
if [ -n "$env_dev" ]; then
|
|
mtdnum="$( find_mtd_index "$CI_UBIPART" )"
|
|
if [ ! "$mtdnum" ]; then
|
|
echo "cannot find ubi mtd partition $CI_UBIPART"
|
|
return 1
|
|
fi
|
|
|
|
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
|
|
if [ ! "$ubidev" ]; then
|
|
ubiattach -m "$mtdnum"
|
|
sync
|
|
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
|
|
fi
|
|
|
|
env_ubivol="$( nand_find_volume "${ubidev}" ${env_dev} )"
|
|
if [ -n "${env_ubivol}" ]; then
|
|
ubootenv_add_uci_config "/dev/$env_ubivol" "0" "0x80000" "0x80000" 1
|
|
fi
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
config_load ubootenv
|
|
config_foreach ubootenv_add_app_config
|
|
exit 0
|