diff --git a/PKGBUILD b/PKGBUILD index e8e562a..7498f00 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -273,7 +273,7 @@ fi pkgname=("${_pkgname_array[@]}") pkgver=$_driver_version -pkgrel=216 +pkgrel=217 arch=('x86_64') url="http://www.nvidia.com/" license=('custom:NVIDIA') @@ -333,6 +333,7 @@ source=($_source_name 'kernel-5.16.patch' # 5.16 workaround 'kernel-5.16-std.diff' # 5.16 workaround for 470.6x 'kernel-5.17.patch' # 5.17 workaround + 'kernel-6.0.patch' ) msg2 "Selected driver integrity check behavior (md5sum or SKIP): $_md5sum" # If the driver is "known", return md5sum. If it isn't, return SKIP @@ -373,7 +374,8 @@ md5sums=("$_md5sum" 'f5fd091893f513d2371654e83049f099' 'd684ca11fdc9894c14ead69cb35a5946' '0f987607c98eb6faeb7d691213de6a70' - 'a70bc9cbbc7e8563b48985864a11de71') + 'a70bc9cbbc7e8563b48985864a11de71' + '31128900574dec9ebdb753db50ef4f16') if [ "$_open_source_modules" = "true" ]; then source+=("$pkgname-$pkgver.tar.gz::https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/${pkgver}.tar.gz") @@ -759,6 +761,12 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf _whitelist517=( 470.62.* 495*) fi + # 6.0 + if (( $(vercmp "$_kernel" "6.0") >= 0 )); then + _kernel60="1" + _whitelist60=( 515.6* ) + fi + # Loop patches (linux-4.15.patch, lol.patch, ...) for _p in $(printf -- '%s\n' ${source[@]} | grep .patch); do # https://stackoverflow.com/a/21058239/1821548 # Patch version (4.15, "", ...) @@ -821,6 +829,9 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf if [ "$_patch" = "5.17" ]; then _whitelist=(${_whitelist517[@]}) fi + if [ "$_patch" = "6.0" ]; then + _whitelist=(${_whitelist60[@]}) + fi patchy=0 if (( $(vercmp "$_kernel" "$_patch") >= 0 )); then @@ -1155,6 +1166,20 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf fi fi + # 6.0 + if [ "$_kernel60" = "1" ]; then + patchy=0 + for yup in "${_whitelist60[@]}"; do + [[ $pkgver = $yup ]] && patchy=1 + done + if [ "$patchy" = "1" ]; then + msg2 "Applying kernel-6.0.patch for dkms..." + patch -Np1 -i "$srcdir"/kernel-6.0.patch + else + msg2 "Skipping kernel-6.0.patch as it doesn't apply to this driver version..." + fi + fi + # Legacy quirks if [ "$_oldstuff" = "1" ]; then msg2 "Applying 01-ipmi-vm.diff for dkms..." diff --git a/patches/kernel-6.0.patch b/patches/kernel-6.0.patch new file mode 100644 index 0000000..0b83408 --- /dev/null +++ b/patches/kernel-6.0.patch @@ -0,0 +1,12 @@ +diff --git a/kernel-dkms/nvidia-drm/nvidia-drm-helper.c b/kernel-dkms/nvidia-drm/nvidia-drm-helper.c +index b04ff67..2df20a3 100644 +--- a/kernel-dkms/nvidia-drm/nvidia-drm-helper.c ++++ b/kernel-dkms/nvidia-drm/nvidia-drm-helper.c +@@ -30,6 +30,7 @@ typedef int vm_fault_t; + * present simplifies nvidia-drm.ko source. + */ + ++#include + #include "nvidia-drm-helper.h" + + #include "nvmisc.h"