commit 0f1fb2f875e6aee2ae8f0609f872ee0c91913002
Author: Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com>
Date: Mon Apr 8 20:42:06 2024 +0200
Allow building drm on kernel < 6.8
kernel-6.6.8.patch | 11 -----------
kernel-6.8.2.patch | 15 +++++++++++++++
nvidia-340xx-kmod.spec | 7 +++++--
3 files changed, 20 insertions(+), 13 deletions(-)
---
diff --git a/kernel-6.8.2.patch b/kernel-6.8.2.patch
new file mode 100644
index 0000000..3adcfc0
--- /dev/null
+++ b/kernel-6.8.2.patch
@@ -0,0 +1,15 @@
+diff -Naur a/kernel/conftest.sh b/kernel/conftest.sh
+--- a/kernel/conftest.sh 2024-04-08 20:36:36.730198000 +0200
++++ b/kernel/conftest.sh 2024-04-08 20:35:11.117112000 +0200
+@@ -1862,7 +1862,11 @@
+ #error DRM not enabled
+ #endif
+
++ #include <linux/bug.h>
++ #include <linux/version.h>
++
+ void conftest_drm_available(void) {
++ BUILD_BUG_ON(LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0));
+ struct drm_driver drv;
+
+ /* 2013-10-02 1bb72532ac260a2d3982b40bdd4c936d779d0d16 */
diff --git a/nvidia-340xx-kmod.spec b/nvidia-340xx-kmod.spec
index 369c1d1..444b8fa 100644
--- a/nvidia-340xx-kmod.spec
+++ b/nvidia-340xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-340xx-kmod
Epoch: 1
Version: 340.108
# Taken over by kmodtool
-Release: 29%{?dist}
+Release: 30%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -24,7 +24,7 @@ Patch1: fix-build-issues.patch
Patch2: kernel-6.3.1.patch
Patch3: kernel-6.5.2.patch
Patch4: kernel-6.6.1.patch
-Patch5: kernel-6.6.8.patch
+Patch5: kernel-6.8.2.patch
BuildRequires: elfutils-libelf-devel
BuildRequires: gcc
@@ -85,6 +85,9 @@ done
%{?akmod_install}
%changelog
+* Mon Apr 08 2024 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-30
+- Allow building drm on kernel < 6.8
+
* Fri Mar 29 2024 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-29
- Fix build on kernel-6.8.2