diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-09-20 20:28:49 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-09-20 20:28:49 +0000 |
commit | 899784949c4c6750ec9f743d7ff103d75a74d1e4 (patch) | |
tree | e6d68f78d5f7653f3ac612b58eba1d164262ff41 /media-video | |
parent | Fix compile with -Os (bug #64581) (diff) | |
download | historical-899784949c4c6750ec9f743d7ff103d75a74d1e4.tar.gz historical-899784949c4c6750ec9f743d7ff103d75a74d1e4.tar.bz2 historical-899784949c4c6750ec9f743d7ff103d75a74d1e4.zip |
Latest -mm kernels removed pci_find_class; replace this with pci_get_class.
It should work fine on earlier kernels, but I have not tested this ...
Diffstat (limited to 'media-video')
5 files changed, 204 insertions, 24 deletions
diff --git a/media-video/nvidia-kernel/ChangeLog b/media-video/nvidia-kernel/ChangeLog index 5a66ea643c3b..926e8b3a481e 100644 --- a/media-video/nvidia-kernel/ChangeLog +++ b/media-video/nvidia-kernel/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-video/nvidia-kernel # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.88 2004/09/06 01:56:51 lv Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.89 2004/09/20 20:28:49 azarah Exp $ + +*nvidia-kernel-1.0.6111-r1 (20 Sep 2004) + + 20 Sep 2004; Martin Schlemmer <azarah@gentoo.org> + +files/1.0.6111/nv-pci_find_class.patch, +nvidia-kernel-1.0.6111-r1.ebuild: + Latest -mm kernels removed pci_find_class; replace this with pci_get_class. It + should work fine on earlier kernels, but I have not tested this ... 05 Sep 2004; Travis Tilley <lv@gentoo.org> nvidia-kernel-1.0.6111.ebuild: stable on amd64 diff --git a/media-video/nvidia-kernel/Manifest b/media-video/nvidia-kernel/Manifest index ee23632a617f..453c34184e67 100644 --- a/media-video/nvidia-kernel/Manifest +++ b/media-video/nvidia-kernel/Manifest @@ -1,37 +1,40 @@ -MD5 8ce6e8510b5396c685ad67f806351d36 nvidia-kernel-1.0.6106-r1.ebuild 3622 -MD5 b4a7988f8e10107742f255ea291478c0 nvidia-kernel-1.0.4499.ebuild 4028 -MD5 c65724336acbdb77c80842d7a9174301 nvidia-kernel-1.0.5332-r1.ebuild 4256 -MD5 1e48aaa4989010b59109e1c81cd9741f nvidia-kernel-1.0.6111.ebuild 3723 MD5 f189c720f21a41c73a6c292ffec6cdfd nvidia-kernel-1.0.5328-r1.ebuild 4461 -MD5 20f6ae4f9076cd8f5dd1d2383d0eaca7 nvidia-kernel-1.0.4496-r3.ebuild 4286 +MD5 5701e5bbdb44cee31bd12de53be39c54 nvidia-kernel-1.0.6111-r1.ebuild 3821 +MD5 a78a30d9cd60c5b6d6e9c1956fdcc976 ChangeLog 21654 +MD5 c65724336acbdb77c80842d7a9174301 nvidia-kernel-1.0.5332-r1.ebuild 4256 +MD5 cc0512640bc35c3419b55a455c480d9f nvidia-kernel-1.0.5336-r4.ebuild 4782 MD5 d5bc3ba053815cd1b559cba6bbd36452 nvidia-kernel-1.0.4363-r3.ebuild 4071 -MD5 249cf3918ee276669944ce34c492d613 ChangeLog 21326 +MD5 20f6ae4f9076cd8f5dd1d2383d0eaca7 nvidia-kernel-1.0.4496-r3.ebuild 4286 +MD5 b4a7988f8e10107742f255ea291478c0 nvidia-kernel-1.0.4499.ebuild 4028 MD5 c84a79e7d9b69a204003fb8c2dbaad01 metadata.xml 297 -MD5 cc0512640bc35c3419b55a455c480d9f nvidia-kernel-1.0.5336-r4.ebuild 4782 -MD5 497ffcbd6a91ed9447dfdf7b736925bd files/digest-nvidia-kernel-1.0.5328-r1 80 +MD5 1e48aaa4989010b59109e1c81cd9741f nvidia-kernel-1.0.6111.ebuild 3723 +MD5 8ce6e8510b5396c685ad67f806351d36 nvidia-kernel-1.0.6106-r1.ebuild 3622 +MD5 56ebaa3ba92e9db848baea746a6aef1a files/digest-nvidia-kernel-1.0.4363-r3 74 +MD5 ed1e098d85579c75542ef0a49ee4dd5c files/digest-nvidia-kernel-1.0.6111-r1 163 +MD5 b6a9c4bdd3961980af4a70f57485d708 files/nvidia-1.1 441 +MD5 046ed3744551619863faea8c5c83db02 files/digest-nvidia-kernel-1.0.4499 74 +MD5 a88479c177f936b6ef19fc73bb39d149 files/digest-nvidia-kernel-1.0.4496-r3 80 MD5 cf7b2bb276c568f0f66d10951b4ce3ad files/digest-nvidia-kernel-1.0.5332-r1 83 +MD5 497ffcbd6a91ed9447dfdf7b736925bd files/digest-nvidia-kernel-1.0.5328-r1 80 MD5 1316f73c0eecd8832bb362a3d5ca4892 files/digest-nvidia-kernel-1.0.5336-r4 80 MD5 50ffea0f5eb12d252905f379bc7be2d6 files/digest-nvidia-kernel-1.0.6106-r1 163 -MD5 046ed3744551619863faea8c5c83db02 files/digest-nvidia-kernel-1.0.4499 74 MD5 ed1e098d85579c75542ef0a49ee4dd5c files/digest-nvidia-kernel-1.0.6111 163 -MD5 56ebaa3ba92e9db848baea746a6aef1a files/digest-nvidia-kernel-1.0.4363-r3 74 -MD5 a88479c177f936b6ef19fc73bb39d149 files/digest-nvidia-kernel-1.0.4496-r3 80 -MD5 b6a9c4bdd3961980af4a70f57485d708 files/nvidia-1.1 441 -MD5 f7d7092e9eb9fbe926ff1b8aa9b3f50e files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030714.diff 79485 -MD5 183b64f528e98221291072f12db5859d files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-pci_name-20030905.diff 608 -MD5 c0f21cb76a7471671ec9665968dfaafb files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-20031026.diff 81900 -MD5 6d98825a3cf78f4a5ce42d4f4decab89 files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-20030905.diff 81553 +MD5 335be8e5143f2227bcf74718de074343 files/1.0.6111/power-suspend-2.6.9-changes.patch 606 +MD5 29eafcaf7ab5d59dd90d3d3243bf57c3 files/1.0.6111/nv_enable_pci.patch 3640 +MD5 682af795a321ec35f27c87d7b387df18 files/1.0.6111/nv-pci_find_class.patch 1112 +MD5 bc61be48f85d84f91d2035fa3cc92a47 files/1.0.6106/NVIDIA_kernel-1.0-6106-koutput-support.patch 6659 MD5 c2a29e883336157e1a3e99a0bceca549 files/1.0.4499/NVIDIA_kernel-1.0-4499-2.6-20031014.diff 69389 -MD5 e6571e952e13f13d9910b7ad29eaeb4a files/1.0.5328/NVIDIA_kernel-1.0-5328-2.4-via-chipset-fix.patch 970 +MD5 f7d7092e9eb9fbe926ff1b8aa9b3f50e files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030714.diff 79485 MD5 0d4e20c2320c685caad56e357cff0b0c files/1.0.5328/NVIDIA_kernel-1.0-5328-2.6-20040105.diff 95197 +MD5 e6571e952e13f13d9910b7ad29eaeb4a files/1.0.5328/NVIDIA_kernel-1.0-5328-2.4-via-chipset-fix.patch 970 MD5 f04497fe1a0f76fcc41a93b554072c4a files/1.0.5328/NVIDIA_kernel-1.0-5328-2.6-20031226.diff 77616 +MD5 6d98825a3cf78f4a5ce42d4f4decab89 files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-20030905.diff 81553 +MD5 c0f21cb76a7471671ec9665968dfaafb files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-20031026.diff 81900 +MD5 183b64f528e98221291072f12db5859d files/1.0.4496/NVIDIA_kernel-1.0-4496-2.6-pci_name-20030905.diff 608 MD5 4c7749ca72483547e15031a2af560415 files/1.0.5332/NVIDIA-Linux-x86_64-1.0-5332-2.6.diff 7216 -MD5 276907ebd8946791398f5f24c27e54c4 files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support-v2.patch 5666 -MD5 6b364c4b64c6de0aea70163850fa3914 files/1.0.5336/Makefile 4410 -MD5 d48d291f79542df558588d1d3575d51c files/1.0.5336/NVIDIA_kernel-1.0-5336-kbuild-koutput-support.patch 1681 MD5 442f1483c003d291a90dfcc87903b045 files/1.0.5336/NVIDIA_kernel-1.0-5336-2.6-20040521.patch 18711 +MD5 276907ebd8946791398f5f24c27e54c4 files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support-v2.patch 5666 MD5 5dc4b9a2463cb459721ae3e642f6239f files/1.0.5336/NVIDIA_kernel-1.0-5336-fix-makefile-for-2.6.patch 886 +MD5 d48d291f79542df558588d1d3575d51c files/1.0.5336/NVIDIA_kernel-1.0-5336-kbuild-koutput-support.patch 1681 MD5 7bf40e44b8f2181a1047ddfd13acd6b3 files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support.patch 5439 -MD5 bc61be48f85d84f91d2035fa3cc92a47 files/1.0.6106/NVIDIA_kernel-1.0-6106-koutput-support.patch 6659 -MD5 335be8e5143f2227bcf74718de074343 files/1.0.6111/power-suspend-2.6.9-changes.patch 606 -MD5 29eafcaf7ab5d59dd90d3d3243bf57c3 files/1.0.6111/nv_enable_pci.patch 3640 +MD5 6b364c4b64c6de0aea70163850fa3914 files/1.0.5336/Makefile 4410 diff --git a/media-video/nvidia-kernel/files/1.0.6111/nv-pci_find_class.patch b/media-video/nvidia-kernel/files/1.0.6111/nv-pci_find_class.patch new file mode 100644 index 000000000000..97c46827d1f4 --- /dev/null +++ b/media-video/nvidia-kernel/files/1.0.6111/nv-pci_find_class.patch @@ -0,0 +1,35 @@ +--- NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c 2004-09-20 23:29:14.953986656 +0200 ++++ NVIDIA-Linux-x86-1.0-6111-pkg1.az/usr/src/nv/nv.c 2004-09-20 23:29:36.414724128 +0200 +@@ -639,7 +639,7 @@ + u8 cap_ptr; + int func, slot; + +- dev = pci_find_class(class << 8, NULL); ++ dev = pci_get_class(class << 8, NULL); + do { + for (func = 0; func < 8; func++) { + slot = PCI_SLOT(dev->devfn); +@@ -650,7 +650,7 @@ + if (cap_ptr) + return fn; + } +- dev = pci_find_class(class << 8, dev); ++ dev = pci_get_class(class << 8, dev); + } while (dev); + + return NULL; +@@ -3484,12 +3484,12 @@ + struct pci_dev *dev = NULL; + int count = 0; + +- dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, dev); ++ dev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, dev); + while (dev) + { + if ((dev->vendor == 0x10de) && (dev->device >= 0x20)) + count++; +- dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, dev); ++ dev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, dev); + } + return count; + } diff --git a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6111-r1 b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6111-r1 new file mode 100644 index 000000000000..891f45379b0a --- /dev/null +++ b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6111-r1 @@ -0,0 +1,2 @@ +MD5 51e83be46f83c52102ccb8995b54f4e2 NVIDIA-Linux-x86-1.0-6111-pkg1.run 8167999 +MD5 6c7b0c8b3ce5c34186e0c80042e6d046 NVIDIA-Linux-x86_64-1.0-6111-pkg2.run 7333486 diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r1.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r1.ebuild new file mode 100644 index 000000000000..6c04bdbf3627 --- /dev/null +++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r1.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r1.ebuild,v 1.1 2004/09/20 20:28:49 azarah Exp $ + +inherit eutils kmod + +X86_PKG_V="pkg1" +AMD64_PKG_V="pkg2" +NV_V="${PV/1.0./1.0-}" +X86_NV_PACKAGE="NVIDIA-Linux-x86-${NV_V}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${NV_V}" + +DESCRIPTION="Linux kernel module for the NVIDIA X11 driver" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? (ftp://download.nvidia.com/XFree86/Linux-x86/${NV_V}/${X86_NV_PACKAGE}-${X86_PKG_V}.run) + amd64? (http://download.nvidia.com/XFree86/Linux-x86_64/${NV_V}/${AMD64_NV_PACKAGE}-${AMD64_PKG_V}.run)" + +if use x86; then + PKG_V="${X86_PKG_V}" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="${AMD64_PKG_V}" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}-${PKG_V}/usr/src/nv" + +# The slot needs to be set to $KV to prevent unmerges of modules for other kernels. +LICENSE="NVIDIA" +SLOT="${KV}" +KEYWORDS="-* ~x86 ~amd64" +RESTRICT="nostrip" +IUSE="" + +DEPEND="virtual/linux-sources" +export _POSIX2_VERSION="199209" + +KMOD_SOURCES="none" + +mtrr_check() { + if [ ! -f /proc/mtrr ] + then + eerror "This version needs MTRR support for most chipsets!" + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features -> [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +pkg_setup() { + mtrr_check +} + +src_unpack() { + # Let the kmod eclass set the variables for us + kmod_src_unpack + + cd ${WORKDIR} + bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only + + # Add patches below, with a breif description. + # 1) SYSFS supported by nvidia + # 2) minion.de patches not released yet + + cd ${S} + + # Fix up the removal of PM_SAVE_STATE in kernels > 2.6.8 + epatch ${FILESDIR}/${PV}/power-suspend-2.6.9-changes.patch + # Update pci stuff to work with irqroutes being changed in kernels + epatch ${FILESDIR}/${PV}/nv_enable_pci.patch + (is_kernel 2 5 || is_kernel 2 6) && \ + epatch ${FILESDIR}/${PV}/nv-pci_find_class.patch + + # if you set this then it's your own fault when stuff breaks :) + [ ! -z "${USE_CRAZY_OPTS}" ] && sed -i "s:-O:${CFLAGS}:" Makefile.* +} + +src_compile() { + # IGNORE_CC_MISMATCH disables a sanity check that's needed when gcc has been + # updated but the running kernel is still compiled with an older gcc. This is + # needed for chrooted building, where the sanity check detects the gcc of the + # kernel outside the chroot rather than within. + if is_kernel 2 5 || is_kernel 2 6 + then + unset ARCH + fi + make IGNORE_CC_MISMATCH="yes" SYSSRC="${KERNEL_DIR}" SYSOUT="${KV_OUTPUT}" \ + clean module V=1 || die "Failed to build module" +} + +src_install() { + # The driver goes into the standard modules location + insinto /lib/modules/${KV}/video + + # Insert the module + doins nvidia.${KV_OBJ} + + # Add the aliases + insinto /etc/modules.d + newins ${FILESDIR}/nvidia-1.1 nvidia + + # Docs + dodoc ${S}/README + + # The device creation script + into / + newsbin ${S}/makedevices.sh NVmakedevices.sh +} + +pkg_postinst() { + if [ "${ROOT}" = "/" ] + then + # Update module dependency + [ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules + if [ ! -e /dev/.devfsd ] && [ ! -e /dev/.udev ] && [ -x /sbin/NVmakedevices.sh ] + then + /sbin/NVmakedevices.sh >/dev/null 2>&1 + fi + fi + + echo + einfo "If you need to load the module automatically on boot up you need" + einfo "to add \"nvidia\" to /etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}" + echo + einfo "Please note that the driver name is \"nvidia\", not \"NVdriver\"" + echo + einfo "This module will now work correctly under udev, you do not need to" + einfo "manually create the devices anymore." + echo +} |