From d694b9e648bcafe48c88f2d15665b185680baa81 Mon Sep 17 00:00:00 2001 From: graysky Date: Wed, 24 Feb 2021 06:30:11 -0500 Subject: [PATCH] Update to 340.108-14 --- .SRCINFO | 4 +++- 0005-kernel-5.11.patch | 25 +++++++++++++++++++++++++ PKGBUILD | 22 +++++++++++++++------- 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 0005-kernel-5.11.patch diff --git a/.SRCINFO b/.SRCINFO index dc9114f..73538bf 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = nvidia-340xx pkgdesc = NVIDIA drivers for linux, 340xx legacy branch pkgver = 340.108 - pkgrel = 13 + pkgrel = 14 url = https://www.nvidia.com/ arch = x86_64 license = custom @@ -15,11 +15,13 @@ pkgbase = nvidia-340xx source = 0002-kernel-5.8.patch source = 0003-kernel-5.9.patch source = 0004-kernel-5.10.patch + source = 0005-kernel-5.11.patch b2sums = 6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028 b2sums = 7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1 b2sums = b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896 b2sums = 947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1 b2sums = 665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f + b2sums = bbea70e129f5a51a06a0c341f731be360f39f6b31a88df39e97c2d8f2daa87dd6c4b3a8becc57f25ad2a26ad567c69208546d907e7334c320796c4140fc78a15 pkgname = nvidia-340xx pkgdesc = NVIDIA drivers for linux, 340xx legacy branch diff --git a/0005-kernel-5.11.patch b/0005-kernel-5.11.patch new file mode 100644 index 0000000..f401d98 --- /dev/null +++ b/0005-kernel-5.11.patch @@ -0,0 +1,25 @@ + +diff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/nv-linux.h NVIDIA-Linux-x86_64-340.108-new/kernel/nv-linux.h +--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-linux.h 2021-02-23 20:01:52.429999710 +0100 ++++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-linux.h 2021-02-23 14:48:00.163333638 +0100 +@@ -119,7 +119,7 @@ + #include /* flush_tlb(), flush_tlb_all() */ + #include /* CPU hotplug support */ + #endif +-#include /* page table entry lookup */ ++//#include /* page table entry lookup */ + + #include /* pci_find_class, etc */ + #include /* tasklets, interrupt helpers */ +--- a/kernel/uvm/nvidia_uvm_linux.h 2019-12-11 17:04:24.000000000 -0500 ++++ b/kernel/uvm/nvidia_uvm_linux.h 2021-02-24 06:26:26.237367942 -0500 +@@ -141,7 +141,7 @@ + #if !defined(NV_VMWARE) + #include /* flush_tlb(), flush_tlb_all() */ + #endif +-#include /* page table entry lookup */ ++//#include /* page table entry lookup */ + + #include /* tasklets, interrupt helpers */ + #include + diff --git a/PKGBUILD b/PKGBUILD index 9026944..2be82e5 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,12 +1,12 @@ -# Maintainer: Jerry Xiao # Maintainer: graysky +# Maintainer: Jerry Xiao # Contributor: Giancarlo Razzolini # Contributor: Eric BĂ©langer pkgbase=nvidia-340xx pkgname=(nvidia-340xx nvidia-340xx-dkms) pkgver=340.108 -pkgrel=13 +pkgrel=14 pkgdesc="NVIDIA drivers for linux, 340xx legacy branch" arch=('x86_64') url="https://www.nvidia.com/" @@ -14,17 +14,20 @@ makedepends=("nvidia-340xx-utils=${pkgver}" 'linux>=5.5' 'linux-headers>=5.5') conflicts=('nvidia') license=('custom') options=(!strip) +# https://github.com/warpme/minimyth2/tree/master/script/nvidia/nvidia-340.108/files source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run" 0001-kernel-5.7.patch 0002-kernel-5.8.patch 0003-kernel-5.9.patch 0004-kernel-5.10.patch + 0005-kernel-5.11.patch ) b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028' '7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1' 'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896' '947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1' - '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f') + '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f' + 'bbea70e129f5a51a06a0c341f731be360f39f6b31a88df39e97c2d8f2daa87dd6c4b3a8becc57f25ad2a26ad567c69208546d907e7334c320796c4140fc78a15') _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32" # default is 'linux' substitute custom name here @@ -36,10 +39,15 @@ prepare() { sh "${_pkg}.run" --extract-only cd "${_pkg}" - patch -Np1 -i ../0001-kernel-5.7.patch - patch -Np1 -i ../0002-kernel-5.8.patch - patch -Np1 -i ../0003-kernel-5.9.patch - patch -Np1 -i ../0004-kernel-5.10.patch + + local src + for src in "${source[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = 0*.patch ]] || continue + echo "Applying patch $src..." + patch -Np1 < "../$src" + done cp -a kernel kernel-dkms }