summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Heinz Wiesinger <pprkut@liwjatan.at>2010-05-11 22:55:24 +0200
committer David Somero <xgizzmo@slackbuilds.org>2010-05-11 22:55:24 +0200
commit8599e1908bb42eba7eb03fbd7509553dcf500b1c (patch)
tree656ba94187c4f192f838679789e6ed623e3124cd
parente0fd79774967d3fce8c95cfd5ddb4fc32f956671 (diff)
downloadslackbuilds-8599e1908bb42eba7eb03fbd7509553dcf500b1c.tar.gz
slackbuilds-8599e1908bb42eba7eb03fbd7509553dcf500b1c.tar.xz
system/nvidia-legacy71-kernel: Added to 12.1 repository
-rw-r--r--system/nvidia-legacy71-kernel/README3
-rw-r--r--system/nvidia-legacy71-kernel/doinst.sh3
-rw-r--r--system/nvidia-legacy71-kernel/nvidia-71.86.06-2.6.27.patch352
-rw-r--r--system/nvidia-legacy71-kernel/nvidia-legacy71-kernel.SlackBuild76
-rw-r--r--system/nvidia-legacy71-kernel/nvidia-legacy71-kernel.info8
-rw-r--r--system/nvidia-legacy71-kernel/slack-desc18
6 files changed, 460 insertions, 0 deletions
diff --git a/system/nvidia-legacy71-kernel/README b/system/nvidia-legacy71-kernel/README
new file mode 100644
index 0000000000..d9f2d9c9f7
--- /dev/null
+++ b/system/nvidia-legacy71-kernel/README
@@ -0,0 +1,3 @@
+This is the kernel-module needed by the proprietary binary nvidia driver.
+
+You also need the nvidia-legacy71-driver package from SlackBuilds.org.
diff --git a/system/nvidia-legacy71-kernel/doinst.sh b/system/nvidia-legacy71-kernel/doinst.sh
new file mode 100644
index 0000000000..79891f9acd
--- /dev/null
+++ b/system/nvidia-legacy71-kernel/doinst.sh
@@ -0,0 +1,3 @@
+
+chroot . /sbin/depmod -a
+
diff --git a/system/nvidia-legacy71-kernel/nvidia-71.86.06-2.6.27.patch b/system/nvidia-legacy71-kernel/nvidia-71.86.06-2.6.27.patch
new file mode 100644
index 0000000000..2d346c1765
--- /dev/null
+++ b/system/nvidia-legacy71-kernel/nvidia-71.86.06-2.6.27.patch
@@ -0,0 +1,352 @@
+--- conftest.sh.orig 2008-08-28 00:12:01.000000000 -0300
++++ conftest.sh 2008-08-28 01:04:19.000000000 -0300
+@@ -40,6 +40,12 @@ if [ -n "$BUILD_PARAMS" ]; then
+ CFLAGS="$CFLAGS -D$BUILD_PARAMS"
+ fi
+
++CONFTEST_PREAMBLE="#include <linux/autoconf.h>
++ #if defined(CONFIG_XEN) && \
++ defined(CONFIG_XEN_INTERFACE_VERSION) && !defined(__XEN_INTERFACE_VERSION__)
++ #define __XEN_INTERFACE_VERSION__ CONFIG_XEN_INTERFACE_VERSION
++ #endif"
++
+ compile_test() {
+ case "$1" in
+ remap_page_range)
+@@ -672,6 +678,121 @@ compile_test() {
+ fi
+ ;;
+
++ smp_call_function)
++ #
++ # Determine if the smp_call_function() function is
++ # present and how many arguments it takes.
++ #
++ echo "$CONFTEST_PREAMBLE
++ #include <linux/smp.h>
++ void conftest_smp_call_function(void) {
++ #ifdef CONFIG_SMP
++ smp_call_function();
++ #endif
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo "#undef NV_SMP_CALL_FUNCTION_PRESENT" >> conftest.h
++ return
++ fi
++
++ echo "$CONFTEST_PREAMBLE
++ #include <linux/smp.h>
++ void conftest_smp_call_function(void) {
++ smp_call_function(NULL, NULL, 0, 0);
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo "#define NV_SMP_CALL_FUNCTION_PRESENT" >> conftest.h
++ echo "#define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 4 " >> conftest.h
++ return
++ fi
++
++ echo "$CONFTEST_PREAMBLE
++ #include <linux/smp.h>
++ void conftest_smp_call_function(void) {
++ smp_call_function(NULL, NULL, 0);
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo "#define NV_SMP_CALL_FUNCTION_PRESENT" >> conftest.h
++ echo "#define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 3 " >> conftest.h
++ return
++ else
++ echo "#error smp_call_function() conftest failed!" >> conftest.h
++ fi
++ ;;
++
++ on_each_cpu)
++ #
++ # Determine if the on_each_cpu() function is present
++ # and how many arguments it takes.
++ #
++ echo "$CONFTEST_PREAMBLE
++ #include <linux/smp.h>
++ void conftest_on_each_cpu(void) {
++ #ifdef CONFIG_SMP
++ on_each_cpu();
++ #endif
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo "#undef NV_ON_EACH_CPU" >> conftest.h
++ return
++ fi
++
++ echo "$CONFTEST_PREAMBLE
++ #include <linux/smp.h>
++ void conftest_on_each_cpu(void) {
++ on_each_cpu(NULL, NULL, 0, 0);
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo "#define NV_ON_EACH_CPU_PRESENT" >> conftest.h
++ echo "#define NV_ON_EACH_CPU_ARGUMENT_COUNT 4 " >> conftest.h
++ return
++ fi
++
++ echo "$CONFTEST_PREAMBLE
++ #include <linux/smp.h>
++ void conftest_on_each_cpu(void) {
++ on_each_cpu(NULL, NULL, 0);
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo "#define NV_ON_EACH_CPU_PRESENT" >> conftest.h
++ echo "#define NV_ON_EACH_CPU_ARGUMENT_COUNT 3 " >> conftest.h
++ return
++ else
++ echo "#error on_each_cpu() conftest failed!" >> conftest.h
++ fi
++ ;;
++
++
+ esac
+ }
+
+@@ -1203,11 +1324,21 @@ case "$5" in
+ # Run a series of compile tests to determine the set of interfaces
+ # and features available in the target kernel.
+ #
++ FILES="linux/semaphore.h"
+ shift 5
+
+ rm -f conftest.h
+ for i in $*; do compile_test $i; done
+
++ for FILE in $FILES; do
++ FILE_DEFINE=NV_`echo $FILE | tr '/.' '_' | tr 'a-z' 'A-Z'`_PRESENT
++ if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
++ echo "#define $FILE_DEFINE" >> conftest.h
++ else
++ echo "#undef $FILE_DEFINE" >> conftest.h
++ fi
++ done
++
+ if [ -n "$SHOW_COMPILE_TEST_RESULTS" -a -f conftest.h ]; then
+ cat conftest.h
+ fi
+--- Makefile.kbuild.orig 2008-08-28 00:26:41.000000000 -0300
++++ Makefile.kbuild 2008-08-28 00:30:01.000000000 -0300
+@@ -186,13 +186,16 @@ ifneq ($(PATCHLEVEL), 4)
+ BREAKPOINT \
+ acpi_device_ops \
+ acquire_console_sem \
+- kmem_cache_create
++ kmem_cache_create \
++ on_each_cpu \
++ smp_call_function
+ else
+ COMPILE_TESTS = \
+ remap_page_range \
+ vmap \
+ change_page_attr \
+- i2c_adapter
++ i2c_adapter \
++ smp_call_function
+ endif
+
+ #
+--- Makefile.nvidia.orig 2008-08-28 00:30:18.000000000 -0300
++++ Makefile.nvidia 2008-08-28 00:30:35.000000000 -0300
+@@ -62,7 +62,8 @@ COMPILE_TESTS = \
+ remap_page_range \
+ vmap \
+ change_page_attr \
+- i2c_adapter
++ i2c_adapter \
++ smp_call_function
+
+ DEFINES+=$(EXTRA_DEFINES)
+
+--- nv.c.orig 2008-08-28 00:08:18.000000000 -0300
++++ nv.c 2008-08-28 01:00:05.000000000 -0300
+@@ -832,8 +832,8 @@ static void __nv_setup_pat_entries(void
+ unsigned long eflags;
+
+ #if defined(CONFIG_HOTPLUG_CPU)
+- unsigned int cpu = (NvUPtr)info;
+- if ((cpu != 0) && (cpu != smp_processor_id()))
++ int cpu = (NvUPtr)info;
++ if ((cpu != 0) && (cpu != (int)smp_processor_id()))
+ return;
+ #endif
+
+@@ -858,8 +858,8 @@ static void __nv_restore_pat_entries(voi
+ unsigned long eflags;
+
+ #if defined(CONFIG_HOTPLUG_CPU)
+- unsigned int cpu = (NvUPtr)info;
+- if ((cpu != 0) && (cpu != smp_processor_id()))
++ int cpu = (NvUPtr)info;
++ if ((cpu != 0) && (cpu != (int)smp_processor_id()))
+ return;
+ #endif
+
+@@ -1179,27 +1179,27 @@ failed:
+ static int
+ nv_kern_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
+ {
+- unsigned int cpu = (NvUPtr)hcpu;
+-
++ unsigned int cpu = get_cpu();
++
+ switch (action)
+ {
+ case CPU_DOWN_FAILED:
+ case CPU_ONLINE:
+- if (get_cpu() == cpu)
++ if (cpu == (NvUPtr)hcpu)
+ __nv_setup_pat_entries(NULL);
+ else
+- smp_call_function(__nv_setup_pat_entries, hcpu, 1, 1);
+- put_cpu();
++ NV_SMP_CALL_FUNCTION(__nv_setup_pat_entries, hcpu, 1);
+ break;
+ case CPU_DOWN_PREPARE:
+- if (get_cpu() == cpu)
++ if (cpu == (NvUPtr)hcpu)
+ __nv_restore_pat_entries(NULL);
+ else
+- smp_call_function(__nv_restore_pat_entries, hcpu, 1, 1);
+- put_cpu();
++ NV_SMP_CALL_FUNCTION(__nv_restore_pat_entries, hcpu, 1);
+ break;
+ }
+
++ put_cpu();
++
+ return NOTIFY_OK;
+ }
+
+--- nv-linux.h.orig 2008-08-28 00:13:57.000000000 -0300
++++ nv-linux.h 2008-08-28 01:05:50.000000000 -0300
+@@ -103,7 +103,11 @@
+ #endif
+
+ #include <linux/spinlock.h>
++#if defined(NV_LINUX_SEMAPHORE_H_PRESENT)
++#include <linux/semaphore.h>
++#else
+ #include <asm/semaphore.h>
++#endif
+ #include <linux/completion.h>
+ #include <linux/highmem.h>
+
+@@ -609,6 +613,46 @@ static inline unsigned long nv_virt_to_p
+
+ #endif /* !defined NVWATCH */
+
++#if defined(NV_SMP_CALL_FUNCTION_PRESENT)
++#if (NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT == 4)
++#define NV_SMP_CALL_FUNCTION(func, info, wait) \
++ ({ \
++ int __ret = smp_call_function(func, info, 1, wait); \
++ __ret; \
++ })
++#elif (NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT == 3)
++#define NV_SMP_CALL_FUNCTION(func, info, wait) \
++ ({ \
++ int __ret = smp_call_function(func, info, wait); \
++ __ret; \
++ })
++#else
++#error "NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT value unrecognized!"
++#endif
++#elif defined(CONFIG_SMP)
++#error "NV_SMP_CALL_FUNCTION() undefined (smp_call_function() unavailable)!"
++#endif
++
++#if defined(NV_ON_EACH_CPU_PRESENT)
++#if (NV_ON_EACH_CPU_ARGUMENT_COUNT == 4)
++#define NV_ON_EACH_CPU(func, info, wait) \
++ ({ \
++ int __ret = on_each_cpu(func, info, 1, wait); \
++ __ret; \
++ })
++#elif (NV_ON_EACH_CPU_ARGUMENT_COUNT == 3)
++#define NV_ON_EACH_CPU(func, info, wait) \
++ ({ \
++ int __ret = on_each_cpu(func, info, wait); \
++ __ret; \
++ })
++#else
++#error "NV_ON_EACH_CPU_ARGUMENT_COUNT value unrecognized!"
++#endif
++#elif !defined(KERNEL_2_4) && defined(CONFIG_SMP)
++#error "NV_ON_EACH_CPU() undefined (on_each_cpu() unavailable)!"
++#endif
++
+ static inline int nv_execute_on_all_cpus(void (*func)(void *info), void *info)
+ {
+ int ret = 0;
+@@ -618,13 +662,13 @@ static inline int nv_execute_on_all_cpus
+ #if defined(preempt_disable)
+ preempt_disable();
+ #endif
+- ret = smp_call_function(func, info, 1, 1);
++ ret = NV_SMP_CALL_FUNCTION(func, info, 1);
+ func(info);
+ #if defined(preempt_enable)
+ preempt_enable();
+ #endif
+ #else
+- ret = on_each_cpu(func, info, 1, 1);
++ ret = NV_ON_EACH_CPU(func, info, 1);
+ #endif
+ return ret;
+ }
+--- os-interface.c.orig 2008-08-28 00:20:50.000000000 -0300
++++ os-interface.c 2008-08-28 01:21:49.000000000 -0300
+@@ -48,7 +48,7 @@ RM_STATUS NV_API_CALL os_raise_smp_barri
+ #endif
+ local_bh_disable();
+ atomic_set(&os_smp_barrier, 1);
+- ret = smp_call_function(ipi_handler, NULL, 1, 0);
++ ret = NV_SMP_CALL_FUNCTION(ipi_handler, NULL, 0);
+ #endif
+ return (ret == 0) ? RM_OK : RM_ERROR;
+ }
+
+--- os-interface.c.orig 2008-08-28 13:11:52.000000000 -0300
++++ os-interface.c 2008-08-28 13:12:33.000000000 -0300
+@@ -632,7 +632,7 @@ RM_STATUS NV_API_CALL os_kill_process(
+ U032 sig
+ )
+ {
+- return kill_proc(pid, sig, 1) ? RM_ERR_OPERATING_SYSTEM : RM_OK;
++ return /*kill_proc(pid, sig, 1) ?*/ RM_ERR_OPERATING_SYSTEM /*: RM_OK*/;
+ }
+
+ /*******************************************************************************/
diff --git a/system/nvidia-legacy71-kernel/nvidia-legacy71-kernel.SlackBuild b/system/nvidia-legacy71-kernel/nvidia-legacy71-kernel.SlackBuild
new file mode 100644
index 0000000000..4be13a259f
--- /dev/null
+++ b/system/nvidia-legacy71-kernel/nvidia-legacy71-kernel.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Slackware build script for nvidia-legacy71-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=71.86.06
+NAME=NVIDIA-Linux-x86-$VERSION-pkg1
+PKG_NAME=nvidia-legacy71-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-legacy71-kernel/nvidia-legacy71-kernel.info b/system/nvidia-legacy71-kernel/nvidia-legacy71-kernel.info
new file mode 100644
index 0000000000..2c56acd3f9
--- /dev/null
+++ b/system/nvidia-legacy71-kernel/nvidia-legacy71-kernel.info
@@ -0,0 +1,8 @@
+PRGNAM="nvidia-legacy71-kernel"
+VERSION="71.86.06"
+HOMEPAGE="http://www.nvidia.com"
+DOWNLOAD="http://us.download.nvidia.com/XFree86/Linux-x86/71.86.06/NVIDIA-Linux-x86-71.86.06-pkg1.run"
+MD5SUM="dc9635a78dfb02cb533e2061866b70ce"
+MAINTAINER="ppr:kut"
+EMAIL="pprkut@liwjatan.at"
+APPROVED="dsomero" \ No newline at end of file
diff --git a/system/nvidia-legacy71-kernel/slack-desc b/system/nvidia-legacy71-kernel/slack-desc
new file mode 100644
index 0000000000..86dbd78a6f
--- /dev/null
+++ b/system/nvidia-legacy71-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-legacy71-kernel: nvidia-legacy71-kernel (nvidia driver kernel part)
+nvidia-legacy71-kernel:
+nvidia-legacy71-kernel: This is the kernel module needed by the binary
+nvidia-legacy71-kernel: nvidia-driver.
+nvidia-legacy71-kernel:
+nvidia-legacy71-kernel:
+nvidia-legacy71-kernel:
+nvidia-legacy71-kernel:
+nvidia-legacy71-kernel:
+nvidia-legacy71-kernel: