summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVi0L02015-12-19 22:09:10 +0100
committerVi0L02015-12-19 22:09:10 +0100
commit5dbc7e1ef2250498f01baace67101d07f14eea30 (patch)
treea4430ad5e4ee5fa993951d79b53f75e62d19ab21
parentf8a01cde9a0e84f36e01b5aa0a13e9fe2a863d70 (diff)
downloadaur-5dbc7e1ef2250498f01baace67101d07f14eea30.tar.gz
updated to 15.12 + 4.4 kernel + grsec initial support
-rw-r--r--.SRCINFO26
-rw-r--r--4.4-manjaro-xstate.patch22
-rw-r--r--PKGBUILD27
-rw-r--r--grsec_arch.patch77
4 files changed, 130 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9b4669164596..3bec1a309c4f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
pkgbase = catalyst-test
pkgdesc = AMD/ATI Catalyst drivers for linux AKA Crimson. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. PRE-GCN Radeons ARE NOT SUPPORTED
- pkgver = 15.11
- pkgrel = 3
+ pkgver = 15.12
+ pkgrel = 1
url = http://www.amd.com
install = catalyst-test.install
arch = i686
arch = x86_64
license = custom
depends = linux>=3.0
- depends = linux<4.4
+ depends = linux<4.5
depends = linux-headers
depends = xorg-server>=1.7.0
depends = xorg-server<1.18.0
@@ -29,12 +29,12 @@ pkgbase = catalyst-test
optdepends = acpid: acpi event support / atieventsd
optdepends = procps-ng: brings pgrep used in acpi event support
provides = libgl
- provides = libatical=15.11
- provides = catalyst=15.11
- provides = catalyst-utils=15.11
- provides = catalyst-hook=15.11
- provides = catalyst-libgl=15.11
- provides = opencl-catalyst=15.11
+ provides = libatical=15.12
+ provides = catalyst=15.12
+ provides = catalyst-utils=15.12
+ provides = catalyst-hook=15.12
+ provides = catalyst-libgl=15.12
+ provides = opencl-catalyst=15.12
provides = libcl
provides = dri
provides = libtxc_dxtn
@@ -54,7 +54,7 @@ pkgbase = catalyst-test
options = libtool
options = !strip
options = !upx
- source = http://www2.ati.com/drivers/linux/radeon-crimson-15.11-15.30.1025.zip
+ source = http://www2.ati.com/drivers/linux/radeon-crimson-15.12-15.302-151217a-297685e.zip
source = catalyst_build_module
source = lib32-catalyst.sh
source = catalyst.sh
@@ -80,7 +80,9 @@ pkgbase = catalyst-test
source = 4.3-kolasa-seq_printf.patch
source = 4.3-gentoo-mtrr.patch
source = crimson_i686_xg.patch
- md5sums = 7ba22f465970fbe2bb9ff974beb0a918
+ source = 4.4-manjaro-xstate.patch
+ source = grsec_arch.patch
+ md5sums = 39808c8a9bcc9041f1305e3531b60622
md5sums = 601d9c756571dd79d26944e54827631e
md5sums = af7fb8ee4fc96fd54c5b483e33dc71c4
md5sums = bdafe749e046bfddee2d1c5e90eabd83
@@ -106,6 +108,8 @@ pkgbase = catalyst-test
md5sums = 0e0666e95d1d590a7a83192805679485
md5sums = 98828e3eeaec2b3795e584883cc1b746
md5sums = 6cdbaf5f71d867d225721a0369413616
+ md5sums = d9bea135ae3e1b3ca87c5bbe6dcf8e72
+ md5sums = 8941e91fc58cb44ce21ab9bda135754e
pkgname = catalyst-test
diff --git a/4.4-manjaro-xstate.patch b/4.4-manjaro-xstate.patch
new file mode 100644
index 000000000000..c221952d5ec7
--- /dev/null
+++ b/4.4-manjaro-xstate.patch
@@ -0,0 +1,22 @@
+--- 15.12/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-18 19:47:41.000000000 +0100
++++ 15.12b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-19 20:48:13.223261632 +0100
+@@ -6450,12 +6450,15 @@
+ struct fpu *fpu = &tsk->thread.fpu;
+
+ if(static_cpu_has(X86_FEATURE_XSAVE)) {
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+- fpu_xsave(fpu);
+- if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+-#else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++ copy_xregs_to_kernel(&fpu->state.xsave);
++ if (!(fpu->state.xsave.header.xfeatures & XFEATURE_MASK_FP))
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+ copy_xregs_to_kernel(&fpu->state.xsave);
+ if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
++#else
++ fpu_xsave(fpu);
++ if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+ #endif
+ return 1;
+ } else if (static_cpu_has(X86_FEATURE_FXSR)) {
diff --git a/PKGBUILD b/PKGBUILD
index f27bd7bed6c6..86db71f03352 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,20 +20,21 @@
# Contributor: solar (authatieventsd' patch s/-1/255)
# Contributor: kolasa (part of 4.3 kernel patches)
# Contributor: gentoo (part of 4.3 kernel patches)
+# Contributor: Philip Müller @ Manjaro (4.4 kernel patch)
# PKGEXT='.pkg.tar.gz' # imho time to pack this pkg into tar.xz is too long, unfortunatelly yaourt got problems when ext is different from .pkg.tar.xz - V
pkgname=catalyst-test
-pkgver=15.11
-pkgrel=3
+pkgver=15.12
+pkgrel=1
# _betano=1.0
-_amdver=15.30.1025
+_amdver=15.302
pkgdesc="AMD/ATI Catalyst drivers for linux AKA Crimson. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. PRE-GCN Radeons ARE NOT SUPPORTED"
arch=('i686' 'x86_64')
url="http://www.amd.com"
license=('custom')
options=('staticlibs' 'libtool' '!strip' '!upx')
-depends=('linux>=3.0' 'linux<4.4' 'linux-headers' 'xorg-server>=1.7.0' 'xorg-server<1.18.0' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'gcc>4.0.0' 'make' 'patch' 'libxinerama' 'mesa>=10.1.0-4')
+depends=('linux>=3.0' 'linux<4.5' 'linux-headers' 'xorg-server>=1.7.0' 'xorg-server<1.18.0' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'gcc>4.0.0' 'make' 'patch' 'libxinerama' 'mesa>=10.1.0-4')
optdepends=('qt4: to run ATi Catalyst Control Center (amdcccle)'
'libxxf86vm: to run ATi Catalyst Control Center (amdcccle)'
'opencl-headers: headers necessary for OpenCL development'
@@ -66,7 +67,7 @@ source=(
# http://www2.ati.com/drivers/linux/amd-catalyst-${pkgver/./-}-linux-x86-x86-64.zip
# http://www2.ati.com/drivers/linux/amd-catalyst-omega-14.12-linux-run-installers.zip
# http://www2.ati.com/drivers/linux/amd-driver-installer-${_amdver}-x86.x86_64.zip
- http://www2.ati.com/drivers/linux/radeon-crimson-15.11-15.30.1025.zip
+ http://www2.ati.com/drivers/linux/radeon-crimson-15.12-15.302-151217a-297685e.zip
catalyst_build_module
lib32-catalyst.sh
catalyst.sh
@@ -91,9 +92,11 @@ source=(
fglrx_gpl_symbol.patch
4.3-kolasa-seq_printf.patch
4.3-gentoo-mtrr.patch
- crimson_i686_xg.patch)
+ crimson_i686_xg.patch
+ 4.4-manjaro-xstate.patch
+ grsec_arch.patch)
-md5sums=('7ba22f465970fbe2bb9ff974beb0a918'
+md5sums=('39808c8a9bcc9041f1305e3531b60622'
'601d9c756571dd79d26944e54827631e'
'af7fb8ee4fc96fd54c5b483e33dc71c4'
'bdafe749e046bfddee2d1c5e90eabd83'
@@ -118,12 +121,14 @@ md5sums=('7ba22f465970fbe2bb9ff974beb0a918'
'ef97fc080ce7e5a275fe0c372bc2a418'
'0e0666e95d1d590a7a83192805679485'
'98828e3eeaec2b3795e584883cc1b746'
- '6cdbaf5f71d867d225721a0369413616')
+ '6cdbaf5f71d867d225721a0369413616'
+ 'd9bea135ae3e1b3ca87c5bbe6dcf8e72'
+ '8941e91fc58cb44ce21ab9bda135754e')
build() {
## Unpack archive
- /bin/sh ./fglrx-15.30.1025/amd-driver-installer-${_amdver}-x86.x86_64.run --extract archive_files
+ /bin/sh ./fglrx-${_amdver}/amd-driver-installer-${_amdver}-x86.x86_64.run --extract archive_files
# mkdir common
# mv etc lib usr common
# mkdir archive_files
@@ -301,11 +306,11 @@ package() {
patch -Np1 -i ../lano1106_fglrx_intel_iommu.patch
patch -Np1 -i ../lano1106_kcl_agp_13_4.patch
test "${CARCH}" = "i686" && patch -Np1 -i ../fglrx_gpl_symbol.patch
-# since 3.19 not only i686 needs gpl symbol - V
-# patch -Np1 -i ../fglrx_gpl_symbol.patch
patch -Np1 -i ../4.3-kolasa-seq_printf.patch
patch -Np1 -i ../4.3-gentoo-mtrr.patch
test "${CARCH}" = "i686" && patch -Np1 -i ../crimson_i686_xg.patch
+ patch -Np1 -i ../4.4-manjaro-xstate.patch
+ patch -Np1 -i ../grsec_arch.patch
# Prepare modules source files
_archdir=x86_64
diff --git a/grsec_arch.patch b/grsec_arch.patch
new file mode 100644
index 000000000000..323e44fd02fa
--- /dev/null
+++ b/grsec_arch.patch
@@ -0,0 +1,77 @@
+diff -uNr 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c
+--- 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-12-19 21:14:13.251002548 +0100
++++ 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-12-19 21:36:27.703783498 +0100
+@@ -6465,11 +6465,21 @@
+
+ if(static_cpu_has(X86_FEATURE_XSAVE)) {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++#ifdef CONFIG_GRKERNSEC
++ copy_xregs_to_kernel(&fpu->state->xsave);
++ if (!(fpu->state->xsave.header.xfeatures & XFEATURE_MASK_FP))
++#else
+ copy_xregs_to_kernel(&fpu->state.xsave);
+ if (!(fpu->state.xsave.header.xfeatures & XFEATURE_MASK_FP))
++#endif
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
++#ifdef CONFIG_GRKERNSEC
++ copy_xregs_to_kernel(&fpu->state->xsave);
++ if (!(fpu->state->xsave.header.xfeatures & XSTATE_FP))
++#else
+ copy_xregs_to_kernel(&fpu->state.xsave);
+ if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
++#endif
+ #else
+ fpu_xsave(fpu);
+ if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+@@ -6486,8 +6496,12 @@
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ : [fx] "=m" (fpu->state->fsave));
+ #else
++#ifdef CONFIG_GRKERNSEC
++ : [fx] "=m" (fpu->state->fsave));
++#else
+ : [fx] "=m" (fpu->state.fsave));
+ #endif
++#endif
+ return 0;
+ }
+
+diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_acpi.c 15.12b/common/lib/modules/fglrx//build_mod/kcl_acpi.c
+--- 15.12/common/lib/modules/fglrx//build_mod/kcl_acpi.c 2015-12-19 21:14:13.247669219 +0100
++++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_acpi.c 2015-12-19 21:10:27.224899708 +0100
+@@ -145,7 +145,11 @@
+ return NOTIFY_OK;
+ }
+
++#ifdef CONFIG_GRKERNSEC
++static notifier_block_no_const firegl_acpi_lid_notifier = {
++#else
+ static struct notifier_block firegl_acpi_lid_notifier = {
++#endif
+ .notifier_call = firegl_acpi_lid_event,
+ };
+ #endif
+@@ -400,7 +404,11 @@
+ KCL_DEBUG_ERROR ("Could not allocate enough memory for video notifier_block\n");
+ return -ENOMEM;
+ }
++#ifdef CONFIG_GRKERNSEC
++ ((notifier_block_no_const*)(*nb))->notifier_call = firegl_acpi_video_event;
++#else
+ ((struct notifier_block*)(*nb))->notifier_call = firegl_acpi_video_event;
++#endif
+ return register_acpi_notifier((struct notifier_block*)(*nb));
+ }
+
+@@ -413,7 +421,11 @@
+ KCL_DEBUG_ERROR ("Could not allocate enough memory for ac notifier_block\n");
+ return -ENOMEM;
+ }
++#ifdef CONFIG_GRKERNSEC
++ ((notifier_block_no_const*)(*nb))->notifier_call = firegl_acpi_ac_event;
++#else
+ ((struct notifier_block*)(*nb))->notifier_call = firegl_acpi_ac_event;
++#endif
+ return register_acpi_notifier((struct notifier_block*)(*nb));
+ }
+