system/nvidia-legacy390-kernel: Updated for version 390.147.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Lenard Spencer 2022-04-01 21:28:58 +07:00 committed by Willy Sudiarto Raharjo
parent c36cc2eeab
commit 3a06c47805
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 51 additions and 17 deletions

View file

@ -1,10 +1,9 @@
This is the kernel-module needed by the proprietary binary nvidia
driver.
You also need the nvidia-driver package from SlackBuilds.org.
driver. You also need the nvidia-driver package from SlackBuilds.org.
To build the package for a kernel different from the running one,
start the script setting the KERNEL variable as in
KERNEL=4.6.3 ./nvidia-legacy390-kernel.SlackBuild
KERNEL=4.6.3 ./nvidia-legacy470-kernel.SlackBuild
A default config file is placed at
/usr/share/X11/xorg.conf.d/10-nvidia.conf
@ -14,3 +13,5 @@ You do not need this file at all if you have a proper and complete
xorg.conf.
The xf86-video-nouveau-blacklist package from /extra is required.
The Nvidia 390.xx series will be supported through December 2022.

View file

@ -0,0 +1,36 @@
From 026a2a54a234cdb7bf78c17be7ea29d8dcf9f390 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Sun, 23 Jan 2022 16:28:18 +0100
Subject: [PATCH] Tentative fix for NVIDIA 470.94 driver for Linux 5.17-rc1
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=359745d78351c6f5442435f81549f0207ece28aa
(edit by LRS: modified for NVIDIA 390.xx drivers)
---
common/inc/nv-procfs-utils.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/common/inc/nv-procfs.h b/common/inc/nv-procfs.h
index 7c3e1a3..462eac1 100644
--- a/common/inc/nv-procfs.h
+++ b/common/inc/nv-procfs.h
@@ -10,6 +10,7 @@
#ifndef _NV_PROCFS_H
#define _NV_PROCFS_H
+#include <linux/version.h>
#include "conftest.h"
#ifdef CONFIG_PROC_FS
@@ -114,6 +115,8 @@ typedef struct file_operations nv_proc_ops_t;
#if defined(NV_PDE_DATA_PRESENT)
# define NV_PDE_DATA(inode) PDE_DATA(inode)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
+# define NV_PDE_DATA(inode) pde_data(inode)
#else
# define NV_PDE_DATA(inode) PDE(inode)->data
#endif
--
2.34.1

View file

@ -28,7 +28,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nvidia-legacy390-kernel
VERSION=${VERSION:-390.144}
VERSION=${VERSION:-390.147}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -85,15 +85,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Patch for 5.14 kernel:
patch -p0 < $CWD/kernel-5.14.patch
# 64-bit only:
if [ "$ARCH" = "x86_64" ]; then
patch -p0 < $CWD/kernel-5.14-uvm.patch
fi
(cd kernel || exit 1
make SYSSRC=$KERNELPATH module || exit 1
# patch for kernels 5.17 and newer:
# patch -p1 < $CWD/nvidia-legacy390-pde_data.patch
patch -p1 < $CWD/nvidia-390xx-fix-linux-5.17.patch
# CC=gcc suppresses an otherwise harmless "compiler mismatch" message
CC=gcc make SYSSRC=$KERNELPATH module || exit 1
)
mkdir -p $PKG/lib/modules/$KERNEL/kernel/drivers/video

View file

@ -1,10 +1,10 @@
PRGNAM="nvidia-legacy390-kernel"
VERSION="390.144"
VERSION="390.147"
HOMEPAGE="http://www.nvidia.com"
DOWNLOAD="https://download.nvidia.com/XFree86/Linux-x86/390.144/NVIDIA-Linux-x86-390.144.run"
MD5SUM="6ee8cd784135bd79f5e416b6815f443d"
DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/390.144/NVIDIA-Linux-x86_64-390.144.run"
MD5SUM_x86_64="dc6a203e3c32456e16e6fae5c8a7c728"
DOWNLOAD="https://download.nvidia.com/XFree86/Linux-x86/390.147/NVIDIA-Linux-x86-390.147.run"
MD5SUM="7af8932a2ae9326cfe8638fe77d62441"
DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/390.147/NVIDIA-Linux-x86_64-390.147.run"
MD5SUM_x86_64="59fafd7991f7d86e05dfcbc8a5ceaf8f"
REQUIRES=""
MAINTAINER="Lenard Spencer"
EMAIL="lenardrspencer@gmai.com"