summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheftig <heftig@eb2447ed-0c53-47e4-bac8-5bc4a241df78>2019-11-24 11:30:20 +0000
committerheftig <heftig@eb2447ed-0c53-47e4-bac8-5bc4a241df78>2019-11-24 11:30:20 +0000
commitb84099582889aaa4a1d0754fe5e89ad5bd81f301 (patch)
treea14d573f639d946e58a966cb91c0b09c593ddbab
parent4b7267cd44bdaffc893e7685e926c0481043766c (diff)
archrelease: copy trunk to testing-x86_64
git-svn-id: file:///srv/repos/svn-packages/svn@369712 eb2447ed-0c53-47e4-bac8-5bc4a241df78
-rw-r--r--nvidia-390xx-lts/repos/testing-x86_64/PKGBUILD48
-rw-r--r--nvidia-390xx-lts/repos/testing-x86_64/kernel-4.16.patch33
2 files changed, 81 insertions, 0 deletions
diff --git a/nvidia-390xx-lts/repos/testing-x86_64/PKGBUILD b/nvidia-390xx-lts/repos/testing-x86_64/PKGBUILD
new file mode 100644
index 00000000000..71b41f38917
--- /dev/null
+++ b/nvidia-390xx-lts/repos/testing-x86_64/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Eric BĂ©langer <eric@archlinux.org>
+
+pkgname=nvidia-390xx-lts
+pkgver=390.132
+pkgrel=3
+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"
+}
diff --git a/nvidia-390xx-lts/repos/testing-x86_64/kernel-4.16.patch b/nvidia-390xx-lts/repos/testing-x86_64/kernel-4.16.patch
new file mode 100644
index 00000000000..67172815ff6
--- /dev/null
+++ b/nvidia-390xx-lts/repos/testing-x86_64/kernel-4.16.patch
@@ -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();
+ }"