[arch-commits] Commit in nvidia-340xx/repos (8 files)

Tobias Powalowski tpowa at archlinux.org
Thu Oct 12 13:16:49 UTC 2017


    Date: Thursday, October 12, 2017 @ 13:16:45
  Author: tpowa
Revision: 307540

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  nvidia-340xx/repos/testing-i686/
  nvidia-340xx/repos/testing-i686/PKGBUILD
    (from rev 307539, nvidia-340xx/trunk/PKGBUILD)
  nvidia-340xx/repos/testing-i686/kernel-4.11.patch
    (from rev 307539, nvidia-340xx/trunk/kernel-4.11.patch)
  nvidia-340xx/repos/testing-i686/nvidia-340xx.install
    (from rev 307539, nvidia-340xx/trunk/nvidia-340xx.install)
  nvidia-340xx/repos/testing-x86_64/
  nvidia-340xx/repos/testing-x86_64/PKGBUILD
    (from rev 307539, nvidia-340xx/trunk/PKGBUILD)
  nvidia-340xx/repos/testing-x86_64/kernel-4.11.patch
    (from rev 307539, nvidia-340xx/trunk/kernel-4.11.patch)
  nvidia-340xx/repos/testing-x86_64/nvidia-340xx.install
    (from rev 307539, nvidia-340xx/trunk/nvidia-340xx.install)

-------------------------------------+
 testing-i686/PKGBUILD               |   72 ++++++++++++++++++++++++++++++++++
 testing-i686/kernel-4.11.patch      |   38 +++++++++++++++++
 testing-i686/nvidia-340xx.install   |   13 ++++++
 testing-x86_64/PKGBUILD             |   72 ++++++++++++++++++++++++++++++++++
 testing-x86_64/kernel-4.11.patch    |   38 +++++++++++++++++
 testing-x86_64/nvidia-340xx.install |   13 ++++++
 6 files changed, 246 insertions(+)

Copied: nvidia-340xx/repos/testing-i686/PKGBUILD (from rev 307539, nvidia-340xx/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2017-10-12 13:16:45 UTC (rev 307540)
@@ -0,0 +1,72 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Baechler <thomas at archlinux.org>
+
+pkgbase=nvidia-340xx
+pkgname=(nvidia-340xx nvidia-340xx-dkms)
+pkgver=340.104
+_extramodules=extramodules-4.13-ARCH
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://www.nvidia.com/"
+makedepends=("nvidia-340xx-utils=${pkgver}" 'linux' 'linux-headers>=4.13' 'linux-headers<4.14')
+conflicts=('nvidia')
+license=('custom')
+options=(!strip)
+source=('kernel-4.11.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=('c25d90499e1deb26129a67dd7e953be8c1e31c5770e2b8b64d03af54cf1afec1a52636e74900f8ac468692207ab8a3765a12edd581142c4d2cfd2d6e66ac7ac2')
+sha512sums_i686=('8dacd5345a5794e862f4106ab9e8e402defa7883dd176c243d019209b560fe955d7576a13936364c01c5a249f15df58208308c9378c12c3438784376e5fb806c')
+sha512sums_x86_64=('e962494561728af5a911354bfb3560e414464f7858f30f9654eac5ca56175bc8498d1eee93a18248c63e9eee7d84807ef924fe9f53239644d7085b0f3502bf8c')
+
+[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
+[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
+
+prepare() {
+    sh "${_pkg}.run" --extract-only
+    cd "${_pkg}"
+    # patches here
+
+    patch -Np0 < "${srcdir}/kernel-4.11.patch"
+
+    cp -a kernel kernel-dkms
+}
+
+build() {
+    _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
+    cd "${_pkg}"/kernel
+    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
+
+    cd uvm
+    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
+}
+
+package_nvidia-340xx() {
+    pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
+    depends=('linux>=4.13' 'linux<4.14' 'libgl' "nvidia-340xx-utils=${pkgver}")
+    conflict+=('nvidia-340xx-dkms')
+    install=nvidia-340xx.install
+
+    install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
+        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
+    install -D -m644 "${srcdir}/${_pkg}/kernel/uvm/nvidia-uvm.ko" \
+        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
+    gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
+    install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
+    echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
+}
+
+package_nvidia-340xx-dkms() {
+    pkgdesc="NVIDIA driver sources for linux, 340xx legacy branch"
+    depends=('dkms' "nvidia-340xx-utils=$pkgver")
+    optdepends=('linux-headers: Build the module for Arch kernel'
+                'linux-lts-headers: Build the module for LTS Arch kernel')
+    conflicts+=('nvidia-340xx')
+
+    cd ${_pkg}
+    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
+    cat "${pkgdir}"/usr/src/nvidia-${pkgver}/uvm/dkms.conf.fragment >> "${pkgdir}"/usr/src/nvidia-${pkgver}/dkms.conf
+}

Copied: nvidia-340xx/repos/testing-i686/kernel-4.11.patch (from rev 307539, nvidia-340xx/trunk/kernel-4.11.patch)
===================================================================
--- testing-i686/kernel-4.11.patch	                        (rev 0)
+++ testing-i686/kernel-4.11.patch	2017-10-12 13:16:45 UTC (rev 307540)
@@ -0,0 +1,38 @@
+--- kernel/uvm/nvidia_uvm_lite.c	2017-09-27 13:50:46.334075042 +0200
++++ kernel/uvm/nvidia_uvm_lite.c	2017-09-27 13:56:06.358041280 +0200
+@@ -818,7 +818,11 @@
+ }
+ 
+ #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ int _fault(struct vm_area_struct *vma, struct vm_fault *vmf)
++#else 	
++int _fault(struct vm_fault *vmf) 	
++#endif
+ {
+ #if defined(NV_VM_FAULT_HAS_ADDRESS)
+     unsigned long vaddr = vmf->address;
+@@ -828,7 +832,11 @@
+     struct page *page = NULL;
+     int retval;
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+     retval = _fault_common(vma, vaddr, &page, vmf->flags);
++#else
++    retval = _fault_common(NULL, vaddr, &page, vmf->flags);
++#endif
+ 
+     vmf->page = page;
+ 
+@@ -866,7 +874,11 @@
+ // it's dealing with anonymous mapping (see handle_pte_fault).
+ //
+ #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ int _sigbus_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
++#else
++int _sigbus_fault(struct vm_fault *vmf)
++#endif
+ {
+     vmf->page = NULL;
+     return VM_FAULT_SIGBUS;

Copied: nvidia-340xx/repos/testing-i686/nvidia-340xx.install (from rev 307539, nvidia-340xx/trunk/nvidia-340xx.install)
===================================================================
--- testing-i686/nvidia-340xx.install	                        (rev 0)
+++ testing-i686/nvidia-340xx.install	2017-10-12 13:16:45 UTC (rev 307540)
@@ -0,0 +1,13 @@
+post_install() {
+    EXTRAMODULES='extramodules-4.13-ARCH'
+    depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+    echo 'In order to use nvidia module, reboot the system.'
+}
+
+post_upgrade() {
+    post_install
+}
+
+post_remove() {
+    post_install
+}

Copied: nvidia-340xx/repos/testing-x86_64/PKGBUILD (from rev 307539, nvidia-340xx/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2017-10-12 13:16:45 UTC (rev 307540)
@@ -0,0 +1,72 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Baechler <thomas at archlinux.org>
+
+pkgbase=nvidia-340xx
+pkgname=(nvidia-340xx nvidia-340xx-dkms)
+pkgver=340.104
+_extramodules=extramodules-4.13-ARCH
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://www.nvidia.com/"
+makedepends=("nvidia-340xx-utils=${pkgver}" 'linux' 'linux-headers>=4.13' 'linux-headers<4.14')
+conflicts=('nvidia')
+license=('custom')
+options=(!strip)
+source=('kernel-4.11.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=('c25d90499e1deb26129a67dd7e953be8c1e31c5770e2b8b64d03af54cf1afec1a52636e74900f8ac468692207ab8a3765a12edd581142c4d2cfd2d6e66ac7ac2')
+sha512sums_i686=('8dacd5345a5794e862f4106ab9e8e402defa7883dd176c243d019209b560fe955d7576a13936364c01c5a249f15df58208308c9378c12c3438784376e5fb806c')
+sha512sums_x86_64=('e962494561728af5a911354bfb3560e414464f7858f30f9654eac5ca56175bc8498d1eee93a18248c63e9eee7d84807ef924fe9f53239644d7085b0f3502bf8c')
+
+[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
+[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
+
+prepare() {
+    sh "${_pkg}.run" --extract-only
+    cd "${_pkg}"
+    # patches here
+
+    patch -Np0 < "${srcdir}/kernel-4.11.patch"
+
+    cp -a kernel kernel-dkms
+}
+
+build() {
+    _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
+    cd "${_pkg}"/kernel
+    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
+
+    cd uvm
+    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
+}
+
+package_nvidia-340xx() {
+    pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
+    depends=('linux>=4.13' 'linux<4.14' 'libgl' "nvidia-340xx-utils=${pkgver}")
+    conflict+=('nvidia-340xx-dkms')
+    install=nvidia-340xx.install
+
+    install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
+        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
+    install -D -m644 "${srcdir}/${_pkg}/kernel/uvm/nvidia-uvm.ko" \
+        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
+    gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
+    install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
+    echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
+}
+
+package_nvidia-340xx-dkms() {
+    pkgdesc="NVIDIA driver sources for linux, 340xx legacy branch"
+    depends=('dkms' "nvidia-340xx-utils=$pkgver")
+    optdepends=('linux-headers: Build the module for Arch kernel'
+                'linux-lts-headers: Build the module for LTS Arch kernel')
+    conflicts+=('nvidia-340xx')
+
+    cd ${_pkg}
+    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
+    cat "${pkgdir}"/usr/src/nvidia-${pkgver}/uvm/dkms.conf.fragment >> "${pkgdir}"/usr/src/nvidia-${pkgver}/dkms.conf
+}

Copied: nvidia-340xx/repos/testing-x86_64/kernel-4.11.patch (from rev 307539, nvidia-340xx/trunk/kernel-4.11.patch)
===================================================================
--- testing-x86_64/kernel-4.11.patch	                        (rev 0)
+++ testing-x86_64/kernel-4.11.patch	2017-10-12 13:16:45 UTC (rev 307540)
@@ -0,0 +1,38 @@
+--- kernel/uvm/nvidia_uvm_lite.c	2017-09-27 13:50:46.334075042 +0200
++++ kernel/uvm/nvidia_uvm_lite.c	2017-09-27 13:56:06.358041280 +0200
+@@ -818,7 +818,11 @@
+ }
+ 
+ #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ int _fault(struct vm_area_struct *vma, struct vm_fault *vmf)
++#else 	
++int _fault(struct vm_fault *vmf) 	
++#endif
+ {
+ #if defined(NV_VM_FAULT_HAS_ADDRESS)
+     unsigned long vaddr = vmf->address;
+@@ -828,7 +832,11 @@
+     struct page *page = NULL;
+     int retval;
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+     retval = _fault_common(vma, vaddr, &page, vmf->flags);
++#else
++    retval = _fault_common(NULL, vaddr, &page, vmf->flags);
++#endif
+ 
+     vmf->page = page;
+ 
+@@ -866,7 +874,11 @@
+ // it's dealing with anonymous mapping (see handle_pte_fault).
+ //
+ #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ int _sigbus_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
++#else
++int _sigbus_fault(struct vm_fault *vmf)
++#endif
+ {
+     vmf->page = NULL;
+     return VM_FAULT_SIGBUS;

Copied: nvidia-340xx/repos/testing-x86_64/nvidia-340xx.install (from rev 307539, nvidia-340xx/trunk/nvidia-340xx.install)
===================================================================
--- testing-x86_64/nvidia-340xx.install	                        (rev 0)
+++ testing-x86_64/nvidia-340xx.install	2017-10-12 13:16:45 UTC (rev 307540)
@@ -0,0 +1,13 @@
+post_install() {
+    EXTRAMODULES='extramodules-4.13-ARCH'
+    depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+    echo 'In order to use nvidia module, reboot the system.'
+}
+
+post_upgrade() {
+    post_install
+}
+
+post_remove() {
+    post_install
+}



More information about the arch-commits mailing list