diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-13 13:58:07 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-13 13:58:07 +0100 |
commit | 011eae436ef9c42ffeae570d10964ab1265c081d (patch) | |
tree | c04e93dcf1c61874ea7fcf36dcc1ee605ff3ce14 /package | |
parent | f513a8a7eb9fd3ec28bfcb773ace28d49b61c0e7 (diff) |
add support for wireless access point with p54usb stick
Diffstat (limited to 'package')
-rw-r--r-- | package/Config.in | 3 | ||||
-rw-r--r-- | package/aufs2-util/Makefile | 4 | ||||
-rwxr-xr-x | package/base-files/src/etc/network/if-post-down.d/03-wireless | 15 | ||||
-rwxr-xr-x | package/base-files/src/etc/network/if-pre-up.d/04-wireless | 86 | ||||
-rw-r--r-- | package/hostapd/files/hostapd.conf | 15 | ||||
-rw-r--r-- | package/iw/Makefile | 6 | ||||
-rw-r--r-- | package/p54-firmware/Makefile | 30 | ||||
-rw-r--r-- | package/rt61-firmware/Makefile (renamed from package/wireless-firmware/Makefile) | 8 |
8 files changed, 139 insertions, 28 deletions
diff --git a/package/Config.in b/package/Config.in index 70565cb36..784f0a51f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -567,8 +567,9 @@ source "package/hostapd/Config.in" source "package/iw/Config.in" #source "package/kismet/Config.in" source "package/olsrd/Config.in" +source "package/p54-firmware/Config.in" +source "package/rt61-firmware/Config.in" source "package/wifidog/Config.in" -source "package/wireless-firmware/Config.in" source "package/wpa_supplicant/Config.in" endmenu diff --git a/package/aufs2-util/Makefile b/package/aufs2-util/Makefile index 2534a47af..c414a1ca2 100644 --- a/package/aufs2-util/Makefile +++ b/package/aufs2-util/Makefile @@ -20,10 +20,6 @@ $(eval $(call PKG_template,AUFS_UTIL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},$ CONFIG_STYLE:= manual MAKE_FLAGS+= KDIR=${LINUX_DIR} -do-extract: - mkdir -p ${WRKBUILD} - ${CP} ./src/* ${WRKBUILD}/ - post-install: $(INSTALL_DIR) $(IDIR_AUFS_UTIL)/sbin $(INSTALL_BIN) ${WRKINST}/sbin/{u,}mount.aufs \ diff --git a/package/base-files/src/etc/network/if-post-down.d/03-wireless b/package/base-files/src/etc/network/if-post-down.d/03-wireless new file mode 100755 index 000000000..66e92639b --- /dev/null +++ b/package/base-files/src/etc/network/if-post-down.d/03-wireless @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +[ "${IFACE%%[0-9]*}" = "wlan" ] || exit 0 + +case "$IF_WIRELESS_MODE" in + ap) + logger -t hostap "Killing hostapd" + pkill hostapd + ;; + *) + exit 0 + ;; +esac +exit 0 diff --git a/package/base-files/src/etc/network/if-pre-up.d/04-wireless b/package/base-files/src/etc/network/if-pre-up.d/04-wireless new file mode 100755 index 000000000..54864ba78 --- /dev/null +++ b/package/base-files/src/etc/network/if-pre-up.d/04-wireless @@ -0,0 +1,86 @@ +#!/bin/sh +#set -x +set -e + +[ -x /usr/sbin/iw ] || exit 0 + +[ "${IFACE%%[0-9]*}" = "wlan" ] || exit 0 + +[ "$IF_WIRELESS_SSID" ] || exit 1 +[ "$IF_WIRELESS_CHANNEL" ] || exit 1 +[ "$IF_WIRELESS_HWMODE" ] || IF_WIRELESS_HWMODE=g + +wpa=0 +wpa1=0 +wpa2=0 + +case "$IF_WIRELESS_SECURITY" in + none) + sec=1 + ;; + wep) + sec=2 + ;; + wpa) + sec=1 + wpa1=1 + ;; + wpa2) + sec=1 + wpa2=1 + ;; + wpa+wpa2) + sec=1 + wpa=1 + ;; + *) + sec=1 + ;; +esac + +case "$IF_WIRELESS_MODE" in + ap) + [ -x /usr/sbin/hostapd ] || { + logger -t hostap "No hostapd program found" + exit 1 + } + logger -t hostap "Creating hostapd configuration" + cat /etc/hostapd.conf > /tmp/hostapd.conf + chmod 600 /tmp/hostapd.conf + echo "interface=${IFACE}" >> /tmp/hostapd.conf + echo "ssid=$IF_WIRELESS_SSID" >> /tmp/hostapd.conf + echo "channel=$IF_WIRELESS_CHANNEL" >> /tmp/hostapd.conf + echo "hw_mode=$IF_WIRELESS_HWMODE" >> /tmp/hostapd.conf + echo "auth_algs=$sec" >> /tmp/hostapd.conf + [ $wpa1 -eq 1 ] && { + logger -t hostap "using WPA for security" + echo "wpa=1" >> /tmp/hostapd.conf + echo "wpa_key_mgmt=WPA-PSK" >> /tmp/hostapd.conf + echo "wpa_pairwise=TKIP" >> /tmp/hostapd.conf + echo "wpa_passphrase=$IF_WIRELESS_PASSPHRASE" >> /tmp/hostapd.conf + } + [ $wpa2 -eq 1 ] && { + logger -t hostap "using WPA2 for security" + echo "wpa=2" >> /tmp/hostapd.conf + echo "wpa_key_mgmt=WPA-PSK" >> /tmp/hostapd.conf + echo "rsn_pairwise=CCMP" >> /tmp/hostapd.conf + echo "wpa_passphrase=$IF_WIRELESS_PASSPHRASE" >> /tmp/hostapd.conf + } + [ $wpa -eq 1 ] && { + logger -t hostap "using WPA and WPA2 for security" + echo "wpa=3" >> /tmp/hostapd.conf + echo "wpa_key_mgmt=WPA-PSK" >> /tmp/hostapd.conf + echo "wpa_pairwise=TKIP" >> /tmp/hostapd.conf + echo "rsn_pairwise=CCMP" >> /tmp/hostapd.conf + echo "wpa_passphrase=$IF_WIRELESS_PASSPHRASE" >> /tmp/hostapd.conf + } + logger -t hostap "Starting hostapd" + hostapd -B /tmp/hostapd.conf + ;; + *) + echo "Unknown operation mode $IF_WIRELESS_MODE given!" + exit 1 + ;; +esac + +exit 0 diff --git a/package/hostapd/files/hostapd.conf b/package/hostapd/files/hostapd.conf index 8676e96a6..94bd1f2bc 100644 --- a/package/hostapd/files/hostapd.conf +++ b/package/hostapd/files/hostapd.conf @@ -1,6 +1,4 @@ ##### hostapd configuration file ##### -interface=wlan0 -#bridge=br0 driver=nl80211 logger_syslog=-1 logger_syslog_level=0 @@ -8,16 +6,3 @@ logger_stdout=-1 logger_stdout_level=0 ctrl_interface=/var/run/hostapd ctrl_interface_group=0 -# set ssid, channel and mode -ssid=openadk -hw_mode=g -channel=1 -# enable WPA2 (WEP/WPA disabled) -macaddr_acl=0 -auth_algs=1 -ignore_broadcast_ssid=0 -wpa=2 -wpa_passphrase=secret123 -wpa_key_mgmt=WPA-PSK -wpa_pairwise=TKIP -rsn_pairwise=CCMP diff --git a/package/iw/Makefile b/package/iw/Makefile index d2ea171a6..4d55ffd28 100644 --- a/package/iw/Makefile +++ b/package/iw/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= iw -PKG_VERSION:= 0.9.18 +PKG_VERSION:= 0.9.19 PKG_RELEASE:= 1 -PKG_MD5SUM:= 9734080d8a5c4b768c5e0da665a48950 +PKG_MD5SUM:= 3b88743f9c6ce8a7e2f5fd7d18fdea42 PKG_DESCR:= Tools for setting up WiFi cards via netlink (nl80211) PKG_SECTION:= net PKG_DEPENDS:= libnl @@ -22,8 +22,6 @@ $(eval $(call PKG_template,IW,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DE CONFIG_STYLE:= manual -XAKE_FLAGS:= V=1 - post-install: ${INSTALL_DIR} ${IDIR_IW}/usr/sbin ${INSTALL_BIN} ${WRKINST}/usr/sbin/iw ${IDIR_IW}/usr/sbin diff --git a/package/p54-firmware/Makefile b/package/p54-firmware/Makefile new file mode 100644 index 000000000..b845174a6 --- /dev/null +++ b/package/p54-firmware/Makefile @@ -0,0 +1,30 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= p54-firmware +PKG_VERSION:= 1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 8e8ab005a4f8f0123bcdc51bc25b47f6 +PKG_DESCR:= firmware for USB prism54 wireless cards (isl3887) +PKG_SECTION:= sys +PKG_SITES:= http://daemonizer.de/prism54/prism54-fw/fw-usb/ + +DISTFILES:= 2.13.24.0.lm87.arm +WRKDIST= ${WRKDIR} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,P54_FIRMWARE,p54-firmware,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + +do-install: + ${INSTALL_DIR} ${IDIR_P54_FIRMWARE}/lib/firmware + ${CP} ${WRKBUILD}/*.arm \ + ${IDIR_P54_FIRMWARE}/lib/firmware/isl3887usb + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/wireless-firmware/Makefile b/package/rt61-firmware/Makefile index 25de67aff..650dd9f30 100644 --- a/package/wireless-firmware/Makefile +++ b/package/rt61-firmware/Makefile @@ -3,7 +3,7 @@ include ${TOPDIR}/rules.mk -PKG_NAME:= wireless-firmware +PKG_NAME:= rt61-firmware PKG_VERSION:= 1 PKG_RELEASE:= 1 PKG_MD5SUM:= d4c690c93b470bc9a681297c2adc6281 @@ -16,15 +16,15 @@ WRKDIST= ${WRKDIR}/RT61_Firmware_V1.2 include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,WIRELESS_FIRMWARE_RT61,wireless-firmware-rt61,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,RT61_FIRMWARE,rt61-firmware,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual do-install: - ${INSTALL_DIR} ${IDIR_WIRELESS_FIRMWARE_RT61}/lib/firmware + ${INSTALL_DIR} ${IDIR_RT61_FIRMWARE}/lib/firmware ${CP} ${WRKBUILD}/rt2*.bin \ - ${IDIR_WIRELESS_FIRMWARE_RT61}/lib/firmware + ${IDIR_RT61_FIRMWARE}/lib/firmware include ${TOPDIR}/mk/pkg-bottom.mk |