From patchwork Mon Sep 22 06:09:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Kim_B=C3=B8ndergaard?= X-Patchwork-Id: 391790 X-Patchwork-Delegate: kiho@prevas.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id E900314017A for ; Mon, 22 Sep 2014 16:10:04 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id ACB4F3FFE7 for ; Mon, 22 Sep 2014 08:10:02 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by hugin.dotsrc.org (Postfix) with ESMTPS id A23483FCF3 for ; Mon, 22 Sep 2014 08:09:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=23285; q=dns/txt; s=ironport2; t=1411366197; x=1442902197; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M3+0BjzN2pqYuoWirAK9JboMoVP8Vp7xJA+pfck0YS4=; b=GAb5pvLuPwZ7aLFYGyjnRrQ2vRY+pQ3tWcP+vlyxLdaguBLhV6aq3alO E1wkbNEnylXtG6r515m30MwFS2mSPuqU0HRAKJgnK0wWnlxevCP5LQ/SF rHKaSsTbKmG0ojzhltcI0tiv8deg+X1Q8xGt+BCW9UlMODGw4h8POdem+ A=; X-IronPort-AV: E=Sophos;i="5.04,570,1406584800"; d="scan'208";a="1085050" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 22 Sep 2014 08:09:56 +0200 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.347.0; Mon, 22 Sep 2014 08:09:56 +0200 Received: by localhost (Postfix, from userid 30019) id AF5B4681445; Mon, 22 Sep 2014 06:09:55 +0000 (UTC) From: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= To: Subject: [PATCH 1/7] =?UTF-8?q?hostapd:=20New=20recipe=20-=20posted=20on?= =?UTF-8?q?=20mailing=20list=20by=20Mads=20Dor=C3=A9?= Date: Mon, 22 Sep 2014 06:09:48 +0000 Message-ID: X-Mailer: git-send-email 1.8.4 In-Reply-To: References: MIME-Version: 1.0 Cc: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Kim Bøndergaard --- hostapd.patch | 473 +++++++++++++++++++++++++++++++++ recipes/hostapd/hostapd-1.0/init | 37 +++ recipes/hostapd/hostapd-1.0/wlan.patch | 133 +++++++++ recipes/hostapd/hostapd_1.0.oe | 39 +++ recipes/hostapd/hostapd_1.0.oe.sig | 1 + 5 files changed, 683 insertions(+) create mode 100644 hostapd.patch create mode 100644 recipes/hostapd/hostapd-1.0/init create mode 100644 recipes/hostapd/hostapd-1.0/wlan.patch create mode 100644 recipes/hostapd/hostapd_1.0.oe create mode 100644 recipes/hostapd/hostapd_1.0.oe.sig diff --git a/hostapd.patch b/hostapd.patch new file mode 100644 index 0000000..a23b420 --- /dev/null +++ b/hostapd.patch @@ -0,0 +1,473 @@ +diff --git a/recipes/hostapd/hostapd-1.0/init b/recipes/hostapd/hostapd-1.0/init +new file mode 100644 +index 0000000..79f74b6 +--- /dev/null ++++ b/recipes/hostapd/hostapd-1.0/init +@@ -0,0 +1,37 @@ ++#!/bin/sh ++DAEMON=/usr/sbin/hostapd ++NAME=hostapd ++DESC="HOSTAP Daemon" ++ARGS="/etc/hostapd.conf -B" ++ ++test -f $DAEMON || exit 0 ++ ++set -e ++ ++case "$1" in ++ start) ++ echo -n "Starting $DESC: " ++ start-stop-daemon -S -x $DAEMON -- $ARGS ++ echo "$NAME." ++ ;; ++ stop) ++ echo -n "Stopping $DESC: " ++ start-stop-daemon -K -x $DAEMON ++ echo "$NAME." ++ ;; ++ restart) ++ $0 stop ++ $0 start ++ ;; ++ reload) ++ echo -n "Reloading $DESC: " ++ killall -HUP $(basename ${DAEMON}) ++ echo "$NAME." ++ ;; ++ *) ++ echo "Usage: $0 {start|stop|restart|reload}" ++ exit 1 ++ ;; ++esac ++ ++exit 0 +diff --git a/recipes/hostapd/hostapd-1.0/wlan.patch b/recipes/hostapd/hostapd-1.0/wlan.patch +new file mode 100644 +index 0000000..d83b48e +--- /dev/null ++++ b/recipes/hostapd/hostapd-1.0/wlan.patch +@@ -0,0 +1,133 @@ ++--- hostapd/defconfig.orig 2014-07-30 11:26:22.599087301 +0200 +++++ hostapd/defconfig 2014-07-30 11:27:26.175090018 +0200 ++@@ -13,14 +13,24 @@ ++ CONFIG_DRIVER_HOSTAP=y ++ ++ # Driver interface for wired authenticator ++-#CONFIG_DRIVER_WIRED=y +++CONFIG_DRIVER_WIRED=y ++ ++ # Driver interface for madwifi driver ++ #CONFIG_DRIVER_MADWIFI=y ++ #CFLAGS += -I../../madwifi # change to the madwifi source directory ++ +++# Driver interface for Prism54 driver +++CONFIG_DRIVER_PRISM54=y +++ ++ # Driver interface for drivers using the nl80211 kernel interface ++ CONFIG_DRIVER_NL80211=y +++CONFIG_LIBNL32=y +++# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be +++# shipped with your distribution yet. If that is the case, you need to build +++# newer libnl version and point the hostapd build to use it. +++#LIBNL=/usr/src/libnl +++#CFLAGS += -I$(LIBNL)/include +++#LIBS += -L$(LIBNL)/lib ++ ++ # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) ++ #CONFIG_DRIVER_BSD=y ++@@ -103,9 +113,7 @@ ++ #CONFIG_EAP_FAST=y ++ ++ # Wi-Fi Protected Setup (WPS) ++-#CONFIG_WPS=y ++-# Enable WSC 2.0 support ++-#CONFIG_WPS2=y +++CONFIG_WPS=y ++ # Enable UPnP support for external WPS Registrars ++ #CONFIG_WPS_UPNP=y ++ ++@@ -121,7 +129,7 @@ ++ ++ # RADIUS authentication server. This provides access to the integrated EAP ++ # server from external hosts using RADIUS. ++-#CONFIG_RADIUS_SERVER=y +++CONFIG_RADIUS_SERVER=y ++ ++ # Build IPv6 support for RADIUS operations ++ CONFIG_IPV6=y ++@@ -131,10 +139,10 @@ ++ ++ # Use the hostapd's IEEE 802.11 authentication (ACL), but without ++ # the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211) ++-#CONFIG_DRIVER_RADIUS_ACL=y +++CONFIG_DRIVER_RADIUS_ACL=y ++ ++ # IEEE 802.11n (High Throughput) support ++-#CONFIG_IEEE80211N=y +++CONFIG_IEEE80211N=y ++ ++ # Remove debugging code that is printing out debug messages to stdout. ++ # This can be used to reduce the size of the hostapd considerably if debugging ++--- hostapd/hostapd.conf.orig 2014-07-30 11:22:15.387076733 +0200 +++++ hostapd/hostapd.conf 2014-07-30 11:25:17.555084520 +0200 ++@@ -23,6 +23,7 @@ ++ # Use driver=none if building hostapd as a standalone RADIUS server that does ++ # not control any wireless/wired driver. ++ # driver=hostap +++driver=nl80211 ++ ++ # hostapd event logger configuration ++ # ++@@ -83,7 +84,7 @@ ++ ##### IEEE 802.11 related configuration ####################################### ++ ++ # SSID to be used in IEEE 802.11 management frames ++-ssid=test +++ssid=AP-Test ++ ++ # Country code (ISO/IEC 3166-1). Used to set regulatory domain. ++ # Set as needed to indicate country in which device is operating. ++@@ -184,7 +185,7 @@ ++ # Bit fields of allowed authentication algorithms: ++ # bit 0 = Open System Authentication ++ # bit 1 = Shared Key Authentication (requires WEP) ++-auth_algs=3 +++auth_algs=1 ++ ++ # Send empty SSID in beacons and ignore probe request frames that do not ++ # specify full SSID, i.e., require stations to know SSID. ++@@ -679,7 +680,7 @@ ++ # and/or WPA2 (full IEEE 802.11i/RSN): ++ # bit0 = WPA ++ # bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled) ++-#wpa=1 +++wpa=1 ++ ++ # WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit ++ # secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase ++@@ -688,7 +689,7 @@ ++ # wpa_psk (dot11RSNAConfigPSKValue) ++ # wpa_passphrase (dot11RSNAConfigPSKPassPhrase) ++ #wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef ++-#wpa_passphrase=secret passphrase +++wpa_passphrase=1234 ++ ++ # Optionally, WPA PSKs can be read from a separate text file (containing list ++ # of (PSK,MAC address) pairs. This allows more than one PSK to be configured. ++@@ -701,6 +702,7 @@ ++ # added to enable SHA256-based stronger algorithms. ++ # (dot11RSNAConfigAuthenticationSuitesTable) ++ #wpa_key_mgmt=WPA-PSK WPA-EAP +++wpa_key_mgmt=WPA-PSK ++ ++ # Set of accepted cipher suites (encryption algorithms) for pairwise keys ++ # (unicast packets). This is a space separated list of algorithms: ++@@ -712,7 +714,7 @@ ++ # TKIP will be used as the group cipher. ++ # (dot11RSNAConfigPairwiseCiphersTable) ++ # Pairwise cipher for WPA (v1) (default: TKIP) ++-#wpa_pairwise=TKIP CCMP +++wpa_pairwise=TKIP CCMP ++ # Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value) ++ #rsn_pairwise=CCMP ++ ++@@ -730,7 +732,7 @@ ++ ++ # Maximum lifetime for PTK in seconds. This can be used to enforce rekeying of ++ # PTK to mitigate some attacks against TKIP deficiencies. ++-#wpa_ptk_rekey=600 +++wpa_ptk_rekey=600 ++ ++ # Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up ++ # roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN +diff --git a/recipes/hostapd/hostapd_1.0.oe b/recipes/hostapd/hostapd_1.0.oe +new file mode 100644 +index 0000000..33d6e03 +--- /dev/null ++++ b/recipes/hostapd/hostapd_1.0.oe +@@ -0,0 +1,39 @@ ++DESCRIPTION = "User space daemon for extended IEEE 802.11 management" ++HOMEPAGE = "http://hostap.epitest.fi" ++LICENSE = "GPLv2 | BSD" ++ ++SRC_URI = "http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz" ++SRC_URI += "file://init" ++SRC_URI += """ ++ file://wlan.patch ++""" ++ ++inherit c make ++ ++LIBS = "libnl-3 libnl-genl-3 libssl libcrypto" ++DEPENDS += "${LIBS}" ++ ++RDEPENDS += "libnl-3 libnl-genl-3 openssl crda" ++ ++S = "${SRCDIR}/hostapd-${PV}/hostapd" ++ ++CFLAGS += "-I${HOST_SYSROOT}${includedir}/libnl3" ++ ++do_configure() { ++ install -m 0644 ${S}/defconfig ${S}/.config ++} ++ ++do_install() { ++ install -d ${D}${sbindir} ${D}${sysconfdir}/init.d ++ install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir} ++ install -m 0755 ${S}/hostapd ${D}${sbindir} ++ install -m 0755 ${S}/hostapd_cli ${D}${sbindir} ++ install -m 755 ${SRCDIR}/init ${D}${sysconfdir}/init.d/hostapd ++} ++ ++PACKAGE =+ "${PN}-conf" ++ ++RDEPENDS_${PN} += "${LIBS}" ++ ++FILES_${PN}-conf = "${sysconfdir}/hostapd.conf" ++ +diff --git a/recipes/hostapd/hostapd_1.0.oe.sig b/recipes/hostapd/hostapd_1.0.oe.sig +new file mode 100644 +index 0000000..637e0d4 +--- /dev/null ++++ b/recipes/hostapd/hostapd_1.0.oe.sig +@@ -0,0 +1 @@ ++4edf267bc5943a5f7d6d9c0abcce0973bfbad5fa hostapd-1.0.tar.gz +-- +2.0.4 +diff --git a/recipes/hostapd/hostapd-1.0/init b/recipes/hostapd/hostapd-1.0/init +new file mode 100644 +index 0000000..79f74b6 +--- /dev/null ++++ b/recipes/hostapd/hostapd-1.0/init +@@ -0,0 +1,37 @@ ++#!/bin/sh ++DAEMON=/usr/sbin/hostapd ++NAME=hostapd ++DESC="HOSTAP Daemon" ++ARGS="/etc/hostapd.conf -B" ++ ++test -f $DAEMON || exit 0 ++ ++set -e ++ ++case "$1" in ++ start) ++ echo -n "Starting $DESC: " ++ start-stop-daemon -S -x $DAEMON -- $ARGS ++ echo "$NAME." ++ ;; ++ stop) ++ echo -n "Stopping $DESC: " ++ start-stop-daemon -K -x $DAEMON ++ echo "$NAME." ++ ;; ++ restart) ++ $0 stop ++ $0 start ++ ;; ++ reload) ++ echo -n "Reloading $DESC: " ++ killall -HUP $(basename ${DAEMON}) ++ echo "$NAME." ++ ;; ++ *) ++ echo "Usage: $0 {start|stop|restart|reload}" ++ exit 1 ++ ;; ++esac ++ ++exit 0 +diff --git a/recipes/hostapd/hostapd-1.0/wlan.patch b/recipes/hostapd/hostapd-1.0/wlan.patch +new file mode 100644 +index 0000000..d83b48e +--- /dev/null ++++ b/recipes/hostapd/hostapd-1.0/wlan.patch +@@ -0,0 +1,133 @@ ++--- hostapd/defconfig.orig 2014-07-30 11:26:22.599087301 +0200 +++++ hostapd/defconfig 2014-07-30 11:27:26.175090018 +0200 ++@@ -13,14 +13,24 @@ ++ CONFIG_DRIVER_HOSTAP=y ++ ++ # Driver interface for wired authenticator ++-#CONFIG_DRIVER_WIRED=y +++CONFIG_DRIVER_WIRED=y ++ ++ # Driver interface for madwifi driver ++ #CONFIG_DRIVER_MADWIFI=y ++ #CFLAGS += -I../../madwifi # change to the madwifi source directory ++ +++# Driver interface for Prism54 driver +++CONFIG_DRIVER_PRISM54=y +++ ++ # Driver interface for drivers using the nl80211 kernel interface ++ CONFIG_DRIVER_NL80211=y +++CONFIG_LIBNL32=y +++# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be +++# shipped with your distribution yet. If that is the case, you need to build +++# newer libnl version and point the hostapd build to use it. +++#LIBNL=/usr/src/libnl +++#CFLAGS += -I$(LIBNL)/include +++#LIBS += -L$(LIBNL)/lib ++ ++ # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) ++ #CONFIG_DRIVER_BSD=y ++@@ -103,9 +113,7 @@ ++ #CONFIG_EAP_FAST=y ++ ++ # Wi-Fi Protected Setup (WPS) ++-#CONFIG_WPS=y ++-# Enable WSC 2.0 support ++-#CONFIG_WPS2=y +++CONFIG_WPS=y ++ # Enable UPnP support for external WPS Registrars ++ #CONFIG_WPS_UPNP=y ++ ++@@ -121,7 +129,7 @@ ++ ++ # RADIUS authentication server. This provides access to the integrated EAP ++ # server from external hosts using RADIUS. ++-#CONFIG_RADIUS_SERVER=y +++CONFIG_RADIUS_SERVER=y ++ ++ # Build IPv6 support for RADIUS operations ++ CONFIG_IPV6=y ++@@ -131,10 +139,10 @@ ++ ++ # Use the hostapd's IEEE 802.11 authentication (ACL), but without ++ # the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211) ++-#CONFIG_DRIVER_RADIUS_ACL=y +++CONFIG_DRIVER_RADIUS_ACL=y ++ ++ # IEEE 802.11n (High Throughput) support ++-#CONFIG_IEEE80211N=y +++CONFIG_IEEE80211N=y ++ ++ # Remove debugging code that is printing out debug messages to stdout. ++ # This can be used to reduce the size of the hostapd considerably if debugging ++--- hostapd/hostapd.conf.orig 2014-07-30 11:22:15.387076733 +0200 +++++ hostapd/hostapd.conf 2014-07-30 11:25:17.555084520 +0200 ++@@ -23,6 +23,7 @@ ++ # Use driver=none if building hostapd as a standalone RADIUS server that does ++ # not control any wireless/wired driver. ++ # driver=hostap +++driver=nl80211 ++ ++ # hostapd event logger configuration ++ # ++@@ -83,7 +84,7 @@ ++ ##### IEEE 802.11 related configuration ####################################### ++ ++ # SSID to be used in IEEE 802.11 management frames ++-ssid=test +++ssid=AP-Test ++ ++ # Country code (ISO/IEC 3166-1). Used to set regulatory domain. ++ # Set as needed to indicate country in which device is operating. ++@@ -184,7 +185,7 @@ ++ # Bit fields of allowed authentication algorithms: ++ # bit 0 = Open System Authentication ++ # bit 1 = Shared Key Authentication (requires WEP) ++-auth_algs=3 +++auth_algs=1 ++ ++ # Send empty SSID in beacons and ignore probe request frames that do not ++ # specify full SSID, i.e., require stations to know SSID. ++@@ -679,7 +680,7 @@ ++ # and/or WPA2 (full IEEE 802.11i/RSN): ++ # bit0 = WPA ++ # bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled) ++-#wpa=1 +++wpa=1 ++ ++ # WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit ++ # secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase ++@@ -688,7 +689,7 @@ ++ # wpa_psk (dot11RSNAConfigPSKValue) ++ # wpa_passphrase (dot11RSNAConfigPSKPassPhrase) ++ #wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef ++-#wpa_passphrase=secret passphrase +++wpa_passphrase=1234 ++ ++ # Optionally, WPA PSKs can be read from a separate text file (containing list ++ # of (PSK,MAC address) pairs. This allows more than one PSK to be configured. ++@@ -701,6 +702,7 @@ ++ # added to enable SHA256-based stronger algorithms. ++ # (dot11RSNAConfigAuthenticationSuitesTable) ++ #wpa_key_mgmt=WPA-PSK WPA-EAP +++wpa_key_mgmt=WPA-PSK ++ ++ # Set of accepted cipher suites (encryption algorithms) for pairwise keys ++ # (unicast packets). This is a space separated list of algorithms: ++@@ -712,7 +714,7 @@ ++ # TKIP will be used as the group cipher. ++ # (dot11RSNAConfigPairwiseCiphersTable) ++ # Pairwise cipher for WPA (v1) (default: TKIP) ++-#wpa_pairwise=TKIP CCMP +++wpa_pairwise=TKIP CCMP ++ # Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value) ++ #rsn_pairwise=CCMP ++ ++@@ -730,7 +732,7 @@ ++ ++ # Maximum lifetime for PTK in seconds. This can be used to enforce rekeying of ++ # PTK to mitigate some attacks against TKIP deficiencies. ++-#wpa_ptk_rekey=600 +++wpa_ptk_rekey=600 ++ ++ # Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up ++ # roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN +diff --git a/recipes/hostapd/hostapd_1.0.oe b/recipes/hostapd/hostapd_1.0.oe +new file mode 100644 +index 0000000..33d6e03 +--- /dev/null ++++ b/recipes/hostapd/hostapd_1.0.oe +@@ -0,0 +1,39 @@ ++DESCRIPTION = "User space daemon for extended IEEE 802.11 management" ++HOMEPAGE = "http://hostap.epitest.fi" ++LICENSE = "GPLv2 | BSD" ++ ++SRC_URI = "http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz" ++SRC_URI += "file://init" ++SRC_URI += """ ++ file://wlan.patch ++""" ++ ++inherit c make ++ ++LIBS = "libnl-3 libnl-genl-3 libssl libcrypto" ++DEPENDS += "${LIBS}" ++ ++RDEPENDS += "libnl-3 libnl-genl-3 openssl crda" ++ ++S = "${SRCDIR}/hostapd-${PV}/hostapd" ++ ++CFLAGS += "-I${HOST_SYSROOT}${includedir}/libnl3" ++ ++do_configure() { ++ install -m 0644 ${S}/defconfig ${S}/.config ++} ++ ++do_install() { ++ install -d ${D}${sbindir} ${D}${sysconfdir}/init.d ++ install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir} ++ install -m 0755 ${S}/hostapd ${D}${sbindir} ++ install -m 0755 ${S}/hostapd_cli ${D}${sbindir} ++ install -m 755 ${SRCDIR}/init ${D}${sysconfdir}/init.d/hostapd ++} ++ ++PACKAGE =+ "${PN}-conf" ++ ++RDEPENDS_${PN} += "${LIBS}" ++ ++FILES_${PN}-conf = "${sysconfdir}/hostapd.conf" ++ +diff --git a/recipes/hostapd/hostapd_1.0.oe.sig b/recipes/hostapd/hostapd_1.0.oe.sig +new file mode 100644 +index 0000000..637e0d4 +--- /dev/null ++++ b/recipes/hostapd/hostapd_1.0.oe.sig +@@ -0,0 +1 @@ ++4edf267bc5943a5f7d6d9c0abcce0973bfbad5fa hostapd-1.0.tar.gz +-- +2.0.4 + diff --git a/recipes/hostapd/hostapd-1.0/init b/recipes/hostapd/hostapd-1.0/init new file mode 100644 index 0000000..79f74b6 --- /dev/null +++ b/recipes/hostapd/hostapd-1.0/init @@ -0,0 +1,37 @@ +#!/bin/sh +DAEMON=/usr/sbin/hostapd +NAME=hostapd +DESC="HOSTAP Daemon" +ARGS="/etc/hostapd.conf -B" + +test -f $DAEMON || exit 0 + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon -S -x $DAEMON -- $ARGS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x $DAEMON + echo "$NAME." + ;; + restart) + $0 stop + $0 start + ;; + reload) + echo -n "Reloading $DESC: " + killall -HUP $(basename ${DAEMON}) + echo "$NAME." + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/recipes/hostapd/hostapd-1.0/wlan.patch b/recipes/hostapd/hostapd-1.0/wlan.patch new file mode 100644 index 0000000..d83b48e --- /dev/null +++ b/recipes/hostapd/hostapd-1.0/wlan.patch @@ -0,0 +1,133 @@ +--- hostapd/defconfig.orig 2014-07-30 11:26:22.599087301 +0200 ++++ hostapd/defconfig 2014-07-30 11:27:26.175090018 +0200 +@@ -13,14 +13,24 @@ + CONFIG_DRIVER_HOSTAP=y + + # Driver interface for wired authenticator +-#CONFIG_DRIVER_WIRED=y ++CONFIG_DRIVER_WIRED=y + + # Driver interface for madwifi driver + #CONFIG_DRIVER_MADWIFI=y + #CFLAGS += -I../../madwifi # change to the madwifi source directory + ++# Driver interface for Prism54 driver ++CONFIG_DRIVER_PRISM54=y ++ + # Driver interface for drivers using the nl80211 kernel interface + CONFIG_DRIVER_NL80211=y ++CONFIG_LIBNL32=y ++# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be ++# shipped with your distribution yet. If that is the case, you need to build ++# newer libnl version and point the hostapd build to use it. ++#LIBNL=/usr/src/libnl ++#CFLAGS += -I$(LIBNL)/include ++#LIBS += -L$(LIBNL)/lib + + # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) + #CONFIG_DRIVER_BSD=y +@@ -103,9 +113,7 @@ + #CONFIG_EAP_FAST=y + + # Wi-Fi Protected Setup (WPS) +-#CONFIG_WPS=y +-# Enable WSC 2.0 support +-#CONFIG_WPS2=y ++CONFIG_WPS=y + # Enable UPnP support for external WPS Registrars + #CONFIG_WPS_UPNP=y + +@@ -121,7 +129,7 @@ + + # RADIUS authentication server. This provides access to the integrated EAP + # server from external hosts using RADIUS. +-#CONFIG_RADIUS_SERVER=y ++CONFIG_RADIUS_SERVER=y + + # Build IPv6 support for RADIUS operations + CONFIG_IPV6=y +@@ -131,10 +139,10 @@ + + # Use the hostapd's IEEE 802.11 authentication (ACL), but without + # the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211) +-#CONFIG_DRIVER_RADIUS_ACL=y ++CONFIG_DRIVER_RADIUS_ACL=y + + # IEEE 802.11n (High Throughput) support +-#CONFIG_IEEE80211N=y ++CONFIG_IEEE80211N=y + + # Remove debugging code that is printing out debug messages to stdout. + # This can be used to reduce the size of the hostapd considerably if debugging +--- hostapd/hostapd.conf.orig 2014-07-30 11:22:15.387076733 +0200 ++++ hostapd/hostapd.conf 2014-07-30 11:25:17.555084520 +0200 +@@ -23,6 +23,7 @@ + # Use driver=none if building hostapd as a standalone RADIUS server that does + # not control any wireless/wired driver. + # driver=hostap ++driver=nl80211 + + # hostapd event logger configuration + # +@@ -83,7 +84,7 @@ + ##### IEEE 802.11 related configuration ####################################### + + # SSID to be used in IEEE 802.11 management frames +-ssid=test ++ssid=AP-Test + + # Country code (ISO/IEC 3166-1). Used to set regulatory domain. + # Set as needed to indicate country in which device is operating. +@@ -184,7 +185,7 @@ + # Bit fields of allowed authentication algorithms: + # bit 0 = Open System Authentication + # bit 1 = Shared Key Authentication (requires WEP) +-auth_algs=3 ++auth_algs=1 + + # Send empty SSID in beacons and ignore probe request frames that do not + # specify full SSID, i.e., require stations to know SSID. +@@ -679,7 +680,7 @@ + # and/or WPA2 (full IEEE 802.11i/RSN): + # bit0 = WPA + # bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled) +-#wpa=1 ++wpa=1 + + # WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit + # secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase +@@ -688,7 +689,7 @@ + # wpa_psk (dot11RSNAConfigPSKValue) + # wpa_passphrase (dot11RSNAConfigPSKPassPhrase) + #wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef +-#wpa_passphrase=secret passphrase ++wpa_passphrase=1234 + + # Optionally, WPA PSKs can be read from a separate text file (containing list + # of (PSK,MAC address) pairs. This allows more than one PSK to be configured. +@@ -701,6 +702,7 @@ + # added to enable SHA256-based stronger algorithms. + # (dot11RSNAConfigAuthenticationSuitesTable) + #wpa_key_mgmt=WPA-PSK WPA-EAP ++wpa_key_mgmt=WPA-PSK + + # Set of accepted cipher suites (encryption algorithms) for pairwise keys + # (unicast packets). This is a space separated list of algorithms: +@@ -712,7 +714,7 @@ + # TKIP will be used as the group cipher. + # (dot11RSNAConfigPairwiseCiphersTable) + # Pairwise cipher for WPA (v1) (default: TKIP) +-#wpa_pairwise=TKIP CCMP ++wpa_pairwise=TKIP CCMP + # Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value) + #rsn_pairwise=CCMP + +@@ -730,7 +732,7 @@ + + # Maximum lifetime for PTK in seconds. This can be used to enforce rekeying of + # PTK to mitigate some attacks against TKIP deficiencies. +-#wpa_ptk_rekey=600 ++wpa_ptk_rekey=600 + + # Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up + # roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN diff --git a/recipes/hostapd/hostapd_1.0.oe b/recipes/hostapd/hostapd_1.0.oe new file mode 100644 index 0000000..33d6e03 --- /dev/null +++ b/recipes/hostapd/hostapd_1.0.oe @@ -0,0 +1,39 @@ +DESCRIPTION = "User space daemon for extended IEEE 802.11 management" +HOMEPAGE = "http://hostap.epitest.fi" +LICENSE = "GPLv2 | BSD" + +SRC_URI = "http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz" +SRC_URI += "file://init" +SRC_URI += """ + file://wlan.patch +""" + +inherit c make + +LIBS = "libnl-3 libnl-genl-3 libssl libcrypto" +DEPENDS += "${LIBS}" + +RDEPENDS += "libnl-3 libnl-genl-3 openssl crda" + +S = "${SRCDIR}/hostapd-${PV}/hostapd" + +CFLAGS += "-I${HOST_SYSROOT}${includedir}/libnl3" + +do_configure() { + install -m 0644 ${S}/defconfig ${S}/.config +} + +do_install() { + install -d ${D}${sbindir} ${D}${sysconfdir}/init.d + install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir} + install -m 0755 ${S}/hostapd ${D}${sbindir} + install -m 0755 ${S}/hostapd_cli ${D}${sbindir} + install -m 755 ${SRCDIR}/init ${D}${sysconfdir}/init.d/hostapd +} + +PACKAGE =+ "${PN}-conf" + +RDEPENDS_${PN} += "${LIBS}" + +FILES_${PN}-conf = "${sysconfdir}/hostapd.conf" + diff --git a/recipes/hostapd/hostapd_1.0.oe.sig b/recipes/hostapd/hostapd_1.0.oe.sig new file mode 100644 index 0000000..637e0d4 --- /dev/null +++ b/recipes/hostapd/hostapd_1.0.oe.sig @@ -0,0 +1 @@ +4edf267bc5943a5f7d6d9c0abcce0973bfbad5fa hostapd-1.0.tar.gz