diff options
Diffstat (limited to 'x11-drivers/nvidia-drivers/files')
14 files changed, 386 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/files/09nvidia b/x11-drivers/nvidia-drivers/files/09nvidia new file mode 100644 index 0000000..1fcbef4 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/09nvidia @@ -0,0 +1,2 @@ +# Has to precede X11's own libraries! +LDPATH=/opt/nvidia/lib diff --git a/x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch new file mode 100644 index 0000000..da9933f --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch @@ -0,0 +1,11 @@ +diff -ur NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h +--- NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h 2002-12-09 21:26:55.000000000 +0100 ++++ NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h 2003-01-30 18:20:23.000000000 +0100 +@@ -39,6 +39,7 @@ + typedef XID GLXPixmap; + typedef XID GLXDrawable; + typedef XID GLXPbuffer; ++typedef XID GLXPbufferSGIX; + typedef XID GLXWindow; + typedef XID GLXFBConfigID; + diff --git a/x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch new file mode 100644 index 0000000..e0393e1 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch @@ -0,0 +1,13 @@ +--- usr/include/GL/gl.g.orig 2004-07-17 19:56:59.789410584 +1000 ++++ usr/include/GL/gl.h 2004-07-17 19:59:08.844791184 +1000 +@@ -66,6 +66,10 @@ + typedef double GLclampd; + typedef void GLvoid; + ++/* Patching for some better defines in the global system */ ++#ifndef GL_GLEXT_LEGACY ++#include <GL/glext.h> ++#endif + + /*************************************************************/ + diff --git a/x11-drivers/nvidia-drivers/files/NVIDIA_glx-makefile.patch b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-makefile.patch new file mode 100644 index 0000000..45e550b --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/NVIDIA_glx-makefile.patch @@ -0,0 +1,15 @@ +--- Makefile.old 2004-11-10 12:13:57.751853304 +1100 ++++ Makefile 2004-11-10 12:14:22.439100272 +1100 +@@ -1,11 +1,5 @@ + default: +- @ echo +- @ echo "It is NOT recommended that you use this Makefile to install" +- @ echo "the NVIDIA driver. Instead, please use the nvidia-installer" +- @ echo "utility. However, should nvidia-installer not operate for you," +- @ echo "you may use this Makefile as a last resort. To install using" +- @ echo "this Makefile, please run 'make install'." +- @ echo ++ @ echo "Gentoo Linux does not use nvidia-installer." + + kernel_module_install: + cd usr/src/nv; make install diff --git a/x11-drivers/nvidia-drivers/files/NVIDIA_i2c-hwmon.patch b/x11-drivers/nvidia-drivers/files/NVIDIA_i2c-hwmon.patch new file mode 100644 index 0000000..f9fdc27 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/NVIDIA_i2c-hwmon.patch @@ -0,0 +1,17 @@ +--- + usr/src/nv/nv-i2c.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- NVIDIA-Linux-x86-1.0-9746-pkg1.orig/usr/src/nv/nv-i2c.c 2006-12-15 19:32:58.000000000 +0100 ++++ NVIDIA-Linux-x86-1.0-9746-pkg1/usr/src/nv/nv-i2c.c 2007-01-06 16:50:48.000000000 +0100 +@@ -250,6 +250,10 @@ void* NV_API_CALL nv_i2c_add_adapter(nv_ + snprintf(pI2cAdapter->name, I2C_NAME_SIZE, + "NVIDIA i2c adapter %u at %x:%02x.%u", port, nv->bus, + nv->slot, PCI_FUNC(nvl->dev->devfn)); ++#ifdef I2C_CLASS_HWMON ++ if (port == 2) ++ pI2cAdapter->class = I2C_CLASS_HWMON; ++#endif + + // add our data to the structure + pI2cAdapter->algo_data = (void *)nv; diff --git a/x11-drivers/nvidia-drivers/files/drm_agp_memory-2.6.31.patch b/x11-drivers/nvidia-drivers/files/drm_agp_memory-2.6.31.patch new file mode 100644 index 0000000..0a3d7f6 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/drm_agp_memory-2.6.31.patch @@ -0,0 +1,33 @@ +diff -rupN nvidia-185.18.14.orig/nv-i2c.c nvidia-185.18.14.new/nv-i2c.c +--- nvidia-185.18.14.orig/nv-i2c.c 2009-06-30 15:11:50.000000000 +0100 ++++ nvidia-185.18.14.new/nv-i2c.c 2009-06-30 15:41:23.000000000 +0100 +@@ -218,8 +218,6 @@ struct i2c_adapter nv_i2c_adapter_protot + #if defined(NV_I2C_ADAPTER_HAS_DEC_USE) + .dec_use = nv_i2c_adapter_dec_use, + #endif +- .client_register = nv_i2c_adapter_register_client, +- .client_unregister = nv_i2c_adapter_unregister_client, + .data = NULL, + }; + +@@ -241,8 +239,6 @@ struct i2c_adapter nv_i2c_adapter_protot + .owner = THIS_MODULE, + .algo = &nv_i2c_algo, + .algo_data = NULL, +- .client_register = nv_i2c_adapter_register_client, +- .client_unregister = nv_i2c_adapter_unregister_client, + }; + + #endif // defined(KERNEL_2_4) +diff -rupN nvidia-185.18.14.orig/os-agp.c nvidia-185.18.14.new/os-agp.c +--- nvidia-185.18.14.orig/os-agp.c 2009-06-30 15:11:50.000000000 +0100 ++++ nvidia-185.18.14.new/os-agp.c 2009-06-30 15:12:58.000000000 +0100 +@@ -293,7 +293,7 @@ RM_STATUS KernLoadAGPPages( + { + nv_pte_t *page_ptr = at->page_table[i]; + +- page_ptr->phys_addr = (ptr->memory[i] & PAGE_MASK); ++ page_ptr->phys_addr = (page_to_phys(ptr->pages[i]) & PAGE_MASK); + page_ptr->virt_addr = (unsigned long) __va(page_ptr->phys_addr); + page_ptr->dma_addr = page_ptr->phys_addr; + } diff --git a/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit b/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit new file mode 100644 index 0000000..b61bcf4 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit @@ -0,0 +1,21 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# Install nvidia library: +# the first parameter is the place where to install it +# the second parameter is the base name of the library +# the third parameter is the provided soversion +donvidia() { + dodir $1 + exeinto $1 + + libname=$(basename $2) + + # libnvidia-cfg.so is no longer supplied in lib32; step over it gracefully + if [ -e $2.$3 ] ; then + doexe $2.$3 + dosym ${libname}.$3 $1/${libname} + [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 + fi +} diff --git a/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit b/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit new file mode 100644 index 0000000..a05c10d --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit @@ -0,0 +1,19 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [[ $? -ne 0 ]] ; then + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} diff --git a/x11-drivers/nvidia-drivers/files/eblits/paravirt_check.eblit b/x11-drivers/nvidia-drivers/files/eblits/paravirt_check.eblit new file mode 100644 index 0000000..dc48837 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/eblits/paravirt_check.eblit @@ -0,0 +1,20 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +paravirt_check() { + ebegin "Checking for Paravirtualized guest support" + linux_chkconfig_present PARAVIRT + + if [[ $? -eq 0 ]]; then + eerror "Please disable PARAVIRT in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] Paravirtualized guest support" + eerror + eerror "or XEN support" + eerror + eerror "and recompile your kernel .." + die "PARAVIRT support detected!" + fi +} diff --git a/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit b/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit new file mode 100644 index 0000000..48b189c --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit @@ -0,0 +1,116 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distribnuted under the terms of the GNU General Public License v2 +# $Header: $ + +src_install-libs() { + local pkglibdir=lib + local inslibdir=$(get_libdir) + + if [[ ${#} -eq 2 ]] ; then + pkglibdir=${1} + inslibdir=${2} + elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then + pkglibdir=lib32 + fi + + local usrpkglibdir=usr/${pkglibdir} + local libdir=usr/X11R6/${pkglibdir} + local drvdir=${libdir}/modules/drivers + local extdir=${libdir}/modules/extensions + local incdir=usr/include/GL + local sover=${PV} + local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" + local NO_TLS_ROOT="${NV_ROOT}/no-tls" + local TLS_ROOT="${NV_ROOT}/tls" + local X11_LIB_DIR="/usr/${inslibdir}/xorg" + + if use x86-fbsd; then + # on FreeBSD everything is on obj/ + pkglibdir=obj + usrpkglibdir=obj + x11pkglibdir=obj + drvdir=obj + extdir=obj + + # don't ask me why the headers are there.. glxext.h is missing + incdir=doc + + # on FreeBSD it has just .1 suffix + sover=1 + fi + + # The GLX libraries + donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover} + donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover} + + donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libnvidia-cfg.so ${sover} + + dodir ${NO_TLS_ROOT} + donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover} + + if ! use x86-fbsd; then + donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover} + fi + + if want_tls ; then + dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib + dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib + dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib + else + dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib + dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib + dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib + fi + + if ! use x86-fbsd; then + # Install the .la file for libtool, to prevent e.g. bug #176423 + [ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR" + local ver1=$(get_version_component_range 1) + local ver2=$(get_version_component_range 2) + local ver3=$(get_version_component_range 3) + sed -e "s:\${PV}:${PV}:" \ + -e "s:\${ver1}:${ver1}:" \ + -e "s:\${ver2}:${ver2}:" \ + -e "s:\${ver3}:${ver3}:" \ + -e "s:\${libdir}:${inslibdir}:" \ + "${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la + fi + + exeinto ${X11_LIB_DIR}/modules/drivers + + [[ -f ${drvdir}/nvidia_drv.so ]] && \ + doexe ${drvdir}/nvidia_drv.so + + insinto /usr/${inslibdir} + [[ -f ${libdir}/libXvMCNVIDIA.a ]] && \ + doins ${libdir}/libXvMCNVIDIA.a + exeinto /usr/${inslibdir} + # fix Bug 131315 + [[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \ + doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \ + dosym libXvMCNVIDIA.so.${PV} \ + /usr/${inslibdir}/libXvMCNVIDIA.so + + exeinto ${NV_ROOT}/extensions + [[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \ + newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so + [[ -f ${extdir}/libglx.so.${sover} ]] && \ + newexe ${extdir}/libglx.so.${sover} libglx.so + + # Includes + insinto ${NV_ROOT}/include + doins ${incdir}/*.h + + #cuda + if [[ -f usr/include/cuda/cuda.h ]]; then + dodir /usr/include/cuda + insinto /usr/include/cuda + doins usr/include/cuda/*.h + + if [[ -f usr/${pkglibdir}/libcuda.so.${PV} ]]; then + dolib.so usr/${pkglibdir}/libcuda.so.${PV} + dosym libcuda.so.${PV} /usr/${inslibdir}/libcuda.so.1 + dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so + fi + fi +} diff --git a/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit b/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit new file mode 100644 index 0000000..3847bc2 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit @@ -0,0 +1,33 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +want_tls() { + # For uclibc or anything non glibc, return false + has_version sys-libs/glibc || return 1 + + # Old versions of glibc were lt/no-tls only + has_version '<sys-libs/glibc-2.3.2' && return 1 + + if use x86 ; then + case ${CHOST/-*} in + i486|i586|i686) ;; + *) return 1 ;; + esac + fi + + # If we've got nptl, we've got tls + built_with_use --missing true sys-libs/glibc nptl && return 0 + + # 2.3.5 turned off tls for linuxthreads glibc on i486 and i586 + if use x86 && has_version '>=sys-libs/glibc-2.3.5' ; then + case ${CHOST/-*} in + i486|i586) return 1 ;; + esac + fi + + # These versions built linuxthreads version to support tls, too + has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0 + + return 1 +} diff --git a/x11-drivers/nvidia-drivers/files/libGL.la-r2 b/x11-drivers/nvidia-drivers/files/libGL.la-r2 new file mode 100644 index 0000000..863d184 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/libGL.la-r2 @@ -0,0 +1,32 @@ +# libGL.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18) +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libGL.so.1' + +# Names of this library. +library_names='libGL.so.${PV} libGL.so.1 libGL.so' + +# The name of the static archive. +old_library='' + +# Libraries that this one depends upon. +dependency_libs='-L/usr/${libdir} -lm -lX11 -lXext -ldl' + +# Version information for libGL. +current=${ver1} +age=${ver2} +revision=${ver3} + +# Is this an already installed library? +installed=yes + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/${libdir}' diff --git a/x11-drivers/nvidia-drivers/files/nvidia b/x11-drivers/nvidia-drivers/files/nvidia new file mode 100644 index 0000000..7cf0f7c --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia @@ -0,0 +1,40 @@ +# Nvidia drivers support +alias char-major-195 nvidia +alias /dev/nvidiactl char-major-195 + +# To tweak the driver the following options can be used, note that +# you should be careful, as it could cause instability!! For more +# options see /usr/share/doc/PACKAGE/README +# +# To enable Side Band Adressing: NVreg_EnableAGPSBA=1 +# +# To enable Fast Writes: NVreg_EnableAGPFW=1 +# +# To enable both for instance, uncomment following line: +# +#options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1 +# If you have a mobile chip, you may need to enable this option +# if you have hard lockups when starting X. +# +# See: Appendix I. Configuring your laptop +# In /usr/share/doc/PACKAGE/README for full details +# +# Choose the appropriate value for NVreg_Mobile from the table: +# Value Meaning +# ---------- -------------------------------------------------- +# 0xFFFFFFFF let the kernel module autodetect the correct value +# 1 Dell laptops +# 2 non-Compal Toshiba laptops +# 3 all other laptops +# 4 Compal Toshiba laptops +# 5 Gateway laptops +# +#options nvidia NVreg_SoftEDIDs=0 NVreg_Mobile=3 + + +# !!! SECURITY WARNING !!! +# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW +# WHAT YOU ARE DOING. +# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, +# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. +options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-169.07 b/x11-drivers/nvidia-drivers/files/nvidia-169.07 new file mode 100644 index 0000000..a96b0cd --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-169.07 @@ -0,0 +1,14 @@ +# Nvidia drivers support +alias char-major-195 nvidia +alias /dev/nvidiactl char-major-195 + +# To tweak the driver the following options can be used, note that +# you should be careful, as it could cause instability!! For more +# options see /usr/share/doc/PACKAGE/README +# +# !!! SECURITY WARNING !!! +# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW +# WHAT YOU ARE DOING. +# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, +# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. +options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 |