summaryrefslogtreecommitdiffstats
path: root/system/nvidia-legacy340-kernel/nvidia-legacy340-kernel.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/nvidia-legacy340-kernel/nvidia-legacy340-kernel.SlackBuild')
-rw-r--r--system/nvidia-legacy340-kernel/nvidia-legacy340-kernel.SlackBuild13
1 files changed, 11 insertions, 2 deletions
diff --git a/system/nvidia-legacy340-kernel/nvidia-legacy340-kernel.SlackBuild b/system/nvidia-legacy340-kernel/nvidia-legacy340-kernel.SlackBuild
index c89c49cce1..1679d12988 100644
--- a/system/nvidia-legacy340-kernel/nvidia-legacy340-kernel.SlackBuild
+++ b/system/nvidia-legacy340-kernel/nvidia-legacy340-kernel.SlackBuild
@@ -28,7 +28,7 @@
# See changelog.txt
PRGNAM=nvidia-legacy340-kernel
-VERSION=${VERSION:-340.104}
+VERSION=${VERSION:-340.107}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -77,6 +77,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Patch to compile on kernels 4.4.168+
+patch -p1 < $CWD/kernel-4.4.168.patch
+
(cd kernel || exit 1
make SYSSRC=$KERNELPATH module || exit 1
cd uvm
@@ -85,7 +88,13 @@ find -L . \
mkdir -p $PKG/lib/modules/$KERNEL/kernel/drivers/video
install -m 0664 kernel/nvidia.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
-install -m 0664 kernel/uvm/nvidia-uvm.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
+
+# Unified Memory kernel module is incompatible with recent Linux kernels,
+# and the GPU hardware generations that the 340.xx legacy driver series is
+# intended to support do not support Unified Memory.
+if [ -e kernel/uvm/nvidia-uvm.ko ]; then
+ install -m 0664 kernel/uvm/nvidia-uvm.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
+fi
# Make sure the X is specified to automagically load the
# correct driver, since I always forget. You can remove