aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/rt5370/README9
-rw-r--r--network/rt5370/doinst.sh19
-rw-r--r--network/rt5370/patches/Makefile.4.diff20
-rw-r--r--network/rt5370/patches/Makefile.4.netif.diff14
-rw-r--r--network/rt5370/patches/Makefile.4.util.diff14
-rw-r--r--network/rt5370/patches/Makefile.6.diff20
-rw-r--r--network/rt5370/patches/Makefile.6.netif.diff14
-rw-r--r--network/rt5370/patches/Makefile.6.util.diff17
-rw-r--r--network/rt5370/patches/Makefile.diff33
-rw-r--r--network/rt5370/patches/config.mk.diff25
-rw-r--r--network/rt5370/rt5370.SlackBuild95
-rw-r--r--network/rt5370/rt5370.info10
-rw-r--r--network/rt5370/slack-desc19
13 files changed, 309 insertions, 0 deletions
diff --git a/network/rt5370/README b/network/rt5370/README
new file mode 100644
index 000000000000..045b2e7a0ef6
--- /dev/null
+++ b/network/rt5370/README
@@ -0,0 +1,9 @@
+This is the Linux device driver for Ralink RT5370 USB ABGN WLAN Card.
+
+This driver implements basic IEEE802.11 infrastructure and ad-hoc mode
+with open or shared or WPA-PSK or WPA2-PSK authentication method.
+NONE, WEP, TKIP and AES encryption.
+
+If you wish to build the package for a kernel different from the running
+one, pass its release no. to the script in the KERNEL variable, e.g.
+KERNEL=2.6.38.8 ./rt5370.SlackBuild
diff --git a/network/rt5370/doinst.sh b/network/rt5370/doinst.sh
new file mode 100644
index 000000000000..c3cac0de85eb
--- /dev/null
+++ b/network/rt5370/doinst.sh
@@ -0,0 +1,19 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/Wireless/RT2870STA/RT2870STA.dat.new
+
+if [ -x sbin/depmod ]; then
+ chroot . /sbin/depmod -a @KERNEL@ 1> /dev/null 2> /dev/null
+fi
+
diff --git a/network/rt5370/patches/Makefile.4.diff b/network/rt5370/patches/Makefile.4.diff
new file mode 100644
index 000000000000..f57772388aed
--- /dev/null
+++ b/network/rt5370/patches/Makefile.4.diff
@@ -0,0 +1,20 @@
+--- 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.orig/os/linux/Makefile.4 2011-07-19 10:56:36.000000000 +0200
++++ 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/Makefile.4 2012-06-20 14:34:49.503183209 +0200
+@@ -266,13 +266,10 @@
+ endif
+
+ install:
+- rm -rf $(DAT_PATH)
+- $(shell [ ! -f /etc/Wireless ] && mkdir /etc/Wireless)
+- mkdir $(DAT_PATH)
+- cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DAT_PATH)/.
+- install -d $(LINUX_SRC_MODULE)
+- install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
+- /sbin/depmod -a ${shell uname -r}
++ mkdir -p $(DESTDIR)/$(DAT_PATH)
++ cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DESTDIR)/$(DAT_PATH)
++ install -d $(DESTDIR)/$(LINUX_SRC_MODULE)
++ install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(DESTDIR)/$(LINUX_SRC_MODULE)
+
+ uninstall:
+ # rm -rf $(DAT_PATH)
diff --git a/network/rt5370/patches/Makefile.4.netif.diff b/network/rt5370/patches/Makefile.4.netif.diff
new file mode 100644
index 000000000000..8a7a7f744f4e
--- /dev/null
+++ b/network/rt5370/patches/Makefile.4.netif.diff
@@ -0,0 +1,14 @@
+--- 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.orig/os/linux/Makefile.4.netif 2011-07-19 10:56:36.000000000 +0200
++++ 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/Makefile.4.netif 2012-06-20 14:37:13.111387859 +0200
+@@ -362,9 +362,8 @@
+ endif
+
+ install:
+- install -d $(LINUX_SRC_MODULE)
+- install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
+- /sbin/depmod -a ${shell uname -r}
++ install -d $(DESTDIR)/$(LINUX_SRC_MODULE)
++ install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(DESTDIR)/$(LINUX_SRC_MODULE)
+
+ uninstall:
+ rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
diff --git a/network/rt5370/patches/Makefile.4.util.diff b/network/rt5370/patches/Makefile.4.util.diff
new file mode 100644
index 000000000000..ef739885a202
--- /dev/null
+++ b/network/rt5370/patches/Makefile.4.util.diff
@@ -0,0 +1,14 @@
+--- 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.orig/os/linux/Makefile.4.util 2011-07-19 10:56:36.000000000 +0200
++++ 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/Makefile.4.util 2012-06-20 14:38:28.727442528 +0200
+@@ -97,9 +97,8 @@
+ endif
+
+ install:
+- install -d $(LINUX_SRC_MODULE)
+- install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
+- /sbin/depmod -a ${shell uname -r}
++ install -d $(DESTDIR)/$(LINUX_SRC_MODULE)
++ install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(DESTDIR)/$(LINUX_SRC_MODULE)
+
+ uninstall:
+ rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
diff --git a/network/rt5370/patches/Makefile.6.diff b/network/rt5370/patches/Makefile.6.diff
new file mode 100644
index 000000000000..6f3360d1822e
--- /dev/null
+++ b/network/rt5370/patches/Makefile.6.diff
@@ -0,0 +1,20 @@
+--- 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.orig/os/linux/Makefile.6 2011-07-19 10:56:36.000000000 +0200
++++ 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/Makefile.6 2012-06-20 14:40:03.119262468 +0200
+@@ -356,13 +356,10 @@
+ endif
+
+ install:
+- rm -rf $(DAT_PATH)
+- $(shell [ ! -f /etc/Wireless ] && mkdir /etc/Wireless)
+- mkdir $(DAT_PATH)
+- cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DAT_PATH)/.
+- install -d $(LINUX_SRC_MODULE)
+- install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
+- /sbin/depmod -a ${shell uname -r}
++ mkdir -p $(DESTDIR)/$(DAT_PATH)
++ cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DESTDIR)/$(DAT_PATH)
++ install -d $(DESTDIR)/$(LINUX_SRC_MODULE)
++ install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(DESTDIR)/$(LINUX_SRC_MODULE)
+
+ uninstall:
+ # rm -rf $(DAT_PATH)
diff --git a/network/rt5370/patches/Makefile.6.netif.diff b/network/rt5370/patches/Makefile.6.netif.diff
new file mode 100644
index 000000000000..be0769f4515c
--- /dev/null
+++ b/network/rt5370/patches/Makefile.6.netif.diff
@@ -0,0 +1,14 @@
+--- 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.orig/os/linux/Makefile.6.netif 2011-07-19 10:56:36.000000000 +0200
++++ 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/Makefile.6.netif 2012-06-20 14:41:11.367409249 +0200
+@@ -371,9 +371,8 @@
+ endif
+
+ install:
+- install -d $(LINUX_SRC_MODULE)
+- install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
+- /sbin/depmod -a ${shell uname -r}
++ install -d $(DESTDIR)/$(LINUX_SRC_MODULE)
++ install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(DESTDIR)/$(LINUX_SRC_MODULE)
+
+ uninstall:
+ rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
diff --git a/network/rt5370/patches/Makefile.6.util.diff b/network/rt5370/patches/Makefile.6.util.diff
new file mode 100644
index 000000000000..a469ef342da2
--- /dev/null
+++ b/network/rt5370/patches/Makefile.6.util.diff
@@ -0,0 +1,17 @@
+--- 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.orig/os/linux/Makefile.6.util 2011-07-19 10:56:36.000000000 +0200
++++ 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/Makefile.6.util 2012-06-20 14:42:29.777428989 +0200
+@@ -106,10 +106,9 @@
+ endif
+
+ install:
+- install -d $(LINUX_SRC_MODULE)
+- install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
+- /sbin/depmod -a ${shell uname -r}
++ install -d $(DESTDIR)/$(LINUX_SRC_MODULE)
++ install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(DESTDIR)/$(LINUX_SRC_MODULE)
+
+ uninstall:
+ rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
+- /sbin/depmod -a ${shell uname -r}
+\ No newline at end of file
++ /sbin/depmod -a ${shell uname -r}
diff --git a/network/rt5370/patches/Makefile.diff b/network/rt5370/patches/Makefile.diff
new file mode 100644
index 000000000000..58dc8e17e9ca
--- /dev/null
+++ b/network/rt5370/patches/Makefile.diff
@@ -0,0 +1,33 @@
+--- 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.orig/Makefile 2011-07-19 10:56:36.000000000 +0200
++++ 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/Makefile 2012-06-20 15:13:00.545541237 +0200
+@@ -170,10 +170,10 @@
+
+ ifeq ($(PLATFORM),PC)
+ # Linux 2.6
+-LINUX_SRC = /lib/modules/$(shell uname -r)/build
++LINUX_SRC = /lib/modules/$(KERNEL)/build
+ # Linux 2.4 Change to your local setting
+ #LINUX_SRC = /usr/src/linux-2.4
+-LINUX_SRC_MODULE = /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/
++LINUX_SRC_MODULE = /lib/modules/$(KERNEL)/kernel/drivers/net/wireless/
+ CROSS_COMPILE =
+ endif
+
+@@ -339,7 +339,7 @@
+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(CHIPSET)apsta.o /tftpboot
+ endif
+ else
+- cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.o /tftpboot
++ true
+ ifeq ($(OSABL),YES)
+ cp -f $(RT28xx_DIR)/os/linux/rtutil$(CHIPSET)sta.o /tftpboot
+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(CHIPSET)sta.o /tftpboot
+@@ -385,7 +385,7 @@
+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(CHIPSET)apsta.ko /tftpboot
+ endif
+ else
+- cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.ko /tftpboot
++ true
+ ifeq ($(OSABL),YES)
+ cp -f $(RT28xx_DIR)/os/linux/rtutil$(CHIPSET)sta.ko /tftpboot
+ cp -f $(RT28xx_DIR)/os/linux/rtnet$(CHIPSET)sta.ko /tftpboot
diff --git a/network/rt5370/patches/config.mk.diff b/network/rt5370/patches/config.mk.diff
new file mode 100644
index 000000000000..c726100a6406
--- /dev/null
+++ b/network/rt5370/patches/config.mk.diff
@@ -0,0 +1,25 @@
+--- 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.orig/os/linux/config.mk 2011-07-19 10:56:36.000000000 +0200
++++ 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/config.mk 2012-06-20 08:51:51.680101903 +0200
+@@ -40,7 +40,7 @@
+ HAS_RSSI_FEEDBACK=n
+
+ # Support XLINK mode
+-HAS_XLINK=n
++HAS_XLINK=y
+
+
+ HAS_NINTENDO=n
+@@ -53,11 +53,11 @@
+ HAS_APCLI=n
+
+ # Support Wpa_Supplicant
+-HAS_WPA_SUPPLICANT=n
++HAS_WPA_SUPPLICANT=y
+
+
+ # Support Native WpaSupplicant for Network Maganger
+-HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n
++HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
+
+ #Support Net interface block while Tx-Sw queue full
+ HAS_BLOCK_NET_IF=n
diff --git a/network/rt5370/rt5370.SlackBuild b/network/rt5370/rt5370.SlackBuild
new file mode 100644
index 000000000000..bff2332afc30
--- /dev/null
+++ b/network/rt5370/rt5370.SlackBuild
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# Slackware build script for rt5370
+
+# Copyright 2012 Roberto Neri, Palermo, Italy
+#
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=rt5370
+VERSION=2.5.0.3
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+KERNEL=${KERNEL:-$(uname -r)}
+PKGVERSION=${VERSION}_$(echo $KERNEL | tr - _)
+SRCNAM=2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V${VERSION}_DPO
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM
+tar xvf $CWD/$SRCNAM.bz2
+cd $SRCNAM
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+for PATCH in \
+ config.mk.diff \
+ Makefile.diff \
+ Makefile.4.diff \
+ Makefile.4.netif.diff \
+ Makefile.4.util.diff \
+ Makefile.6.diff \
+ Makefile.6.netif.diff \
+ Makefile.6.util.diff ; do
+ patch -p1 < $CWD/patches/$PATCH
+done
+
+KERNEL=$KERNEL make
+KERNEL=$KERNEL make install DESTDIR=$PKG
+
+mv $PKG/etc/Wireless/RT2870STA/RT2870STA.dat $PKG/etc/Wireless/RT2870STA/RT2870STA.dat.new
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ iwpriv_usage.txt README_STA_usb sta_ate_iwpriv_usage.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+sed "s/@KERNEL@/$KERNEL/" $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
diff --git a/network/rt5370/rt5370.info b/network/rt5370/rt5370.info
new file mode 100644
index 000000000000..bcc777af8d38
--- /dev/null
+++ b/network/rt5370/rt5370.info
@@ -0,0 +1,10 @@
+PRGNAM="rt5370"
+VERSION="2.5.0.3"
+HOMEPAGE="http://www.ralinktech.com/en/04_support/support.php?sn=501"
+DOWNLOAD="ftp://harrier.slackbuilds.org/misc/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2"
+MD5SUM="8ea0d247ac5881de1cb4c113ebf65724"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Roberto Neri"
+EMAIL="rneri@libero.it"
+APPROVED="rworkman"
diff --git a/network/rt5370/slack-desc b/network/rt5370/slack-desc
new file mode 100644
index 000000000000..fb40bcd247f7
--- /dev/null
+++ b/network/rt5370/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+rt5370: rt5370 (Linux driver for Ralink RT5370 USB WLAN Card)
+rt5370:
+rt5370: This driver implements basic IEEE802.11 infrastructure and ad-hoc mode
+rt5370: with open or shared or WPA-PSK or WPA2-PSK authentication method.
+rt5370: NONE, WEP, TKIP and AES encryption.
+rt5370:
+rt5370: Homepage: http://www.ralinktech.com/en/04_support/support.php?sn=501
+rt5370:
+rt5370:
+rt5370:
+rt5370: