#!/bin/sh -e
[ -z "$DEBUG" ] || set -x
echo "########## hostapd-2.10: configure ##########"
cd /home/ych/rk3568/buildroot
cp /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/hostapd-2.10/hostapd/defconfig /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/hostapd-2.10/hostapd/.config
sed -i -e 's/^#\(CONFIG_INTERNAL_LIBTOMMATH\)/\1/' -e 's/^#\(CONFIG_DEBUG_FILE\)/\1/' -e 's/^#\(CONFIG_DEBUG_SYSLOG\)/\1/' -e 's/^#\(CONFIG_HS20\)/\1/' -e 's/^#\(CONFIG_IEEE80211AX\)/\1/' -e 's/^#\(CONFIG_IEEE80211AC\)/\1/' -e 's/^#\(CONFIG_IEEE80211N\)/\1/' -e 's/^#\(CONFIG_IEEE80211R\)/\1/' -e 's/^#\(CONFIG_INTERWORKING\)/\1/' -e 's/^#\(CONFIG_ACS\)/\1/' -e 's/^#\(CONFIG_NO_ACCOUNTING\)/\1/' -e 's/^#\(CONFIG_NO_RADIUS\)/\1/' -e 's/^#\(CONFIG_DPP\)/\1/' -e 's/^#\(CONFIG_SAE\)/\1/' -e 's/^#\(CONFIG_SAE_PK\)/\1/' -e 's/^#\(CONFIG_OWE\)/\1/' -e 's/^#\(CONFIG_FULL_DYNAMIC_VLAN\)/\1/' -e 's/^#\(NEED_LINUX_IOCTL\)/\1/' -e 's/^#\(CONFIG_VLAN_NETLINK\)/\1/' -e 's/^#\(CONFIG_LIBNL32\)/\1/' -e 's/^\(CONFIG_EAP\)/#\1/' -e 's/#\(CONFIG_TLS=openssl\)/\1/' /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/hostapd-2.10/hostapd/.config
# set requested configuration options not listed in hostapd defconfig
for s in CONFIG_INTERNAL_LIBTOMMATH CONFIG_DEBUG_FILE CONFIG_DEBUG_SYSLOG CONFIG_HS20 CONFIG_IEEE80211AX CONFIG_IEEE80211AC CONFIG_IEEE80211N CONFIG_IEEE80211R CONFIG_INTERWORKING CONFIG_ACS CONFIG_NO_ACCOUNTING CONFIG_NO_RADIUS CONFIG_DPP CONFIG_SAE CONFIG_SAE_PK CONFIG_OWE CONFIG_FULL_DYNAMIC_VLAN NEED_LINUX_IOCTL CONFIG_VLAN_NETLINK CONFIG_LIBNL32 ; do if ! grep -q "^${s}" /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/hostapd-2.10/hostapd/.config; then echo "${s}=y" >> /home/ych/rk3568/buildroot/output/rockchip_rk3568/build/hostapd-2.10/hostapd/.config ; fi done
