From ff2e06ef30ab02c7857837130bfc22443c2747c6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 13 Oct 2022 23:43:42 +0100 Subject: sys-kernel/nvidia-drivers-dkms : revision bump, kernel 6.0 compatibility --- .../sys-kernel/nvidia-drivers-dkms-470.141.03 | 13 ------ .../sys-kernel/nvidia-drivers-dkms-470.141.03-r1 | 13 ++++++ metadata/pkg_desc_index | 2 +- .../nvidia-drivers-dkms/files/kernel-6.0.patch | 43 +++++++++++++++++++ .../nvidia-drivers-dkms-470.141.03-r1.ebuild | 49 ++++++++++++++++++++++ .../nvidia-drivers-dkms-470.141.03.ebuild | 48 --------------------- 6 files changed, 106 insertions(+), 62 deletions(-) delete mode 100644 metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.141.03 create mode 100644 metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.141.03-r1 create mode 100644 sys-kernel/nvidia-drivers-dkms/files/kernel-6.0.patch create mode 100644 sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03-r1.ebuild delete mode 100644 sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03.ebuild diff --git a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.141.03 b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.141.03 deleted file mode 100644 index 3247e07d..00000000 --- a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.141.03 +++ /dev/null @@ -1,13 +0,0 @@ -DEFINED_PHASES=install postinst prerm unpack -DEPEND=sys-kernel/dkms -DESCRIPTION=NVIDIA driver sources for linux -EAPI=6 -HOMEPAGE=http://www.nvidia.com/ -INHERIT=eutils -KEYWORDS=amd64 -LICENSE=GPL-2 NVIDIA-r2 -RDEPEND=sys-kernel/dkms !!sys-kernel/nvidia-drivers-legacy-dkms -SLOT=0 -SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/470.141.03/NVIDIA-Linux-x86_64-470.141.03.run ) -_eclasses_=desktop 22952d8f27cac191d75529d4c38e6bfa edos2unix 33e347e171066657f91f8b0c72ec8773 epatch 447396341f5f896d722e435a06f87a4f eqawarn c9847c43b3253a276ae2eabddedab3d7 estack 055c42df72f76a4f45ec92b35e83cd56 eutils 8f942ebdcf04334697649d4a0bf65a32 ltprune 97143780d341cc8d8f1d4c6187a36d29 multilib 5ca4e49abed8e3a2f7b56920eadee157 preserve-libs a8e50acee31b5759b4df1f7707cae54b strip-linguas ac3ee41ee2d31d8c41a77c0838320cc7 toolchain-funcs 441f754fd75cd4fd1fa06fbc17da6144 vcs-clean d271b7bc7e6a009758d7d4ef749174e3 wrapper 4a1902f969e5718126434fc35f3a0d9c -_md5_=4877cba8e9c34ad8a2ff1cfd47be0f1c diff --git a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.141.03-r1 b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.141.03-r1 new file mode 100644 index 00000000..e8aaebd3 --- /dev/null +++ b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.141.03-r1 @@ -0,0 +1,13 @@ +DEFINED_PHASES=install postinst prerm unpack +DEPEND=sys-kernel/dkms +DESCRIPTION=NVIDIA driver sources for linux +EAPI=6 +HOMEPAGE=http://www.nvidia.com/ +INHERIT=eutils +KEYWORDS=amd64 +LICENSE=GPL-2 NVIDIA-r2 +RDEPEND=sys-kernel/dkms !!sys-kernel/nvidia-drivers-legacy-dkms +SLOT=0 +SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/470.141.03/NVIDIA-Linux-x86_64-470.141.03.run ) +_eclasses_=desktop 22952d8f27cac191d75529d4c38e6bfa edos2unix 33e347e171066657f91f8b0c72ec8773 epatch 447396341f5f896d722e435a06f87a4f eqawarn c9847c43b3253a276ae2eabddedab3d7 estack 055c42df72f76a4f45ec92b35e83cd56 eutils 8f942ebdcf04334697649d4a0bf65a32 ltprune 97143780d341cc8d8f1d4c6187a36d29 multilib 5ca4e49abed8e3a2f7b56920eadee157 preserve-libs a8e50acee31b5759b4df1f7707cae54b strip-linguas ac3ee41ee2d31d8c41a77c0838320cc7 toolchain-funcs 441f754fd75cd4fd1fa06fbc17da6144 vcs-clean d271b7bc7e6a009758d7d4ef749174e3 wrapper 4a1902f969e5718126434fc35f3a0d9c +_md5_=cd77211d1b2a14ed00683d3638cad3ff diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index 3ad341b5..62673ad1 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -65,7 +65,7 @@ sys-kernel/linux-image-redcore-lts-legacy 5.10.147: Redcore Linux Kernel Image ( sys-kernel/linux-sources-redcore 6.0.1: Redcore Linux Kernel Sources sys-kernel/linux-sources-redcore-lts 5.15.73: Redcore Linux Kernel Sources (LTS) sys-kernel/linux-sources-redcore-lts-legacy 5.10.147: Redcore Linux Kernel Sources (LTS Legacy v5.10) -sys-kernel/nvidia-drivers-dkms 470.141.03: NVIDIA driver sources for linux +sys-kernel/nvidia-drivers-dkms 470.141.03-r1: NVIDIA driver sources for linux sys-kernel/nvidia-drivers-legacy-dkms 390.154: NVIDIA driver sources for linux sys-kernel/vhba-dkms 20211218: Virtual (SCSI) Host Bus Adapter kernel module for the CDEmu suite sources sys-kernel/virtualbox-modules-dkms 6.1.18-r2: Kernel Modules source for Virtualbox diff --git a/sys-kernel/nvidia-drivers-dkms/files/kernel-6.0.patch b/sys-kernel/nvidia-drivers-dkms/files/kernel-6.0.patch new file mode 100644 index 00000000..372b6572 --- /dev/null +++ b/sys-kernel/nvidia-drivers-dkms/files/kernel-6.0.patch @@ -0,0 +1,43 @@ +diff -Nur a/kernel/nvidia/nv-acpi.c b/kernel/nvidia/nv-acpi.c +--- a/kernel/nvidia/nv-acpi.c 2022-06-30 20:05:22.000000000 +0100 ++++ b/kernel/nvidia/nv-acpi.c 2022-10-13 23:34:09.841766070 +0100 +@@ -16,7 +16,10 @@ + + #include + +-#if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED) ++#include ++// Rel.commit "ACPI: bus: Drop unused list heads from struct acpi_device" (Rafael J. Wysocki, 4 Jun 2022) ++// Disable ACPI support due to more GPL stuff (acpi_dev_for_each_child is only GPL-exported) ++#if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)) + static NV_STATUS nv_acpi_extract_integer (const union acpi_object *, void *, NvU32, NvU32 *); + static NV_STATUS nv_acpi_extract_buffer (const union acpi_object *, void *, NvU32, NvU32 *); + static NV_STATUS nv_acpi_extract_package (const union acpi_object *, void *, NvU32, NvU32 *); +diff -Nur a/kernel/nvidia/nv.c b/kernel/nvidia/nv.c +--- a/kernel/nvidia/nv.c 2022-06-30 20:05:22.000000000 +0100 ++++ b/kernel/nvidia/nv.c 2022-10-13 23:34:09.841766070 +0100 +@@ -5423,7 +5423,8 @@ + { + NvU8 buf[8]; + +-#if defined(NV_SEQ_READ_ITER_PRESENT) ++// FIXME: Avoid this code path because on Linux 6.0-rc1, init_sync_kiocb references a GPL symbol ++#if defined(NV_SEQ_READ_ITER_PRESENT) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)) + struct file *file; + ssize_t num_read; + struct kiocb kiocb; +diff -Nur a/kernel/nvidia-drm/nvidia-drm-helper.c b/kernel/nvidia-drm/nvidia-drm-helper.c +--- a/kernel/nvidia-drm/nvidia-drm-helper.c 2022-06-30 19:33:22.000000000 +0100 ++++ b/kernel/nvidia-drm/nvidia-drm-helper.c 2022-10-13 23:34:09.841766070 +0100 +@@ -41,6 +41,11 @@ + #include + #endif + ++// Add header which is no longer indirectly referenced as of Linux 6.0-rc1 ++#if defined(NV_DRM_DRM_FRAMEBUFFER_H_PRESENT) ++#include ++#endif ++ + static void __nv_drm_framebuffer_put(struct drm_framebuffer *fb) + { + #if defined(NV_DRM_FRAMEBUFFER_GET_PRESENT) diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03-r1.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03-r1.ebuild new file mode 100644 index 00000000..a24cf3f6 --- /dev/null +++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit eutils + +NV_URI="http://us.download.nvidia.com/XFree86/" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" + +DESCRIPTION="NVIDIA driver sources for linux" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )" + +LICENSE="GPL-2 NVIDIA-r2" +SLOT="0" +KEYWORDS="amd64" +IUSE="" + +DEPEND="sys-kernel/dkms" +RDEPEND="${DEPEND} + !!sys-kernel/nvidia-drivers-legacy-dkms" + +PATCHES=( + "${FILESDIR}"/fs62142.patch + "${FILESDIR}"/kernel-6.0.patch + "${FILESDIR}"/dkms.patch +) + +S="${WORKDIR}/${AMD64_NV_PACKAGE}" + +src_unpack() { + sh ${DISTDIR}/${AMD64_NV_PACKAGE}.run --extract-only +} + +src_install() { + dodir usr/src/${P} + insinto usr/src/${P} + doins -r "${S}"/kernel/* +} + +pkg_postinst() { + dkms add ${PN}/${PV} +} + +pkg_prerm() { + dkms remove ${PN}/${PV} --all +} diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03.ebuild deleted file mode 100644 index 63bdc6ce..00000000 --- a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.141.03.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit eutils - -NV_URI="http://us.download.nvidia.com/XFree86/" -AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" - -DESCRIPTION="NVIDIA driver sources for linux" -HOMEPAGE="http://www.nvidia.com/" -SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )" - -LICENSE="GPL-2 NVIDIA-r2" -SLOT="0" -KEYWORDS="amd64" -IUSE="" - -DEPEND="sys-kernel/dkms" -RDEPEND="${DEPEND} - !!sys-kernel/nvidia-drivers-legacy-dkms" - -PATCHES=( - "${FILESDIR}"/fs62142.patch - "${FILESDIR}"/dkms.patch -) - -S="${WORKDIR}/${AMD64_NV_PACKAGE}" - -src_unpack() { - sh ${DISTDIR}/${AMD64_NV_PACKAGE}.run --extract-only -} - -src_install() { - dodir usr/src/${P} - insinto usr/src/${P} - doins -r "${S}"/kernel/* -} - -pkg_postinst() { - dkms add ${PN}/${PV} -} - -pkg_prerm() { - dkms remove ${PN}/${PV} --all -} -- cgit v1.2.3