2010-10-06 19:31:33 +02:00
|
|
|
##############################################################
|
2009-11-30 15:45:35 +01:00
|
|
|
#
|
|
|
|
# hostapd
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2010-10-06 19:31:33 +02:00
|
|
|
HOSTAPD_VERSION = 0.7.3
|
2009-11-30 15:45:35 +01:00
|
|
|
HOSTAPD_SITE = http://hostap.epitest.fi/releases
|
|
|
|
HOSTAPD_SUBDIR = hostapd
|
|
|
|
HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config
|
2010-04-26 16:54:32 +02:00
|
|
|
HOSTAPD_DEPENDENCIES = libnl
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2011-04-27 10:26:39 +02:00
|
|
|
define HOSTAPD_LIBNL_CONFIG
|
|
|
|
echo "CONFIG_LIBNL20=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
endef
|
|
|
|
|
2010-10-06 19:31:33 +02:00
|
|
|
define HOSTAPD_CRYPTO_CONFIG
|
2010-09-01 23:44:24 +02:00
|
|
|
echo "CONFIG_CRYPTO=internal" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(HOSTAPD_CONFIG)
|
2010-10-06 19:31:33 +02:00
|
|
|
echo "CONFIG_INTERNAL_LIBTOMMATH_FAST=y" >>$(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2010-10-06 19:31:33 +02:00
|
|
|
# Try to use openssl for TLS if it's already available
|
|
|
|
# gnutls is also supported for TLS
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
|
|
HOSTAPD_DEPENDENCIES += openssl
|
|
|
|
define HOSTAPD_TLS_CONFIG
|
|
|
|
echo "CONFIG_TLS=openssl" >>$(HOSTAPD_CONFIG)
|
|
|
|
endef
|
|
|
|
else
|
|
|
|
define HOSTAPD_TLS_CONFIG
|
|
|
|
echo "CONFIG_TLS=internal" >>$(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2010-10-06 19:31:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y)
|
|
|
|
define HOSTAPD_EAP_CONFIG
|
2009-11-30 15:45:35 +01:00
|
|
|
$(SED) "s/CONFIG_EAP_MSCHAPV2=y//" $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) "s/CONFIG_EAP_PEAP=y//" $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) "s/CONFIG_EAP_TLS=y//" $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) "s/CONFIG_EAP_TTLS=y//" $(HOSTAPD_CONFIG)
|
2010-10-06 19:31:33 +02:00
|
|
|
echo "CONFIG_EAP_AKA=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CONFIG_EAP_AKA_PRIME=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CONFIG_EAP_GPSK=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CONFIG_EAP_GPSK_SHA256=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CONFIG_EAP_PAX=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CONFIG_EAP_PSK=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CONFIG_EAP_SAKE=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CONFIG_EAP_SIM=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CONFIG_RADIUS_SERVER=y" >>$(HOSTAPD_CONFIG)
|
|
|
|
endef
|
|
|
|
ifeq ($(BR2_INET_IPV6),y)
|
|
|
|
define HOSTAPD_RADIUS_IPV6_CONFIG
|
|
|
|
$(SED) "s/^#CONFIG_IPV6/CONFIG_IPV6/" $(HOSTAPD_CONFIG)
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
define HOSTAPD_EAP_CONFIG
|
|
|
|
$(SED) "s/^CONFIG_EAP/#CONFIG_EAP/g" $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) "s/^#CONFIG_NO_ACCOUNTING/CONFIG_NO_ACCOUNTING/" $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) "s/^#CONFIG_NO_RADIUS/CONFIG_NO_RADIUS/" $(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2009-11-30 15:45:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y)
|
2010-10-06 19:31:33 +02:00
|
|
|
define HOSTAPD_WPS_CONFIG
|
|
|
|
$(SED) "s/^#CONFIG_WPS/CONFIG_WPS/g" $(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
|
|
|
define HOSTAPD_CONFIGURE_CMDS
|
|
|
|
cp $(@D)/$(HOSTAPD_SUBDIR)/defconfig $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) "s/\/local//" $(@D)/$(HOSTAPD_SUBDIR)/Makefile
|
|
|
|
echo "CFLAGS += $(TARGET_CFLAGS)" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "LDFLAGS += $(TARGET_LDFLAGS)" >>$(HOSTAPD_CONFIG)
|
|
|
|
echo "CC = $(TARGET_CC)" >>$(HOSTAPD_CONFIG)
|
2009-11-30 15:45:35 +01:00
|
|
|
# Drivers
|
2010-10-06 19:31:33 +02:00
|
|
|
$(SED) "s/^#CONFIG_DRIVER_WIRED/CONFIG_DRIVER_WIRED/" $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) "s/^#CONFIG_DRIVER_NL80211/CONFIG_DRIVER_NL80211/" $(HOSTAPD_CONFIG)
|
2009-11-30 15:45:35 +01:00
|
|
|
# Misc
|
2010-12-09 10:55:01 +01:00
|
|
|
$(SED) "s/^CONFIG_IPV6/#CONFIG_IPV6/" $(HOSTAPD_CONFIG)
|
2010-10-06 19:31:33 +02:00
|
|
|
$(SED) "s/^#CONFIG_IEEE80211N/CONFIG_IEEE80211N/" $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) "s/^#CONFIG_IEEE80211R/CONFIG_IEEE80211R/" $(HOSTAPD_CONFIG)
|
|
|
|
$(HOSTAPD_CRYPTO_CONFIG)
|
|
|
|
$(HOSTAPD_TLS_CONFIG)
|
|
|
|
$(HOSTAPD_RADIUS_IPV6_CONFIG)
|
|
|
|
$(HOSTAPD_EAP_CONFIG)
|
|
|
|
$(HOSTAPD_WPS_CONFIG)
|
2011-04-27 10:26:39 +02:00
|
|
|
$(HOSTAPD_LIBNL_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2010-09-01 23:44:24 +02:00
|
|
|
define HOSTAPD_INSTALL_TARGET_CMDS
|
2010-12-09 10:55:01 +01:00
|
|
|
$(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd \
|
|
|
|
$(TARGET_DIR)/usr/sbin/hostapd
|
|
|
|
$(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd_cli \
|
|
|
|
$(TARGET_DIR)/usr/bin/hostapd_cli
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2010-09-01 23:44:24 +02:00
|
|
|
define HOSTAPD_UNINSTALL_TARGET_CMDS
|
2009-11-30 15:45:35 +01:00
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/hostapd
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/hostapd
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2010-09-01 23:44:24 +02:00
|
|
|
$(eval $(call AUTOTARGETS,package,hostapd))
|