update for kernel 5.16, thanks Viterzgir

This commit is contained in:
JerryXiao 2022-01-14 10:58:19 +08:00
parent 27cd86ac1b
commit ae6710ad6b
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5
3 changed files with 37 additions and 3 deletions

View file

@ -1,7 +1,7 @@
pkgbase = nvidia-340xx pkgbase = nvidia-340xx
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
pkgver = 340.108 pkgver = 340.108
pkgrel = 26 pkgrel = 27
url = https://www.nvidia.com/ url = https://www.nvidia.com/
arch = x86_64 arch = x86_64
license = custom license = custom
@ -19,6 +19,7 @@ pkgbase = nvidia-340xx
source = 0005-kernel-5.11.patch source = 0005-kernel-5.11.patch
source = 0006-kernel-5.14.patch source = 0006-kernel-5.14.patch
source = 0007-kernel-5.15.patch source = 0007-kernel-5.15.patch
source = 0008-kernel-5.16.patch
b2sums = 6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028 b2sums = 6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028
b2sums = 49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8 b2sums = 49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8
b2sums = 7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1 b2sums = 7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1
@ -28,6 +29,7 @@ pkgbase = nvidia-340xx
b2sums = 344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35 b2sums = 344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35
b2sums = 31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32 b2sums = 31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32
b2sums = a26426488f6e105f546e091ce4d2e9587cc41a0fb05b0dffeb1c523d8d06782bda3004352655c9c019224091f7bc7903939e53ede73f64553f14be8e8a47793a b2sums = a26426488f6e105f546e091ce4d2e9587cc41a0fb05b0dffeb1c523d8d06782bda3004352655c9c019224091f7bc7903939e53ede73f64553f14be8e8a47793a
b2sums = caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9
pkgname = nvidia-340xx pkgname = nvidia-340xx
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch pkgdesc = NVIDIA drivers for linux, 340xx legacy branch

30
0008-kernel-5.16.patch Normal file
View file

@ -0,0 +1,30 @@
--- a/kernel/os-interface.h 2019-12-11 22:04:24.000000000 +0000
+++ b/kernel/os-interface.h 2022-01-10 02:04:26.740899810 +0000
@@ -24,7 +24,12 @@
* *
\***************************************************************************/
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
+#include <linux/stdarg.h>
+#else
#include <stdarg.h>
+#endif
/*
* Define away Microsoft compiler extensions when possible
--- a/kernel/nv.h 2019-12-11 22:04:24.000000000 +0000
+++ b/kernel/nv.h 2022-01-10 02:29:07.828733372 +0000
@@ -13,7 +13,12 @@
#define _NV_H_
#include <nvtypes.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
+#include <linux/stdarg.h>
+#else
#include <stdarg.h>
+#endif
#if !defined(NV_MIN)
#define NV_MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b))

View file

@ -6,7 +6,7 @@
pkgbase=nvidia-340xx pkgbase=nvidia-340xx
pkgname=(nvidia-340xx nvidia-340xx-dkms); [ -n "$NVIDIA_340XX_DKMS_ONLY" ] && pkgname=(nvidia-340xx-dkms) pkgname=(nvidia-340xx nvidia-340xx-dkms); [ -n "$NVIDIA_340XX_DKMS_ONLY" ] && pkgname=(nvidia-340xx-dkms)
pkgver=340.108 pkgver=340.108
pkgrel=26 pkgrel=27
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch" pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
arch=('x86_64') arch=('x86_64')
url="https://www.nvidia.com/" url="https://www.nvidia.com/"
@ -24,6 +24,7 @@ source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Li
0005-kernel-5.11.patch 0005-kernel-5.11.patch
0006-kernel-5.14.patch 0006-kernel-5.14.patch
0007-kernel-5.15.patch 0007-kernel-5.15.patch
0008-kernel-5.16.patch
) )
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028' b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
'49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8' '49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8'
@ -33,7 +34,8 @@ b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb
'665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f' '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
'344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35' '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35'
'31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32' '31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32'
'a26426488f6e105f546e091ce4d2e9587cc41a0fb05b0dffeb1c523d8d06782bda3004352655c9c019224091f7bc7903939e53ede73f64553f14be8e8a47793a') 'a26426488f6e105f546e091ce4d2e9587cc41a0fb05b0dffeb1c523d8d06782bda3004352655c9c019224091f7bc7903939e53ede73f64553f14be8e8a47793a'
'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32" _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
# default is 'linux' substitute custom name here # default is 'linux' substitute custom name here