summaryrefslogtreecommitdiffstats
path: root/openwrt/package
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-14 07:01:13 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-08-14 07:01:13 +0000
commitad1bf3c12a6c2639de7eaac657c96fd2492f1c91 (patch)
treeb3984a64e5875180f04c9269979e4d4830070107 /openwrt/package
parent1c571f291067b4c2c45933d4125c635737cd37c3 (diff)
add hostapd package with initial support for madwifi
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1659 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package')
-rw-r--r--openwrt/package/Config.in1
-rw-r--r--openwrt/package/Makefile2
-rw-r--r--openwrt/package/hostapd/Config.in15
-rw-r--r--openwrt/package/hostapd/Makefile46
-rw-r--r--openwrt/package/hostapd/files/config66
-rw-r--r--openwrt/package/hostapd/ipkg/hostapd.conffiles1
-rw-r--r--openwrt/package/hostapd/ipkg/hostapd.control9
-rw-r--r--openwrt/package/hostapd/patches/001-cross_compile_fix.patch32
8 files changed, 172 insertions, 0 deletions
diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in
index 96d6f154b..0d4f047b6 100644
--- a/openwrt/package/Config.in
+++ b/openwrt/package/Config.in
@@ -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"
diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile
index 2c7bc2843..e855e6f4e 100644
--- a/openwrt/package/Makefile
+++ b/openwrt/package/Makefile
@@ -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
diff --git a/openwrt/package/hostapd/Config.in b/openwrt/package/hostapd/Config.in
new file mode 100644
index 000000000..e6d6c6865
--- /dev/null
+++ b/openwrt/package/hostapd/Config.in
@@ -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/
+
+
diff --git a/openwrt/package/hostapd/Makefile b/openwrt/package/hostapd/Makefile
new file mode 100644
index 000000000..405c1fd7e
--- /dev/null
+++ b/openwrt/package/hostapd/Makefile
@@ -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
+
diff --git a/openwrt/package/hostapd/files/config b/openwrt/package/hostapd/files/config
new file mode 100644
index 000000000..90cf20ed9
--- /dev/null
+++ b/openwrt/package/hostapd/files/config
@@ -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
diff --git a/openwrt/package/hostapd/ipkg/hostapd.conffiles b/openwrt/package/hostapd/ipkg/hostapd.conffiles
new file mode 100644
index 000000000..f61980010
--- /dev/null
+++ b/openwrt/package/hostapd/ipkg/hostapd.conffiles
@@ -0,0 +1 @@
+/etc/hostapd.conf
diff --git a/openwrt/package/hostapd/ipkg/hostapd.control b/openwrt/package/hostapd/ipkg/hostapd.control
new file mode 100644
index 000000000..dacf83fe4
--- /dev/null
+++ b/openwrt/package/hostapd/ipkg/hostapd.control
@@ -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
diff --git a/openwrt/package/hostapd/patches/001-cross_compile_fix.patch b/openwrt/package/hostapd/patches/001-cross_compile_fix.patch
new file mode 100644
index 000000000..d4323a7d9
--- /dev/null
+++ b/openwrt/package/hostapd/patches/001-cross_compile_fix.patch
@@ -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>