add hostapd package with initial support for madwifi

git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1659 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Nicolas Thill 2005-08-14 07:01:13 +00:00
parent 13e370c2f1
commit f2b45182ed
8 changed files with 172 additions and 0 deletions

View File

@ -53,6 +53,7 @@ source "package/fprobe-ulog/Config.in"
source "package/freeradius/Config.in"
source "package/frickin/Config.in"
source "package/howl/Config.in"
source "package/hostapd/Config.in"
source "package/htpdate/Config.in"
source "package/iproute2/Config.in"
source "package/kismet/Config.in"

View File

@ -43,6 +43,7 @@ package-$(BR2_PACKAGE_GLIB) += glib
package-$(BR2_PACKAGE_GMP) += gmp
package-$(BR2_PACKAGE_GNUTLS) += gnutls
package-$(BR2_PACKAGE_HASERL) += haserl
package-$(BR2_PACKAGE_HOSTAPD) += hostapd
package-$(BR2_PACKAGE_HOWL) += howl
package-$(BR2_PACKAGE_HTPDATE) += htpdate
package-$(BR2_PACKAGE_IPKG) += ipkg
@ -181,6 +182,7 @@ fprobe-compile: libpcap-compile
gdbserver-compile: ncurses-compile
gnutls-compile: libgcrypt-compile opencdk-compile libtasn1-compile
irssi-compile: glib-compile ncurses-compile
hostapd-compile: openssl-compile
kismet-compile: uclibc++-compile libpcap-compile ncurses-compile
less-compile: ncurses-compile
lcd4linux-compile: ncurses-compile

15
package/hostapd/Config.in Normal file
View File

@ -0,0 +1,15 @@
config BR2_PACKAGE_HOSTAPD
tristate "hostapd - IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator"
# default m if CONFIG_DEVEL
default n
select BR2_PACKAGE_KMOD_MADWIFI
select BR2_PACKAGE_OPENSSL
help
hostapd is a user space daemon for access point and
authentication servers. It implements IEEE 802.11 access point
management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS
client, EAP server, and RADIUS authentication server.
http://hostap.epitest.fi/hostapd/

46
package/hostapd/Makefile Normal file
View File

@ -0,0 +1,46 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=hostapd
PKG_VERSION:=0.3.9
PKG_RELEASE:=1
PKG_MD5SUM:=c9cab38387594090a36062008b3de59e
PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
cp ./files/config $(PKG_BUILD_DIR)/.config
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
OPTFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/madwifi" \
LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
all
touch $@
$(IPKG_HOSTAPD):
install -m0755 -d $(IDIR_HOSTAPD)/etc
install -m0600 $(PKG_BUILD_DIR)/madwifi.conf $(IDIR_HOSTAPD)/etc/hostapd.conf
install -m0755 -d $(IDIR_HOSTAPD)/usr/sbin
install -m0755 $(PKG_BUILD_DIR)/hostapd $(IDIR_HOSTAPD)/usr/sbin/
install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(IDIR_HOSTAPD)/usr/sbin/
$(RSTRIP) $(IDIR_HOSTAPD)
$(IPKG_BUILD) $(IDIR_HOSTAPD) $(PACKAGE_DIR)
mostlyclean:
make -C $(PKG_BUILD_DIR) clean
rm $(PKG_BUILD_DIR)/.built

View File

@ -0,0 +1,66 @@
# Example hostapd build time configuration
#
# This file lists the configuration options that are used when building the
# hostapd binary. All lines starting with # are ignored. Configuration option
# lines must be commented out complete, if they are not to be included, i.e.,
# just setting VARIABLE=n is not disabling that variable.
#
# This file is included in Makefile, so variables like CFLAGS and LIBS can also
# be modified from here. In most cass, these lines should use += in order not
# to override previous values of the variables.
# Driver interface for Host AP driver
#CONFIG_DRIVER_HOSTAP=y
# Driver interface for wired authenticator
#CONFIG_DRIVER_WIRED=y
# Driver interface for madwifi driver
CONFIG_DRIVER_MADWIFI=y
#CFLAGS += -I../head # change to reflect local setup; directory for madwifi src
# Driver interface for Prism54 driver
#CONFIG_DRIVER_PRISM54=y
# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y
#CFLAGS += -I/usr/local/include
#LIBS += -L/usr/local/lib
# IEEE 802.11F/IAPP
CONFIG_IAPP=y
# WPA2/IEEE 802.11i RSN pre-authentication
CONFIG_RSN_PREAUTH=y
# Integrated EAP authenticator
CONFIG_EAP=y
# EAP-MD5 for the integrated EAP authenticator
CONFIG_EAP_MD5=y
# EAP-TLS for the integrated EAP authenticator
CONFIG_EAP_TLS=y
# EAP-MSCHAPv2 for the integrated EAP authenticator
CONFIG_EAP_MSCHAPV2=y
# EAP-PEAP for the integrated EAP authenticator
CONFIG_EAP_PEAP=y
# EAP-GTC for the integrated EAP authenticator
CONFIG_EAP_GTC=y
# EAP-TTLS for the integrated EAP authenticator
CONFIG_EAP_TTLS=y
# EAP-SIM for the integrated EAP authenticator
#CONFIG_EAP_SIM=y
# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
CONFIG_PKCS12=y
# RADIUS authentication server. This provides access to the integrated EAP
# authenticator from external hosts using RADIUS.
#CONFIG_RADIUS_SERVER=y

View File

@ -0,0 +1 @@
/etc/hostapd.conf

View File

@ -0,0 +1,9 @@
Package: hostapd
Priority: optional
Section: net
Version: [TBDL]
Architecture: [TBDL]
Maintainer: OpenWrt Developers Team <bugs@openwrt.org>
Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/hostapd/
Depends: kmod-madwifi, libopenssl
Description: an IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator

View File

@ -0,0 +1,32 @@
diff -ruN hostapd-0.3.9-old/Makefile hostapd-0.3.9-new/Makefile
--- hostapd-0.3.9-old/Makefile 2005-06-11 05:03:36.000000000 +0200
+++ hostapd-0.3.9-new/Makefile 2005-08-14 08:09:52.000000000 +0200
@@ -3,7 +3,7 @@
DIR_HOSTAP=.
ifndef CFLAGS
-CFLAGS = -MMD -O2 -Wall -g
+CFLAGS = -MMD $(OPTFLAGS) $(CPPFLAGS)
endif
# define HOSTAPD_DUMP_STATE to include SIGUSR1 handler for dumping state to
@@ -173,7 +173,7 @@
for i in $(ALL); do cp $$i /usr/local/bin/$$i; done
hostapd: $(OBJS)
- $(CC) -o hostapd $(OBJS) $(LIBS)
+ $(CC) -o hostapd $(OBJS) $(LDFLAGS) $(LIBS)
driver_conf.c: Makefile .config
rm -f driver_conf.c
diff -ruN hostapd-0.3.9-old/driver_madwifi.c hostapd-0.3.9-new/driver_madwifi.c
--- hostapd-0.3.9-old/driver_madwifi.c 2005-05-18 05:38:57.000000000 +0200
+++ hostapd-0.3.9-new/driver_madwifi.c 2005-08-14 08:23:21.000000000 +0200
@@ -24,6 +24,7 @@
#include <include/compat.h>
#include <net80211/ieee80211.h>
#include <net80211/ieee80211_crypto.h>
+#include <net80211/_ieee80211.h>
#include <net80211/ieee80211_ioctl.h>
#include <net/if_arp.h>