FreeBSD Bugzilla – Attachment 162189 Details for
Bug 202228
[proposal] x11/nvidia-driver: Patch for new file hierarchy starting with NVVERION >= 355.006
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
x11/nvidia-driver NVVERSION >= 358.09
nvidia-driver.patch (text/plain), 9.20 KB, created by
O. Hartmann
on 2015-10-18 09:06:39 UTC
(
hide
)
Description:
x11/nvidia-driver NVVERSION >= 358.09
Filename:
MIME Type:
Creator:
O. Hartmann
Created:
2015-10-18 09:06:39 UTC
Size:
9.20 KB
patch
obsolete
>diff -Nur a/nvidia-driver/Makefile b/nvidia-driver/Makefile >--- a/nvidia-driver/Makefile 2015-10-18 10:45:30.790346000 +0200 >+++ b/nvidia-driver/Makefile 2015-10-18 10:45:25.374913000 +0200 >@@ -71,10 +71,16 @@ > EXTRA_PATCHES= ${FILESDIR}/extra-patch-mk-nvidia.lib.mk > .endif > >-.if ${NVVERSION} >= 304.088 >+.if ${NVVERSION} >= 304.088 && ${NVVERSION} < 355.006 >+NVSRC="" > EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src-Makefile \ > ${FILESDIR}/extra-patch-src-nv-freebsd.h \ > ${FILESDIR}/extra-patch-src-nv-misc.h >+.else >+NVSRC=nvidia >+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src-nvidia-Makefile \ >+ ${FILESDIR}/extra-patch-src-nvidia-nv-freebsd.h \ >+ ${FILESDIR}/extra-patch-src-nvidia-nv-misc.h > .endif > > .if ${NVVERSION} >= 304.125 # 331.020 >@@ -134,13 +140,13 @@ > > post-patch: .SILENT > # We should support -CURRENT: kill the check >- ${REINPLACE_CMD} -e '24,26d' ${WRKSRC}/src/nv-freebsd.h >+ ${REINPLACE_CMD} -e '24,26d' ${WRKSRC}/src/${NVSRC}/nv-freebsd.h > # Adjust legacy drivers for updated d_mmap() since FreeBSD src SVN r201223 > .if ${NVVERSION} < 195.022 > ${REINPLACE_CMD} -e 's/vm_offset_t offset/vm_ooffset_t offset/ ; \ > s/vm_offset_t \*address/vm_paddr_t *address/ ; \ > s/int nprot/&, vm_memattr_t *memattr/' \ >- ${WRKSRC}/src/nvidia_dev.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_dev.c > .endif > # In the legacy drivers: remove page queue locking and add page locking > # around vm_page_(un)wire() after FreeBSD src SVN r207410, r207617, and >@@ -149,75 +155,75 @@ > .if ${NVVERSION} < 304.064 > ${REINPLACE_CMD} -E '/vm_page_(un)?lock_queues\(\);/d ; \ > s/(vm_page_(un)?wire\()([^,]+)(, 0)?(\);)/vm_page_lock(\3); & vm_page_unlock(\3);/' \ >- ${WRKSRC}/src/nvidia_subr.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_subr.c > .endif > # Catch up legacy drivers with FreeBSD src SVN r225617 > .if ${NVVERSION} < 195.022 > ${REINPLACE_CMD} -e '/return/s/ioctl/sys_&/' \ >- ${WRKSRC}/src/nvidia_linux.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_linux.c > .endif > # Adjust Linux headers #include's after FreeBSD src SVN r246085 > .if ${OSVERSION} > 1000027 && ${NVVERSION} >= 96.04323 > ${REINPLACE_CMD} -E '/#include "machine\/\.\.\/linux(32)?\/linux.h"/ \ > { x ; s/.*/#include "machine\/..\/..\/compat\/linux\/linux_ioctl.h"/ ; H ; x ; }' \ >- ${WRKSRC}/src/nvidia_linux.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_linux.c > .endif > # Adjust vm_object locking after FreeBSD src SVN r248084 > .if ${OSVERSION} > 1000029 > ${REINPLACE_CMD} -e '/#include <vm\/vm_object.h>/ \ > { x ; s/.*/#include <sys\/rwlock.h>/ ; G ; }' \ >- ${WRKSRC}/src/nv-freebsd.h >+ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h > ${REINPLACE_CMD} -E 's/(VM_OBJECT_)(UN)?(LOCK)/\1W\2\3/' \ >- ${WRKSRC}/src/nvidia_subr.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_subr.c > .endif > # Adjust kmem(9) calls after FreeBSD src SVN r254025 > .if ${OSVERSION} > 1000040 && ${NVVERSION} < 331.067 > ${REINPLACE_CMD} -e '/kmem_/s/kernel_map/kernel_arena/' \ >- ${WRKSRC}/src/nvidia_subr.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_subr.c > .endif > # Argument count of vm_map_find() changed in FreeBSD src SVN r255426 > .if ${OSVERSION} > 1000054 && ${NVVERSION} < 304.123 # < 331.067 > ${REINPLACE_CMD} -e 's/virtual_address, size,/& 0,/' \ >- ${WRKSRC}/src/nvidia_subr.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_subr.c > .endif > # Fix CTLFLAG_* values for SYSCTL_ADD_PROC() after FreeBSD src SVN r273377 > .if ${OSVERSION} > 1100039 || ${OSVERSION} > 1001501 && ${OSVERSION} < 1100000 > ${REINPLACE_CMD} -e '/SYSCTL_ADD_PROC/,/;/ \ > s/^[[:blank:]]*CTLFLAG_RD/CTLTYPE_STRING |&/' \ >- ${WRKSRC}/src/nvidia_sysctl.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_sysctl.c > .endif > # Replace d_thread_t (compat shim to support FreeBSD 4) with `struct thread' > ${REINPLACE_CMD} -e 's/d_thread_t/struct thread/' \ >- ${WRKSRC}/src/nvidia_ctl.c ${WRKSRC}/src/nvidia_dev.c \ >- ${WRKSRC}/src/nvidia_linux.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_ctl.c ${WRKSRC}/src/${NVSRC}/nvidia_dev.c \ >+ ${WRKSRC}/src/${NVSRC}/nvidia_linux.c > # Fix stack buffer overflow in nvidia_sysctl_bus_type() > ${REINPLACE_CMD} -e 's/8 bus_type\[4\]/8 bus_type[8]/' \ >- ${WRKSRC}/src/nvidia_sysctl.c >+ ${WRKSRC}/src/${NVSRC}/nvidia_sysctl.c > # Unbreak the build of 173.14.xx legacy series on recent -CURRENT > .if ${NVVERSION} < 195.022 && ${NVVERSION} >= 169.004 > ${REINPLACE_CMD} -E 's/os_(alloc|free)_contig_pages/NV_API_CALL &/' \ >- ${WRKSRC}/src/nv-freebsd.h >+ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h > .endif > # Process OPTIONS > .if ${PORT_OPTIONS:MFREEBSD_AGP} > ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \ >- ${WRKSRC}/src/nv-freebsd.h >+ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h > .endif > .if ${PORT_OPTIONS:MACPI_PM} > ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_ACPI_PM)/define \1/' \ >- ${WRKSRC}/src/nv-freebsd.h >+ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h > .endif > .if ! ${PORT_OPTIONS:MLINUX} > ${REINPLACE_CMD} -E 's/define (NV_SUPPORT_LINUX_COMPAT)/undef \1/' \ >- ${WRKSRC}/src/nv-freebsd.h >+ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h > .endif > .if ${PORT_OPTIONS:MPAE} > ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_PAE)/define \1/' \ >- ${WRKSRC}/src/nv-freebsd.h >+ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h > .endif > .if ${PORT_OPTIONS:MWBINVD} > ${REINPLACE_CMD} -E 's/undef (NV_USE_WBINVD)/define \1/' \ >- ${WRKSRC}/src/nv-freebsd.h >+ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h > .endif > ${REINPLACE_CMD} -e 's/exists(\/.*/& \&\& !defined(WITHOUT_LINUX)/' \ > ${WRKSRC}/lib/Makefile >@@ -268,6 +274,11 @@ > ${WRKSRC}/lib/libGL/Makefile ${WRKSRC}/doc/Makefile > .endif > >+.if ${NVVERSION} >= 358.009 >+ ${REINPLACE_CMD} -e 's/d_thread_t/struct thread/g' \ >+ ${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c >+.endif >+ > pre-install: > @${MKDIR} ${STAGEDIR}${PREFIX}/${MODULESDIR}/drivers \ > ${STAGEDIR}${PREFIX}/${MODULESDIR}/extensions >diff -Nur a/nvidia-driver/distinfo b/nvidia-driver/distinfo >--- a/nvidia-driver/distinfo 2015-10-18 10:45:30.790372000 +0200 >+++ b/nvidia-driver/distinfo 2015-10-18 10:45:25.374844000 +0200 >@@ -1,14 +1,2 @@ >-SHA256 (NVIDIA-FreeBSD-x86_64-346.96.tar.gz) = 89daaff29afe92d825ec8c00149a703b4eb234e4f16bbfb98673f077521bcff9 >-SIZE (NVIDIA-FreeBSD-x86_64-346.96.tar.gz) = 58774970 >-SHA256 (NVIDIA-FreeBSD-x86-346.96.tar.gz) = a27d7b79c053702bf6524b2c4725321fa557be18a585735e0b8122d884348c3e >-SIZE (NVIDIA-FreeBSD-x86-346.96.tar.gz) = 58010757 >-SHA256 (NVIDIA-FreeBSD-x86_64-340.93.tar.gz) = 07208f6a832c2da8748b1c4f8b5ce42a7b617f2ee1ac59155fecaff952c30988 >-SIZE (NVIDIA-FreeBSD-x86_64-340.93.tar.gz) = 60215584 >-SHA256 (NVIDIA-FreeBSD-x86-340.93.tar.gz) = 094dc6df60b8e57cf9b94d982cb29c32d5e0c1d81796dbadb39145e78a3b0086 >-SIZE (NVIDIA-FreeBSD-x86-340.93.tar.gz) = 59385673 >-SHA256 (NVIDIA-FreeBSD-x86_64-304.128.tar.gz) = ee38635fb02eb598dd0cdfdbc9014096774104d75ba42fee7688126e531fed8f >-SIZE (NVIDIA-FreeBSD-x86_64-304.128.tar.gz) = 35481444 >-SHA256 (NVIDIA-FreeBSD-x86-304.128.tar.gz) = c26d0ce5bda8965b37a8b8f91e8580f98b740e16dd21f3aaf7fb6bc84d3dd363 >-SIZE (NVIDIA-FreeBSD-x86-304.128.tar.gz) = 34479549 >-SHA256 (NVIDIA-FreeBSD-x86-173.14.39.tar.gz) = 63a922ce4c5b676b4cb1ace98094dace4cc5408f2553e183df7b2127777a238b >-SIZE (NVIDIA-FreeBSD-x86-173.14.39.tar.gz) = 20038266 >+SHA256 (NVIDIA-FreeBSD-x86_64-358.09.tar.gz) = d6d92c23a1d15ca275db03a59add2969fa8f1ffcafc3cb0786e7c840fe162bc0 >+SIZE (NVIDIA-FreeBSD-x86_64-358.09.tar.gz) = 55191037 >diff -Nur a/nvidia-driver/files/extra-patch-src-nvidia-Makefile b/nvidia-driver/files/extra-patch-src-nvidia-Makefile >--- a/nvidia-driver/files/extra-patch-src-nvidia-Makefile 1970-01-01 01:00:00.000000000 +0100 >+++ b/nvidia-driver/files/extra-patch-src-nvidia-Makefile 2015-10-18 10:45:25.374729000 +0200 >@@ -0,0 +1,18 @@ >+--- src/nvidia/Makefile.orig 2014-04-04 23:24:59.000000000 +0200 >++++ src/nvidia/Makefile 2014-05-06 14:31:07.000000000 +0200 >+@@ -24,6 +24,15 @@ >+ stdarg.h: >+ @ln -s machine/stdarg.h stdarg.h >+ >++SRCS+= opt_global.h >++.if ${MACHINE_ARCH} == "i386" && !defined(KERNBUILDDIR) >++PAE!= sed -n '/define NV_SUPPORT_PAE/p' nv-freebsd.h >++.if !empty(PAE) >++opt_global.h: >++ echo "#define PAE 1" > ${.TARGET} >++.endif >++.endif >++ >+ *.c: stdarg.h >+ >+ beforeinstall: ${KMOD}.ko >diff -Nur a/nvidia-driver/files/extra-patch-src-nvidia-nv-freebsd.h b/nvidia-driver/files/extra-patch-src-nvidia-nv-freebsd.h >--- a/nvidia-driver/files/extra-patch-src-nvidia-nv-freebsd.h 1970-01-01 01:00:00.000000000 +0100 >+++ b/nvidia-driver/files/extra-patch-src-nvidia-nv-freebsd.h 2015-10-18 10:45:25.374515000 +0200 >@@ -0,0 +1,14 @@ >+--- src/nvidia/nv-freebsd.h.orig 2014-02-13 05:07:44.000000000 +0100 >++++ src/nvidia/nv-freebsd.h 2014-05-05 18:38:59.000000000 +0200 >+@@ -143,6 +143,11 @@ >+ #define NV_SUPPORT_ACPI_PM >+ >+ /* >++ * Enable/Disable support for PAE on i386. >++ */ >++#undef NV_SUPPORT_PAE >++ >++/* >+ * Enable/Disable heavy-weight cache-flush logic. By default, the driver >+ * relies on the kernel to perform cache flushes using optimized >+ * routines. >diff -Nur a/nvidia-driver/files/extra-patch-src-nvidia-nv-misc.h b/nvidia-driver/files/extra-patch-src-nvidia-nv-misc.h >--- a/nvidia-driver/files/extra-patch-src-nvidia-nv-misc.h 1970-01-01 01:00:00.000000000 +0100 >+++ b/nvidia-driver/files/extra-patch-src-nvidia-nv-misc.h 2015-10-18 10:45:25.374752000 +0200 >@@ -0,0 +1,11 @@ >+--- src/nvidia/nv-misc.h.orig 2014-02-13 05:07:44.000000000 +0100 >++++ src/nvidia/nv-misc.h 2014-05-05 18:45:44.000000000 +0200 >+@@ -11,6 +11,8 @@ >+ #ifndef _NV_MISC_H_ >+ #define _NV_MISC_H_ >+ >++#include "opt_global.h" >++ >+ #include "nvtypes.h" >+ #include "rmretval.h" >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ohartmann
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 202228
:
159739
| 162189