[arch-commits] Commit in nvidia-390xx-lts/repos (3 files)

Jan Steffens heftig at archlinux.org
Tue Feb 11 17:27:41 UTC 2020


    Date: Tuesday, February 11, 2020 @ 17:27:41
  Author: heftig
Revision: 375398

archrelease: copy trunk to testing-x86_64

Added:
  nvidia-390xx-lts/repos/testing-x86_64/
  nvidia-390xx-lts/repos/testing-x86_64/PKGBUILD
    (from rev 375396, nvidia-390xx-lts/trunk/PKGBUILD)
  nvidia-390xx-lts/repos/testing-x86_64/kernel-4.16.patch
    (from rev 375396, nvidia-390xx-lts/trunk/kernel-4.16.patch)

-------------------+
 PKGBUILD          |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 kernel-4.16.patch |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)

Copied: nvidia-390xx-lts/repos/testing-x86_64/PKGBUILD (from rev 375396, nvidia-390xx-lts/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2020-02-11 17:27:41 UTC (rev 375398)
@@ -0,0 +1,48 @@
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=nvidia-390xx-lts
+pkgver=390.132
+pkgrel=21
+epoch=1
+pkgdesc="NVIDIA drivers for linux-lts, 390xx legacy branch"
+arch=('x86_64')
+url="https://www.nvidia.com/"
+makedepends=("nvidia-390xx-utils=${pkgver}" 'libglvnd' 'linux-lts-headers')
+provides=('nvidia-390xx')
+conflicts=('nvidia-lts')
+license=('custom')
+options=('!strip')
+_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
+source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run"
+        'kernel-4.16.patch')
+sha256sums=('b6b4b8af37e78e026c9ebdf4a5c64ea412dfcb710931dd028c22dac228de659d'
+            '622ac792ec200b2239cb663c0010392118b78c9904973d82cd261165c16d6385')
+
+prepare() {
+    sh "${_pkg}.run" --extract-only
+    cd "${_pkg}"
+
+    # Restore phys_to_dma support (still needed for 396.18)
+    # https://bugs.archlinux.org/task/58074
+    patch -Np1 -i ../kernel-4.16.patch
+}
+
+build() {
+    cd "${_pkg}"/kernel
+    make SYSSRC=/usr/src/linux-lts module
+}
+
+package() {
+    depends=('linux-lts' "nvidia-390xx-utils=${pkgver}" 'libglvnd')
+
+    _extradir="/usr/lib/modules/$(</usr/src/linux-lts/version)/extramodules"
+    install -Dt "${pkgdir}${_extradir}" -m644 \
+      "${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
+
+    find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
+
+    echo "blacklist nouveau" |
+        install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
+
+    install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE"
+}

Copied: nvidia-390xx-lts/repos/testing-x86_64/kernel-4.16.patch (from rev 375396, nvidia-390xx-lts/trunk/kernel-4.16.patch)
===================================================================
--- testing-x86_64/kernel-4.16.patch	                        (rev 0)
+++ testing-x86_64/kernel-4.16.patch	2020-02-11 17:27:41 UTC (rev 375398)
@@ -0,0 +1,33 @@
+diff --git a/kernel/common/inc/nv-linux.h b/kernel/common/inc/nv-linux.h
+index 10fc418..22ef968 100644
+--- a/kernel/common/inc/nv-linux.h
++++ b/kernel/common/inc/nv-linux.h
+@@ -175,7 +175,11 @@ static inline uid_t __kuid_val(kuid_t uid)
+ 
+ #if defined(NV_VM_INSERT_PAGE_PRESENT)
+ #include <linux/pagemap.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
+ #include <linux/dma-mapping.h>
++#else
++#include <linux/dma-direct.h>
++#endif
+ #endif
+ 
+ #if defined(CONFIG_SWIOTLB) && defined(NVCPU_AARCH64)
+diff --git a/kernel/conftest.sh b/kernel/conftest.sh
+index b23dbb4..42dc576 100755
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -1906,7 +1906,12 @@ compile_test() {
+             # Determine if the phys_to_dma function is present.
+             #
+             CODE="
++            #include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
+             #include <linux/dma-mapping.h>
++#else
++            #include <linux/dma-direct.h>
++#endif
+             void conftest_phys_to_dma(void) {
+                 phys_to_dma();
+             }"



More information about the arch-commits mailing list