Merge branch 'master' of github.com:archlinuxarm/PKGBUILDs

This commit is contained in:
Kevin Mihelich 2013-04-15 04:26:08 +00:00
commit e9cf72e60e
9 changed files with 365 additions and 10 deletions

View file

@ -11,7 +11,7 @@
pkgname=asterisk pkgname=asterisk
pkgver=11.3.0 pkgver=11.3.0
pkgrel=1 pkgrel=2
pkgdesc="A complete PBX solution (Long Term Support)" pkgdesc="A complete PBX solution (Long Term Support)"
arch=('arm') arch=('arm')
groups=() groups=()

View file

@ -32,6 +32,7 @@ post_upgrade() {
post_remove() { post_remove() {
echo -n -e "\nremoving asterisk system user... " echo -n -e "\nremoving asterisk system user... "
userdel asterisk && echo "done." userdel asterisk && echo "done."
rm -f /etc/tmpdiles.d/asterisk.conf
} }
op=$1 op=$1
shift shift

57
aur/dkms-8192cu/PKGBUILD Normal file
View file

@ -0,0 +1,57 @@
# Maintainer: Jan Madaj < madaj.jan@gmail.com >
#alarm: moonman
# -dkms.conf: change ARCH=i386 to ARCH=arm
pkgname=dkms-8192cu
pkgver=v3.4.4_4749
pkgrel=7
pkgdesc="Driver for Realtek RTL8188CUS (8188C, 8192C) chipset wireless cards"
arch=('arm')
url="http://www.realtek.com.tw/"
license=('GPL')
depends=('dkms' 'linux-headers')
conflicts=("8192cu" "rt8192cu")
install=${pkgname}.install
options=(!strip)
_pkgname="8192cu"
source=("https://www.dropbox.com/s/3rrxrg55hmnzr1l/$_pkgname-$pkgver.tar.bz2"
"dkms.conf"
"blacklist-dkms-8192cu.conf"
"use_kthread_run.patch"
"use_kthread_run_v2.patch" )
md5sums=('f4291ba24e9ff3408c26606ba9400152'
'9de2f7a7788689e2bf7680950b4451d9'
'5f2d28bf3839447bfe762416a89e1a21'
'28acff14c65b67e7ec246173cae113c0'
'7b22f83c62456e4b8310e21b56bb4c2f')
package() {
installDir="$pkgdir/usr/src/$_pkgname-$pkgver"
install -dm755 "$installDir"
install -m644 "$srcdir/dkms.conf" "$installDir"
install -dm755 "$pkgdir/etc/modprobe.d"
install -m644 "$srcdir/blacklist-dkms-8192cu.conf" "$pkgdir/etc/modprobe.d/blacklist-dkms-8192cu.conf"
cd "${srcdir}/${_pkgname}-${pkgver}/"
patch -p1 -i "$srcdir/use_kthread_run_v2.patch"
for d in `find . -type d`
do
install -dm755 "$installDir/$d"
done
for f in `find . -type f`
do
install -m644 "${srcdir}/${_pkgname}-${pkgver}/$f" "$installDir/$f"
done
}

View file

@ -0,0 +1,5 @@
blacklist rtlwifi
blacklist rtl8192c_common
blacklist rtl8192cu

View file

@ -0,0 +1,45 @@
post_install (){
MODULE="8192cu"
DKMS=$(which dkms)
MODPROBE=$(which modprobe)
VERSION="v3.4.4_4749"
$DKMS add -m $MODULE -v $VERSION
$DKMS build -m $MODULE -v $VERSION
$DKMS install -m $MODULE -v $VERSION
$MODPROBE -a $MODULE
}
pre_upgrade(){
pre_remove
}
post_upgrade(){
post_install
}
pre_remove (){
_inmemory=$(/usr/bin/lsmod | /usr/bin/grep 8192cu)
if [ ! -z "$_inmemory" ]; then
/usr/bin/rmmod 8192cu &> /dev/null
fi
DKMS=$(which dkms)
_line=$($DKMS status -m 8192cu)
if echo "$_line" | grep -E 'added|built|installed'; then
version=$(echo "$_line" | sed 's/8192cu,\([^,]*\)[,:].*/\1/;t;d')
$DKMS remove -m 8192cu -v $version --all
fi
}
post_remove () {
/sbin/depmod -a
}
op=$1
shift
$op $*

View file

@ -0,0 +1,6 @@
PACKAGE_NAME="8192cu"
PACKAGE_VERSION="v3.4.4_4749"
MAKE[0]="make ARCH=arm CROSS_COMPILE= -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules"
BUILT_MODULE_NAME[0]="8192cu"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
AUTOINSTALL="yes"

View file

@ -0,0 +1,107 @@
diff -ur _/core/rtw_mp.c rt8192cu-master/core/rtw_mp.c
--- _/core/rtw_mp.c 2012-07-09 10:32:18.000000000 +0200
+++ rt8192cu-master/core/rtw_mp.c 2012-12-21 03:13:45.358137142 +0100
@@ -1140,8 +1140,7 @@
_rtw_memset(ptr, payload, pkt_end - ptr);
//3 6. start thread
- pmp_priv->tx.PktTxThread = kernel_thread(mp_xmit_packet_thread, pmp_priv, CLONE_FS|CLONE_FILES);
- if(pmp_priv->tx.PktTxThread < 0)
+ if(!start_kthread(&pmp_priv->tx.PktTxThread, mp_xmit_packet_thread, pmp_priv, "8192cu-mp-xmit"))
DBG_871X("Create PktTx Thread Fail !!!!!\n");
}
diff -ur _/include/osdep_service.h rt8192cu-master/include/osdep_service.h
--- _/include/osdep_service.h 2012-07-09 10:32:18.000000000 +0200
+++ rt8192cu-master/include/osdep_service.h 2012-12-21 03:09:05.314123589 +0100
@@ -100,6 +100,9 @@
#include <linux/pci.h>
#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
+ #include <linux/kthread.h>
+#endif
#ifdef CONFIG_USB_HCI
typedef struct urb * PURB;
@@ -133,8 +136,12 @@
//typedef u32 _irqL;
typedef unsigned long _irqL;
typedef struct net_device * _nic_hdl;
-
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
typedef pid_t _thread_hdl_;
+#else
+ typedef struct task_struct * _thread_hdl_;
+#endif
typedef int thread_return;
typedef void* thread_context;
@@ -827,4 +834,8 @@
#endif
+#ifdef PLATFORM_LINUX
+extern int start_kthread(_thread_hdl_ *t_hdl, int (*threadfn)(void *data),
+ void *data, const char *name);
+#endif
diff -ur _/os_dep/linux/os_intfs.c rt8192cu-master/os_dep/linux/os_intfs.c
--- _/os_dep/linux/os_intfs.c 2012-12-21 03:17:25.618147802 +0100
+++ rt8192cu-master/os_dep/linux/os_intfs.c 2012-12-21 03:14:14.554138555 +0100
@@ -797,27 +797,22 @@
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_start_drv_threads\n"));
#ifdef CONFIG_SDIO_HCI
- padapter->xmitThread = kernel_thread(rtw_xmit_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->xmitThread < 0)
+ if(!start_kthread(&padapter->xmitThread, rtw_xmit_thread, padapter, "8192cu-xmit"))
_status = _FAIL;
#endif
#ifdef CONFIG_RECV_THREAD_MODE
- padapter->recvThread = kernel_thread(recv_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->recvThread < 0)
+ if(!start_kthread(&padapter->recvThread, recv_thread, padapter, "8192cu-recv"))
_status = _FAIL;
#endif
- padapter->cmdThread = kernel_thread(rtw_cmd_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->cmdThread < 0)
+ if(!start_kthread(&padapter->cmdThread, rtw_cmd_thread, padapter, "8192cu-cmd"))
_status = _FAIL;
else
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); //wait for cmd_thread to run
-
#ifdef CONFIG_EVENT_THREAD_MODE
- padapter->evtThread = kernel_thread(event_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->evtThread < 0)
+ if(!start_kthread(&padapter->evtThread, event_thread, padapter, "8192cu-evt"))
_status = _FAIL;
#endif
diff -ur _/os_dep/osdep_service.c rt8192cu-master/os_dep/osdep_service.c
--- _/os_dep/osdep_service.c 2012-12-21 03:17:25.618147802 +0100
+++ rt8192cu-master/os_dep/osdep_service.c 2012-12-21 03:08:30.330121896 +0100
@@ -1553,3 +1553,19 @@
#endif
}
+#ifdef PLATFORM_LINUX
+int start_kthread(_thread_hdl_ *t_hdl, int (*threadfn)(void *data),
+ void *data, const char *name)
+{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+ *t_hdl = kernel_thread(threadfn, data, CLONE_FS|CLONE_FILES);
+ if(*t_hdl < 0)
+#else
+ *t_hdl = kthread_run(threadfn, data, name);
+ if(IS_ERR(*t_hdl))
+#endif
+ return 0;
+ return -1;
+}
+#endif
+

View file

@ -0,0 +1,131 @@
diff -ruN a/core/rtw_mp.c b/core/rtw_mp.c
--- a/core/rtw_mp.c 2012-07-30 12:51:05.000000000 +0000
+++ b/core/rtw_mp.c 2013-03-17 19:00:28.393782000 +0000
@@ -1140,8 +1140,7 @@
_rtw_memset(ptr, payload, pkt_end - ptr);
//3 6. start thread
- pmp_priv->tx.PktTxThread = kernel_thread(mp_xmit_packet_thread, pmp_priv, CLONE_FS|CLONE_FILES);
- if(pmp_priv->tx.PktTxThread < 0)
+ if(!start_kthread(&pmp_priv->tx.PktTxThread, mp_xmit_packet_thread, pmp_priv, "8192cu-mp-xmit"))
DBG_871X("Create PktTx Thread Fail !!!!!\n");
}
diff -ruN a/include/osdep_service.h b/include/osdep_service.h
--- a/include/osdep_service.h 2012-07-30 12:51:05.000000000 +0000
+++ b/include/osdep_service.h 2013-03-17 17:37:39.105483734 +0000
@@ -100,6 +100,9 @@
#include <linux/pci.h>
#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
+ #include <linux/kthread.h>
+#endif
#ifdef CONFIG_USB_HCI
typedef struct urb * PURB;
@@ -133,8 +136,12 @@
//typedef u32 _irqL;
typedef unsigned long _irqL;
typedef struct net_device * _nic_hdl;
-
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
typedef pid_t _thread_hdl_;
+#else
+ typedef struct task_struct * _thread_hdl_;
+#endif
typedef int thread_return;
typedef void* thread_context;
@@ -572,7 +579,7 @@
#ifdef PLATFORM_LINUX
//struct net_device *pnetdev = (struct net_device *)context;
//daemonize("%s", pnetdev->name);
- daemonize("%s", "RTKTHREAD");
+ //daemonize("%s", "RTKTHREAD");
allow_signal(SIGTERM);
#endif
}
@@ -827,4 +834,8 @@
#endif
+#ifdef PLATFORM_LINUX
+extern int start_kthread(_thread_hdl_ *t_hdl, int (*threadfn)(void *data),
+ void *data, const char *name);
+#endif
diff -ruN a/include/rtw_recv.h b/include/rtw_recv.h
--- a/include/rtw_recv.h 2012-07-30 12:51:05.000000000 +0000
+++ b/include/rtw_recv.h 2013-03-17 17:35:36.136873966 +0000
@@ -623,8 +623,9 @@
//from any given member of recv_frame.
// rxmem indicates the any member/address in recv_frame
- return (union recv_frame*)(((uint)rxmem>>RXFRAME_ALIGN) <<RXFRAME_ALIGN) ;
-
+ //return (union recv_frame*)(((uint)rxmem>>RXFRAME_ALIGN) <<RXFRAME_ALIGN) ;
+ //return (union recv_frame*)(((SIZE_PTR)rxmem >> RXFRAME_ALIGN) << RXFRAME_ALIGN);
+ return (union recv_frame*)(((ulong)rxmem>>RXFRAME_ALIGN) <<RXFRAME_ALIGN) ;
}
__inline static union recv_frame *pkt_to_recvframe(_pkt *pkt)
diff -ruN a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c
--- a/os_dep/linux/os_intfs.c 2012-11-05 07:42:45.000000000 +0000
+++ b/os_dep/linux/os_intfs.c 2013-03-17 19:00:28.393782000 +0000
@@ -797,27 +797,22 @@
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_start_drv_threads\n"));
#ifdef CONFIG_SDIO_HCI
- padapter->xmitThread = kernel_thread(rtw_xmit_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->xmitThread < 0)
+ if(!start_kthread(&padapter->xmitThread, rtw_xmit_thread, padapter, "8192cu-xmit"))
_status = _FAIL;
#endif
#ifdef CONFIG_RECV_THREAD_MODE
- padapter->recvThread = kernel_thread(recv_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->recvThread < 0)
+ if(!start_kthread(&padapter->recvThread, recv_thread, padapter, "8192cu-recv"))
_status = _FAIL;
#endif
- padapter->cmdThread = kernel_thread(rtw_cmd_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->cmdThread < 0)
+ if(!start_kthread(&padapter->cmdThread, rtw_cmd_thread, padapter, "8192cu-cmd"))
_status = _FAIL;
else
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); //wait for cmd_thread to run
-
#ifdef CONFIG_EVENT_THREAD_MODE
- padapter->evtThread = kernel_thread(event_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->evtThread < 0)
+ if(!start_kthread(&padapter->evtThread, event_thread, padapter, "8192cu-evt"))
_status = _FAIL;
#endif
diff -ruN a/os_dep/osdep_service.c b/os_dep/osdep_service.c
--- a/os_dep/osdep_service.c 2012-07-30 12:51:05.000000000 +0000
+++ b/os_dep/osdep_service.c 2013-03-17 19:00:28.393782000 +0000
@@ -1553,3 +1553,19 @@
#endif
}
+#ifdef PLATFORM_LINUX
+int start_kthread(_thread_hdl_ *t_hdl, int (*threadfn)(void *data),
+ void *data, const char *name)
+{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+ *t_hdl = kernel_thread(threadfn, data, CLONE_FS|CLONE_FILES);
+ if(*t_hdl < 0)
+#else
+ *t_hdl = kthread_run(threadfn, data, name);
+ if(IS_ERR(*t_hdl))
+#endif
+ return 0;
+ return -1;
+}
+#endif
+

View file

@ -58,30 +58,33 @@ md5sums=('8d43453f8159b2332ad410b19d86a931'
build() { build() {
msg "Patches:"
cd "${srcdir}/linux-${_basekernel}" cd "${srcdir}/linux-${_basekernel}"
# add upstream patch msg2 "Add upstream patch"
patch -p1 -i "${srcdir}/patch-${pkgver}" patch -p1 -i "${srcdir}/patch-${pkgver}"
#Add the pci-e patch backported from 3.6.10 for kirkwoods msg2 "Add the pci-e patch backported from 3.6.10 for kirkwoods"
patch -Np1 -i "${srcdir}/pciefix.patch" patch -Np1 -i "${srcdir}/pciefix.patch"
# Add the USB_QUIRK_RESET_RESUME for several webcams msg2 "Add the USB_QUIRK_RESET_RESUME for several webcams"
# FS#26528 # FS#26528
patch -Np1 -i "${srcdir}/usb-add-reset-resume-quirk-for-several-webcams.patch" patch -Np1 -i "${srcdir}/usb-add-reset-resume-quirk-for-several-webcams.patch"
# Add Arch Linux ARM patch for ARMv5te plug computers, requested additional support, mach-types msg2 "Add Arch Linux ARM patch for ARMv5te plug computers,"
msg2 " requested additional support, mach-types"
patch -Np1 -i "${srcdir}/archlinuxarm.patch" patch -Np1 -i "${srcdir}/archlinuxarm.patch"
patch -Np1 -i "${srcdir}/support.patch" patch -Np1 -i "${srcdir}/support.patch"
cp "${srcdir}/mach-types" arch/arm/tools cp "${srcdir}/mach-types" arch/arm/tools
#Add BFQ I/O scheduler patches msg2 "Add BFQ I/O scheduler patches"
patch -Np1 -i "${srcdir}/0001-block-prepare-I-O-context-code-for-BFQ-${bfqver}-for-${_basekernel}.patch" patch -Np1 -i "${srcdir}/0001-block-prepare-I-O-context-code-for-BFQ-${bfqver}-for-${_basekernel}.patch"
patch -Np1 -i "${srcdir}/0002-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-${_basekernel}.patch" patch -Np1 -i "${srcdir}/0002-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-${_basekernel}.patch"
patch -Np1 -i "${srcdir}/0003-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${_basekernel}.patch" patch -Np1 -i "${srcdir}/0003-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${_basekernel}.patch"
msg2 "Fix a possible BFQ bug"
patch -Np1 -i "${srcdir}/0001-block-bfq-attempt-to-fix-use-after-free-which-2.6.38-to-3.2.0.patch" patch -Np1 -i "${srcdir}/0001-block-bfq-attempt-to-fix-use-after-free-which-2.6.38-to-3.2.0.patch"
# Add AUFS3 patches msg2 "Add AUFS3 patches"
patch -Np1 -i "${srcdir}/aufs3-kbuild.patch" patch -Np1 -i "${srcdir}/aufs3-kbuild.patch"
patch -Np1 -i "${srcdir}/aufs3-base.patch" patch -Np1 -i "${srcdir}/aufs3-base.patch"
patch -Np1 -i "${srcdir}/aufs3-standalone.patch" patch -Np1 -i "${srcdir}/aufs3-standalone.patch"
@ -90,7 +93,7 @@ build() {
# add latest fixes from stable queue, if needed # add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param) msg2 "Set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)"
# remove this when a Kconfig knob is made available by upstream # remove this when a Kconfig knob is made available by upstream
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch" patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
@ -126,10 +129,10 @@ build() {
#yes "" | make config #yes "" | make config
# build! msg "Building!"
make ${MAKEFLAGS} uImage modules make ${MAKEFLAGS} uImage modules
# build cryptodev module msg "Building cryptodev module"
cd "${srcdir}/cryptodev-linux-${cryptover}" cd "${srcdir}/cryptodev-linux-${cryptover}"
make KERNEL_DIR="${srcdir}/linux-${_basekernel}" make KERNEL_DIR="${srcdir}/linux-${_basekernel}"
} }