summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
author Lenard Spencer2024-03-10 14:54:58 +0100
committer Willy Sudiarto Raharjo2024-03-11 00:44:42 +0100
commit2411938db958e663da6852846541fbbe98b59bb8 (patch)
treefcebd4515b83b9e0439912c6a190db6556a7cb7f /system
parentd17c6f08bff588301c2ec24b110222f715caf4f8 (diff)
downloadslackbuilds-2411938db958e663da6852846541fbbe98b59bb8.tar.gz
system/nvidia-legacy390-kernel: Fix build on i586.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild13
-rw-r--r--system/nvidia-legacy390-kernel/patches/kernel-6.3.patch13
-rw-r--r--system/nvidia-legacy390-kernel/patches/kernel-6.3_64.patch13
3 files changed, 22 insertions, 17 deletions
diff --git a/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild b/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild
index aedaf0445f..ba575bb815 100644
--- a/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild
+++ b/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild
@@ -87,11 +87,16 @@ find -L . \
unset ARCH
cd kernel || exit 1
-# Patch for kernel 6.6.x
+# Patches for kernel 6.6.x
if [ "${KERNEL66:-no}" = "yes" ]; then
- for i in `ls $CWD/patches`; do
- patch -p1 < $CWD/patches/$i
- done
+ patch -p1 < $CWD/patches/kernel-6.2.patch
+ patch -p1 < $CWD/patches/kernel-6.3.patch
+ if [ "$ARCH" = "x86_64" ]; then
+ patch -p1 < $CWD/patches/kernel-6.3_64.patch
+ fi
+ patch -p1 < $CWD/patches/kernel-6.4.patch
+ patch -p1 < $CWD/patches/kernel-6.5.patch
+ patch -p1 < $CWD/patches/kernel-6.6.patch
fi
# CC=${CC:-gcc} suppresses an otherwise harmless "compiler mismatch"
diff --git a/system/nvidia-legacy390-kernel/patches/kernel-6.3.patch b/system/nvidia-legacy390-kernel/patches/kernel-6.3.patch
index f062e780d7..b6c7bb1580 100644
--- a/system/nvidia-legacy390-kernel/patches/kernel-6.3.patch
+++ b/system/nvidia-legacy390-kernel/patches/kernel-6.3.patch
@@ -32,19 +32,6 @@ index 725164a..c35e0ee 100644
#include <drm/drm_crtc_helper.h>
-diff --git a/nvidia-uvm/uvm8.c b/nvidia-uvm/uvm8.c
-index 11cb373..49e1047 100644
---- a/nvidia-uvm/uvm8.c
-+++ b/nvidia-uvm/uvm8.c
-@@ -658,7 +658,7 @@ static int uvm_mmap(struct file *filp, struct vm_area_struct *vma)
- // Using VM_DONTCOPY would be nice, but madvise(MADV_DOFORK) can reset that
- // so we have to handle vm_open on fork anyway. We could disable MADV_DOFORK
- // with VM_IO, but that causes other mapping issues.
-- vma->vm_flags |= VM_MIXEDMAP | VM_DONTEXPAND;
-+ vm_flags_set(vma, VM_MIXEDMAP | VM_DONTEXPAND);
-
- vma->vm_ops = &uvm_vm_ops_managed;
-
diff --git a/nvidia/nv-mmap.c b/nvidia/nv-mmap.c
index 0b0a6f2..da891ff 100644
--- a/nvidia/nv-mmap.c
diff --git a/system/nvidia-legacy390-kernel/patches/kernel-6.3_64.patch b/system/nvidia-legacy390-kernel/patches/kernel-6.3_64.patch
new file mode 100644
index 0000000000..1b2bfe6c89
--- /dev/null
+++ b/system/nvidia-legacy390-kernel/patches/kernel-6.3_64.patch
@@ -0,0 +1,13 @@
+diff --git a/nvidia-uvm/uvm8.c b/nvidia-uvm/uvm8.c
+index 11cb373..49e1047 100644
+--- a/nvidia-uvm/uvm8.c
++++ b/nvidia-uvm/uvm8.c
+@@ -658,7 +658,7 @@ static int uvm_mmap(struct file *filp, struct vm_area_struct *vma)
+ // Using VM_DONTCOPY would be nice, but madvise(MADV_DOFORK) can reset that
+ // so we have to handle vm_open on fork anyway. We could disable MADV_DOFORK
+ // with VM_IO, but that causes other mapping issues.
+- vma->vm_flags |= VM_MIXEDMAP | VM_DONTEXPAND;
++ vm_flags_set(vma, VM_MIXEDMAP | VM_DONTEXPAND);
+
+ vma->vm_ops = &uvm_vm_ops_managed;
+