2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2009-11-30 15:45:35 +01:00
|
|
|
#
|
|
|
|
# hostapd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2016-10-11 21:05:08 +02:00
|
|
|
HOSTAPD_VERSION = 2.6
|
2017-09-14 17:11:14 +02:00
|
|
|
HOSTAPD_SITE = http://w1.fi/releases
|
2017-10-16 13:19:21 +02:00
|
|
|
HOSTAPD_PATCH = \
|
|
|
|
http://w1.fi/security/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch \
|
|
|
|
http://w1.fi/security/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
|
2009-11-30 15:45:35 +01:00
|
|
|
HOSTAPD_SUBDIR = hostapd
|
|
|
|
HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config
|
2017-12-30 16:57:36 +01:00
|
|
|
HOSTAPD_DEPENDENCIES = host-pkgconf
|
|
|
|
HOSTAPD_CFLAGS = $(TARGET_CFLAGS)
|
2017-03-30 15:43:38 +02:00
|
|
|
HOSTAPD_LICENSE = BSD-3-Clause
|
2012-12-03 05:46:08 +01:00
|
|
|
HOSTAPD_LICENSE_FILES = README
|
2014-02-27 21:47:11 +01:00
|
|
|
HOSTAPD_CONFIG_SET =
|
|
|
|
|
2017-12-30 16:57:36 +01:00
|
|
|
HOSTAPD_CONFIG_ENABLE = CONFIG_INTERNAL_LIBTOMMATH
|
2014-02-27 21:47:11 +01:00
|
|
|
|
|
|
|
HOSTAPD_CONFIG_DISABLE =
|
2011-07-25 16:26:40 +02:00
|
|
|
|
2012-12-28 10:47:18 +01:00
|
|
|
# Try to use openssl if it's already available
|
2017-10-21 18:45:36 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
|
|
|
|
HOSTAPD_DEPENDENCIES += libopenssl
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_LIBS += $(if $(BR2_STATIC_LIBS),-lcrypto -lz)
|
|
|
|
HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/'
|
2010-10-06 19:31:33 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD
|
|
|
|
HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2017-12-30 16:57:34 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_HOSTAP),)
|
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_DRIVER_HOSTAP
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_NL80211),)
|
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_DRIVER_NL80211
|
|
|
|
endif
|
|
|
|
|
2017-09-14 13:08:11 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_RTW),y)
|
2017-11-25 12:08:51 +01:00
|
|
|
HOSTAPD_PATCH += https://github.com/pritambaral/hostapd-rtl871xdrv/raw/master/rtlxdrv.patch
|
2017-09-14 13:08:11 +02:00
|
|
|
HOSTAPD_CONFIG_SET += CONFIG_DRIVER_RTW
|
|
|
|
endif
|
|
|
|
|
2017-12-30 16:57:34 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_WIRED),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_DRIVER_WIRED
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_NONE),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_DRIVER_NONE
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Add options for wireless drivers
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_HAS_WIFI_DRIVERS),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += \
|
|
|
|
CONFIG_HS20 \
|
|
|
|
CONFIG_IEEE80211AC \
|
|
|
|
CONFIG_IEEE80211N \
|
|
|
|
CONFIG_IEEE80211R \
|
|
|
|
CONFIG_INTERWORKING
|
|
|
|
endif
|
|
|
|
|
2015-12-03 17:40:38 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_ACS),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_ACS
|
|
|
|
endif
|
|
|
|
|
2010-10-06 19:31:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_ENABLE += \
|
|
|
|
CONFIG_EAP \
|
2017-04-05 00:50:14 +02:00
|
|
|
CONFIG_RADIUS_SERVER
|
2014-06-05 16:24:19 +02:00
|
|
|
|
2015-03-31 09:21:57 +02:00
|
|
|
# Enable both TLS v1.1 (CONFIG_TLSV11) and v1.2 (CONFIG_TLSV12)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_TLSV1
|
2010-10-06 19:31:33 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_EAP
|
|
|
|
HOSTAPD_CONFIG_ENABLE += \
|
|
|
|
CONFIG_NO_ACCOUNTING \
|
|
|
|
CONFIG_NO_RADIUS
|
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)
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_WPS
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2017-12-23 20:06:14 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN),)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_NO_VLAN
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_DYNAMIC),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_FULL_DYNAMIC_VLAN
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_NETLINK),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_VLAN_NETLINK
|
|
|
|
endif
|
|
|
|
|
2017-12-30 16:57:36 +01:00
|
|
|
# Options for building with libnl
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBNL),y)
|
|
|
|
HOSTAPD_DEPENDENCIES += libnl
|
|
|
|
HOSTAPD_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl3/
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_LIBNL32
|
|
|
|
# libnl-3 needs -lm (for rint) and -lpthread if linking statically
|
|
|
|
# And library order matters hence stick -lnl-3 first since it's appended
|
|
|
|
# in the hostapd Makefiles as in LIBS+=-lnl-3 ... thus failing
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
HOSTAPD_LIBS += -lnl-3 -lm -lpthread
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2010-09-01 23:44:24 +02:00
|
|
|
define HOSTAPD_CONFIGURE_CMDS
|
2012-05-14 04:29:59 +02:00
|
|
|
cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG)
|
2014-02-27 21:47:11 +01:00
|
|
|
sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(HOSTAPD_CONFIG_ENABLE)) \
|
|
|
|
$(patsubst %,-e 's/^\(%\)/#\1/',$(HOSTAPD_CONFIG_DISABLE)) \
|
|
|
|
$(patsubst %,-e '1i%=y',$(HOSTAPD_CONFIG_SET)) \
|
|
|
|
$(patsubst %,-e %,$(HOSTAPD_CONFIG_EDITS)) \
|
|
|
|
$(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2012-05-14 04:29:59 +02:00
|
|
|
define HOSTAPD_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) CFLAGS="$(HOSTAPD_CFLAGS)" \
|
2013-11-29 15:25:43 +01:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(HOSTAPD_LIBS)" \
|
2012-05-14 04:29:59 +02:00
|
|
|
$(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(HOSTAPD_SUBDIR)
|
|
|
|
endef
|
|
|
|
|
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
|
2016-07-07 08:12:26 +02:00
|
|
|
$(INSTALL) -m 0644 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd.conf \
|
|
|
|
$(TARGET_DIR)/etc/hostapd.conf
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|