summaryrefslogtreecommitdiff
path: root/community-testing
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-10-02 01:06:16 -0700
committerroot <root@rshg054.dnsready.net>2012-10-02 01:06:16 -0700
commit941550cbc215d608bd18439f99500b74fbb80f0d (patch)
treeced50aee5db693d8495b19c59d2bdbd6927c9393 /community-testing
parent9b6be78b0c13a61c14d5278f1363eaf9c6388e4c (diff)
Tue Oct 2 01:06:06 PDT 2012
Diffstat (limited to 'community-testing')
-rw-r--r--community-testing/catalyst-dkms/3.5-do_mmap.patch50
-rw-r--r--community-testing/catalyst-dkms/PKGBUILD49
-rw-r--r--community-testing/catalyst-dkms/catalyst.install24
-rw-r--r--community-testing/catalyst-dkms/dkms.conf7
4 files changed, 130 insertions, 0 deletions
diff --git a/community-testing/catalyst-dkms/3.5-do_mmap.patch b/community-testing/catalyst-dkms/3.5-do_mmap.patch
new file mode 100644
index 000000000..04248eb7b
--- /dev/null
+++ b/community-testing/catalyst-dkms/3.5-do_mmap.patch
@@ -0,0 +1,50 @@
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-15 18:30:13.483762070 +0200
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-17 17:47:36.543041869 +0200
+@@ -2106,6 +2106,12 @@
+ }
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
++# define NO_DO_MMAP
++# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f)
++# define do_munmap(a,b,c) vm_munmap(b, c)
++#endif
++
+ unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval(
+ KCL_IO_FILE_Handle file,
+ unsigned long addr,
+@@ -2117,10 +2123,13 @@
+
+ flags = MAP_SHARED;
+ prot = PROT_READ|PROT_WRITE;
+-
++#ifdef NO_DO_MMAP
++ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff);
++#else
+ down_write(&current->mm->mmap_sem);
+ vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);
+ up_write(&current->mm->mmap_sem);
++#endif
+ if (IS_ERR(vaddr))
+ return 0;
+ else
+@@ -2131,7 +2140,9 @@
+ {
+ int retcode = 0;
+
++#ifndef NO_DO_MMAP
+ down_write(&current->mm->mmap_sem);
++#endif
+ #ifdef FGL_LINUX_RHEL_MUNMAP_API
+ retcode = do_munmap(current->mm,
+ addr,
+@@ -2142,7 +2153,9 @@
+ addr,
+ len);
+ #endif
++#ifndef NO_DO_MMAP
+ up_write(&current->mm->mmap_sem);
++#endif
+ return retcode;
+ }
+
diff --git a/community-testing/catalyst-dkms/PKGBUILD b/community-testing/catalyst-dkms/PKGBUILD
new file mode 100644
index 000000000..b238862f8
--- /dev/null
+++ b/community-testing/catalyst-dkms/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 76898 2012-10-01 22:40:39Z lcarlier $
+# Maintainer: Laurent Carlier <lordheavym@gmail.com>
+# Contributor: Vi0L0, wonder, Eduardo "kensai" Romero
+# Contributor: aidanlinz, Rip-Rip, OvsInc, Sebastian Siebert
+
+pkgname=catalyst-dkms
+pkgver=12.8
+pkgrel=0.1
+pkgdesc="AMD proprietary gpu kernel driver"
+arch=('i686' 'x86_64')
+url="http://www.amd.com"
+license=('custom')
+depends=('linux>=3.5' 'linux-headers>=3.5' 'dkms')
+source=(http://www2.ati.com/drivers/linux/amd-driver-installer-${pkgver/./-}-x86.x86_64.zip
+ dkms.conf
+ 3.5-do_mmap.patch)
+md5sums=('41c5478322b13be6909eeb46412a3aa0'
+ '972049dc247a74a7162f2227078abcb0'
+ 'a450e2e3db61994b09e9d99d95bee837')
+install=catalyst.install
+
+package() {
+ depends=(${depends[@]} "catalyst-utils=${pkgver}")
+
+ cd ${srcdir}
+
+ if [ "${CARCH}" = "x86_64" ]; then
+ _archdir=x86_64
+ else
+ _archdir=x86
+ fi
+
+ sh ./amd-driver-installer*.run --extract fglrx-install
+
+ cd fglrx-install
+ patch -Np1 -i ../3.5-do_mmap.patch
+
+ install -dm755 "${pkgdir}/usr/lib/modprobe.d"
+ install -dm755 "${pkgdir}/usr/src/fglrx-${pkgver}-${pkgrel}"
+ cp -r common/lib/modules/fglrx/build_mod/* "${pkgdir}/usr/src/fglrx-${pkgver}-${pkgrel}/"
+ cp "arch/${_archdir}"/lib/modules/fglrx/build_mod/libfglrx_ip.a "${pkgdir}/usr/src/fglrx-${pkgver}-${pkgrel}/"
+ cp ${srcdir}/dkms.conf "${pkgdir}/usr/src/fglrx-${pkgver}-${pkgrel}/"
+ sed -i -e "s/@VERSION@/${pkgver}-${pkgrel}/" "${pkgdir}/usr/src/fglrx-${pkgver}-${pkgrel}/dkms.conf"
+
+ echo "blacklist radeon" >> "${pkgdir}/usr/lib/modprobe.d/catalyst.conf"
+
+ # license
+ install -Dm644 "${srcdir}/fglrx-install/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT"
+}
diff --git a/community-testing/catalyst-dkms/catalyst.install b/community-testing/catalyst-dkms/catalyst.install
new file mode 100644
index 000000000..f32e7ae7a
--- /dev/null
+++ b/community-testing/catalyst-dkms/catalyst.install
@@ -0,0 +1,24 @@
+post_install()
+{
+ dkms add -m fglrx -v $1
+ dkms build -m fglrx -v $1
+ dkms install -m fglrx -v $1
+}
+
+pre_upgrade()
+{
+ dkms remove -m fglrx -v $1 --all
+}
+
+post_upgrade()
+{
+ dkms add -m fglrx -v $1
+ dkms build -m fglrx -v $1
+ dkms install -m fglrx -v $1
+}
+
+pre_remove()
+{
+ dkms remove -m fglrx -v $1 --all
+}
+
diff --git a/community-testing/catalyst-dkms/dkms.conf b/community-testing/catalyst-dkms/dkms.conf
new file mode 100644
index 000000000..8d312da4f
--- /dev/null
+++ b/community-testing/catalyst-dkms/dkms.conf
@@ -0,0 +1,7 @@
+PACKAGE_NAME="fglrx"
+PACKAGE_VERSION="@VERSION@"
+CLEAN="rm -f *.*o"
+BUILT_MODULE_NAME[0]="fglrx"
+MAKE[0]="sh make.sh --nohints --uname_r=$kernelver --norootcheck"
+DEST_MODULE_LOCATION[0]="/extramodules"
+AUTOINSTALL="yes"