Date: Thursday, July 13, 2017 @ 12:57:47 Author: heftig Revision: 300248
304.135-8: kernel 4.12.1 Added: nvidia-304xx/trunk/kernel_4.12.patch Modified: nvidia-304xx/trunk/PKGBUILD nvidia-304xx/trunk/nvidia-304xx.install ----------------------+ PKGBUILD | 21 ++++++++++-------- kernel_4.12.patch | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ nvidia-304xx.install | 2 - 3 files changed, 69 insertions(+), 10 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-07-13 12:57:30 UTC (rev 300247) +++ PKGBUILD 2017-07-13 12:57:47 UTC (rev 300248) @@ -5,11 +5,11 @@ pkgbase=nvidia-304xx pkgname=(nvidia-304xx nvidia-304xx-dkms) pkgver=304.135 -_extramodules=extramodules-4.11-ARCH -pkgrel=7 +_extramodules=extramodules-4.12-ARCH +pkgrel=8 arch=('i686' 'x86_64') url="http://www.nvidia.com/" -makedepends=('linux' 'linux-headers>=4.11' 'linux-headers<4.12') +makedepends=('linux' 'linux-headers>=4.12' 'linux-headers<4.13') conflicts=('nvidia') license=('custom') options=('!strip') @@ -16,13 +16,15 @@ source=('disable-mtrr.patch' 'drm-driver-legacy.patch' 'kernel_4.10.patch' - 'kernel_4.11.patch') + 'kernel_4.11.patch' + 'kernel_4.12.patch') source_i686+=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run") source_x86_64+=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run") sha512sums=('54e8825e523f11706890e09e476498f3a30f75ce4e350ff2ff8a1e1c3af574d9ccfb8903543766b6863d94cdfbf46e68cd3d33380867dd976cafc8dd2dd78774' 'fa39dee5c9f1ea98286c87165f683ee194b2cb4056aa6b556e822b9ee760dcf3683ea001c3704e79b9ac9712314d7df5690dc7f68440cda7a96791f94425455d' '68dabbf6ad889c46bd0c01ebb697b80f4aa526ef1cdc53de008343a243adefc6ce7f2778be7005f2d79f3d23c0a3ff69f67ecdb9f97c0feb0ec99405a0c1046a' - 'da3d1698af8b97e8fc3b6d3c690925e0258f8b6ad26a24f8d32c04a5a82701655208021f9f5af0ce44cb397a7422e2776a05193204bc7e4ac2b98f6e173984ea') + 'da3d1698af8b97e8fc3b6d3c690925e0258f8b6ad26a24f8d32c04a5a82701655208021f9f5af0ce44cb397a7422e2776a05193204bc7e4ac2b98f6e173984ea' + '49aa15fb7321bb9e0ab2a5361b9830ad95c2a8e22cf7b9aaf9777745fad88b419e791edb8e833849e7846373a1b76ececfcdac8803faed21729c89a3ff0a2d74') sha512sums_i686=('c2645cc9a6f23641d8b6da51e72e203980068c05e365fcc73b32322a6875ce95e81f4e0d893276e14e84e93464488539c16db6b3be04f5324cf7d7a12bb557f8') sha512sums_x86_64=('a5aa48baa75eb267bd193e59328aa5fbc15d41045bb7e97aa1b96b918b9e68a1c1bf95624d9d494336256e0af2c41e188d30fe91be4967084de3387f50d3805c') @@ -36,6 +38,7 @@ # patches here patch -Np1 --no-backup-if-mismatch -i ../kernel_4.10.patch patch -Np1 --no-backup-if-mismatch -i ../kernel_4.11.patch + patch -Np1 --no-backup-if-mismatch -i ../kernel_4.12.patch # FS#47092 #(cd kernel; patch -p1 --no-backup-if-mismatch -i "$srcdir"/disable-mtrr.patch) @@ -52,8 +55,8 @@ package_nvidia-304xx() { pkgdesc="NVIDIA drivers for linux, 304xx legacy branch" - depends=('linux>=4.11' 'linux<4.12' 'libgl' "nvidia-304xx-utils=${pkgver}") - conflicts+=('nvidia-304xx-dkms') + depends=('linux>=4.12' 'linux<4.13' 'libgl' "nvidia-304xx-utils=${pkgver}") + conflicts+=('nvidia-304xx-dkms') install=nvidia-304xx.install install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \ @@ -71,10 +74,10 @@ depends=('dkms' "nvidia-304xx-utils=$pkgver") optdepends=('linux-headers: Build the module for Arch kernel' 'linux-lts-headers: Build the module for LTS Arch kernel') - conflicts+=('nvidia-304xx') + conflicts+=('nvidia-304xx') cd ${_pkg} - make -C kernel clean + make -C kernel clean install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src} cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}"/usr/src/nvidia-${pkgver} echo 'blacklist nouveau' > "${pkgdir}"/usr/lib/modprobe.d/nvidia.conf Added: kernel_4.12.patch =================================================================== --- kernel_4.12.patch (rev 0) +++ kernel_4.12.patch 2017-07-13 12:57:47 UTC (rev 300248) @@ -0,0 +1,56 @@ +diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/conftest.sh NVIDIA-Linux-x86_64-340.102-new/kernel/conftest.sh +--- NVIDIA-Linux-x86_64-340.102-old/kernel/conftest.sh 2017-01-16 21:15:32.000000000 +0100 ++++ NVIDIA-Linux-x86_64-340.102-new/kernel/conftest.sh 2017-07-05 20:58:45.283333334 +0200 +@@ -362,7 +362,11 @@ + # Determine if the set_memory_uc() function is present. + # + CODE=" +- #include <asm/cacheflush.h> ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include <asm/set_memory.h> ++ #else ++ #include <asm/cacheflush.h> ++ #endif + void conftest_set_memory_uc(void) { + set_memory_uc(); + }" +@@ -375,7 +379,11 @@ + # Determine if the set_memory_array_uc() function is present. + # + CODE=" +- #include <asm/cacheflush.h> ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include <asm/set_memory.h> ++ #else ++ #include <asm/cacheflush.h> ++ #endif + void conftest_set_memory_array_uc(void) { + set_memory_array_uc(); + }" +@@ -388,7 +396,11 @@ + # Determine if the set_pages_uc() function is present. + # + CODE=" +- #include <asm/cacheflush.h> ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include <asm/set_memory.h> ++ #else ++ #include <asm/cacheflush.h> ++ #endif + void conftest_set_pages_uc(void) { + set_pages_uc(); + }" +diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/nv-vm.c NVIDIA-Linux-x86_64-340.102-new/kernel/nv-vm.c +--- NVIDIA-Linux-x86_64-340.102-old/kernel/nv-vm.c 2017-01-16 21:15:32.000000000 +0100 ++++ NVIDIA-Linux-x86_64-340.102-new/kernel/nv-vm.c 2017-07-05 20:58:45.286666667 +0200 +@@ -13,6 +13,10 @@ + #include "nv.h" + #include "nv-linux.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include <asm/set_memory.h> ++#endif ++ + static inline void nv_set_contig_memory_uc(nv_pte_t *page_ptr, NvU32 num_pages) + { + if (nv_update_memory_types) Modified: nvidia-304xx.install =================================================================== --- nvidia-304xx.install 2017-07-13 12:57:30 UTC (rev 300247) +++ nvidia-304xx.install 2017-07-13 12:57:47 UTC (rev 300248) @@ -1,5 +1,5 @@ post_install() { - EXTRAMODULES='extramodules-4.11-ARCH' + EXTRAMODULES='extramodules-4.12-ARCH' depmod $(cat /usr/lib/modules/$EXTRAMODULES/version) echo 'In order to use nvidia module, reboot the system.' }