diff options
author | Vi0L0 | 2016-06-12 21:33:37 +0200 |
---|---|---|
committer | Vi0L0 | 2016-06-12 21:33:37 +0200 |
commit | c9f6a5af7883cc103761b63374df5a5a803016f3 (patch) | |
tree | 6d25a77bc8019d494efa2dd20bd939d209b2943d | |
parent | 574f96955f2add81caf3e660e70846645793d732 (diff) | |
download | aur-c9f6a5af7883cc103761b63374df5a5a803016f3.tar.gz |
15.302.2001-1: initial 4.6 kernel support + switched to dkms + acpi script from aslmaswd
-rw-r--r-- | .SRCINFO | 55 | ||||
-rw-r--r-- | 4.2-amd-from_crimson_15.11.patch | 447 | ||||
-rw-r--r-- | 4.6-arch-get_user_pages-page_cache_release.patch | 38 | ||||
-rw-r--r-- | PKGBUILD | 121 | ||||
-rw-r--r-- | a-ac-aticonfig | 6 | ||||
-rw-r--r-- | a-lid-aticonfig | 4 | ||||
-rwxr-xr-x | ati-powermode.sh | 107 | ||||
-rw-r--r-- | ati_make.sh | 145 | ||||
-rw-r--r-- | catalyst-firepro.install | 37 | ||||
-rw-r--r-- | catalyst-hook.service | 14 | ||||
-rwxr-xr-x | catalyst_build_module | 225 | ||||
-rw-r--r-- | cold-fglrx-3.14-current_euid.patch | 14 | ||||
-rw-r--r-- | dkms.conf | 7 | ||||
-rw-r--r-- | hook-fglrx | 14 | ||||
-rw-r--r-- | lano1106_fglrx-13.8_proc.patch | 50 | ||||
-rw-r--r-- | makesh-dont-check-gcc-version.patch | 11 |
16 files changed, 192 insertions, 1103 deletions
@@ -1,15 +1,15 @@ pkgbase = catalyst-firepro - pkgdesc = AMD/ATI beta drivers for FirePro/GL/MV brand cards. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. - pkgver = 15.201.2401 - pkgrel = 2 + pkgdesc = AMD/ATI drivers for FirePro/GL/MV brand cards. catalyst-dkms + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. + pkgver = 15.302.2001 + pkgrel = 1 url = http://www.amd.com install = catalyst-firepro.install arch = i686 arch = x86_64 license = custom - makedepends = unzip + depends = dkms depends = linux>=3.0 - depends = linux<4.6 + depends = linux<4.7 depends = linux-headers depends = xorg-server>=1.7.0 depends = xorg-server<1.18.0 @@ -28,13 +28,14 @@ pkgbase = catalyst-firepro optdepends = libxxf86vm: to run ATi Catalyst Control Center (amdcccle) optdepends = opencl-headers: headers necessary for OpenCL development optdepends = acpid: acpi event support / atieventsd - optdepends = linux-lts-headers: to build the fglrx module for the linux-lts kernel + optdepends = procps-ng: brings pgrep used in acpi event support provides = libgl - provides = libatical=15.201.2401 - provides = catalyst=15.201.2401 - provides = catalyst-libgl=15.201.2401 - provides = catalyst-utils=15.201.2401 - provides = catalyst-hook=15.201.2401 + provides = libatical=15.302.2001 + provides = catalyst=15.302.2001 + provides = catalyst-utils=15.302.2001 + provides = catalyst-dkms=15.302.2001 + provides = catalyst-libgl=15.302.2001 + provides = opencl-catalyst=15.302.2001 provides = libcl provides = dri provides = libtxc_dxtn @@ -44,7 +45,7 @@ pkgbase = catalyst-firepro conflicts = catalyst conflicts = catalyst-daemon conflicts = catalyst-generator - conflicts = catalyst-hook + conflicts = catalyst-dkms conflicts = catalyst-utils conflicts = libcl conflicts = catalyst-dkms @@ -54,21 +55,15 @@ pkgbase = catalyst-firepro options = libtool options = !strip options = !upx - source = http://www2.ati.com/drivers/firepro/15.201.2401-linux-retail_end_user.zip - source = catalyst_build_module + source = https://www2.ati.com/drivers/firepro/15.302.2001-linux-retail_end_user.zip source = lib32-catalyst.sh source = catalyst.sh source = atieventsd.sh source = atieventsd.service source = ati-powermode.sh - source = a-ac-aticonfig - source = a-lid-aticonfig source = catalyst.conf source = arch-fglrx-authatieventsd_new.patch - source = hook-fglrx - source = ati_make.sh source = makefile_compat.patch - source = catalyst-hook.service source = switchlibGL source = switchlibglx source = pxp_switch_catalyst @@ -76,30 +71,24 @@ pkgbase = catalyst-firepro source = temp-links-catalyst.service source = lano1106_fglrx_intel_iommu.patch source = lano1106_kcl_agp_13_4.patch - source = lano1106_fglrx-13.8_proc.patch - source = cold-fglrx-3.14-current_euid.patch source = fglrx_gpl_symbol.patch source = 4.3-kolasa-seq_printf.patch source = 4.3-gentoo-mtrr.patch - source = 4.2-amd-from_crimson_15.11.patch source = crimson_i686_xg.patch source = 4.4-manjaro-xstate.patch source = grsec_arch.patch - md5sums = 6b5633069fa8a331185ac903252507f5 - md5sums = 601d9c756571dd79d26944e54827631e + source = 4.6-arch-get_user_pages-page_cache_release.patch + source = dkms.conf + source = makesh-dont-check-gcc-version.patch + md5sums = 09465fd40f60c609c3e56dbbe342a46e md5sums = af7fb8ee4fc96fd54c5b483e33dc71c4 md5sums = bdafe749e046bfddee2d1c5e90eabd83 md5sums = 9d9ea496eadf7e883d56723d65e96edf md5sums = b79e144932616221f6d01c4b05dc9306 - md5sums = 514899437eb209a1d4670df991cdfc10 - md5sums = 80fdfbff93d96a1dfca2c7f684be8cc1 - md5sums = 9054786e08cf3ea2a549fe22d7f2cd92 + md5sums = 9e2a7ded987b7d2b2cfffc7281ebd8a5 md5sums = 3e19c2285c76f4cb92108435a1e9c302 md5sums = b3ceefeb97c609037845f65d0956c4f0 - md5sums = 9126e1ef0c724f8b57d3ac0fe77efe2f - md5sums = 62239156a9656c6f41e89a879578925c md5sums = 3e1b82bd69774ea808da69c983d6a43b - md5sums = a64e2eae5addc6d670911ccf94b8cda4 md5sums = 394bc493fdf493a5093f9e2095096d02 md5sums = 3226230592fa3c91ff22389114fc5dc7 md5sums = 9e706c272feb167be55ba7201dfa8d51 @@ -107,15 +96,15 @@ pkgbase = catalyst-firepro md5sums = 2c22bb4d4f828cb8b024f670c1ae7e45 md5sums = 5184b94a2a40216a67996999481dd9ee md5sums = c5156eddf81c8a1719b160d05a2e8d67 - md5sums = 2ab4837233de42332753882445373d7b - md5sums = ba33b6ef10896d3e1b5e4cd96390b771 md5sums = ef97fc080ce7e5a275fe0c372bc2a418 md5sums = 0e0666e95d1d590a7a83192805679485 md5sums = 98828e3eeaec2b3795e584883cc1b746 - md5sums = fd2851026228ca72124972d1ea0335ea md5sums = 6cdbaf5f71d867d225721a0369413616 md5sums = d9bea135ae3e1b3ca87c5bbe6dcf8e72 md5sums = 8941e91fc58cb44ce21ab9bda135754e + md5sums = 11b7c2e0dc4794801005d66b0e7608a3 + md5sums = 23d569abfdd7de433d76e003e4b3ccf9 + md5sums = 10829e3b992b3e80a6e78c8e27748703 pkgname = catalyst-firepro diff --git a/4.2-amd-from_crimson_15.11.patch b/4.2-amd-from_crimson_15.11.patch deleted file mode 100644 index cd957917b1bf..000000000000 --- a/4.2-amd-from_crimson_15.11.patch +++ /dev/null @@ -1,447 +0,0 @@ -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-09-09 00:57:14.000000000 +0200 -+++ 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-11-21 00:35:38.000000000 +0100 -@@ -191,9 +191,17 @@ - #include <linux/string.h> - #include <linux/gfp.h> - #include <linux/swap.h> -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) - #include "asm/i387.h" -+#else -+#include <asm/fpu/api.h> -+#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) - #include <asm/fpu-internal.h> -+#else -+#include <asm/fpu/internal.h> -+#endif - #endif - - #include "firegl_public.h" -@@ -1742,7 +1750,11 @@ - unsigned long new, int size) - { - #ifndef __HAVE_ARCH_CMPXCHG -+#if defined(__i386__) - return __fgl_cmpxchg(ptr,old,new,size); -+#elif defined(__x86_64__) -+ return cmpxchg((unsigned long*)ptr,old,new); -+#endif - #else - /* On kernel version 2.6.34 passing a variable or unsupported size - * argument to the __cmpxchg macro causes the default-clause of a -@@ -3503,10 +3515,12 @@ - KCL_PUB_InterruptHandlerWrap, - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) - ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)), --#else -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) - //when MSI enabled. keep irq disabled when calling the action handler, - //exclude this IRQ from irq balancing (only on one CPU) -- ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)), -+ ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)), -+#else -+ ((useMSI) ? (0x0) : (IRQF_SHARED)), - #endif - dev_name, - context); -@@ -5031,7 +5045,7 @@ - orig_level = kasSetExecutionLevel(kasContext.exec_level_ih); - - ret = kasContext.callback_wrapper_ret(ih_routine, ih_context); -- KCL_DEBUG1(FN_FIREGL_KAS,"Interrupt handler returned 0x%08X\n", ret); -+ KCL_DEBUG1(FN_FIREGL_KAS,"Interrupt handler returned 0x%08X\n", ret); - - kasSetExecutionLevel(orig_level); - spin_unlock(&kasContext.lock_ih); -@@ -6436,21 +6450,36 @@ - 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)) -- return 1; -+#else -+ copy_xregs_to_kernel(&fpu->state.xsave); -+ if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP)) -+#endif -+ return 1; - } else if (static_cpu_has(X86_FEATURE_FXSR)) { -- fpu_fxsave(fpu); -- } else { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) -+ fpu_fxsave(fpu); -+#else -+ copy_fxregs_to_kernel(fpu); -+#endif -+} else { - asm volatile("fnsave %[fx]; fwait" -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) - : [fx] "=m" (fpu->state->fsave)); -- return 0; -+#else -+ : [fx] "=m" (fpu->state.fsave)); -+#endif -+ return 0; - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) - if (unlikely(fpu->state->fxsave.swd & X87_FSW_ES)) { -- asm volatile("fnclex"); -- return 0; -+ asm volatile("fnclex"); -+ return 0; - } -+#endif - return 1; - } - #endif -@@ -6462,8 +6491,13 @@ - void ATI_API_CALL KCL_fpu_begin(void) - { - #ifdef CONFIG_X86_64 -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) - kernel_fpu_begin(); - #else -+ preempt_disable(); -+ __kernel_fpu_begin(); -+#endif -+#else - #ifdef TS_USEDFPU - struct thread_info *cur_thread = current_thread_info(); - struct task_struct *cur_task = get_current(); -@@ -6487,8 +6521,12 @@ - /* The thread structure is changed with the commit below for kernel 3.3: - * https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8 - */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) - if (cur_task->thread.fpu.has_fpu) - #else -+ if (cur_task->thread.fpu.fpregs_active) -+#endif -+#else - if (cur_task->thread.has_fpu) - #endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0) -@@ -6508,7 +6546,12 @@ - */ - void ATI_API_CALL KCL_fpu_end(void) - { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) - kernel_fpu_end(); -+#else -+ __kernel_fpu_end(); -+ preempt_enable(); -+#endif - } - - /** Create new directory entry under "/proc/...." -diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.c 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.c ---- 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.c 2015-09-09 00:57:14.000000000 +0200 -+++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.c 2015-11-21 00:35:38.000000000 +0100 -@@ -35,10 +35,10 @@ - #include <linux/kernel.h> - #include <linux/sysrq.h> - #include <linux/thread_info.h> -- -+#include "firegl_public.h" - #include "kcl_debug.h" - --extern void* ATI_API_CALL KCL_MEM_SmallBufferAllocAtomic(unsigned long size); -+extern void* ATI_API_CALL KCL_MEM_SmallBufferAllocAtomic(kcl_size_t size); - extern void ATI_API_CALL KCL_MEM_SmallBufferFree(void* p); - - extern int ATI_API_CALL firegl_debug_dump(void); -@@ -156,6 +156,47 @@ - KCL_MEM_SmallBufferFree(buffer); - } - -+/** \brief Print debug information to the OS debug console according to traceMask and debugMask -+ * \param traceMask Bit mask of enabled trace function -+ * \param debugMask Bit mask of enabled debug level. 0-7 total -+ * \param name function name -+ * \param line line number inside the file -+ * \param the print parameter -+ * \param fmt printf-like formatting string -+ * \param ... printf-like parameters -+ */ -+void ATI_API_CALL KCL_DEBUG_Print_Trace(unsigned int traceMask, unsigned int debugMask, void* name, int line, long param, const char* fmt, ...) -+{ -+ int print = firegl_trace(traceMask, debugMask, name, line, param); -+ if(print) -+ { -+ int len; -+ char* buffer=KCL_MEM_SmallBufferAllocAtomic(MAX_STRING_LENGTH); -+ if(buffer==NULL) -+ return; -+ if(fmt == NULL) -+ { -+ buffer[0] = '\n'; -+ buffer[1] = '\0'; -+ } -+ else -+ { -+ va_list marker; -+ va_start(marker, fmt); -+ kcl_vsnprintf(buffer,255,fmt, marker); -+ va_end(marker); -+ len = strlen(buffer); -+ if(buffer[len-1] != '\n') -+ { -+ buffer[len]='\n'; -+ buffer[len+1]='\0'; -+ } -+ } -+ KCL_DEBUG_Print("[fglrx] %s:%d %s", (char*)name, line, buffer); -+ KCL_MEM_SmallBufferFree(buffer); -+ } -+} -+ - /** \brief Register keyboard handler to dump module internal state - * \param enable 1 to register the handler, 0 to unregister it - * \return 0 -diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.h 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.h ---- 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.h 2015-09-09 00:57:14.000000000 +0200 -+++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.h 2015-11-21 00:35:38.000000000 +0100 -@@ -64,17 +64,22 @@ - FN_GENERIC_MAXIMUM = 0x3f - } FN_TRACE; - --extern void ATI_API_CALL firegl_trace(unsigned int traceMask, -+extern int ATI_API_CALL firegl_trace(unsigned int traceMask, - unsigned int debugMask, - void* name, - int line, -- long param, -- const char* fmt, -- ...); -+ long param); - - #define MAX_STRING_LENGTH 512 - - void ATI_API_CALL KCL_DEBUG_Print(const char* fmt, ...); -+void ATI_API_CALL KCL_DEBUG_Print_Trace(unsigned int traceMask, -+ unsigned int debugMask, -+ void* name, -+ int line, -+ long param, -+ const char* fmt, -+ ...); - int ATI_API_CALL KCL_DEBUG_RegKbdHandler(int enable); - int ATI_API_CALL KCL_DEBUG_RegKbdDumpHandler(int enable); - void ATI_API_CALL KCL_DEBUG_OsDump(void); -@@ -211,102 +216,106 @@ - KCL_DEBUG_Print("<6>[fglrx] " fmt, ##arg) - - --#define KCL_DEBUG_TRACE(m, p, fmt, arg...) \ -- do \ -- { \ -- firegl_trace(m, \ -- FN_DEBUG_TRACE, \ -- (void*)__FUNCTION__, \ -- (int)(__LINE__), \ -- (long)(p), \ -- fmt, \ -- ##arg); \ -+#define KCL_DEBUG_TRACE(m, p, fmt, arg...) \ -+ do \ -+ { \ -+ KCL_DEBUG_Print_Trace(m, \ -+ FN_DEBUG_TRACE, \ -+ (void*)__FUNCTION__, \ -+ (int)(__LINE__), \ -+ (long)(p), \ -+ fmt, \ -+ ##arg); \ - } while (0) - - #define KCL_DEBUG_TRACEIN KCL_DEBUG_TRACE - --#define KCL_DEBUG_TRACEOUT(m, p, fmt, arg...) \ -- do \ -- { \ -- firegl_trace(m, \ -- FN_DEBUG_TRACEOUT, \ -- (void*)__FUNCTION__, \ -- (int)(__LINE__), \ -- (long)(p), \ -- fmt, \ -- ##arg); \ -- } while (0) -- --#define KCL_DEBUG1(m, fmt, arg...) \ -- do \ -- { \ -- firegl_trace(m, \ -- FN_DEBUG_LEVEL1, \ -- (void*)__FUNCTION__, \ -- (int)__LINE__, \ -- 0, \ -- fmt, \ -- ##arg); \ -- } while (0) -- --#define KCL_DEBUG2(m, fmt, arg...) \ -- do \ -- { \ -- firegl_trace(m, \ -- FN_DEBUG_LEVEL2, \ -- (void*)__FUNCTION__, \ -- (int)__LINE__, \ -- 0, \ -- fmt, \ -- ##arg); \ -- } while (0) -- --#define KCL_DEBUG3(m, fmt, arg...) \ -- do \ -- { \ -- firegl_trace(m, \ -- FN_DEBUG_LEVEL3, \ -- (void*)__FUNCTION__, \ -- (int)__LINE__, \ -- 0, \ -- fmt, \ -- ##arg); \ -- } while (0) -- --#define KCL_DEBUG4(m, fmt, arg...) \ -- do \ -- { \ -- firegl_trace(m, \ -- FN_DEBUG_LEVEL4, \ -- (void*)__FUNCTION__, \ -- (int)__LINE__, \ -- 0, \ -- fmt, \ -- ##arg); \ -- } while (0) -- --#define KCL_DEBUG5(m, fmt, arg...) \ -- do \ -- { \ -- firegl_trace(m, \ -- FN_DEBUG_LEVEL5, \ -- (void*)__FUNCTION__, \ -- (int)__LINE__, \ -- 0, \ -- fmt, \ -- ##arg); \ -- } while (0) -- --#define KCL_DEBUG6(m, fmt, arg...) \ -- do \ -- { \ -- firegl_trace(m, \ -- FN_DEBUG_LEVEL6, \ -- (void*)__FUNCTION__, \ -- (int)__LINE__, \ -- 0, \ -- fmt, \ -- ##arg); \ -+#define KCL_DEBUG_TRACEOUT(m, p, fmt, arg...) \ -+ do \ -+ { \ -+ KCL_DEBUG_Print_Trace(m, \ -+ FN_DEBUG_TRACEOUT, \ -+ (void*)__FUNCTION__, \ -+ (int)(__LINE__), \ -+ (long)(p), \ -+ fmt, \ -+ ##arg); \ -+ } while (0) -+ -+ -+#define KCL_DEBUG1(m, fmt, arg...) \ -+ do \ -+ { \ -+ KCL_DEBUG_Print_Trace(m, \ -+ FN_DEBUG_LEVEL1, \ -+ (void*)__FUNCTION__, \ -+ (int)(__LINE__), \ -+ 0, \ -+ fmt, \ -+ ##arg); \ -+ } while (0) -+ -+#define KCL_DEBUG2(m, fmt, arg...) \ -+ do \ -+ { \ -+ KCL_DEBUG_Print_Trace(m, \ -+ FN_DEBUG_LEVEL2, \ -+ (void*)__FUNCTION__, \ -+ (int)(__LINE__), \ -+ 0, \ -+ fmt, \ -+ ##arg); \ -+ } while (0) -+ -+#define KCL_DEBUG3(m, fmt, arg...) \ -+ do \ -+ { \ -+ KCL_DEBUG_Print_Trace(m, \ -+ FN_DEBUG_LEVEL3, \ -+ (void*)__FUNCTION__, \ -+ (int)(__LINE__), \ -+ 0, \ -+ fmt, \ -+ ##arg); \ -+ } while (0) -+ -+ -+#define KCL_DEBUG4(m, fmt, arg...) \ -+ do \ -+ { \ -+ KCL_DEBUG_Print_Trace(m, \ -+ FN_DEBUG_LEVEL4, \ -+ (void*)__FUNCTION__, \ -+ (int)(__LINE__), \ -+ 0, \ -+ fmt, \ -+ ##arg); \ -+ } while (0) -+ -+ -+#define KCL_DEBUG5(m, fmt, arg...) \ -+ do \ -+ { \ -+ KCL_DEBUG_Print_Trace(m, \ -+ FN_DEBUG_LEVEL5, \ -+ (void*)__FUNCTION__, \ -+ (int)(__LINE__), \ -+ 0, \ -+ fmt, \ -+ ##arg); \ -+ } while (0) -+ -+ -+#define KCL_DEBUG6(m, fmt, arg...) \ -+ do \ -+ { \ -+ KCL_DEBUG_Print_Trace(m, \ -+ FN_DEBUG_LEVEL6, \ -+ (void*)__FUNCTION__, \ -+ (int)(__LINE__), \ -+ 0, \ -+ fmt, \ -+ ##arg); \ - } while (0) - - #endif -diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_str.c 15.12b/common/lib/modules/fglrx//build_mod/kcl_str.c ---- 15.12/common/lib/modules/fglrx//build_mod/kcl_str.c 2015-09-09 00:57:14.000000000 +0200 -+++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_str.c 2015-11-21 00:35:38.000000000 +0100 -@@ -42,6 +42,10 @@ - #include "kcl_type.h" - #include "kcl_str.h" - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0) -+#define strnicmp strncasecmp -+#endif -+ - /** \brief Fill memory with a constant byte - * \param s Pointer to memory - * \param c Initializing value diff --git a/4.6-arch-get_user_pages-page_cache_release.patch b/4.6-arch-get_user_pages-page_cache_release.patch new file mode 100644 index 000000000000..935392c8fc84 --- /dev/null +++ b/4.6-arch-get_user_pages-page_cache_release.patch @@ -0,0 +1,38 @@ +--- 16.5/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-18 19:47:41.000000000 +0100 ++++ 16.5b/common/lib/modules/fglrx/build_mod/firegl_public.c 2016-05-09 20:29:48.227025117 +0200 +@@ -3220,7 +3220,11 @@ + int ret; + + down_read(¤t->mm->mmap_sem); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) ++ ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL); ++#else + ret = get_user_pages(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL); ++#endif + up_read(¤t->mm->mmap_sem); + + return ret; +@@ -3238,7 +3242,11 @@ + int ret; + + down_read(¤t->mm->mmap_sem); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) ++ ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL); ++#else + ret = get_user_pages(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL); ++#endif + up_read(¤t->mm->mmap_sem); + + return ret; +@@ -3249,7 +3257,11 @@ + unsigned int i; + for (i=0; i<page_cnt; i++) + { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) ++ put_page((struct page*)page_list[i]); ++#else + page_cache_release((struct page*)page_list[i]); ++#endif + } + } + @@ -21,26 +21,28 @@ # 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) +# Contributor: aslmaswd (acpi main script) # 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-firepro -pkgver=15.201.2401 -pkgrel=2 -pkgdesc="AMD/ATI beta drivers for FirePro/GL/MV brand cards. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport." +pkgver=15.302.2001 +pkgrel=1 +# _betano=1.0 +_amdver=15.302 +pkgdesc="AMD/ATI drivers for FirePro/GL/MV brand cards. catalyst-dkms + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport." arch=('i686' 'x86_64') url="http://www.amd.com" license=('custom') options=('staticlibs' 'libtool' '!strip' '!upx') -depends=('linux>=3.0' 'linux<4.6' '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') -makedepends=('unzip') +depends=('dkms' 'linux>=3.0' 'linux<4.7' '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' 'acpid: acpi event support / atieventsd' - 'linux-lts-headers: to build the fglrx module for the linux-lts kernel') -conflicts=('libgl' 'catalyst' 'catalyst-daemon' 'catalyst-generator' 'catalyst-hook' 'catalyst-utils' 'libcl' 'catalyst-dkms' 'mesa-libgl' 'mesa-libgl-git') -provides=('libgl' "libatical=${pkgver}" "catalyst=${pkgver}" "catalyst-libgl=${pkgver}" "catalyst-utils=${pkgver}" "catalyst-hook=${pkgver}" 'libcl' 'dri' 'libtxc_dxtn' 'mesa-libgl' 'mesa-libgl-git') + 'procps-ng: brings pgrep used in acpi event support') +conflicts=('libgl' 'catalyst' 'catalyst-daemon' 'catalyst-generator' 'catalyst-dkms' 'catalyst-utils' 'libcl' 'catalyst-dkms' 'mesa-libgl' 'mesa-libgl-git') +provides=('libgl' "libatical=${pkgver}" "catalyst=${pkgver}" "catalyst-utils=${pkgver}" "catalyst-dkms=${pkgver}" "catalyst-libgl=${pkgver}" "opencl-catalyst=${pkgver}" 'libcl' 'dri' 'libtxc_dxtn' 'mesa-libgl' 'mesa-libgl-git') if [ "${CARCH}" = "x86_64" ]; then warning "x86_64 system detected" @@ -49,7 +51,7 @@ if [ "${CARCH}" = "x86_64" ]; then warning "OK, lib32-catalyst-utils will be added to the package" depends+=('lib32-libxext' 'lib32-libdrm' 'lib32-libxinerama' 'lib32-mesa>=10.1.0-4') conflicts+=('lib32-libgl' 'lib32-catalyst-utils' 'lib32-libcl' 'lib32-mesa-libgl' 'lib32-mesa-libgl-git') - provides+=('lib32-libgl' "lib32-catalyst-libgl=${pkgver}" "lib32-catalyst-utils=${pkgver}" 'lib32-dri' 'lib32-libtxc_dxtn' 'lib32-libcl' 'lib32-mesa-libgl' 'lib32-mesa-libgl-git') + provides+=('lib32-libgl' "lib32-catalyst-utils=${pkgver}" "lib32-catalyst-libgl=${pkgver}" "lib32-opencl-catalyst=${pkgver}" 'lib32-dri' 'lib32-libtxc_dxtn' 'lib32-libcl' 'lib32-mesa-libgl' 'lib32-mesa-libgl-git') else warning "lib32-catalyst-utils will NOT be added to the package" fi @@ -57,25 +59,24 @@ fi install=${pkgname}.install -url_ref="http://support.amd.com/en-us/download/workstation?os=Linux+x86" +url_ref="http://support.amd.com/en-us/kb-articles/Pages/latest-linux-beta-driver.aspx" DLAGENTS="http::/usr/bin/curl --referer ${url_ref} -o %o %u" source=( - http://www2.ati.com/drivers/firepro/15.201.2401-linux-retail_end_user.zip - catalyst_build_module +# http://www2.ati.com/drivers/beta/amd-catalyst-${pkgver}-beta-v${_betano}-linux-x86.x86_64.run.zip +# http://www2.ati.com/drivers/linux/amd-catalyst-${pkgver}-linux-x86.x86_64.zip +# 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 + https://www2.ati.com/drivers/firepro/15.302.2001-linux-retail_end_user.zip lib32-catalyst.sh catalyst.sh atieventsd.sh atieventsd.service ati-powermode.sh - a-ac-aticonfig - a-lid-aticonfig catalyst.conf arch-fglrx-authatieventsd_new.patch - hook-fglrx - ati_make.sh makefile_compat.patch - catalyst-hook.service switchlibGL switchlibglx pxp_switch_catalyst @@ -83,58 +84,50 @@ source=( temp-links-catalyst.service lano1106_fglrx_intel_iommu.patch lano1106_kcl_agp_13_4.patch - lano1106_fglrx-13.8_proc.patch - cold-fglrx-3.14-current_euid.patch fglrx_gpl_symbol.patch 4.3-kolasa-seq_printf.patch 4.3-gentoo-mtrr.patch - 4.2-amd-from_crimson_15.11.patch crimson_i686_xg.patch 4.4-manjaro-xstate.patch - grsec_arch.patch) + grsec_arch.patch + 4.6-arch-get_user_pages-page_cache_release.patch + dkms.conf + makesh-dont-check-gcc-version.patch) -md5sums=('6b5633069fa8a331185ac903252507f5' - '601d9c756571dd79d26944e54827631e' +md5sums=('09465fd40f60c609c3e56dbbe342a46e' 'af7fb8ee4fc96fd54c5b483e33dc71c4' 'bdafe749e046bfddee2d1c5e90eabd83' '9d9ea496eadf7e883d56723d65e96edf' 'b79e144932616221f6d01c4b05dc9306' - '514899437eb209a1d4670df991cdfc10' - '80fdfbff93d96a1dfca2c7f684be8cc1' - '9054786e08cf3ea2a549fe22d7f2cd92' + '9e2a7ded987b7d2b2cfffc7281ebd8a5' '3e19c2285c76f4cb92108435a1e9c302' 'b3ceefeb97c609037845f65d0956c4f0' - '9126e1ef0c724f8b57d3ac0fe77efe2f' - '62239156a9656c6f41e89a879578925c' '3e1b82bd69774ea808da69c983d6a43b' - 'a64e2eae5addc6d670911ccf94b8cda4' - '394bc493fdf493a5093f9e2095096d02' + '394bc493fdf493a5093f9e2095096d02' '3226230592fa3c91ff22389114fc5dc7' '9e706c272feb167be55ba7201dfa8d51' '0e6d963436dd23dbb45ae0f4fc9b661c' '2c22bb4d4f828cb8b024f670c1ae7e45' '5184b94a2a40216a67996999481dd9ee' 'c5156eddf81c8a1719b160d05a2e8d67' - '2ab4837233de42332753882445373d7b' - 'ba33b6ef10896d3e1b5e4cd96390b771' 'ef97fc080ce7e5a275fe0c372bc2a418' '0e0666e95d1d590a7a83192805679485' '98828e3eeaec2b3795e584883cc1b746' - 'fd2851026228ca72124972d1ea0335ea' '6cdbaf5f71d867d225721a0369413616' 'd9bea135ae3e1b3ca87c5bbe6dcf8e72' - '8941e91fc58cb44ce21ab9bda135754e') - + '8941e91fc58cb44ce21ab9bda135754e' + '11b7c2e0dc4794801005d66b0e7608a3' + '23d569abfdd7de433d76e003e4b3ccf9' + '10829e3b992b3e80a6e78c8e27748703') build() { ## Unpack archive -# unzip ${srcdir}/14.301.1010-linux-firepro-retail.zip /bin/sh ./fglrx-${pkgver}/amd-driver-installer-${pkgver}-x86.x86_64.run --extract archive_files -#mkdir common -#mv etc lib usr common -#mkdir archive_files -#mv arch common xpic xpic_64a archive_files +# mkdir common +# mv etc lib usr common +# mkdir archive_files +# mv arch common xpic xpic_64a archive_files } package() { @@ -201,6 +194,7 @@ package() { install -m755 X11R6/${_lib}/libXvBAW.so.1.0 ${pkgdir}/usr/lib ln -snf libXvBAW.so.1.0 ${pkgdir}/usr/lib/libXvBAW.so.1 ln -snf libXvBAW.so.1.0 ${pkgdir}/usr/lib/libXvBAW.so + ln -snf /usr/lib/libXvBAW.so.1.0 ${pkgdir}/usr/lib/dri/fglrx_drv_video.so #omega 14.12 install -m644 X11R6/${_lib}/*.a ${pkgdir}/usr/lib install -m644 X11R6/${_lib}/*.cap ${pkgdir}/usr/lib install -m755 X11R6/${_lib}/modules/dri/*.so ${pkgdir}/usr/lib/xorg/modules/dri @@ -258,11 +252,10 @@ package() { # ACPI example files # install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh ${pkgdir}/etc/acpi # sed -i -e "s/usr\/X11R6/usr/g" ${pkgdir}/etc/acpi/ati-powermode.sh -# install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* ${pkgdir}/etc/acpi/events - # lets check our own files - V + install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* ${pkgdir}/etc/acpi/events + # put version modified by aslmaswd - V install -m755 ${srcdir}/ati-powermode.sh ${pkgdir}/etc/acpi - install -m644 ${srcdir}/a-ac-aticonfig ${pkgdir}/etc/acpi/events - install -m644 ${srcdir}/a-lid-aticonfig ${pkgdir}/etc/acpi/events + # Add ATI Events Daemon launcher install -m755 ${srcdir}/atieventsd.sh ${pkgdir}/etc/rc.d/atieventsd @@ -272,6 +265,7 @@ package() { install -m755 ${srcdir}/catalyst.sh ${pkgdir}/etc/profile.d # License +# install -m644 ${srcdir}/archive_files/LICENSE.TXT ${pkgdir}/usr/share/licenses/${pkgname} install -m644 ${srcdir}/archive_files/LICENSE.TXT ${pkgdir}/usr/share/licenses/${pkgname} install -m644 ${srcdir}/archive_files/common/usr/share/doc/amdcccle/ccc_copyrights.txt \ ${pkgdir}/usr/share/licenses/${pkgname}/amdcccle_copyrights.txt @@ -300,45 +294,39 @@ package() { # switching script: switch xorg.conf + aticonfig --px-Xgpu + switchlibGL + add/remove fglrx into MODULES install -m755 ${srcdir}/pxp_switch_catalyst ${pkgdir}/usr/bin -##catalyst-hook section +##catalyst-dkms section cd ${srcdir}/archive_files patch -Np1 -i ../makefile_compat.patch patch -Np1 -i ../lano1106_fglrx_intel_iommu.patch patch -Np1 -i ../lano1106_kcl_agp_13_4.patch - patch -Np1 -i ../4.2-amd-from_crimson_15.11.patch + patch -Np1 -i ../fglrx_gpl_symbol.patch patch -Np1 -i ../4.3-kolasa-seq_printf.patch patch -Np1 -i ../4.3-gentoo-mtrr.patch - patch -Np1 -i ../fglrx_gpl_symbol.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 + patch -Np1 -i ../4.6-arch-get_user_pages-page_cache_release.patch + patch -Np1 -i ../makesh-dont-check-gcc-version.patch # Prepare modules source files + install -dm755 ${pkgdir}/usr/src/fglrx-${pkgver}/2.6.x _archdir=x86_64 test "${CARCH}" = "i686" && _archdir=x86 - install -m755 -d ${pkgdir}/usr/share/ati/build_mod + install -m755 -d ${pkgdir}/usr/src/fglrx-${pkgver} install -m644 common/lib/modules/fglrx/build_mod/*.c \ - ${pkgdir}/usr/share/ati/build_mod + ${pkgdir}/usr/src/fglrx-${pkgver} install -m644 common/lib/modules/fglrx/build_mod/*.h \ - ${pkgdir}/usr/share/ati/build_mod + ${pkgdir}/usr/src/fglrx-${pkgver} install -m644 common/lib/modules/fglrx/build_mod/2.6.x/Makefile \ - ${pkgdir}/usr/share/ati/build_mod + ${pkgdir}/usr/src/fglrx-${pkgver}/2.6.x + install -m644 common/lib/modules/fglrx/build_mod/make.sh \ + ${pkgdir}/usr/src/fglrx-${pkgver} install -m644 arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a \ - ${pkgdir}/usr/share/ati/build_mod - install -m755 -d ${pkgdir}/usr/bin - install -m755 ${srcdir}/catalyst_build_module ${pkgdir}/usr/bin - - # modified ati's make.sh script - install -m755 ${srcdir}/ati_make.sh ${pkgdir}/usr/share/ati/build_mod - - # hook fglrx - install -m755 -d ${pkgdir}/usr/lib/initcpio/install - install -m644 ${srcdir}/hook-fglrx ${pkgdir}/usr/lib/initcpio/install/fglrx - - # systemd service to perform fglrx module build at shutdown - install -m755 -d ${pkgdir}/usr/lib/systemd/system - install -m644 ${srcdir}/catalyst-hook.service ${pkgdir}/usr/lib/systemd/system + ${pkgdir}/usr/src/fglrx-${pkgver} + # copy dkms.conf and set version + cp ${srcdir}/dkms.conf ${pkgdir}/usr/src/fglrx-${pkgver}/ + sed -i -e "s/@VERSION@/${pkgver}/" "${pkgdir}/usr/src/fglrx-${pkgver}/dkms.conf" ##lib32-catalyst-utils section if [ "${CARCH}" = "x86_64" ] && [[ `cat /etc/pacman.conf | grep -c "#\[multilib]"` = 0 ]]; then @@ -347,6 +335,7 @@ package() { cd ${srcdir}/archive_files/arch/x86/usr install -dm755 ${pkgdir}/usr/lib32 install -dm755 ${pkgdir}/usr/lib32/fglrx + install -dm755 ${pkgdir}/usr/lib32/dri install -dm755 ${pkgdir}/usr/lib32/xorg/modules/dri # install -dm755 ${pkgdir}/usr/lib32/hsa #removed in 14.1 install -m755 lib/*.so* ${pkgdir}/usr/lib32 @@ -357,7 +346,7 @@ package() { install -m755 X11R6/lib/libfglrx_dm.so.1.0 ${pkgdir}/usr/lib32 install -m755 X11R6/lib/libXvBAW.so.1.0 ${pkgdir}/usr/lib32 install -m755 X11R6/lib/modules/dri/*.so ${pkgdir}/usr/lib32/xorg/modules/dri - ln -snf /usr/lib32/xorg/modules/dri ${pkgdir}/usr/lib32/dri + ln -snf /usr/lib32/xorg/modules/dri/fglrx_dri.so ${pkgdir}/usr/lib32/dri/fglrx_dri.so cd $pkgdir/usr/lib32 ln -sf /usr/lib32/libfglrx_dm.so.1.0 ${pkgdir}/usr/lib32/libfglrx_dm.so.1 diff --git a/a-ac-aticonfig b/a-ac-aticonfig deleted file mode 100644 index 753e3af063f9..000000000000 --- a/a-ac-aticonfig +++ /dev/null @@ -1,6 +0,0 @@ -# /etc/acpi/events/ac -# Called when the user connects ac power to us -# - -event=ac_adapter -action=/etc/acpi/ati-powermode.sh "%e" diff --git a/a-lid-aticonfig b/a-lid-aticonfig deleted file mode 100644 index 021f834ba6dd..000000000000 --- a/a-lid-aticonfig +++ /dev/null @@ -1,4 +0,0 @@ -# Called when the user opens/closes the laptop lid - -event=button/lid -action=/etc/acpi/ati-powermode.sh "%e" diff --git a/ati-powermode.sh b/ati-powermode.sh index ded996c43057..6c2ad527d0cb 100755 --- a/ati-powermode.sh +++ b/ati-powermode.sh @@ -5,6 +5,10 @@ # getXuser() { +# user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'` +# if [ x"$user" = x"" ]; then +# user=`finger| grep -m1 ":$displaynum" | awk '{print $1}'` +# fi user=`pinky -fw | awk '{ if ($2 == ":'$displaynum'" || $(NF) == ":'$displaynum'" ) { print $1; exit; } }'` if [ x"$user" = x"" ]; then startx=`pgrep -n startx` @@ -18,11 +22,30 @@ getXuser() { else export XAUTHORITY="" fi - export XUSER=$user } + +grep -q closed /proc/acpi/button/lid/*/state +if [ $? = 0 ]; then + lid_closed=1 + echo "Lid Closed" +else + lid_closed=0 + echo "Lid Open" +fi + +#grep -q off-line /proc/acpi/ac_adapter/*/state +grep -q 0 /sys/class/power_supply/ADP*/online + +if [ $? = 0 ]; then + echo "On DC" + on_dc=1 +else + echo "On AC" + on_dc=0 +fi + #Find the right XServer to be configured. -getXserver() { for x in /tmp/.X11-unix/*; do displaynum=`echo $x | sed s#/tmp/.X11-unix/X##` getXuser; @@ -30,10 +53,8 @@ for x in /tmp/.X11-unix/*; do export DISPLAY=":$displaynum" fi done -} #If PPLIB is enabled -checkPPLIB() { su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB if [ $? = 0 ]; then echo "Has PPLIB" @@ -42,65 +63,21 @@ else echo "No PPLIB" has_pplib=0 fi -} -case "$1" in - ac_adapter) - case "$2" in - AC|ACAD|ADP0) - case "$4" in - 00000000) - logger 'AC unpluged' - getXserver; - checkPPLIB; - if [ ${has_pplib} -eq 1 ]; then - su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"' - else - su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now" - fi - ;; - 00000001) - logger 'AC pluged' - getXserver; - checkPPLIB; - if [ ${has_pplib} -eq 1 ]; then - su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"' - else - su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now" - fi - ;; - esac - ;; - *) - logger "ACPI action undefined: $2" - ;; - esac - ;; - button/lid) - case "$3" in - close) - logger 'LID closed' - getXserver; - checkPPLIB; - if [ ${has_pplib} -eq 1 ]; then - su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"' - else - su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now" - fi - ;; - open) - logger 'LID opened' - getXserver; - checkPPLIB; - if [ ${has_pplib} -eq 1 ]; then - su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"' - else - su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now" - fi - ;; - *) - logger "ACPI action undefined: $3" - ;; - esac - ;; -esac
\ No newline at end of file + + +if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then + echo "Low power" + if [ ${has_pplib} -eq 1 ]; then + su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"' + else + su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now" + fi +else + echo "high power" + if [ ${has_pplib} -eq 1 ]; then + su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"' + else + su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now" + fi +fi
\ No newline at end of file diff --git a/ati_make.sh b/ati_make.sh deleted file mode 100644 index 45fa26a4710e..000000000000 --- a/ati_make.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/bash -### Vi0L0: it is ati's code from their make.sh file, modified a bit to fit our arch linux system, used inside PKGBUILD - -# Copyright 1999-2005 ATI Technologies Inc., Markham, Ontario, CANADA. -# All Rights Reserved. -# -# Your use and or redistribution of this software in source and \ or -# binary form, with or without modification, is subject to: (i) your -# ongoing acceptance of and compliance with the terms and conditions of -# the ATI Technologies Inc. software End User License Agreement; and (ii) -# your inclusion of this notice in any version of this software that you -# use or redistribute. A copy of the ATI Technologies Inc. software End -# User License Agreement is included with this software and is also -# available by contacting ATI Technologies Inc. at http://www.ati.com - - -function _ati_check() -{ -# ============================================================== -# resolve if we are running a SMP enabled kernel - -SMP=0 - -# 1 -# grep in OsVersion string for SMP specific keywords -OsVersion=`uname -v` - -if [ `echo $OsVersion | grep [sS][mM][pP] -c` -ne 0 ]; then - SMP=1 - echo "OsVersion says: SMP=$SMP" -fi - -# 2 -# grep in /proc/ksyms for SMP specific kernel symbols -# use triggerlevel of 10 occurences -# (UP kernels might have 0-1, SMP kernels might have 32-45 or much more) - -src_file=/proc/kallsyms - -if [ -e $src_file ]; then - if [ `fgrep smp $src_file -c` -gt 10 ]; then - SMP=1 - echo "file $src_file says: SMP=$SMP" - fi -fi - -# 3 -# linux/autoconf.h may contain this: #define CONFIG_SMP 1 - -# Before 2.6.33 autoconf.h is under linux/. -# For 2.6.33 and later autoconf.h is under generated/. -if [ -f /usr/lib/modules/${kernver}/build/include/generated/autoconf.h ]; then - autoconf_h=/usr/lib/modules/${kernver}/build/include/generated/autoconf.h -else - autoconf_h=/usr/lib/modules/${kernver}/build/include/linux/autoconf.h -fi -src_file=$autoconf_h - -if [ ! -e $src_file ]; then - echo "Warning:" - echo "kernel includes at /usr/lib/modules/${kernver}/build/include not found or incomplete" - echo "file: $src_file" - echo "" -else - if [ `cat $src_file | grep "#undef" | grep "CONFIG_SMP" -c` = 0 ]; then - SMP=`cat $src_file | grep CONFIG_SMP | cut -d' ' -f3` - echo "file $src_file says: SMP=$SMP" - fi -fi - -if [ "$SMP" = 0 ]; then - echo "assuming default: SMP=$SMP" -fi - -# act on final result -if [ ! "$SMP" = 0 ]; then - smp="-SMP" - def_smp=-D__SMP__ -fi -# ============================================================== -# resolve whether we need to set PAGE_ATTR_FIX -PAGE_ATTR_FIX=0 - -src_file=/proc/kallsyms - -if [ -e $src_file ]; then - if [ `fgrep " change_page_attr\$" $src_file -c` -gt 0 ]; then - PAGE_ATTR_FIX=1 - echo "file $src_file says: PAGE_ATTR_FIX=$PAGE_ATTR_FIX" - fi -fi -# ============================================================== -# resolve if we are running a MODVERSIONS enabled kernel - -MODVERSIONS=0 - -# autoconf.h may contain this: #define CONFIG_MODVERSIONS 1 -src_file=$autoconf_h -if [ ! -e $src_file ]; -then - echo "Warning:" - echo "kernel includes at /usr/lib/modules/${kernver}/build/include not found or incomplete" - echo "file: $src_file" - echo "" -else - if [ `cat $src_file | grep "#undef" | grep "CONFIG_MODVERSIONS" -c` = 0 ] - then - MODVERSIONS=`cat $src_file | grep CONFIG_MODVERSIONS | cut -d' ' -f3` - echo "file $src_file says: MODVERSIONS=$MODVERSIONS" - fi -fi - -if [ "$MODVERSIONS" = 0 ] -then - echo "assuming default: MODVERSIONS=$MODVERSIONS" -fi - -# act on final result -if [ ! "$MODVERSIONS" = 0 ] -then - def_modversions="-DMODVERSIONS" -fi - -# ============================================================== -# resolve if we are building for a kernel with a fix for CVE-2010-3081 -# On kernels with the fix, use arch_compat_alloc_user_space instead -# of compat_alloc_user_space since the latter is GPL-only - -COMPAT_ALLOC_USER_SPACE=compat_alloc_user_space - -src_file=/usr/lib/modules/${kernver}/build/arch/x86/include/asm/compat.h -if [ ! -e $src_file ]; -then - echo "Warning:" - echo "kernel includes at /usr/lib/modules/${kernver}/build/include not found or incomplete" - echo "file: $src_file" - echo "" -else - if [ `cat $src_file | grep -c arch_compat_alloc_user_space` -gt 0 ] - then - COMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space - fi - echo "file $src_file says: COMPAT_ALLOC_USER_SPACE=$COMPAT_ALLOC_USER_SPACE" -fi -}
\ No newline at end of file diff --git a/catalyst-firepro.install b/catalyst-firepro.install index 01c90889b330..62094ecde3cc 100644 --- a/catalyst-firepro.install +++ b/catalyst-firepro.install @@ -5,8 +5,11 @@ signa(){ whisperer(){ echo "----------------------------------------------------------------" + echo "Note: hook was replaced by dkms" + echo "----------------------------------------------------------------" echo "Add nomodeset to your kernel line in /boot/grub/menu.lst , ie.:" echo "kernel /boot/vmlinuz-linux root=/dev/sda1 ro nomodeset" + echo "Note: don't do this if you have pxp/hybrid" echo "----------------------------------------------------------------" echo "You can use the tool 'aticonfig' to generate an xorg.conf file." echo "--------------------- ^^^^^^^^^ --------------------------------" @@ -18,15 +21,14 @@ whisperer(){ echo "----------------------------------------------------------------" echo "For more info and troubleshooting visit:" echo "http://wiki.archlinux.org/index.php/ATI_Catalyst" - echo -e '\E[37;44m'"\033[1m----------------------------------------------------------------\033[0m" - echo "To enable 'automatic re-compilation while system shutdown/reboot' " - echo "feature run these commands as root:" - echo "systemctl enable catalyst-hook" - echo "systemctl start catalyst-hook" - echo "" - echo "More info here:" - echo "https://bbs.archlinux.org/viewtopic.php?pid=1255575#p1255575" - echo -e '\E[37;44m'"\033[1m----------------------------------------------------------------\033[0m" + echo -e "\e[0;32m--------------------------- PXP --------------------------------\e[0m" + echo -e "\e[0;32m@pxp_user:\e[0m I switched GL/glx links to catalyst again..." + echo -e "\e[0;32m----------------------------------------------------------------\e[0m" + echo -e "\e[1;31m------------ DROPPED SUPPORT FOR RADEONS HD 5 6 k --------------\e[0m" + echo "Please note that this release SADLY :( is" + echo "dropping support for pre-GCN cards so mainly" + echo "Radeons of series 5000 and 6000" + echo -e "\e[1;31m----------------------------------------------------------------\e[0m" } bug_whisper(){ @@ -53,17 +55,19 @@ pre_upgrade(){ if [[ -e usr/lib/fglrx/switchlibglx ]] && [[ `usr/lib/fglrx/switchlibglx query | grep -c "intel"` == "1" ]]; then touch tmp/switch_glx_intel fi + # remove hook fglrx + sed '/^HOOKS/s/ *fglrx//' -i etc/mkinitcpio.conf + systemctl stop catalyst-hook.service + systemctl disable catalyst-hook.service + # remove existing fglrx modules + usr/bin/catalyst_build_module ra } post_install(){ - usr/bin/catalyst_build_module ra - usr/bin/catalyst_build_module all whisperer } post_upgrade(){ - usr/bin/catalyst_build_module ra - usr/bin/catalyst_build_module all whisperer ## switch to intel if it was intel before upgrade @@ -77,14 +81,7 @@ post_upgrade(){ fi } -pre_remove(){ - usr/bin/catalyst_build_module ra -} - post_remove(){ - # remove hook fglrx - sed '/^HOOKS/s/ *fglrx//' -i etc/mkinitcpio.conf - # remove log rm -f var/log/catalyst-install.log diff --git a/catalyst-hook.service b/catalyst-hook.service deleted file mode 100644 index 10292498a235..000000000000 --- a/catalyst-hook.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Catalyst's fglrx kernel' module builder -Before=umount.target - -[Service] -SysVStartPriority=90 -Type=oneshot -RemainAfterExit=yes -ExecStart=/bin/true -ExecStop=/usr/bin/catalyst_build_module check -KillMode=none - -[Install] -WantedBy=multi-user.target
\ No newline at end of file diff --git a/catalyst_build_module b/catalyst_build_module deleted file mode 100755 index 02d75f9e4c4a..000000000000 --- a/catalyst_build_module +++ /dev/null @@ -1,225 +0,0 @@ -#!/bin/bash - -kernver=${KERNVER:-$(uname -r)} -arch=${ARCH:-$(uname -m)} -arch=${arch/i686/i386} -LOG="/var/log/catalyst-install.log" - - -install_module(){ - echo "" - echo "--------" - date '+%Y-%m-%d %H:%M:%S' - echo "Building fglrx module for ${kernver} kernel ..." - echo "--------" - - - if [ ! -d "/usr/lib/modules/${kernver}/build" ]; then - echo "Kernel header files are absent: directory /usr/lib/modules/${kernver}/build doesn't exist! Game over" - return 1 - fi - workdir=$(mktemp -du /tmp/catalyst.XXXXXX) -# set -x - cp "/usr/share/ati/build_mod" "${workdir}" -R - cd "$workdir" - - ## include ati_make.sh and use _ati_check function from it - . ati_make.sh - _ati_check - -#------------------------------------------------------------------------------------------ -# putting our info into module - modsymmd5=`md5sum /usr/lib/modules/${kernver}/build/Module.symvers | cut -d ' ' -f 1` - sed "/MODULE_DESCRIPTION/a\MODULE_DESCRIPTION(\"__msm:$modsymmd5\");" -i firegl_public.c -#------------------------------------------------------------------------------------------ - - ## Compile module using _ati_check variables - CFLAGS_MODULE="-DMODULE -DATI -DFGL -DPAGE_ATTR_FIX=$PAGE_ATTR_FIX -DCOMPAT_ALLOC_USER_SPACE=$COMPAT_ALLOC_USER_SPACE $def_smp $def_modversions" - make -C /usr/lib/modules/${kernver}/build SUBDIRS="`pwd`" ARCH=${arch} \ - MODFLAGS="$CFLAGS_MODULE" \ - CFLAGS_MODULE="$CFLAGS_MODULE" \ - PAGE_ATTR_FIX=$PAGE_ATTR_FIX COMPAT_ALLOC_USER_SPACE=$COMPAT_ALLOC_USER_SPACE modules || return 1 - - gzip -9 fglrx.ko - - ## here we are checking kernel's extramodules dir - for r in /usr/lib/modules/*; do - if [[ ${r:17:3} = "ext" ]]; then - if [[ `cat ${r}/version | grep -c ${kernver}` != 0 ]]; then - destidir=${r} - fi - fi - done - - install -m644 fglrx.ko.gz ${destidir} || return 1 - - depmod ${kernver} - rm -rf "${workdir}" -# set +x - echo "ok." -} - -build_all_modules(){ - for p in /usr/lib/modules/*; do - if [ ${p:17:3} != "ext" ] && [ -d $p/build ] && [ -d $p/kernel ]; then - /usr/bin/catalyst_build_module ${p##*/usr/lib/modules/} - fi - done -} - -remove_module(){ - for p in /usr/lib/modules/*; do - if [[ ${p:17:3} != "ext" ]]; then - if [ ! -d $p/kernel ]; then - if [[ -e $p/video/fglrx.ko.gz ]] || [[ -e $p/extramodules/fglrx.ko.gz ]] || [[ -e $p/video/fglrx.ko ]] || [[ -e $p/extramodules/fglrx.ko ]]; then - echo "- removing fglrx module from $p" - rm "$p/video/fglrx.ko.gz" &>/dev/null - rm "$p/video/fglrx.ko" &>/dev/null - rm "$p/extramodules/fglrx.ko.gz" &>/dev/null - rm "$p/extramodules/fglrx.ko" &>/dev/null - rmdir -p "$p/video/" --ignore-fail-on-non-empty &>/dev/null - fi - if [ -d $p ]; then - if [ -z "$(ls $p)" ]; then - echo "- removing empty directory: $p" - rm -rf $p - else echo "- $p looks like unused, maybe remove it manualy?" - fi - fi - fi - elif [[ ! -e $p/version ]]; then - if [[ -e $p/fglrx.ko.gz ]] || [[ -e $p/fglrx.ko ]]; then - echo "- removing fglrx module from $p" - rm "$p/fglrx.ko.gz" &>/dev/null - rm "$p/fglrx.ko" &>/dev/null - fi - if [ -z "$(ls $p)" ]; then #check if /usr/lib/modules/ext* is empty - echo "- removing empty directory: $p" - rm -rf $p - else echo "- $p looks like unused, maybe remove it manualy?" - fi - fi - done -} - -remove_all_modules(){ - for p in /usr/lib/modules/*; do - if [[ ${p:17:3} != "ext" ]]; then - if [[ -e $p/video/fglrx.ko.gz ]] || [[ -e $p/extramodules/fglrx.ko.gz ]] || [[ -e $p/video/fglrx.ko ]] || [[ -e $p/extramodules/fglrx.ko ]]; then - echo "- removing fglrx module from $p" - rm "$p/video/fglrx.ko.gz" &>/dev/null - rm "$p/video/fglrx.ko" &>/dev/null - rm "$p/extramodules/fglrx.ko.gz" &>/dev/null - rm "$p/extramodules/fglrx.ko" &>/dev/null - rmdir -p "$p/video/" --ignore-fail-on-non-empty &>/dev/null - depmod $(basename $p) - fi - if [ -d $p ]; then - if [ -z "$(ls $p)" ]; then #check if /usr/lib/modules/p is empty - echo "- removing empty directory: $p" - rm -rf $p - elif [ ! -d $p/kernel ]; then - echo "- $p looks like unused, maybe remove it manualy?" - fi - fi - elif [[ ! -e $p/version ]]; then - if [[ -e $p/fglrx.ko.gz ]] || [[ -e $p/fglrx.ko ]]; then - echo "- removing fglrx module from $p" - rm "$p/fglrx.ko.gz" &>/dev/null - rm "$p/fglrx.ko" &>/dev/null - fi - if [ -z "$(ls $p)" ]; then #check if /usr/lib/modules/ext* is empty - echo "- removing empty directory: $p" - rm -rf $p - else echo "- $p looks like unused, maybe remove it manualy?" - fi - fi - done -} - -remove_old_modules(){ - for p in /lib/modules/*; do - if [[ ${p:13:3} != "ext" ]]; then - if [[ -e $p/video/fglrx.ko ]] || [[ -e $p/extramodules/fglrx.ko ]]; then - echo "- removing old fglrx module from $p" - rm "$p/video/fglrx.ko" &>/dev/null - rm "$p/extramodules/fglrx.ko" &>/dev/null - rmdir -p "$p/video/" --ignore-fail-on-non-empty &>/dev/null - depmod $(basename $p) - fi - fi - done -} - -hook_add(){ - # add hook fglrx to mkiniticpio - hooks=$(grep ^HOOKS /etc/mkinitcpio.conf | grep fglrx) - if [ "$hooks" = "" ]; then - # add hook fglrx - sed 's/^HOOKS="\([^"]*\)"/HOOKS="\1 fglrx"/' -i /etc/mkinitcpio.conf - echo "fgkrx hook was added into /etc/mkinitcpio.conf" - fi -} - -hook_remove(){ - # remove hook fglrx - sed '/^HOOKS/s/ *fglrx//' -i /etc/mkinitcpio.conf - echo "fgkrx hook was removed from /etc/mkinitcpio.conf" -} - -check_modules(){ - for p in /usr/lib/modules/*; do - if [ ${p:17:3} != "ext" ] && [ -d $p/build ] && [ -d $p/kernel ]; then - if [[ -e $p/extramodules/fglrx.ko.gz ]]; then - compare=$(md5sum $p/build/Module.symvers | cut -d ' ' -f 1) - test=$(modinfo -F description $p/extramodules/fglrx.ko.gz | grep "__msm:") - if [ "$test" != "__msm:$compare" ]; then - /usr/bin/catalyst_build_module ${p##*/usr/lib/modules/} - fi - else /usr/bin/catalyst_build_module ${p##*/usr/lib/modules/} - fi - fi - done -} - -case "$1" in - help|--help) - echo "usage: $0 {version|all|remove|remove_all|ra|hookadd|hookrm}" - echo "- with no specified kernel version it will use the current kernel version to build module" - echo "- all will try to build fglrx modules for all working system's kernels" - echo "- remove is removing unused fglrx modules and all empty /usr/lib/modules/* directories" - echo "- remove_all is removing all fglrx modules and all empty /usr/lib/modules/* directories" - echo "- ra works same as remove_all" - echo "- hookadd will add fglrx hook into mkinitcpio" - echo "- hookrm will remove fglrx hook from mkinitcpio" - ;; - remove) - remove_module - ;; - remove_all) - remove_all_modules - ;; - ra) - remove_all_modules - ;; - remove_old) - remove_old_modules - ;; - hookadd) - hook_add - ;; - hookrm) - hook_remove - ;; - all) - build_all_modules - ;; - check) - check_modules - ;; - *) - test "$1" != "" && kernver="$1" - echo "+ building fglrx module for ${kernver} kernel ..." - install_module >> $LOG 2>&1 && echo " ok." || echo -e '\E[37;44m'"\033[1mFailed!!! Check out log: $LOG\033[0m" - ;; -esac
\ No newline at end of file diff --git a/cold-fglrx-3.14-current_euid.patch b/cold-fglrx-3.14-current_euid.patch deleted file mode 100644 index 77bfe2565492..000000000000 --- a/cold-fglrx-3.14-current_euid.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- 14.1/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-02-23 19:26:52.215995002 +0100 -+++ 14.1/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-02-23 19:27:59.320999596 +0100 -@@ -1761,7 +1761,11 @@ - #else - - #ifdef current_euid -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0) -+ return __kuid_val(current_euid()); -+#else - return current_euid(); -+#endif - #else - return current->euid; - #endif diff --git a/dkms.conf b/dkms.conf new file mode 100644 index 000000000000..66ae6a71115d --- /dev/null +++ b/dkms.conf @@ -0,0 +1,7 @@ +PACKAGE_NAME="fglrx" +PACKAGE_VERSION=@VERSION@ +AUTOINSTALL="yes" + +MAKE[0]="sh make.sh --nohints --uname_r=$kernelver --norootcheck" +BUILT_MODULE_NAME[0]="fglrx" +DEST_MODULE_LOCATION[0]="/kernel/drivers/video"
\ No newline at end of file diff --git a/hook-fglrx b/hook-fglrx deleted file mode 100644 index 0d6f9b2f4e93..000000000000 --- a/hook-fglrx +++ /dev/null @@ -1,14 +0,0 @@ -# vim: set ft=sh: - -build () -{ - /usr/bin/catalyst_build_module "$KERNELVERSION" - /usr/bin/catalyst_build_module remove -} - -help () -{ -cat<<HELPEOF - This hook rebuilds fglrx module. It does nothing to the initrd image. -HELPEOF -} diff --git a/lano1106_fglrx-13.8_proc.patch b/lano1106_fglrx-13.8_proc.patch deleted file mode 100644 index e2ec7c30d0d0..000000000000 --- a/lano1106_fglrx-13.8_proc.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- 13.8/common/lib/modules/fglrx/build_mod/firegl_public.c 2013-09-26 00:59:28.292596334 -0400 -+++ 13.8/common/lib/modules/fglrx/build_mod/firegl_public.c 2013-09-26 01:02:35.036252455 -0400 -@@ -821,7 +821,7 @@ static struct proc_dir_entry *firegl_pro - KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list); - if (!minor) - { -- root = KCL_create_proc_dir(NULL, "ati", S_IRUGO|S_IXUGO); -+ root = KCL_create_proc_dir(NULL, "ati", 0); - } - - if (!root) -@@ -835,7 +835,7 @@ static struct proc_dir_entry *firegl_pro - // Global major debice number entry and Global debug entry - while (globallist->rp || globallist->fops) - { -- ent = KCL_create_proc_entry(root, globallist->name, S_IFREG|S_IRUGO, globallist->fops, globallist->rp, globallist->wp, dev); -+ ent = KCL_create_proc_entry(root, globallist->name, 0, globallist->fops, globallist->rp, globallist->wp, dev); - if (!ent) - { - KCL_remove_proc_dir_entry(NULL, "ati"); -@@ -847,7 +847,7 @@ static struct proc_dir_entry *firegl_pro - } - - sprintf(name, "%d", minor); -- *dev_root = KCL_create_proc_dir(root, name, S_IRUGO|S_IXUGO); -+ *dev_root = KCL_create_proc_dir(root, name, 0); - if (!*dev_root) { - KCL_remove_proc_dir_entry(root, "major"); - KCL_remove_proc_dir_entry(NULL, "ati"); -@@ -857,7 +857,7 @@ static struct proc_dir_entry *firegl_pro - - while (list->rp || list->fops) - { -- ent = KCL_create_proc_entry(*dev_root, list->name, S_IFREG|S_IRUGO, list->fops, list->rp, list->wp, -+ ent = KCL_create_proc_entry(*dev_root, list->name, 0, list->fops, list->rp, list->wp, - ((dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev))); - if (!ent) - { -@@ -6358,9 +6358,9 @@ void * KCL_create_proc_dir(void *root_di - dir = create_proc_entry(name, S_IFDIR | access, (struct proc_dir_entry *)root_dir); - #else - if (root_dir == NULL) -- dir = proc_mkdir_mode(name, S_IFDIR | access, NULL); -+ dir = proc_mkdir_mode(name, access, NULL); - else -- dir = proc_mkdir_mode(name, S_IFDIR | access, (struct proc_dir_entry *)root_dir); -+ dir = proc_mkdir_mode(name, access, (struct proc_dir_entry *)root_dir); - #endif - - return dir; diff --git a/makesh-dont-check-gcc-version.patch b/makesh-dont-check-gcc-version.patch new file mode 100644 index 000000000000..314c85c8b30e --- /dev/null +++ b/makesh-dont-check-gcc-version.patch @@ -0,0 +1,11 @@ +--- 16.5/common/lib/modules/fglrx/build_mod/make.sh 2015-12-18 19:47:41.000000000 +0100 ++++ 16.5b/common/lib/modules/fglrx/build_mod/make.sh 2016-05-11 22:04:56.681353509 +0200 +@@ -57,7 +57,7 @@ + + if [ -z "${CC}" ]; then + CC=gcc +- set_GCC_version ++# set_GCC_version + fi + + # ============================================================== |