diff --git a/nvidia-367.35-kernel-4.6.patch b/nvidia-367.35-kernel-4.6.patch new file mode 100644 index 0000000..5dfedc7 --- /dev/null +++ b/nvidia-367.35-kernel-4.6.patch @@ -0,0 +1,42 @@ +--- a/kernel/nvidia-drm/nvidia-drm-fb.c 2016-05-17 19:36:45.210422962 +0700 ++++ b/kernel/nvidia-drm/nvidia-drm-fb.c 2016-05-17 19:43:19.621579825 +0700 +@@ -77,7 +77,7 @@ + static struct drm_framebuffer *internal_framebuffer_create + ( + struct drm_device *dev, +- struct drm_file *file, struct drm_mode_fb_cmd2 *cmd, ++ struct drm_file *file, const struct drm_mode_fb_cmd2 *cmd, + uint64_t nvkms_params_ptr, + uint64_t nvkms_params_size + ) +@@ -199,7 +199,7 @@ + struct drm_framebuffer *nvidia_drm_framebuffer_create + ( + struct drm_device *dev, +- struct drm_file *file, struct drm_mode_fb_cmd2 *cmd ++ struct drm_file *file, const struct drm_mode_fb_cmd2 *cmd + ) + { + return internal_framebuffer_create(dev, file, cmd, 0, 0); +--- a/kernel/nvidia-drm/nvidia-drm-fb.h 2016-05-17 19:36:45.210422962 +0700 ++++ b/kernel/nvidia-drm/nvidia-drm-fb.h 2016-05-17 19:36:48.517069977 +0700 +@@ -45,7 +45,7 @@ + struct drm_framebuffer *nvidia_drm_framebuffer_create + ( + struct drm_device *dev, +- struct drm_file *file, struct drm_mode_fb_cmd2 *cmd ++ struct drm_file *file, const struct drm_mode_fb_cmd2 *cmd + ); + + int nvidia_drm_add_nvkms_fb( +--- a/kernel/nvidia-drm/nvidia-drm-linux.c 2016-05-17 19:36:45.210422962 +0700 ++++ b/kernel/nvidia-drm/nvidia-drm-linux.c 2016-05-17 19:42:18.677163127 +0700 +@@ -121,7 +121,7 @@ + + down_read(&mm->mmap_sem); + +- pages_pinned = get_user_pages(current, mm, ++ pages_pinned = get_user_pages_remote(current, mm, + address, pages_count, write, force, + user_pages, NULL); + up_read(&mm->mmap_sem); diff --git a/nvidia.spec b/nvidia.spec index 200345b..41f66c2 100644 --- a/nvidia.spec +++ b/nvidia.spec @@ -1,7 +1,7 @@ %define nvidia_current_ver %version %define nvidia_current_libver %version Name: nvidia -Version: 358.16 +Version: 367.35 Epoch: 1 Release: 2mamba Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel @@ -13,6 +13,7 @@ URL: http://www.nvidia.com/object/unix.html Source0: http://us.download.nvidia.com/XFree86/Linux-x86/%{nvidia_current_ver}/NVIDIA-Linux-x86-%{nvidia_current_ver}.run Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{nvidia_current_ver}/NVIDIA-Linux-x86_64-%{nvidia_current_ver}.run Patch0: nvidia-331.20-x86-conftest.patch +Patch1: nvidia-367.35-kernel-4.6.patch License: no OSI Approved ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END @@ -120,9 +121,10 @@ This package contains the HTML documentation. sed -i "s|__UTILS_PATH__|%{_bindir}|;s|__PIXMAP_PATH__|%{_datadir}/pixmaps|" \ current/nvidia-settings.desktop -#cd current +cd current #%patch0 -p1 -#cd .. +#%patch1 -p1 +cd .. %build @@ -130,22 +132,6 @@ sed -i "s|__UTILS_PATH__|%{_bindir}|;s|__PIXMAP_PATH__|%{_datadir}/pixmaps|" \ [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" pushd current -# dkms -install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version} -cp -a kernel/* %{buildroot}%{_prefix}/src/%{name}-%{version}/ -cat > %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf << _EOF -PACKAGE_NAME=%{name} -PACKAGE_VERSION=%{version} -MAKE="ln -sf /usr/src/\${PACKAGE_NAME}-\${PACKAGE_VERSION}/nv-kernel.o \${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build/;\ -make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build modules" -CLEAN="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build clean" -BUILT_MODULE_NAME=\${PACKAGE_NAME} -BUILT_MODULE_LOCATION=./ -DEST_MODULE_LOCATION=/kernel/drivers/video -REMAKE_INITRD=no -AUTOINSTALL=yes -_EOF - install -D -m 0755 libnvidia-wfb.so.%{nvidia_current_libver} \ %{buildroot}%{_libdir}/xorg/modules/libnvidia-wfb.so.%{nvidia_current_libver} @@ -237,6 +223,45 @@ export CLUTTER_BACKEND=x11 _EOF chmod +x %{buildroot}%{_sysconfdir}/profile.d/nvidia-clutter.sh +# dkms +install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version} +cp -a kernel/* %{buildroot}%{_prefix}/src/%{name}-%{version}/ +cat > %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf << _EOF +PACKAGE_NAME=%{name} +PACKAGE_VERSION=%{version} +MAKE="ln -sf /usr/src/\${PACKAGE_NAME}-\${PACKAGE_VERSION}/nv-kernel.o \${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build/;\ +make SYSSRC=\${kernel_source_dir} modules" +CLEAN="make SYSSRC=\${kernel_source_dir} clean" +BUILT_MODULE_NAME[0]=nvidia +BUILT_MODULE_NAME[1]=nvidia-drm +BUILT_MODULE_NAME[2]=nvidia-modeset +%ifarch x86_64 +BUILT_MODULE_NAME[3]=nvidia-uvm +%endif +BUILT_MODULE_LOCATION=./ +DEST_MODULE_LOCATION=/kernel/drivers/video +REMAKE_INITRD=no +AUTOINSTALL=yes +_EOF + +%check +cd current/kernel +for d in /lib/modules/4.*/build; do + kver=`echo $d|sed "s|/lib/modules/\(.*\)/build.*|\1|"` + [ "${kver:0:3}" == "4.0" -o "${kver:0:3}" == "4.1" ] && continue + [ "${kver/-arm}" == "${kver}" ] || continue + rm -f *.ko + make %{_smp_mflags} SYSSRC=$d + for n in nvidia nvidia-drm nvidia-modeset \ +%ifarch x86_64 +nvidia-uvm \ +%endif + ; do + [ -e ${n}.ko ] || exit 1 + done + make %{_smp_mflags} SYSSRC=$d clean +done + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -401,6 +426,27 @@ exit 0 %doc current/{LICENSE,NVIDIA_Changelog,README.txt} current/html %changelog +* Sun Jul 31 2016 Silvan Calarco 367.35-2mamba +- added check section to make sure module compiles with installed kernels in buildvm + +* Sat Jul 16 2016 Automatic Build System 367.35-1mamba +- automatic version update by autodist + +* Tue Jun 14 2016 Automatic Build System 367.27-1mamba +- automatic version update by autodist + +* Mon Jun 13 2016 Automatic Build System 367.18-1mamba +- automatic version update by autodist + +* Sat Apr 23 2016 Automatic Build System 364.19-1mamba +- automatic version update by autodist + +* Thu Mar 31 2016 Automatic Build System 361.42-1mamba +- automatic version update by autodist + +* Tue Feb 09 2016 Automatic Build System 361.28-1mamba +- automatic version update by autodist + * Sat Nov 21 2015 Automatic Build System 358.16-2mamba - automatic version update by autodist