ports/118506: nvidia-driver broken due to structure change of agp driver in sys
Armin Pirkovitsch
a.pirko at inode.at
Sun Dec 9 10:50:01 UTC 2007
>Number: 118506
>Category: ports
>Synopsis: nvidia-driver broken due to structure change of agp driver in sys
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Dec 09 10:50:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Armin Pirkovitsch
>Release: 8.0 CURRENT
>Organization:
>Environment:
FreeBSD oh-sub2.local 8.0-CURRENT FreeBSD 8.0-CURRENT #4: Sun Dec 9 10:45:08 CET 2007 sperber at oh-sub2.local:/usr/obj/usr/src/sys/OH-SUB2 i386
>Description:
Due to jhb's commit on the 2007-11-12, 21:51:38 UTC agpvar.h has to be included from a diffrent place. (version bumped to 800004)
Furthermore sys/priv.h has to be included to provide the driver with the suser function (I haven't found out which change in the repo caused that problem)
>How-To-Repeat:
Try to compile nvidia-driver on FreeBSD >= 800004
>Fix:
Patch attached with submission follows:
--- src/nv-freebsd.h.orig 2007-09-18 23:28:13.000000000 +0200
+++ src/nv-freebsd.h 2007-12-09 11:29:57.000000000 +0100
@@ -21,12 +21,6 @@
#include <sys/param.h>
-#if __FreeBSD_version >= 700000
-#error This driver does not support FreeBSD 7.x/-CURRENT!
-#endif
-#if __FreeBSD_version >= 600000 && __FreeBSD_version < 600034
-#error This driver does not support FreeBSD 6.x/-CURRENT!
-#endif
#if __FreeBSD_version < 503000
#error This driver requires FreeBSD 5.3 or later!
#endif
@@ -75,7 +69,11 @@
#include <vm/pmap.h>
#include <vm/vm_map.h>
+#if __FreeBSD_version >= 800004
+#include <dev/agp/agpvar.h>
+#else
#include <pci/agpvar.h>
+#endif
#include <sys/agpio.h>
#if defined(NVCPU_X86_64)
@@ -97,6 +95,8 @@
#include <sys/sx.h>
#include <sys/condvar.h>
+#include <sys/priv.h>
+
#if defined(NVCPU_X86) && defined(PAE)
#error This driver does not support PAE enabled kernels!
#endif
@@ -228,7 +228,9 @@
} nvidia_softc_t;
+#if __FreeBSD_version < 502103
#define CDEV_MAJOR 180
+#endif
#define CDEV_CTL_MINOR 255
extern devclass_t nvidia_devclass;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list