diff options
author | Manuel Olguin | 2015-06-10 02:56:36 +0200 |
---|---|---|
committer | Manuel Olguin | 2015-06-10 02:56:36 +0200 |
commit | 40ce602e03797d911b9b2f816fdf9cc7fbb006be (patch) | |
tree | 390de7a073a16fbfb93b114443d4eafb2054ecd6 | |
download | aur-40ce602e03797d911b9b2f816fdf9cc7fbb006be.tar.gz |
Migration from AUR3
-rw-r--r-- | .AURINFO | 24 | ||||
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | 3.14fix.patch | 17 | ||||
-rw-r--r-- | PKGBUILD | 59 | ||||
-rw-r--r-- | kernel_version_fix.patch | 124 | ||||
-rw-r--r-- | rt3290sta.install | 28 | ||||
-rw-r--r-- | rt3290sta_fix_64bit_3.8.patch | 64 | ||||
-rw-r--r-- | sta_fix.patch | 21 |
8 files changed, 366 insertions, 0 deletions
diff --git a/.AURINFO b/.AURINFO new file mode 100644 index 000000000000..7487706f291e --- /dev/null +++ b/.AURINFO @@ -0,0 +1,24 @@ +pkgbase = rt3290sta-dkms + pkgdesc = Drivers for rt3290 chipset wireless cards + pkgver = 2.6.0.0 + pkgrel = 5 + url = http://www.ralinktech.com/ + install = rt3290sta.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = make + makedepends = linux-headers + depends = dkms + conflicts = rt2860 + conflicts = rt3090 + conflicts = rt3290sta + replaces = rt3290sta + source = https://launchpad.net/~barracuda72/+archive/ralink/+files/rt3290-dkms_2.6.0.0rev1-0ubuntu1~ppa1.tar.gz + source = rt3290sta_fix_64bit_3.8.patch + source = kernel_version_fix.patch + source = 3.14fix.patch + source = sta_fix.patch + +pkgname = rt3290sta-dkms + diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e55ac7cd7fd0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = rt3290sta-dkms + pkgdesc = Drivers for rt3290 chipset wireless cards + pkgver = 2.6.0.0 + pkgrel = 5 + url = http://www.ralinktech.com/ + install = rt3290sta.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = make + makedepends = linux-headers + depends = dkms + conflicts = rt2860 + conflicts = rt3090 + conflicts = rt3290sta + replaces = rt3290sta + source = https://launchpad.net/~barracuda72/+archive/ralink/+files/rt3290-dkms_2.6.0.0rev1-0ubuntu1~ppa1.tar.gz + source = rt3290sta_fix_64bit_3.8.patch + source = kernel_version_fix.patch + source = 3.14fix.patch + source = sta_fix.patch + md5sums = edb2c4c636f899ee4b096e3eea41a4e4 + md5sums = 3731311126f4baa55aea33cdad8dd999 + md5sums = 4c465506484a5d6f63300f6651c6767b + md5sums = 251b1aa059722f341effcd81f89312f8 + md5sums = 8713205e497903abf47cc032fa90ae88 + +pkgname = rt3290sta-dkms + diff --git a/3.14fix.patch b/3.14fix.patch new file mode 100644 index 000000000000..60b9737cde71 --- /dev/null +++ b/3.14fix.patch @@ -0,0 +1,17 @@ +diff -Naur a/include/os/rt_linux.h b/include/os/rt_linux.h +--- a/include/os/rt_linux.h 2012-05-08 08:27:26.000000000 +0300 ++++ b/include/os/rt_linux.h 2014-02-07 00:47:15.752558956 +0200 +@@ -269,8 +269,13 @@ +
+ typedef struct _OS_FS_INFO_
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+ int fsuid;
+ int fsgid;
++#else
++ kuid_t fsuid;
++ kgid_t fsgid;
++#endif
+ mm_segment_t fs;
+ } OS_FS_INFO;
+
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..02f9d8d3e262 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,59 @@ +# Contributor Alper Kanat <alperkanat@raptiye.org> +# Contributor Jaeic Lee <zeraxeal@gmail.com> +# Contributor Zhang Li <richselian@gmail.com> +# Based on rt2860 package from Marius Dransfeld <marius.dransfeld@gmail.com> +# Maintainer: Manuel Olguin <molguin@dcc.uchile.cl> + +pkgname="rt3290sta-dkms" +pkgver="2.6.0.0" +pkgrel=5 +pkgdesc="Drivers for rt3290 chipset wireless cards" +arch=("i686" "x86_64") +url="http://www.ralinktech.com/" +license=('GPL') +depends=("dkms") +makedepends=("make" "linux-headers") +replaces=("rt3290sta") +conflicts=("rt2860" "rt3090" "rt3290sta") +install="rt3290sta.install" + +source=( + "https://launchpad.net/~barracuda72/+archive/ralink/+files/rt3290-dkms_2.6.0.0rev1-0ubuntu1~ppa1.tar.gz" + "rt3290sta_fix_64bit_3.8.patch" + "kernel_version_fix.patch" + "3.14fix.patch" + "sta_fix.patch" +) +md5sums=( + "edb2c4c636f899ee4b096e3eea41a4e4" + "3731311126f4baa55aea33cdad8dd999" + "4c465506484a5d6f63300f6651c6767b" + "251b1aa059722f341effcd81f89312f8" + "8713205e497903abf47cc032fa90ae88" +) + +build() { + cd ${srcdir} + tar zxvf rt3290-dkms_2.6.0.0rev1-0ubuntu1~ppa1.tar.gz + cd ${srcdir}/rt3290-2.6.0.0rev1/ + patch -p1 -i ${srcdir}/rt3290sta_fix_64bit_3.8.patch + patch -p1 -i ${srcdir}/kernel_version_fix.patch --binary + patch -p1 -i ${srcdir}/3.14fix.patch + patch -p1 -i ${srcdir}/sta_fix.patch +} + +package() { + cd ${srcdir}/rt3290-2.6.0.0rev1/ + mkdir -pv ${pkgdir}/usr/src/rt3290-2.6.0.0rev1/ + mkdir -pv ${pkgdir}/etc/Wireless/RT2860STA/ + mkdir -pv ${pkgdir}/etc/modprobe.d/ + cp -Rv chips common include os rate_ctrl sta tools ${pkgdir}/usr/src/rt3290-2.6.0.0rev1/ + chown -R 0:0 ${pkgdir}/usr/src/rt3290-2.6.0.0rev1/ + chmod -R 0644 ${pkgdir}/usr/src/rt3290-2.6.0.0rev1/ + install -m 0644 -o root -g root Makefile ${pkgdir}/usr/src/rt3290-2.6.0.0rev1/ + install -m 0644 -o root -g root debian/dkms.conf ${pkgdir}/usr/src/rt3290-2.6.0.0rev1/ + install -m 0755 -o root -g root RT2860STA.dat ${pkgdir}/etc/Wireless/RT2860STA/ + install -m 0644 -o root -g root blacklist-ralink.conf ${pkgdir}/etc/modprobe.d/ +} + + diff --git a/kernel_version_fix.patch b/kernel_version_fix.patch new file mode 100644 index 000000000000..438268bcd426 --- /dev/null +++ b/kernel_version_fix.patch @@ -0,0 +1,124 @@ +diff -Naur a/Makefile b/Makefile +--- a/Makefile 2013-07-02 19:38:49.000000000 +0300 ++++ b/Makefile 2013-12-16 15:27:24.449280259 +0200 +@@ -64,6 +64,9 @@ + #PLATFORM = UBICOM_IPX8
+ #PLATFORM = INTELP6
+
++KERNEL_VERSION = $(shell uname -r | cut -d. -f1-2)
++KERNEL24=
++
+ #APSOC
+ ifeq ($(MODULE),3050)
+ PLATFORM = RALINK_3050
+@@ -333,7 +336,7 @@ + $(MAKE) -C $(RT28xx_DIR)/os/Threadx -f $(RT28xx_DIR)/os/ThreadX/Makefile
+
+ LINUX:
+-ifneq (,$(findstring 2.4,$(LINUX_SRC)))
++ifneq ($(KERNEL24),)
+
+ ifeq ($(OSABL),YES)
+ cp -f os/linux/Makefile.4.util $(RT28xx_DIR)/os/linux/Makefile
+@@ -459,7 +462,7 @@ +
+ uninstall:
+ ifeq ($(TARGET), LINUX)
+-ifneq (,$(findstring 2.4,$(LINUX_SRC)))
++ifneq ($(KERNEL24),)
+ $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.4 uninstall
+ else
+ $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.6 uninstall
+@@ -468,7 +471,7 @@ +
+ install:
+ ifeq ($(TARGET), LINUX)
+-ifneq (,$(findstring 2.4,$(LINUX_SRC)))
++ifneq ($(KERNEL24),)
+ $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.4 install
+ else
+ $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.6 install
+@@ -476,7 +479,7 @@ + endif
+
+ libwapi:
+-ifneq (,$(findstring 2.4,$(LINUX_SRC)))
++ifneq ($(KERNEL24),)
+ cp -f os/linux/Makefile.libwapi.4 $(RT28xx_DIR)/os/linux/Makefile
+ $(MAKE) -C $(RT28xx_DIR)/os/linux/
+ else
+@@ -486,7 +489,7 @@ +
+ osutil:
+ ifeq ($(OSABL),YES)
+-ifneq (,$(findstring 2.4,$(LINUX_SRC)))
++ifneq ($(KERNEL24),)
+ cp -f os/linux/Makefile.4.util $(RT28xx_DIR)/os/linux/Makefile
+ $(MAKE) -C $(RT28xx_DIR)/os/linux/
+ else
+@@ -497,7 +500,7 @@ +
+ osnet:
+ ifeq ($(OSABL),YES)
+-ifneq (,$(findstring 2.4,$(LINUX_SRC)))
++ifneq ($(KERNEL24),)
+ cp -f os/linux/Makefile.4.netif $(RT28xx_DIR)/os/linux/Makefile
+ $(MAKE) -C $(RT28xx_DIR)/os/linux/
+ else
+@@ -507,7 +510,7 @@ + endif
+
+ osdrv:
+-ifneq (,$(findstring 2.4,$(LINUX_SRC)))
++ifneq ($(KERNEL24),)
+ cp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile
+ $(MAKE) -C $(RT28xx_DIR)/os/linux/
+ else
+diff -Naur a/os/linux/config.mk b/os/linux/config.mk +--- a/os/linux/config.mk 2013-07-02 11:04:08.000000000 +0300 ++++ b/os/linux/config.mk 2013-12-16 15:23:38.000000000 +0200 +@@ -717,7 +717,7 @@ + endif + + ifeq ($(PLATFORM),INF_DANUBE) +-ifneq (,$(findstring 2.4,$(LINUX_SRC))) ++ifneq ($(KERNEL24),) + # Linux 2.4 + WFLAGS += -DINF_DANUBE -DRT_BIG_ENDIAN + else +@@ -821,7 +821,7 @@ + endif + + ifeq ($(PLATFORM),INF_DANUBE) +- ifneq (,$(findstring 2.4,$(LINUX_SRC))) ++ ifneq ($(KERNEL24),) + CFLAGS := -I$(RT28xx_DIR)/include $(WFLAGS) -Wundef -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -I$(LINUX_SRC)/include/asm-mips/mach-generic + else + CFLAGS := -I$(RT28xx_DIR)/include $(WFLAGS) -Wundef -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -mabi=32 -march=mips32r2 -Wa,-32 -Wa,-march=mips32r2 -Wa,-mips32r2 -Wa,--trap -I$(LINUX_SRC)/include/asm-mips/mach-generic +@@ -855,7 +855,7 @@ + endif + + ifeq ($(PLATFORM),PC) +- ifneq (,$(findstring 2.4,$(LINUX_SRC))) ++ ifneq ($(KERNEL24),) + # Linux 2.4 + CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS) + export CFLAGS +@@ -922,7 +922,7 @@ + endif + + ifeq ($(PLATFORM),MT85XX) +- ifneq (,$(findstring 2.4,$(LINUX_SRC))) ++ ifneq ($(KERNEL24),) + # Linux 2.4 + CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS) + export CFLAGS +@@ -943,7 +943,7 @@ + endif + + ifeq ($(PLATFORM),NXP_TV550) +- ifneq (,$(findstring 2.4,$(LINUX_SRC))) ++ ifneq ($(KERNEL24),) + # Linux 2.4 + CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=mips -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS) + export CFLAGS diff --git a/rt3290sta.install b/rt3290sta.install new file mode 100644 index 000000000000..7baf82a2e78f --- /dev/null +++ b/rt3290sta.install @@ -0,0 +1,28 @@ + +post_install() { + + echo "Adding Module to DKMS build system" + dkms add -m rt3290 -v 2.6.0.0rev1 + + echo "Doing initial module build" + dkms build -m rt3290 -v 2.6.0.0rev1 + + echo "Installing initial module" + dkms install -m rt3290 -v 2.6.0.0rev1 --force + + echo "************************************************************" + echo 'Remember to enable DKMS at boot with "systemctl enable dkms"' + echo "************************************************************" +} +post_upgrade() { + post_install +} + +pre_remove() { + + echo "Uninstalling initial module" + dkms uninstall -m rt3290 -v 2.6.0.0rev1 + + echo "Removing module from DKMS system" + dkms remove -m rt3290 -v 2.6.0.0rev1 --all +} diff --git a/rt3290sta_fix_64bit_3.8.patch b/rt3290sta_fix_64bit_3.8.patch new file mode 100644 index 000000000000..75d2ccdf7fbb --- /dev/null +++ b/rt3290sta_fix_64bit_3.8.patch @@ -0,0 +1,64 @@ +diff -rupN a/include/os/rt_linux.h b/include/os/rt_linux.h +--- a/include/os/rt_linux.h 2012-05-08 05:27:26.000000000 +0000 ++++ b/include/os/rt_linux.h 2013-10-17 23:55:33.903364091 +0000 +@@ -987,15 +987,15 @@ void linux_pci_unmap_single(void *handle + (RTPKT_TO_OSPKT(_pkt)->len) = (_len)
+
+ #define GET_OS_PKT_DATATAIL(_pkt) \
+- (RTPKT_TO_OSPKT(_pkt)->tail)
++ ((unsigned char*)skb_tail_pointer(RTPKT_TO_OSPKT(_pkt)))
+ #define SET_OS_PKT_DATATAIL(_pkt, _start, _len) \
+- ((RTPKT_TO_OSPKT(_pkt))->tail) = (PUCHAR)((_start) + (_len))
++ (skb_set_tail_pointer((RTPKT_TO_OSPKT(_pkt)), (_len)))
+
+ #define GET_OS_PKT_HEAD(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt)->head)
+
+ #define GET_OS_PKT_END(_pkt) \
+- (RTPKT_TO_OSPKT(_pkt)->end)
++ ((unsigned char*)skb_end_pointer(RTPKT_TO_OSPKT(_pkt)))
+
+ #define GET_OS_PKT_NETDEV(_pkt) \
+ (RTPKT_TO_OSPKT(_pkt)->dev)
+diff -rupN a/os/linux/rt_linux.c b/os/linux/rt_linux.c +--- a/os/linux/rt_linux.c 2012-05-08 05:27:26.000000000 +0000 ++++ b/os/linux/rt_linux.c 2013-10-17 23:57:10.576701607 +0000 +@@ -505,9 +505,9 @@ PNDIS_PACKET duplicate_pkt( + MEM_DBG_PKT_ALLOC_INC(skb); + + skb_reserve(skb, 2); +- NdisMoveMemory(skb->tail, pHeader802_3, HdrLen); ++ NdisMoveMemory((unsigned char*)skb_tail_pointer(skb), pHeader802_3, HdrLen); + skb_put(skb, HdrLen); +- NdisMoveMemory(skb->tail, pData, DataSize); ++ NdisMoveMemory((unsigned char*)skb_tail_pointer(skb), pData, DataSize); + skb_put(skb, DataSize); + skb->dev = pNetDev; /*get_netdev_from_bssid(pAd, FromWhichBSSID); */ + pPacket = OSPKT_TO_RTPKT(skb); +@@ -659,7 +659,7 @@ PNDIS_PACKET ClonePacket( + pClonedPkt->dev = pRxPkt->dev; + pClonedPkt->data = pData; + pClonedPkt->len = DataSize; +- pClonedPkt->tail = pClonedPkt->data + pClonedPkt->len; ++ skb_set_tail_pointer(pClonedPkt, DataSize); + ASSERT(DataSize < 1530); + } + return pClonedPkt; +@@ -705,7 +705,7 @@ void wlan_802_11_to_802_3_packet( + pOSPkt->dev = pNetDev; + pOSPkt->data = pData; + pOSPkt->len = DataSize; +- pOSPkt->tail = pOSPkt->data + pOSPkt->len; ++ skb_set_tail_pointer(pOSPkt, DataSize); + + /* */ + /* copy 802.3 header */ +@@ -4924,7 +4924,7 @@ Note: + */ + VOID RtmpOsPktTailAdjust(IN PNDIS_PACKET pNetPkt, + IN UINT removedTagLen) { +- OS_PKT_TAIL_ADJUST(pNetPkt, removedTagLen); ++ skb_set_tail_pointer(pNetPkt, pNetPkt->len - removedTagLen) + } + + /* diff --git a/sta_fix.patch b/sta_fix.patch new file mode 100644 index 000000000000..98918e042593 --- /dev/null +++ b/sta_fix.patch @@ -0,0 +1,21 @@ +diff -Naur a/sta/sta_cfg.c b/sta/sta_cfg.c +--- a/sta/sta_cfg.c 2012-05-08 01:27:26.000000000 -0400 ++++ b/sta/sta_cfg.c 2014-05-27 19:44:16.870179894 -0400 +@@ -4896,7 +4896,7 @@ + wrq->u.data.length = strlen(extra) + 1; /* 1: size of '\0' */ + break; + case SHOW_DRVIER_VERION: +- snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ ); ++ snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, "N", "N" ); + wrq->u.data.length = strlen(extra) + 1; /* 1: size of '\0' */ + break; + #ifdef DOT11_N_SUPPORT +@@ -7217,7 +7217,7 @@ + } + + #if defined(BT_COEXISTENCE_SUPPORT) || defined(RT3290) +-sprintf(extra+strlen(extra), "pAd->NicConfig3.field.CoexAnt == 0x%x\n\n",pAd->NicConfig3); ++sprintf(extra+strlen(extra), "pAd->NicConfig3.field.CoexAnt == 0x%x\n\n",pAd->NicConfig3.field.CoexAnt); + if (pAd->NicConfig3.field.CoexAnt == TRUE) + sprintf(extra+strlen(extra), "pAd->NicConfig3.field.CoexAnt == TRUE\n\n"); + else |