[packages/xorg-driver-video-nvidia] fix build with kernel 5.7

atler atler at pld-linux.org
Wed Jun 3 19:07:08 CEST 2020


commit e9d80916ffa141d484e4f4a042d6b7bc0fb014f1
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Jun 3 19:06:28 2020 +0200

    fix build with kernel 5.7

 kernel-5.7.patch              | 22 ++++++++++++++++++++++
 xorg-driver-video-nvidia.spec |  2 ++
 2 files changed, 24 insertions(+)
---
diff --git a/xorg-driver-video-nvidia.spec b/xorg-driver-video-nvidia.spec
index 8a90b7a..5c280b9 100644
--- a/xorg-driver-video-nvidia.spec
+++ b/xorg-driver-video-nvidia.spec
@@ -45,6 +45,7 @@ Source3:	gl.pc.in
 Source4:	10-nvidia.conf
 Source5:	10-nvidia-modules.conf
 Patch0:		X11-driver-nvidia-desktop.patch
+Patch1:		kernel-5.7.patch
 URL:		http://www.nvidia.com/object/unix.html
 BuildRequires:	rpmbuild(macros) >= 1.701
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.32}}
@@ -245,6 +246,7 @@ rm -rf NVIDIA-Linux-x86_64-%{version}
 /bin/sh %{SOURCE0} --extract-only
 %setup -qDT -n NVIDIA-Linux-x86_64-%{version}
 %patch0 -p1
+%patch1 -p1
 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
 
 %build
diff --git a/kernel-5.7.patch b/kernel-5.7.patch
new file mode 100644
index 0000000..a6821b5
--- /dev/null
+++ b/kernel-5.7.patch
@@ -0,0 +1,22 @@
+diff --git a/kernel/conftest.sh b/kernel/conftest.sh
+index 8f807a1..af29636 100755
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -143,6 +143,7 @@ test_headers() {
+     FILES="$FILES video/nv_internal.h"
+     FILES="$FILES asm/book3s/64/hash-64k.h"
+     FILES="$FILES asm/set_memory.h"
++    FILES="$FILES asm/pgtable.h"
+     FILES="$FILES asm/prom.h"
+     FILES="$FILES asm/powernv.h"
+     FILES="$FILES asm/tlbflush.h"
+@@ -466,6 +467,9 @@ compile_test() {
+             # It does not exist on all architectures.
+             #
+             CODE="
++            #if defined(NV_ASM_PGTABLE_H_PRESENT)
++            #include <asm/pgtable.h>
++            #endif
+             #if defined(NV_ASM_SET_MEMORY_H_PRESENT)
+             #include <asm/set_memory.h>
+             #else
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia.git/commitdiff/e9d80916ffa141d484e4f4a042d6b7bc0fb014f1



More information about the pld-cvs-commit mailing list