mirror of
https://github.com/archlinux-jerry/nvidia-340xx
synced 2024-12-22 22:19:24 +08:00
Update to 340.108-10
This commit is contained in:
parent
e0d93e1350
commit
8dcfa0f3fd
3 changed files with 7 additions and 87 deletions
8
.SRCINFO
8
.SRCINFO
|
@ -1,7 +1,7 @@
|
|||
pkgbase = nvidia-340xx
|
||||
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
|
||||
pkgver = 340.108
|
||||
pkgrel = 9
|
||||
pkgrel = 10
|
||||
url = https://www.nvidia.com/
|
||||
arch = x86_64
|
||||
license = custom
|
||||
|
@ -11,11 +11,9 @@ pkgbase = nvidia-340xx
|
|||
conflicts = nvidia
|
||||
options = !strip
|
||||
source = https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108-no-compat32.run
|
||||
source = kernel-5.7.patch::https://gitlab.manjaro.org/packages/extra/linux57-extramodules/nvidia-340xx/-/raw/master/kernel-5.7.patch?inline=false
|
||||
source = buildfix_kernel_5.8.patch
|
||||
source = nvidia-340.108-fix-5.9-kernel-compile.patch::https://raw.githubusercontent.com/warpme/minimyth2/master/script/nvidia/nvidia-340.108/files/nvidia-340.108-fix-5.9-kernel-compile.patch
|
||||
b2sums = 6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028
|
||||
b2sums = e1e3d2dd5f4c79bb6c0235236ba5c092d3d2ff07175125947d01817f014652b5ebf93710270189cc06c03a96172627adeaf495607c360f2470f62bca2a6a55ba
|
||||
b2sums = bd75129644bd11caed8d9d1e2d5bbbced59bcdcb7784c3defe9a48b4c4de09adde59626456b0bc8c789d2e1e4844c21a7f2e5795d9eefbb548914af1ca8a60ae
|
||||
b2sums = daf886ec4622b0800fc82784f08f4fc0f6dfa1b70ef7c87a91bded2221b710da2baf4b3129542da6210fda5e5b862876ccd5e93d799f60fc6d75d83ef302210b
|
||||
|
||||
pkgname = nvidia-340xx
|
||||
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
|
||||
|
|
15
PKGBUILD
15
PKGBUILD
|
@ -6,7 +6,7 @@
|
|||
pkgbase=nvidia-340xx
|
||||
pkgname=(nvidia-340xx nvidia-340xx-dkms)
|
||||
pkgver=340.108
|
||||
pkgrel=9
|
||||
pkgrel=10
|
||||
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
|
||||
arch=('x86_64')
|
||||
url="https://www.nvidia.com/"
|
||||
|
@ -15,12 +15,10 @@ conflicts=('nvidia')
|
|||
license=('custom')
|
||||
options=(!strip)
|
||||
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
|
||||
kernel-5.7.patch::https://gitlab.manjaro.org/packages/extra/linux57-extramodules/nvidia-340xx/-/raw/master/kernel-5.7.patch?inline=false
|
||||
buildfix_kernel_5.8.patch
|
||||
nvidia-340.108-fix-5.9-kernel-compile.patch::https://raw.githubusercontent.com/warpme/minimyth2/master/script/nvidia/nvidia-340.108/files/nvidia-340.108-fix-5.9-kernel-compile.patch
|
||||
)
|
||||
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
|
||||
'e1e3d2dd5f4c79bb6c0235236ba5c092d3d2ff07175125947d01817f014652b5ebf93710270189cc06c03a96172627adeaf495607c360f2470f62bca2a6a55ba'
|
||||
'bd75129644bd11caed8d9d1e2d5bbbced59bcdcb7784c3defe9a48b4c4de09adde59626456b0bc8c789d2e1e4844c21a7f2e5795d9eefbb548914af1ca8a60ae')
|
||||
'daf886ec4622b0800fc82784f08f4fc0f6dfa1b70ef7c87a91bded2221b710da2baf4b3129542da6210fda5e5b862876ccd5e93d799f60fc6d75d83ef302210b')
|
||||
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
|
||||
|
||||
# default is 'linux' substitute custom name here
|
||||
|
@ -34,12 +32,7 @@ prepare() {
|
|||
|
||||
# seems manjaro is keeping this current
|
||||
# https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx
|
||||
(patch -p1 --no-backup-if-mismatch -i "$srcdir"/kernel-5.7.patch)
|
||||
|
||||
# https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy/+packages
|
||||
# the following was extracted from
|
||||
# https://launchpadlibrarian.net/492468557/nvidia-graphics-drivers-340_340.108-1lmtrfocal3_340.108-2lmtrfocal.diff.gz
|
||||
(cd kernel && patch -p1 --no-backup-if-mismatch -i "$srcdir"/buildfix_kernel_5.8.patch)
|
||||
(patch -p1 --no-backup-if-mismatch -i "$srcdir"/nvidia-340.108-fix-5.9-kernel-compile.patch)
|
||||
|
||||
cp -a kernel kernel-dkms
|
||||
}
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
diff -Naur a/nvidia-modules-common.mk b/nvidia-modules-common.mk
|
||||
--- a/nvidia-modules-common.mk
|
||||
+++ b/nvidia-modules-common.mk
|
||||
@@ -222,6 +222,7 @@
|
||||
define BUILD_MODULE_RULE
|
||||
$(1): build-sanity-checks $(3)
|
||||
@echo "NVIDIA: calling KBUILD..."; \
|
||||
+ touch .nv-kernel.o.cmd; \
|
||||
$$(MAKE) "CC=$$(CC)" NV_MODULE_SUFFIX=$$(strip $(2)) $$(KBUILD_PARAMS) modules; \
|
||||
echo "NVIDIA: left KBUILD."; \
|
||||
if ! [ -f $(1) ]; then \
|
||||
diff -Naru a/nv-linux.h b/nv-linux.h
|
||||
--- a/nv-linux.h 2020-08-08 03:48:46.894783237 +0300
|
||||
+++ b/nv-linux.h 2020-08-08 15:43:05.252047541 +0300
|
||||
@@ -669,11 +669,19 @@
|
||||
# define KM_FREE_RECORD(a,b,c)
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
|
||||
+#define NV_VMALLOC(ptr, size) \
|
||||
+ { \
|
||||
+ (ptr) = __vmalloc(size, GFP_KERNEL); \
|
||||
+ VM_ALLOC_RECORD(ptr, size, "vm_vmalloc"); \
|
||||
+ }
|
||||
+#else
|
||||
#define NV_VMALLOC(ptr, size) \
|
||||
{ \
|
||||
(ptr) = __vmalloc(size, GFP_KERNEL, PAGE_KERNEL); \
|
||||
VM_ALLOC_RECORD(ptr, size, "vm_vmalloc"); \
|
||||
}
|
||||
+#endif
|
||||
|
||||
#define NV_VFREE(ptr, size) \
|
||||
{ \
|
||||
diff -Naru a/os-mlock.c b/os-mlock.c
|
||||
--- a/os-mlock.c 2020-04-16 15:37:41.000000000 +0300
|
||||
+++ b/os-mlock.c 2020-08-08 15:47:44.793311179 +0300
|
||||
@@ -44,11 +44,19 @@
|
||||
return rmStatus;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
|
||||
+ down_read(&mm->mmap_lock);
|
||||
+ ret = NV_GET_USER_PAGES((unsigned long)address,
|
||||
+ page_count, write, force, user_pages, NULL);
|
||||
+ up_read(&mm->mmap_lock);
|
||||
+ pinned = ret;
|
||||
+#else
|
||||
down_read(&mm->mmap_sem);
|
||||
ret = NV_GET_USER_PAGES((unsigned long)address,
|
||||
page_count, write, force, user_pages, NULL);
|
||||
up_read(&mm->mmap_sem);
|
||||
pinned = ret;
|
||||
+#endif
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
diff -Naru a/uvm/nvidia_uvm_lite_api.c b/uvm/nvidia_uvm_lite_api.c
|
||||
--- a/uvm/nvidia_uvm_lite_api.c 2020-04-16 15:37:41.000000000 +0300
|
||||
+++ b/uvm/nvidia_uvm_lite_api.c 2020-08-08 15:28:40.110186418 +0300
|
||||
@@ -30,6 +30,10 @@
|
||||
#include "uvm_gpu_ops_tests.h"
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
|
||||
+#define mmap_sem mmap_lock
|
||||
+#endif
|
||||
+
|
||||
//
|
||||
// nvidia_uvm_lite_api.c
|
||||
//
|
Loading…
Reference in a new issue