From 3b2c35b3130c4c5f34888d84c091876ef2c28172 Mon Sep 17 00:00:00 2001 From: Rmys Date: Sun, 16 Sep 2018 15:52:10 +0300 Subject: [PATCH] nvidia304:rebuild --- kernel/drivers/module-nvidia304/actions.py | 2 +- .../module-nvidia304/files/kernel-4.14.patch | 35 +++++++++++++++++++ kernel/drivers/module-nvidia304/pspec.xml | 4 +-- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 kernel/drivers/module-nvidia304/files/kernel-4.14.patch diff --git a/kernel/drivers/module-nvidia304/actions.py b/kernel/drivers/module-nvidia304/actions.py index 4336162865..e2d9ad8e1b 100644 --- a/kernel/drivers/module-nvidia304/actions.py +++ b/kernel/drivers/module-nvidia304/actions.py @@ -31,7 +31,7 @@ def setup(): % (arch, get.srcVERSION())) shelltools.move("tmp/*", ".") - #shelltools.system("patch -p1 < linux-4.6.patch") + shelltools.system("patch -p1 < kernel-4.14.patch") #shelltools.system("patch -p0 < nv-drm.patch") # Our libc is TLS enabled so use TLS library diff --git a/kernel/drivers/module-nvidia304/files/kernel-4.14.patch b/kernel/drivers/module-nvidia304/files/kernel-4.14.patch new file mode 100644 index 0000000000..1ee8b0aa5b --- /dev/null +++ b/kernel/drivers/module-nvidia304/files/kernel-4.14.patch @@ -0,0 +1,35 @@ +--- NVIDIA-Linux-x86_64-304.137/kernel/nv-drm.c.orig 2017-09-14 23:51:09.000000000 +0300 ++++ NVIDIA-Linux-x86_64-304.137/kernel/nv-drm.c 2017-11-13 16:24:05.604118167 +0200 +@@ -14,6 +14,8 @@ + #include "os-interface.h" + #include "nv-linux.h" + ++#include ++ + #if defined(NV_DRM_AVAILABLE) + + #include +@@ -121,8 +123,12 @@ int __init nv_drm_init( + { + int ret = 0; + #if defined(NV_DRM_AVAILABLE) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++ ret = drm_legacy_pci_init(&nv_drm_driver, pci_driver); ++#else + ret = drm_pci_init(&nv_drm_driver, pci_driver); + #endif ++#endif + return ret; + } + +@@ -131,6 +137,10 @@ void nv_drm_exit( + ) + { + #if defined(NV_DRM_AVAILABLE) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++ drm_legacy_pci_exit(&nv_drm_driver, pci_driver); ++#else + drm_pci_exit(&nv_drm_driver, pci_driver); + #endif ++#endif + } diff --git a/kernel/drivers/module-nvidia304/pspec.xml b/kernel/drivers/module-nvidia304/pspec.xml index b018a3d511..8402c83b04 100644 --- a/kernel/drivers/module-nvidia304/pspec.xml +++ b/kernel/drivers/module-nvidia304/pspec.xml @@ -15,7 +15,7 @@ http://http.download.nvidia.com/XFree86/Linux-x86/304.137/NVIDIA-Linux-x86-304.137.run http://http.download.nvidia.com/XFree86/Linux-x86_64/304.137/NVIDIA-Linux-x86_64-304.137.run - + kernel-4.14.patch kernel-module-headers @@ -67,7 +67,7 @@ - 2018-09-01 + 2018-09-16 304.137 Rebuild for new kernel. Mustafa Cinasal