summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2003-05-13 20:55:16 +0000
committerMartin Schlemmer <azarah@gentoo.org>2003-05-13 20:55:16 +0000
commitee3c1143f55cff68cd2ce04e1407774108f04b4d (patch)
tree147a848220bbd527299603230f72041e9d4b968b /media-video/nvidia-kernel
parentfix to compile with linux-2.5.69-bk8 (diff)
downloadgentoo-2-ee3c1143f55cff68cd2ce04e1407774108f04b4d.tar.gz
gentoo-2-ee3c1143f55cff68cd2ce04e1407774108f04b4d.tar.bz2
gentoo-2-ee3c1143f55cff68cd2ce04e1407774108f04b4d.zip
fix to compile with linux-2.5.69-bk8
Diffstat (limited to 'media-video/nvidia-kernel')
-rw-r--r--media-video/nvidia-kernel/ChangeLog8
-rw-r--r--media-video/nvidia-kernel/Manifest6
-rw-r--r--media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5.69.diff49
-rw-r--r--media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.4363-r11
-rw-r--r--media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r1.ebuild143
5 files changed, 203 insertions, 4 deletions
diff --git a/media-video/nvidia-kernel/ChangeLog b/media-video/nvidia-kernel/ChangeLog
index e4ac8b840beb..76221ed7cd81 100644
--- a/media-video/nvidia-kernel/ChangeLog
+++ b/media-video/nvidia-kernel/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-video/nvidia-kernel
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.31 2003/04/26 13:14:20 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.32 2003/05/13 20:53:38 azarah Exp $
+
+*nvidia-kernel-1.0.4363-r1 (13 May 2003)
+
+ 13 May 2003; Martin Schlemmer <azarah@gentoo.org> nvidia-kernel-1.0.4363-r1.ebuild,
+ NVIDIA_kernel-1.0-4363-2.5.69.diff :
+ Get it to compile with latest devfs changes in linux-2.5.69-bk8 or later.
*nvidia-kernel-1.0.4363 (26 Apr 2003)
diff --git a/media-video/nvidia-kernel/Manifest b/media-video/nvidia-kernel/Manifest
index 68185981a0bd..e50dc71cdb6f 100644
--- a/media-video/nvidia-kernel/Manifest
+++ b/media-video/nvidia-kernel/Manifest
@@ -1,4 +1,4 @@
-MD5 5c44ed1565da57e2dc533fbec000cb79 ChangeLog 6390
+MD5 61ba695d5ddcca227d668659b886cb1c ChangeLog 6634
MD5 04b1f361d40708ab81631bea5e46a632 nvidia-kernel-1.0.2880-r1.ebuild 1970
MD5 5177ed76121fb4bc1aa220c62319d196 nvidia-kernel-1.0.2960-r1.ebuild 2081
MD5 16a9003f79bea31eeec6f03ae64cd8ef nvidia-kernel-1.0.3123-r2.ebuild 3229
@@ -7,7 +7,7 @@ MD5 e64884b31959fdf80e8abc6016f63e34 nvidia-kernel-1.0.4349-r1.ebuild 4219
MD5 0646bd1f1f1109063862d1475aaccab4 nvidia-kernel-1.0.4349-r2.ebuild 3702
MD5 10e07a6ec08e11dab21341ae06788e78 nvidia-kernel-1.0.4349.ebuild 4201
MD5 60d9b36f0373c43f7942c7dcc942350b nvidia-kernel-1.0.4363.ebuild 4104
-MD5 e31b419801b452dbac2d4f4190b3aab5 nvidia-kernel-1.0.4363-r1.ebuild 4365
+MD5 fb0098fb2f158b1633237ad1e18bdb8f nvidia-kernel-1.0.4363-r1.ebuild 4364
MD5 441b29e8f10b6620c4dd4fc01528f172 files/NVIDIA_kernel-1.0-3123-2.5-module.diff 5569
MD5 4057597a09dd795c93ce8088d6f023bb files/NVIDIA_kernel-1.0-3123-2.5-tl-pa.diff 11858
MD5 059b3ddf8944dce6c9184d11d15abd71 files/NVIDIA_kernel-1.0-3123-2.5-tl.diff 31614
@@ -33,4 +33,4 @@ MD5 31565678620709b117139345323051fd files/1.0.4349/NVIDIA_kernel-1.0-4349-2.5-2
MD5 439563bcf7fa96c91361226fae454e0e files/1.0.4349/NVIDIA_kernel-1.0-4349-2.5.68.diff 1467
MD5 051a7f07595e4d97c82275767fe961f9 files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030424.diff 69299
MD5 439563bcf7fa96c91361226fae454e0e files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5.68.diff 1467
-MD5 42635c0610032d6bc4a164812664f38c files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5.69.diff 1388
+MD5 78aae777bb88899e94c4b42d51c0ccd3 files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5.69.diff 1718
diff --git a/media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5.69.diff b/media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5.69.diff
new file mode 100644
index 000000000000..745e0af936b2
--- /dev/null
+++ b/media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5.69.diff
@@ -0,0 +1,49 @@
+--- NVIDIA_kernel-1.0-4363/nv.c.orig 2003-05-13 22:26:24.000000000 +0200
++++ NVIDIA_kernel-1.0-4363/nv.c 2003-05-13 22:27:39.000000000 +0200
+@@ -44,8 +44,8 @@
+ #endif
+
+ #ifdef CONFIG_DEVFS_FS
+-devfs_handle_t nv_dev_handle[NV_MAX_DEVICES];
+-devfs_handle_t nv_ctl_handle;
++int nv_dev_handle[NV_MAX_DEVICES];
++int nv_ctl_handle;
+ #endif
+
+ // #define NV_DBG_MEM 1
+@@ -733,21 +733,16 @@
+ }
+
+ #ifdef CONFIG_DEVFS_FS
+- memset(nv_dev_handle, 0, sizeof(devfs_handle_t) * NV_MAX_DEVICES);
++ /* devfs_mk_cdev return 0 on success */
++ memset(nv_dev_handle, 1, sizeof(nv_dev_handle) * NV_MAX_DEVICES);
+ do {
+ char name[10];
+
+- nv_ctl_handle = devfs_register(NULL, "nvidiactl",
+- DEVFS_FL_DEFAULT, nv_major, 255,
+- S_IFCHR | S_IRUGO | S_IWUGO,
+- &nv_fops, NULL);
++ nv_ctl_handle = devfs_mk_cdev(MKDEV(nv_major, 255), S_IFCHR|S_IRUGO|S_IWUGO, "nvidiactl");
+
+ for (i = 0; i < num_devices; i++) {
+ sprintf(name, "nvidia%d", i);
+- nv_dev_handle[i] = devfs_register(NULL, name,
+- DEVFS_FL_DEFAULT, nv_major, i,
+- S_IFCHR | S_IRUGO | S_IWUGO,
+- &nv_fops, NULL);
++ nv_dev_handle[i] = devfs_mk_cdev(MKDEV(nv_major, i), S_IFCHR|S_IRUGO|S_IWUGO, name);
+ }
+ } while(0);
+ #endif
+@@ -870,7 +865,8 @@
+ #ifdef CONFIG_DEVFS_FS
+ do {
+ int i;
+- for (i = 0; nv_dev_handle[i] != 0; i++) {
++ /* devfs_mk_cdev return 0 on success */
++ for (i = 0; nv_dev_handle[i] == 0; i++) {
+ devfs_remove("nvidia%d", i);
+ }
+ } while(0);
diff --git a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.4363-r1 b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.4363-r1
new file mode 100644
index 000000000000..b1f93afc2136
--- /dev/null
+++ b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.4363-r1
@@ -0,0 +1 @@
+MD5 29b4cfcff63f502787fd2f0ac7a105fd NVIDIA_kernel-1.0-4363.tar.gz 661447
diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r1.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r1.ebuild
new file mode 100644
index 000000000000..144d99402662
--- /dev/null
+++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r1.ebuild,v 1.1 2003/05/13 20:53:38 azarah Exp $
+
+inherit eutils
+
+# Make sure Portage does _NOT_ strip symbols. Need both lines for
+# Portage 1.8.9+
+DEBUGBUILD="yes"
+RESTRICT="nostrip"
+
+NV_V="${PV/1.0./1.0-}"
+NV_PACKAGE="NVIDIA_kernel-${NV_V}"
+S="${WORKDIR}/${NV_PACKAGE}"
+DESCRIPTION="Linux kernel module for the NVIDIA's X driver"
+SRC_URI="ftp://download.nvidia.com/XFree86/Linux-x86/${NV_V}/${NV_PACKAGE}.tar.gz"
+HOMEPAGE="http://www.nvidia.com/"
+
+# The slow needs to be set to $KV to prevent unmerges of
+# modules for other kernels.
+LICENSE="NVIDIA"
+SLOT="${KV}"
+KEYWORDS="~x86 -ppc -sparc -alpha -hppa -mips -arm"
+
+DEPEND="virtual/linux-sources
+ >=sys-apps/portage-1.9.10"
+RDEPEND=${DEPEND}
+IUSE=""
+
+pkg_setup() {
+ 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
+
+ if [ ! -f "${ROOT}/usr/src/linux/include/linux/version.h" ]
+ then
+ eerror "Please verify that your /usr/src/linux symlink is pointing"
+ eerror "to your current kernel sources, and that you did run:"
+ eerror
+ eerror " # make dep"
+ die "/usr/src/linux symlink not setup!"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Next section applies patches for linux-2.5 kernel, and/or
+ # bugfixes for linux-2.4. All these are from:
+ #
+ # http://www.minion.de/nvidia/
+ #
+ # Many thanks to Christian Zander <zander@minion.de> for bringing
+ # these to us, and being so helpful to select which to use.
+
+ # Get the kernel version of sources in /usr/src/linux ...
+ local KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3 }' \
+ "${ROOT}/usr/src/linux/include/linux/version.h")"
+ local KV_major="$(echo "${KV_full}" | cut -d. -f1)"
+ local KV_minor="$(echo "${KV_full}" | cut -d. -f2)"
+ local KV_micro="$(echo "${KV_full}" | cut -d. -f3 | sed -e 's:[^0-9].*::')"
+
+ cd ${S}
+ einfo "Linux kernel ${KV_major}.${KV_minor}.${KV_micro}"
+ if [ "${KV_major}" -eq 2 -a "${KV_minor}" -eq 5 ]
+ then
+ EPATCH_SINGLE_MSG="Applying tasklet patch for kernel 2.5..." \
+ epatch ${FILESDIR}/${PV}/${NV_PACKAGE}-2.5-20030424.diff
+
+ if [ "${KV_micro}" -ge 68 ] && \
+ [ -n "`grep irqreturn_t /usr/src/linux/include/linux/interrupt.h`" ]
+ then
+ EPATCH_SINGLE_MSG="Applying patch for devfs/irq changes in 2.5.68+..." \
+ epatch ${FILESDIR}/${PV}/${NV_PACKAGE}-2.5.68.diff
+ fi
+
+ if [ "${KV_micro}" -ge 69 ] && \
+ [ -z "`grep devfs_handle_t /usr/src/linux/include/linux/devfs_fs_kernel.h`" ]
+ then
+ EPATCH_SINGLE_MSG="Applying patch for devfs changes in 2.5.69+..." \
+ epatch ${FILESDIR}/${PV}/${NV_PACKAGE}-2.5.69.diff
+ fi
+
+ # Some problems with kbuild one ..
+ ln -s Makefile.nvidia Makefile
+ fi
+}
+
+src_compile() {
+ # Portage should determine the version of the kernel sources
+ check_KV
+ # 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.
+ make IGNORE_CC_MISMATCH="yes" KERNDIR="/usr/src/linux" \
+ clean nvidia.o || die
+}
+
+src_install() {
+ # The driver goes into the standard modules location
+ insinto /lib/modules/${KV}/video
+ doins nvidia.o
+
+ # 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 ] && [ -x /sbin/NVmakedevices.sh ]
+ then
+ /sbin/NVmakedevices.sh >/dev/null 2>&1
+ fi
+ fi
+
+ echo
+ einfo "If you are not using devfs, loading the module automatically at"
+ einfo "boot up, you need to add \"nvidia\" to your /etc/modules.autoload."
+ echo
+ ewarn "Please note that the driver name changed from \"NVdriver\""
+ ewarn "to \"nvidia.o\"."
+ echo
+}
+