summaryrefslogtreecommitdiff
path: root/system/nvidia-legacy96-kernel
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-05-11 22:55:25 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:55:25 +0200
commit16f4ae2412477a16ae85a2228e2b806c806b6ac9 (patch)
tree347c48bc9587c9db5024470d0fb0188c1345c136 /system/nvidia-legacy96-kernel
parent1db316e83478ed99d37216e6fcdd241117976bb8 (diff)
downloadslackbuilds-16f4ae2412477a16ae85a2228e2b806c806b6ac9.tar.gz
system/nvidia-legacy96-kernel: Added to 12.1 repository
Diffstat (limited to 'system/nvidia-legacy96-kernel')
-rw-r--r--system/nvidia-legacy96-kernel/README2
-rw-r--r--system/nvidia-legacy96-kernel/doinst.sh3
-rw-r--r--system/nvidia-legacy96-kernel/nvidia-96.43.07-2.6.27.patch87
-rw-r--r--system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.SlackBuild76
-rw-r--r--system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.info8
-rw-r--r--system/nvidia-legacy96-kernel/slack-desc18
6 files changed, 194 insertions, 0 deletions
diff --git a/system/nvidia-legacy96-kernel/README b/system/nvidia-legacy96-kernel/README
new file mode 100644
index 0000000000..e304cead98
--- /dev/null
+++ b/system/nvidia-legacy96-kernel/README
@@ -0,0 +1,2 @@
+This is the kernel-module needed by the proprietary binary nvidia driver.
+You also need the nvidia-legacy96-driver package from SlackBuilds.org.
diff --git a/system/nvidia-legacy96-kernel/doinst.sh b/system/nvidia-legacy96-kernel/doinst.sh
new file mode 100644
index 0000000000..79891f9acd
--- /dev/null
+++ b/system/nvidia-legacy96-kernel/doinst.sh
@@ -0,0 +1,3 @@
+
+chroot . /sbin/depmod -a
+
diff --git a/system/nvidia-legacy96-kernel/nvidia-96.43.07-2.6.27.patch b/system/nvidia-legacy96-kernel/nvidia-96.43.07-2.6.27.patch
new file mode 100644
index 0000000000..6f2b747829
--- /dev/null
+++ b/system/nvidia-legacy96-kernel/nvidia-96.43.07-2.6.27.patch
@@ -0,0 +1,87 @@
+diff -Nru NVIDIA-Linux-x86-173.14.12-pkg0.orig/usr/src/nv/nv.c NVIDIA-Linux-x86-173.14.12-pkg0/usr/src/nv/nv.c
+--- nv.c 2008-07-18 03:42:50.000000000 +0200
++++ nv.c 2008-08-12 00:35:45.000000000 +0200
+@@ -1296,14 +1296,22 @@
+ if (get_cpu() == cpu)
+ __nv_setup_pat_entries(NULL);
+ else
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
++ smp_call_function(__nv_setup_pat_entries, hcpu, 1);
++ #else
+ smp_call_function(__nv_setup_pat_entries, hcpu, 1, 1);
++ #endif
+ put_cpu();
+ break;
+ case CPU_DOWN_PREPARE:
+ if (get_cpu() == cpu)
+ __nv_restore_pat_entries(NULL);
+ else
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
++ smp_call_function(__nv_restore_pat_entries, hcpu, 1);
++ #else
+ smp_call_function(__nv_restore_pat_entries, hcpu, 1, 1);
++ #endif
+ put_cpu();
+ break;
+ }
+diff -Nru NVIDIA-Linux-x86-173.14.12-pkg0.orig/usr/src/nv/nv-linux.h NVIDIA-Linux-x86-173.14.12-pkg0/usr/src/nv/nv-linux.h
+--- nv-linux.h 2008-07-18 03:42:51.000000000 +0200
++++ nv-linux.h 2008-08-12 00:44:27.000000000 +0200
+@@ -104,7 +104,10 @@
+ #endif
+
+ #include <linux/spinlock.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
++#else
+ #include <asm/semaphore.h>
++#endif
+ #include <linux/completion.h>
+ #include <linux/highmem.h>
+
+@@ -665,13 +668,21 @@
+ #if defined(preempt_disable)
+ preempt_disable();
+ #endif
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
++ ret = smp_call_function(func, info, 1);
++ #else
+ ret = smp_call_function(func, info, 1, 1);
++ #endif
+ func(info);
+ #if defined(preempt_enable)
+ preempt_enable();
+ #endif
+ #else
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
++ ret = on_each_cpu(func, info, 1);
++ #else
+ ret = on_each_cpu(func, info, 1, 1);
++ #endif
+ #endif
+ return ret;
+ }
+diff -Nru NVIDIA-Linux-x86-173.14.12-pkg0.orig/usr/src/nv/os-interface.c NVIDIA-Linux-x86-173.14.12-pkg0/usr/src/nv/os-interface.c
+--- os-interface.c 2008-07-18 03:42:50.000000000 +0200
++++ os-interface.c 2008-08-12 00:48:07.000000000 +0200
+@@ -48,7 +48,11 @@
+ #endif
+ local_bh_disable();
+ atomic_set(&os_smp_barrier, 1);
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
++ ret = smp_call_function(ipi_handler, NULL, 0);
++ #else
+ ret = smp_call_function(ipi_handler, NULL, 1, 0);
++ #endif
+ #endif
+ return (ret == 0) ? RM_OK : RM_ERROR;
+ }
+@@ -704,7 +708,9 @@
+ U032 sig
+ )
+ {
++ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26)
+ return kill_proc(pid, sig, 1) ? RM_ERR_OPERATING_SYSTEM : RM_OK;
++ #endif
+ }
+
+ /************************************************************************** \ No newline at end of file
diff --git a/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.SlackBuild b/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.SlackBuild
new file mode 100644
index 0000000000..1f0edd5bdf
--- /dev/null
+++ b/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Slackware build script for nvidia-legacy96-kernel
+
+# Copyright 2007-2008 Heinz Wiesinger <pprkut@liwjatan.at>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Thanks to Robby Workman for suggestions to improve this script.
+
+KERNELVERSION=${KERNELVERSION:-$(uname -r)}
+KERNELPATH=${KERNELPATH:-/lib/modules/${KERNELVERSION}/build}
+
+VERSION=96.43.07
+NAME=NVIDIA-Linux-x86-$VERSION-pkg1
+PKG_NAME=nvidia-legacy96-kernel
+PKG_VERS=${VERSION}_$(echo $KERNELVERSION | tr - _)
+
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=${PKG:-$TMP/package-$PKG_NAME}
+OUTPUT=${OUTPUT:-/tmp}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP || exit 1
+rm -rf $NAME
+sh $CWD/$NAME.run --extract-only || exit 1
+cd $NAME || exit 1
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+cd usr/src/nv/ || exit 1
+
+if [ "${KERNELVERSION:0:6}" = "2.6.27" ]; then
+ patch -p0 -i $CWD/nvidia-$VERSION-2.6.27.patch
+fi
+
+make SYSSRC=$KERNELPATH module || exit 1
+
+# It seems better as DESTDIR doesn't work here, to install the module manually.
+#make SYSSRC=$KERNELPATH install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/lib/modules/$KERNELVERSION/kernel/drivers/video
+install -m 0664 nvidia.ko $PKG/lib/modules/$KERNELVERSION/kernel/drivers/video/
+
+mkdir -p $PKG/usr/doc/$PKG_NAME-$PKG_VERS
+cp -a README $PKG/usr/doc/$PKG_NAME-$PKG_VERS
+cat $CWD/$PKG_NAME.SlackBuild > $PKG/usr/doc/$PKG_NAME-$PKG_VERS/$PKG_NAME.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PKG_NAME-$PKG_VERS-$ARCH-$BUILD$TAG.tgz
diff --git a/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.info b/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.info
new file mode 100644
index 0000000000..75b34dbabb
--- /dev/null
+++ b/system/nvidia-legacy96-kernel/nvidia-legacy96-kernel.info
@@ -0,0 +1,8 @@
+PRGNAM="nvidia-legacy96-kernel"
+VERSION="96.43.07"
+HOMEPAGE="http://www.nvidia.com"
+DOWNLOAD="http://us.download.nvidia.com/XFree86/Linux-x86/96.43.07/NVIDIA-Linux-x86-96.43.07-pkg1.run"
+MD5SUM="bce9f250b21cc024d8fcebc28ba06970"
+MAINTAINER="ppr:kut"
+EMAIL="pprkut@liwjatan.at"
+APPROVED="dsomero" \ No newline at end of file
diff --git a/system/nvidia-legacy96-kernel/slack-desc b/system/nvidia-legacy96-kernel/slack-desc
new file mode 100644
index 0000000000..19582662cb
--- /dev/null
+++ b/system/nvidia-legacy96-kernel/slack-desc
@@ -0,0 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler---------------------------------------|
+nvidia-legacy96-kernel: nvidia-legacy96-kernel (nvidia-driver Kernel Interface)
+nvidia-legacy96-kernel:
+nvidia-legacy96-kernel: This is the kernel module needed by the binary
+nvidia-legacy96-kernel: nvidia-driver.
+nvidia-legacy96-kernel:
+nvidia-legacy96-kernel:
+nvidia-legacy96-kernel:
+nvidia-legacy96-kernel:
+nvidia-legacy96-kernel:
+nvidia-legacy96-kernel: