mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
* fix(nvidia-kmod-common): Swap back to kernel-open as default
* feat(nvidia-kmod-common): Scriptlet to detect cards that need closed modules
* chore: Bump release
* feat: Update note
* refactor: Change to Negativo17's sed command
* feat: Only change file if it needs to be changed
* fix: Forgot a `then`
* feat: More descript cariable because why not
* feat: Add Akmods/DKMS rebuild to scriptlet?
* feat: Add macro back to post script???
* fix: Make this posttrans
* feat: Open and closed kmod variants
* cleanup: Missed some testing stuff in the specs...
* refactor: Can actually just do the DKMS ones in dkms.conf
* shsdsadhdjk
* fix: Rename didn't stick?
* fix: Requires/provides
* chore: Rename open dkms.conf file
* chore: Bump release
---------
(cherry picked from commit 196d15e0a8)
Signed-off-by: Gilver <rockgrub@disroot.org>
Signed-off-by: RockGrub <RockGrub@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ PACKAGE_NAME="nvidia"
|
||||
PACKAGE_VERSION="__VERSION_STRING"
|
||||
AUTOINSTALL="yes"
|
||||
|
||||
. /etc/nvidia/kernel.conf
|
||||
MODULE_VARIANT=kernel
|
||||
|
||||
# Quote make to avoid DKMS replacing it with "make -j$parallel_jobs KERNELRELEASE=$kernelver"
|
||||
CLEAN="'make' -j$(nproc) -C ${MODULE_VARIANT} clean"
|
||||
+2
-2
@@ -5,14 +5,14 @@
|
||||
|
||||
Name: dkms-%{modulename}
|
||||
Version: 570.144
|
||||
Release: 1%?dist
|
||||
Release: 3%?dist
|
||||
Summary: NVIDIA display driver kernel module
|
||||
Epoch: 3
|
||||
License: NVIDIA License
|
||||
URL: https://www.nvidia.com/object/unix.html
|
||||
Source0: https://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run
|
||||
Source1: %{name}.conf
|
||||
Patch0: nvidia-kernel-ccflags-y.patch
|
||||
%dnl Patch0: nvidia-kernel-ccflags-y.patch
|
||||
BuildRequires: sed
|
||||
Provides: %{modulename}-kmod = %{?epoch:%{epoch}:}%{version}
|
||||
Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version}
|
||||
@@ -0,0 +1,8 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "dkms-nvidia-open.spec"
|
||||
}
|
||||
labels {
|
||||
subrepo = "nvidia"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
PACKAGE_NAME="nvidia"
|
||||
PACKAGE_VERSION="__VERSION_STRING"
|
||||
AUTOINSTALL="yes"
|
||||
|
||||
MODULE_VARIANT=kernel-open
|
||||
|
||||
# Quote make to avoid DKMS replacing it with "make -j$parallel_jobs KERNELRELEASE=$kernelver"
|
||||
MAKE[0]="'make' -j$(nproc) -C ${MODULE_VARIANT} KERNEL_UNAME=${kernelver} modules"
|
||||
|
||||
BUILT_MODULE_NAME[0]="nvidia"
|
||||
BUILT_MODULE_LOCATION[0]="${MODULE_VARIANT}"
|
||||
DEST_MODULE_LOCATION[0]="/extra"
|
||||
|
||||
BUILT_MODULE_NAME[1]="nvidia-modeset"
|
||||
BUILT_MODULE_LOCATION[1]="${MODULE_VARIANT}"
|
||||
DEST_MODULE_LOCATION[1]="/extra"
|
||||
|
||||
BUILT_MODULE_NAME[2]="nvidia-drm"
|
||||
BUILT_MODULE_LOCATION[2]="${MODULE_VARIANT}"
|
||||
DEST_MODULE_LOCATION[2]="/extra"
|
||||
|
||||
BUILT_MODULE_NAME[3]="nvidia-uvm"
|
||||
BUILT_MODULE_LOCATION[3]="${MODULE_VARIANT}"
|
||||
DEST_MODULE_LOCATION[3]="/extra"
|
||||
|
||||
BUILT_MODULE_NAME[4]="nvidia-peermem"
|
||||
BUILT_MODULE_LOCATION[4]="${MODULE_VARIANT}"
|
||||
DEST_MODULE_LOCATION[4]="/extra"
|
||||
@@ -0,0 +1,61 @@
|
||||
## NVIDIA DKMS package, based on the work of Negativo17 with tweaks for Terra.
|
||||
|
||||
%global debug_package %{nil}
|
||||
%global modulename nvidia
|
||||
|
||||
Name: dkms-%{modulename}-open
|
||||
Version: 570.144
|
||||
Release: 1%?dist
|
||||
Summary: NVIDIA display driver kernel module
|
||||
Epoch: 3
|
||||
License: NVIDIA License
|
||||
URL: https://www.nvidia.com/object/unix.html
|
||||
Source0: https://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run
|
||||
Source1: %{name}.conf
|
||||
%dnl Patch0: nvidia-kernel-ccflags-y.patch
|
||||
BuildRequires: sed
|
||||
Provides: %{modulename}-open-kmod = %{?epoch:%{epoch}:}%{version}
|
||||
Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version}
|
||||
Requires: dkms
|
||||
Conflicts: akmod-nvidia
|
||||
# Unlike most DKMS packages, this package is NOT noarch!
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
%description
|
||||
This package provides the NVIDIA kernel driver modules.
|
||||
|
||||
%prep
|
||||
sh %{SOURCE0} -x --target dkms-nvidia-%{version}-%{_arch}
|
||||
%setup -T -D -n dkms-nvidia-%{version}-%{_arch}
|
||||
%autopatch -p1
|
||||
|
||||
cp -f %{SOURCE1} dkms.conf
|
||||
|
||||
sed -i -e 's/__VERSION_STRING/%{version}/g' dkms.conf
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
|
||||
cp -fr * %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
|
||||
rm -f %{buildroot}%{_usrsrc}/%{modulename}-%{version}/*/dkms.conf
|
||||
|
||||
%post
|
||||
dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || :
|
||||
# Rebuild and make available for the currently running kernel:
|
||||
dkms build -m %{modulename} -v %{version} -q || :
|
||||
dkms install -m %{modulename} -v %{version} -q --force || :
|
||||
dracut --regenerate-all --force --quiet
|
||||
|
||||
%preun
|
||||
# Remove all versions from DKMS registry:
|
||||
dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || :
|
||||
if [ "$1" == 0 ]; then
|
||||
dracut --regenerate-all --force --quiet
|
||||
fi
|
||||
|
||||
%files
|
||||
%{_usrsrc}/%{modulename}-%{version}
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
@@ -0,0 +1 @@
|
||||
NO_WEAK_MODULES="yes"
|
||||
+2
-5
@@ -13,8 +13,5 @@
|
||||
# +-------------+---------------------+----------------+
|
||||
|
||||
# TERRA-SPECIFIC NOTES:
|
||||
# Since we are focused on HWE, we will use proprietary drivers for now.
|
||||
# At least until Pascal/Maxwell support is added to the open source drivers, or until
|
||||
# everyone stops using them in the near future.
|
||||
|
||||
MODULE_VARIANT=kernel
|
||||
# The default module versions have been added to the DKMS and Akmods packages.
|
||||
# This file now exists only to explain how the variable works.
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
Name: nvidia-kmod-common
|
||||
Version: 570.144
|
||||
Release: 1%?dist
|
||||
Release: 3%?dist
|
||||
Summary: Common file for NVIDIA's proprietary driver kernel modules
|
||||
Epoch: 3
|
||||
License: NVIDIA License
|
||||
@@ -17,7 +17,7 @@ URL: http://www.nvidia.com/object/unix.html
|
||||
BuildArch: noarch
|
||||
|
||||
Source0: http://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run
|
||||
Source18: kernel.conf
|
||||
Source18: MODULE_VARIANT.txt
|
||||
Source19: nvidia-modeset.conf
|
||||
Source20: nvidia.conf
|
||||
Source21: 60-nvidia.rules
|
||||
@@ -26,7 +26,7 @@ Source21: 60-nvidia.rules
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
Requires: nvidia-modprobe
|
||||
Requires: nvidia-kmod = %{?epoch:%{epoch}:}%{version}
|
||||
Requires: (nvidia-open-kmod = %{?epoch:%{epoch}:}%{version} or nvidia-kmod = %{?epoch:%{epoch}:}%{version})
|
||||
Provides: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version}
|
||||
Obsoletes: cuda-nvidia-kmod-common < %{?epoch:%{epoch}:}%{version}
|
||||
|
||||
@@ -39,9 +39,6 @@ sh %{SOURCE0} -x --target nvidia-kmod-%{version}-x86_64
|
||||
%setup -T -D -n nvidia-kmod-%{version}-x86_64
|
||||
|
||||
%install
|
||||
# Choice of kernel module type:
|
||||
install -p -m 0644 -D %{SOURCE18} %{buildroot}%{_sysconfdir}/nvidia/kernel.conf
|
||||
|
||||
# Nvidia modesetting support:
|
||||
install -p -m 0644 -D %{SOURCE19} %{buildroot}%{_sysconfdir}/modprobe.d/nvidia-modeset.conf
|
||||
|
||||
@@ -58,6 +55,9 @@ install -p -m 644 -D %{SOURCE21} %{buildroot}%{_udevrulesdir}/60-nvidia.rules
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/firmware/nvidia/%{version}/
|
||||
install -p -m 644 firmware/* %{buildroot}%{_prefix}/lib/firmware/nvidia/%{version}
|
||||
|
||||
# Old kernel.conf rewritten as a doc file.
|
||||
cp %{SOURCE18} .
|
||||
|
||||
%pre
|
||||
# Remove the kernel command line adjustments one last time when doing an upgrade
|
||||
# from a version that was still setting up the command line parameters:
|
||||
@@ -67,340 +67,13 @@ if [ "$1" -eq "2" ] && [ -x %{_bindir}/nvidia-boot-update ]; then
|
||||
fi ||:
|
||||
|
||||
%files
|
||||
%doc MODULE_VARIANT.txt
|
||||
%{_modprobedir}/nvidia.conf
|
||||
%dir %{_prefix}/lib/firmware
|
||||
%dir %{_prefix}/lib/firmware/nvidia
|
||||
%{_prefix}/lib/firmware/nvidia/%{version}
|
||||
%config(noreplace) %{_sysconfdir}/modprobe.d/nvidia-modeset.conf
|
||||
%config(noreplace) %{_sysconfdir}/nvidia/kernel.conf
|
||||
%{_udevrulesdir}/60-nvidia.rules
|
||||
|
||||
%changelog
|
||||
* Wed Dec 25 2024 Simone Caronni <negativo17@gmail.com> - 3:565.77-2
|
||||
- Run nvidia-modprobe only on add/bind (thanks os369510).
|
||||
|
||||
* Thu Dec 05 2024 Simone Caronni <negativo17@gmail.com> - 3:565.77-1
|
||||
- Update to 565.77.
|
||||
|
||||
* Tue Oct 29 2024 Simone Caronni <negativo17@gmail.com> - 3:565.57.01-2
|
||||
- Update power management configuration.
|
||||
|
||||
* Wed Oct 23 2024 Simone Caronni <negativo17@gmail.com> - 3:565.57.01-1
|
||||
- Update to 565.57.01.
|
||||
|
||||
* Fri Oct 11 2024 Simone Caronni <negativo17@gmail.com> - 3:560.35.03-2
|
||||
- Fix configuration file replacement (#14).
|
||||
|
||||
* Wed Aug 21 2024 Simone Caronni <negativo17@gmail.com> - 3:560.35.03-1
|
||||
- Update to 560.35.03.
|
||||
|
||||
* Tue Aug 06 2024 Simone Caronni <negativo17@gmail.com> - 3:560.31.02-1
|
||||
- Update to 560.31.02.
|
||||
|
||||
* Mon Aug 05 2024 Simone Caronni <negativo17@gmail.com> - 3:560.28.03-1
|
||||
- Update to 560.28.03.
|
||||
|
||||
* Tue Jul 02 2024 Simone Caronni <negativo17@gmail.com> - 3:555.58.02-1
|
||||
- Update to 555.58.02.
|
||||
|
||||
* Thu Jun 27 2024 Simone Caronni <negativo17@gmail.com> - 3:555.58-1
|
||||
- Update to 555.58.
|
||||
|
||||
* Thu Jun 06 2024 Simone Caronni <negativo17@gmail.com> - 3:555.52.04-1
|
||||
- Update to 555.52.04.
|
||||
|
||||
* Fri May 31 2024 Simone Caronni <negativo17@gmail.com> - 3:555.42.02-2
|
||||
- Fix typo in preun scriptlet.
|
||||
|
||||
* Wed May 22 2024 Simone Caronni <negativo17@gmail.com> - 3:555.42.02-1
|
||||
- Update to 555.42.02.
|
||||
|
||||
* Fri Apr 26 2024 Simone Caronni <negativo17@gmail.com> - 3:550.78-1
|
||||
- Update to 550.78.
|
||||
|
||||
* Thu Apr 18 2024 Simone Caronni <negativo17@gmail.com> - 3:550.76-1
|
||||
- Update to 550.76.
|
||||
|
||||
* Sun Mar 24 2024 Simone Caronni <negativo17@gmail.com> - 3:550.67-1
|
||||
- Update to 550.67.
|
||||
|
||||
* Mon Mar 11 2024 Simone Caronni <negativo17@gmail.com> - 3:550.54.14-2
|
||||
- Add support for installing drivers without a configured bootloader (i.e.
|
||||
kickstart case).
|
||||
- Add support for sdboot.
|
||||
|
||||
* Sun Mar 03 2024 Simone Caronni <negativo17@gmail.com> - 3:550.54.14-1
|
||||
- Update to 550.54.14.
|
||||
|
||||
* Tue Feb 06 2024 Simone Caronni <negativo17@gmail.com> - 3:550.40.07-1
|
||||
- Update to 550.40.07.
|
||||
|
||||
* Fri Dec 01 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.06-1
|
||||
- Update to 545.29.06.
|
||||
|
||||
* Tue Nov 14 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.02-5
|
||||
- Update location of configuration file for kernel module variant.
|
||||
|
||||
* Mon Nov 13 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.02-4
|
||||
- Allow installing proprietary or open source kernel modules.
|
||||
|
||||
* Sat Nov 04 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.02-3
|
||||
- Second part of the fix for issue
|
||||
https://github.com/negativo17/nvidia-kmod-common/issues/11.
|
||||
|
||||
* Sat Nov 04 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.02-2
|
||||
- First part of fix for issue
|
||||
https://github.com/negativo17/nvidia-kmod-common/issues/11.
|
||||
|
||||
* Tue Oct 31 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.02-1
|
||||
- Update to 545.29.02.
|
||||
|
||||
* Thu Oct 19 2023 Simone Caronni <negativo17@gmail.com> - 3:545.23.06-2
|
||||
- Also remove old simpledrm workaround if still present.
|
||||
|
||||
* Wed Oct 18 2023 Simone Caronni <negativo17@gmail.com> - 3:545.23.06-1
|
||||
- Update to 545.23.06.
|
||||
|
||||
* Fri Sep 22 2023 Simone Caronni <negativo17@gmail.com> - 3:535.113.01-1
|
||||
- Update to 535.113.01.
|
||||
|
||||
* Thu Aug 24 2023 Simone Caronni <negativo17@gmail.com> - 3:535.104.05-1
|
||||
- Update to 535.104.05.
|
||||
|
||||
* Wed Aug 09 2023 Simone Caronni <negativo17@gmail.com> - 3:535.98-1
|
||||
- Update to 535.98.
|
||||
|
||||
* Wed Jul 19 2023 Simone Caronni <negativo17@gmail.com> - 3:535.86.05-1
|
||||
- Update to 535.86.05.
|
||||
|
||||
* Thu Jun 15 2023 Simone Caronni <negativo17@gmail.com> - 3:535.54.03-1
|
||||
- Update to 535.54.03.
|
||||
|
||||
* Tue Jun 13 2023 Simone Caronni <negativo17@gmail.com> - 3:535.43.02-1
|
||||
- Update to 535.43.02.
|
||||
|
||||
* Fri Mar 24 2023 Simone Caronni <negativo17@gmail.com> - 3:530.41.03-1
|
||||
- Update to 530.41.03.
|
||||
|
||||
* Wed Mar 08 2023 Simone Caronni <negativo17@gmail.com> - 3:530.30.02-1
|
||||
- Update to 530.30.02.
|
||||
|
||||
* Wed Mar 08 2023 Simone Caronni <negativo17@gmail.com> - 3:525.89.02-2
|
||||
- Drop workaround for simpledrm support (fixed in 525.60.11).
|
||||
|
||||
* Fri Feb 10 2023 Simone Caronni <negativo17@gmail.com> - 3:525.89.02-1
|
||||
- Update to 525.89.02.
|
||||
|
||||
* Fri Jan 20 2023 Simone Caronni <negativo17@gmail.com> - 3:525.85.05-1
|
||||
- Update to 525.85.05.
|
||||
|
||||
* Mon Jan 09 2023 Simone Caronni <negativo17@gmail.com> - 3:525.78.01-1
|
||||
- Update to 525.78.01.
|
||||
|
||||
* Tue Nov 29 2022 Simone Caronni <negativo17@gmail.com> - 3:525.60.11-1
|
||||
- Update to 525.60.11.
|
||||
|
||||
* Thu Oct 13 2022 Simone Caronni <negativo17@gmail.com> - 3:520.56.06-1
|
||||
- Update to 520.56.06.
|
||||
|
||||
* Wed Sep 21 2022 Simone Caronni <negativo17@gmail.com> - 3:515.76-1
|
||||
- Update to 515.76.
|
||||
|
||||
* Mon Aug 08 2022 Simone Caronni <negativo17@gmail.com> - 3:515.65.01-1
|
||||
- Update to 515.65.01.
|
||||
|
||||
* Wed Jun 29 2022 Simone Caronni <negativo17@gmail.com> - 3:515.57-1
|
||||
- Update to 515.57.
|
||||
|
||||
* Thu Jun 09 2022 Simone Caronni <negativo17@gmail.com> - 3:515.48.07-2
|
||||
- Adjust conditionals.
|
||||
- Drop removal of nvidia-drm.modeset=1 from the kernel command line.
|
||||
- Add nvidia-drm.modeset=1 to the configuration file also on RHEL/CentOS.
|
||||
|
||||
* Wed Jun 01 2022 Simone Caronni <negativo17@gmail.com> - 3:515.48.07-1
|
||||
- Update to 515.48.07.
|
||||
|
||||
* Tue May 31 2022 Simone Caronni <negativo17@gmail.com> - 3:515.43.04-2
|
||||
- Blacklist nouveau for modprobe.
|
||||
|
||||
* Thu May 12 2022 Simone Caronni <negativo17@gmail.com> - 3:515.43.04-1
|
||||
- Update to 515.43.04.
|
||||
|
||||
* Mon May 02 2022 Simone Caronni <negativo17@gmail.com> - 3:510.68.02-1
|
||||
- Update to 510.68.02.
|
||||
|
||||
* Mon Mar 28 2022 Simone Caronni <negativo17@gmail.com> - 3:510.60.02-1
|
||||
- Update to 510.60.02.
|
||||
|
||||
* Mon Feb 14 2022 Simone Caronni <negativo17@gmail.com> - 3:510.54-1
|
||||
- Update to 510.54.
|
||||
|
||||
* Wed Feb 02 2022 Simone Caronni <negativo17@gmail.com> - 3:510.47.03-1
|
||||
- Update to 510.47.03.
|
||||
|
||||
* Tue Dec 14 2021 Simone Caronni <negativo17@gmail.com> - 3:495.46-1
|
||||
- Update to 495.46.
|
||||
|
||||
* Fri Dec 10 2021 Jamie Nguyen <jamien@nvidia.com> - 3:495.44-4
|
||||
- Source grub file before rewriting GRUB_CMDLINE_LINUX in preun. Without this,
|
||||
we are clearing out GRUB_CMDLINE_LINUX when this package gets removed.
|
||||
|
||||
* Sun Nov 07 2021 Simone Caronni <negativo17@gmail.com> - 3:495.44-3
|
||||
- Avoid duplication on modprobe configuration file names (second file in
|
||||
/usr/lib/modprobe.d gets ignored). Thanks Jens Peters.
|
||||
- Fix issue with missing quotes in /etc/default/grub and multiple parameters.
|
||||
Thanks Roshan Shariff.
|
||||
|
||||
* Sat Nov 06 2021 Simone Caronni <negativo17@gmail.com> - 3:495.44-2
|
||||
- Update configuration files and boot options.
|
||||
|
||||
* Tue Nov 02 2021 Simone Caronni <negativo17@gmail.com> - 3:495.44-1
|
||||
- Update to 495.44.
|
||||
- Also disable bundling nvidia-peermem in initrd.
|
||||
|
||||
* Tue Nov 02 2021 Simone Caronni <negativo17@gmail.com> - 3:470.82.00-1
|
||||
- Update to 470.82.00.
|
||||
|
||||
* Tue Sep 21 2021 Simone Caronni <negativo17@gmail.com> - 3:470.74-1
|
||||
- Update to 470.74.
|
||||
|
||||
* Fri Aug 20 2021 Simone Caronni <negativo17@gmail.com> - 3:470.63.01-3
|
||||
- SPEC file cleanup.
|
||||
- Enable modesetting by default for Fedora 35+
|
||||
|
||||
* Fri Aug 20 2021 Simone Caronni <negativo17@gmail.com> - 3:470.63.01-2
|
||||
- Enable complete power management.
|
||||
|
||||
* Wed Aug 11 2021 Simone Caronni <negativo17@gmail.com> - 3:470.63.01-1
|
||||
- Update to 470.63.01.
|
||||
|
||||
* Tue Jul 20 2021 Simone Caronni <negativo17@gmail.com> - 3:470.57.02-1
|
||||
- Update to 470.57.02.
|
||||
|
||||
* Wed Jun 30 2021 Simone Caronni <negativo17@gmail.com> - 3:470.42.01-1
|
||||
- Update to 470.42.01.
|
||||
|
||||
* Wed May 26 2021 Simone Caronni <negativo17@gmail.com> - 3:465.31-1
|
||||
- Update to 465.31.
|
||||
|
||||
* Sat May 01 2021 Simone Caronni <negativo17@gmail.com> - 3:465.27-1
|
||||
- Update to 465.27.
|
||||
|
||||
* Sun Apr 18 2021 Simone Caronni <negativo17@gmail.com> - 3:465.24.02-1
|
||||
- Update to 465.24.02.
|
||||
|
||||
* Fri Apr 09 2021 Simone Caronni <negativo17@gmail.com> - 3:465.19.01-1
|
||||
- Update to 465.19.01.
|
||||
|
||||
* Fri Mar 19 2021 Simone Caronni <negativo17@gmail.com> - 3:460.67-1
|
||||
- Update to 460.67.
|
||||
|
||||
* Mon Mar 01 2021 Simone Caronni <negativo17@gmail.com> - 3:460.56-1
|
||||
- Update to 460.56.
|
||||
|
||||
* Wed Jan 27 2021 Simone Caronni <negativo17@gmail.com> - 3:460.39-1
|
||||
- Update to 460.39.
|
||||
|
||||
* Thu Jan 7 2021 Simone Caronni <negativo17@gmail.com> - 3:460.32.03-1
|
||||
- Update to 460.32.03.
|
||||
|
||||
* Sun Dec 20 2020 Simone Caronni <negativo17@gmail.com> - 3:460.27.04-1
|
||||
- Update to 460.27.04.
|
||||
- Update comments in modprobe file.
|
||||
|
||||
* Mon Dec 07 2020 Simone Caronni <negativo17@gmail.com> - 3:455.45.01-2
|
||||
- Remove CentOS/RHEL 6 support.
|
||||
|
||||
* Wed Nov 18 2020 Simone Caronni <negativo17@gmail.com> - 3:455.45.01-1
|
||||
- Update to 455.45.01.
|
||||
|
||||
* Mon Nov 02 2020 Simone Caronni <negativo17@gmail.com> - 3:455.38-1
|
||||
- Update to 455.38.
|
||||
|
||||
* Mon Oct 12 2020 Simone Caronni <negativo17@gmail.com> - 3:455.28-1
|
||||
- Update to 455.28.
|
||||
|
||||
* Tue Oct 06 2020 Simone Caronni <negativo17@gmail.com> - 3:450.80.02-1
|
||||
- Update to 450.80.02.
|
||||
|
||||
* Thu Aug 20 2020 Simone Caronni <negativo17@gmail.com> - 3:450.66-1
|
||||
- Update to 450.66.
|
||||
|
||||
* Fri Jul 10 2020 Simone Caronni <negativo17@gmail.com> - 3:450.57-1
|
||||
- Update to 450.57.
|
||||
|
||||
* Thu Jun 25 2020 Simone Caronni <negativo17@gmail.com> - 3:440.100-1
|
||||
- Update to 440.100.
|
||||
|
||||
* Thu Apr 09 2020 Simone Caronni <negativo17@gmail.com> - 3:440.82-1
|
||||
- Update to 440.82.
|
||||
|
||||
* Fri Feb 28 2020 Simone Caronni <negativo17@gmail.com> - 3:440.64-1
|
||||
- Update to 440.64.
|
||||
|
||||
* Tue Feb 04 2020 Simone Caronni <negativo17@gmail.com> - 3:440.59-1
|
||||
- Update to 440.59.
|
||||
|
||||
* Sat Dec 14 2019 Simone Caronni <negativo17@gmail.com> - 3:440.44-1
|
||||
- Update to 440.44.
|
||||
|
||||
* Sat Nov 30 2019 Simone Caronni <negativo17@gmail.com> - 3:440.36-1
|
||||
- Update to 440.36.
|
||||
|
||||
* Mon Nov 11 2019 Simone Caronni <negativo17@gmail.com> - 3:440.31-2
|
||||
- Fix udev rules synax (thanks Leigh)
|
||||
|
||||
* Sat Nov 09 2019 Simone Caronni <negativo17@gmail.com> - 3:440.31-1
|
||||
- Update to 440.31.
|
||||
|
||||
* Thu Oct 17 2019 Simone Caronni <negativo17@gmail.com> - 3:440.26-1
|
||||
- Update to 440.26.
|
||||
|
||||
* Tue Oct 01 2019 Simone Caronni <negativo17@gmail.com> - 3:435.21-3
|
||||
- Remove workaround for onboard GPU devices.
|
||||
- Fix typo on udev character device rules (thanks tbaederr).
|
||||
|
||||
* Tue Oct 01 2019 Simone Caronni <negativo17@gmail.com> - 3:435.21-2
|
||||
- Fix build on CentOS/RHEL 8
|
||||
|
||||
* Tue Sep 03 2019 Simone Caronni <negativo17@gmail.com> - 3:435.21-1
|
||||
- Update to 435.21.
|
||||
|
||||
* Thu Aug 22 2019 Simone Caronni <negativo17@gmail.com> - 3:435.17-1
|
||||
- Update to 435.17.
|
||||
- Add power management functions as per documentation.
|
||||
- Require systemd-rpm-macros instead of systemd on Fedora/RHEL 8+.
|
||||
|
||||
* Wed Jul 31 2019 Simone Caronni <negativo17@gmail.com> - 3:430.40-1
|
||||
- Update to 430.40.
|
||||
|
||||
* Fri Jul 12 2019 Simone Caronni <negativo17@gmail.com> - 3:430.34-1
|
||||
- Update to 430.34.
|
||||
|
||||
* Wed Jun 12 2019 Simone Caronni <negativo17@gmail.com> - 3:430.26-1
|
||||
- Update to 430.26.
|
||||
|
||||
* Thu Jun 06 2019 Simone Caronni <negativo17@gmail.com> - 3:430.14-2
|
||||
- Do not run post/preun scriptlets on Atomic/Silverblue.
|
||||
|
||||
* Sat May 18 2019 Simone Caronni <negativo17@gmail.com> - 3:430.14-1
|
||||
- Update to 430.14.
|
||||
|
||||
* Thu May 09 2019 Simone Caronni <negativo17@gmail.com> - 3:418.74-1
|
||||
- Update to 418.74.
|
||||
- Remove fallback scenario (thanks Karol Herbst).
|
||||
|
||||
* Thu Apr 18 2019 Simone Caronni <negativo17@gmail.com> - 3:418.56-2
|
||||
- Obsoletes cuda-nvidia-kmod-common (thanks Timm).
|
||||
|
||||
* Sun Mar 24 2019 Simone Caronni <negativo17@gmail.com> - 3:418.56-1
|
||||
- Update to 418.56.
|
||||
|
||||
* Fri Feb 22 2019 Simone Caronni <negativo17@gmail.com> - 3:418.43-1
|
||||
- Update to 418.43.
|
||||
|
||||
* Wed Feb 06 2019 Simone Caronni <negativo17@gmail.com> - 3:418.30-1
|
||||
- Update to 418.30.
|
||||
|
||||
* Sun Feb 03 2019 Simone Caronni <negativo17@gmail.com> - 3:415.27-1
|
||||
- First build.
|
||||
%autochangelog
|
||||
|
||||
@@ -0,0 +1,234 @@
|
||||
diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild nvidia-kmod-575.51.02-x86_64/kernel/Kbuild
|
||||
--- nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild 2025-04-22 18:54:37.758155663 +0200
|
||||
+++ nvidia-kmod-575.51.02-x86_64/kernel/Kbuild 2025-04-22 18:54:45.069483044 +0200
|
||||
@@ -75,21 +75,15 @@
|
||||
$(eval include $(src)/$(_module)/$(_module).Kbuild))
|
||||
|
||||
|
||||
-#
|
||||
-# Define CFLAGS that apply to all the NVIDIA kernel modules. EXTRA_CFLAGS
|
||||
-# is deprecated since 2.6.24 in favor of ccflags-y, but we need to support
|
||||
-# older kernels which do not have ccflags-y. Newer kernels append
|
||||
-# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
|
||||
-#
|
||||
-
|
||||
-EXTRA_CFLAGS += -I$(src)/common/inc
|
||||
-EXTRA_CFLAGS += -I$(src)
|
||||
-EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
|
||||
-EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
|
||||
-EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\"
|
||||
+ccflags-y += -std=gnu17
|
||||
+ccflags-y += -I$(src)/common/inc
|
||||
+ccflags-y += -I$(src)
|
||||
+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
|
||||
+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
|
||||
+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\"
|
||||
|
||||
ifneq ($(SYSSRCHOST1X),)
|
||||
- EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
|
||||
+ ccflags-y += -I$(SYSSRCHOST1X)
|
||||
endif
|
||||
|
||||
# Some Android kernels prohibit driver use of filesystem functions like
|
||||
@@ -99,57 +93,57 @@
|
||||
PLATFORM_IS_ANDROID ?= 0
|
||||
|
||||
ifeq ($(PLATFORM_IS_ANDROID),1)
|
||||
- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
|
||||
+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
|
||||
else
|
||||
- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
|
||||
+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -Wno-unused-function
|
||||
+ccflags-y += -Wno-unused-function
|
||||
|
||||
ifneq ($(NV_BUILD_TYPE),debug)
|
||||
- EXTRA_CFLAGS += -Wuninitialized
|
||||
+ ccflags-y += -Wuninitialized
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -fno-strict-aliasing
|
||||
+ccflags-y += -fno-strict-aliasing
|
||||
|
||||
ifeq ($(ARCH),arm64)
|
||||
- EXTRA_CFLAGS += -mstrict-align
|
||||
+ ccflags-y += -mstrict-align
|
||||
endif
|
||||
|
||||
ifeq ($(NV_BUILD_TYPE),debug)
|
||||
- EXTRA_CFLAGS += -g
|
||||
+ ccflags-y += -g
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -ffreestanding
|
||||
+ccflags-y += -ffreestanding
|
||||
|
||||
ifeq ($(ARCH),arm64)
|
||||
- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a
|
||||
- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,)
|
||||
+ ccflags-y += -mgeneral-regs-only -march=armv8-a
|
||||
+ ccflags-y += $(call cc-option,-mno-outline-atomics,)
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel
|
||||
+ ccflags-y += -mno-red-zone -mcmodel=kernel
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),powerpc)
|
||||
- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align
|
||||
+ ccflags-y += -mlittle-endian -mno-strict-align
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -DNV_UVM_ENABLE
|
||||
-EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
|
||||
-EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
|
||||
-EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER
|
||||
+ccflags-y += -DNV_UVM_ENABLE
|
||||
+ccflags-y += $(call cc-option,-Werror=undef,)
|
||||
+ccflags-y += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
|
||||
+ccflags-y += -DNV_KERNEL_INTERFACE_LAYER
|
||||
|
||||
#
|
||||
# Detect SGI UV systems and apply system-specific optimizations.
|
||||
#
|
||||
|
||||
ifneq ($(wildcard /proc/sgi_uv),)
|
||||
- EXTRA_CFLAGS += -DNV_CONFIG_X86_UV
|
||||
+ ccflags-y += -DNV_CONFIG_X86_UV
|
||||
endif
|
||||
|
||||
ifdef VGX_FORCE_VFIO_PCI_CORE
|
||||
- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE
|
||||
+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE
|
||||
endif
|
||||
|
||||
WARNINGS_AS_ERRORS ?=
|
||||
@@ -183,7 +177,7 @@
|
||||
|
||||
NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags)
|
||||
|
||||
-NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie
|
||||
+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie
|
||||
NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
|
||||
NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
|
||||
NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
|
||||
diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild
|
||||
--- nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild 2025-04-22 18:54:37.828156191 +0200
|
||||
+++ nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild 2025-04-22 18:54:45.069786396 +0200
|
||||
@@ -75,21 +75,15 @@
|
||||
$(eval include $(src)/$(_module)/$(_module).Kbuild))
|
||||
|
||||
|
||||
-#
|
||||
-# Define CFLAGS that apply to all the NVIDIA kernel modules. EXTRA_CFLAGS
|
||||
-# is deprecated since 2.6.24 in favor of ccflags-y, but we need to support
|
||||
-# older kernels which do not have ccflags-y. Newer kernels append
|
||||
-# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
|
||||
-#
|
||||
-
|
||||
-EXTRA_CFLAGS += -I$(src)/common/inc
|
||||
-EXTRA_CFLAGS += -I$(src)
|
||||
-EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
|
||||
-EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
|
||||
-EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\"
|
||||
+ccflags-y += -std=gnu17
|
||||
+ccflags-y += -I$(src)/common/inc
|
||||
+ccflags-y += -I$(src)
|
||||
+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
|
||||
+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
|
||||
+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\"
|
||||
|
||||
ifneq ($(SYSSRCHOST1X),)
|
||||
- EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
|
||||
+ ccflags-y += -I$(SYSSRCHOST1X)
|
||||
endif
|
||||
|
||||
# Some Android kernels prohibit driver use of filesystem functions like
|
||||
@@ -99,57 +93,57 @@
|
||||
PLATFORM_IS_ANDROID ?= 0
|
||||
|
||||
ifeq ($(PLATFORM_IS_ANDROID),1)
|
||||
- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
|
||||
+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
|
||||
else
|
||||
- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
|
||||
+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -Wno-unused-function
|
||||
+ccflags-y += -Wno-unused-function
|
||||
|
||||
ifneq ($(NV_BUILD_TYPE),debug)
|
||||
- EXTRA_CFLAGS += -Wuninitialized
|
||||
+ ccflags-y += -Wuninitialized
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -fno-strict-aliasing
|
||||
+ccflags-y += -fno-strict-aliasing
|
||||
|
||||
ifeq ($(ARCH),arm64)
|
||||
- EXTRA_CFLAGS += -mstrict-align
|
||||
+ ccflags-y += -mstrict-align
|
||||
endif
|
||||
|
||||
ifeq ($(NV_BUILD_TYPE),debug)
|
||||
- EXTRA_CFLAGS += -g
|
||||
+ ccflags-y += -g
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -ffreestanding
|
||||
+ccflags-y += -ffreestanding
|
||||
|
||||
ifeq ($(ARCH),arm64)
|
||||
- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a
|
||||
- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,)
|
||||
+ ccflags-y += -mgeneral-regs-only -march=armv8-a
|
||||
+ ccflags-y += $(call cc-option,-mno-outline-atomics,)
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel
|
||||
+ ccflags-y += -mno-red-zone -mcmodel=kernel
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),powerpc)
|
||||
- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align
|
||||
+ ccflags-y += -mlittle-endian -mno-strict-align
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -DNV_UVM_ENABLE
|
||||
-EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
|
||||
-EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
|
||||
-EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER
|
||||
+ccflags-y += -DNV_UVM_ENABLE
|
||||
+ccflags-y += $(call cc-option,-Werror=undef,)
|
||||
+ccflags-y += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
|
||||
+ccflags-y += -DNV_KERNEL_INTERFACE_LAYER
|
||||
|
||||
#
|
||||
# Detect SGI UV systems and apply system-specific optimizations.
|
||||
#
|
||||
|
||||
ifneq ($(wildcard /proc/sgi_uv),)
|
||||
- EXTRA_CFLAGS += -DNV_CONFIG_X86_UV
|
||||
+ ccflags-y += -DNV_CONFIG_X86_UV
|
||||
endif
|
||||
|
||||
ifdef VGX_FORCE_VFIO_PCI_CORE
|
||||
- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE
|
||||
+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE
|
||||
endif
|
||||
|
||||
WARNINGS_AS_ERRORS ?=
|
||||
@@ -183,7 +177,7 @@
|
||||
|
||||
NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags)
|
||||
|
||||
-NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie
|
||||
+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie
|
||||
NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
|
||||
NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
|
||||
NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
|
||||
@@ -0,0 +1,66 @@
|
||||
# Build only the akmod package and no kernel module packages:
|
||||
%define buildforkernels akmod
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: nvidia-kmod
|
||||
Version: 570.144
|
||||
Release: 2%?dist
|
||||
Summary: NVIDIA display driver kernel module
|
||||
Epoch: 3
|
||||
License: NVIDIA License
|
||||
URL: http://www.nvidia.com/object/unix.html
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run
|
||||
%dnl Patch0: nvidia-kernel-ccflags-y.patch
|
||||
Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version}
|
||||
Requires: akmods
|
||||
|
||||
|
||||
# Get the needed BuildRequires (in parts depending on what we build for):
|
||||
BuildRequires: kmodtool
|
||||
|
||||
# kmodtool does its magic here:
|
||||
%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
|
||||
|
||||
%description
|
||||
The NVidia %{version} display driver kernel module for kernel %{kversion}.
|
||||
|
||||
%prep
|
||||
# Error out if there was something wrong with kmodtool:
|
||||
%{?kmodtool_check}
|
||||
# Print kmodtool output for debugging purposes:
|
||||
kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
|
||||
|
||||
sh %{SOURCE0} -x --target nvidia-kmod-%{version}-%{_arch}
|
||||
%setup -T -D -n nvidia-kmod-%{version}-%{_arch}
|
||||
%autopatch -p1
|
||||
|
||||
rm -f */dkms.conf
|
||||
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
mkdir _kmod_build_${kernel_version%%___*}
|
||||
cp -fr kernel* _kmod_build_${kernel_version%%___*}
|
||||
done
|
||||
|
||||
%build
|
||||
export MODULE_VARIANT=kernel
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
pushd _kmod_build_${kernel_version%%___*}/
|
||||
make %{?_smp_mflags} -C ${MODULE_VARIANT} \
|
||||
KERNEL_UNAME="${kernel_version%%___*}" modules
|
||||
popd
|
||||
done
|
||||
|
||||
%install
|
||||
export MODULE_VARIANT=kernel
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
||||
install -p -m 0755 _kmod_build_${kernel_version%%___*}/${MODULE_VARIANT}/*.ko \
|
||||
%{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
||||
done
|
||||
%{?akmod_install}
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
@@ -0,0 +1,3 @@
|
||||
import "andax/nvidia.rhai" as nvidia;
|
||||
|
||||
rpm.version(nvidia::nvidia_driver_version());
|
||||
@@ -1,206 +0,0 @@
|
||||
# Build only the akmod package and no kernel module packages:
|
||||
%define buildforkernels akmod
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: nvidia-kmod
|
||||
Version: 570.144
|
||||
Release: 1%?dist
|
||||
Summary: NVIDIA display driver kernel module
|
||||
Epoch: 3
|
||||
License: NVIDIA License
|
||||
URL: http://www.nvidia.com/object/unix.html
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run
|
||||
Patch0: nvidia-kernel-ccflags-y.patch
|
||||
Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version}
|
||||
Requires: akmods
|
||||
|
||||
|
||||
# Get the needed BuildRequires (in parts depending on what we build for):
|
||||
BuildRequires: kmodtool
|
||||
|
||||
# kmodtool does its magic here:
|
||||
%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
|
||||
|
||||
%description
|
||||
The NVidia %{version} display driver kernel module for kernel %{kversion}.
|
||||
|
||||
%prep
|
||||
# Error out if there was something wrong with kmodtool:
|
||||
%{?kmodtool_check}
|
||||
# Print kmodtool output for debugging purposes:
|
||||
kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
|
||||
|
||||
sh %{SOURCE0} -x --target nvidia-kmod-%{version}-%{_arch}
|
||||
%setup -T -D -n nvidia-kmod-%{version}-%{_arch}
|
||||
%autopatch -p1
|
||||
|
||||
rm -f */dkms.conf
|
||||
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
mkdir _kmod_build_${kernel_version%%___*}
|
||||
cp -fr kernel* _kmod_build_${kernel_version%%___*}
|
||||
done
|
||||
|
||||
%build
|
||||
if [ -f /etc/nvidia/kernel.conf ]; then
|
||||
. /etc/nvidia/kernel.conf
|
||||
fi
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
pushd _kmod_build_${kernel_version%%___*}/
|
||||
make %{?_smp_mflags} -C ${MODULE_VARIANT} \
|
||||
KERNEL_UNAME="${kernel_version%%___*}" modules
|
||||
popd
|
||||
done
|
||||
|
||||
%install
|
||||
if [ -f /etc/nvidia/kernel.conf ]; then
|
||||
. /etc/nvidia/kernel.conf
|
||||
fi
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
||||
install -p -m 0755 _kmod_build_${kernel_version%%___*}/${MODULE_VARIANT}/*.ko \
|
||||
%{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
||||
done
|
||||
%{?akmod_install}
|
||||
|
||||
%changelog
|
||||
* Thu Dec 05 2024 Simone Caronni <negativo17@gmail.com> - 3:565.77-1
|
||||
- Update to 565.77.
|
||||
|
||||
* Mon Nov 25 2024 Simone Caronni <negativo17@gmail.com> - 3:565.57.01-2
|
||||
- Add kernel 6.12 patch.
|
||||
|
||||
* Wed Oct 23 2024 Simone Caronni <negativo17@gmail.com> - 3:565.57.01-1
|
||||
- Update to 565.57.01.
|
||||
|
||||
* Fri Oct 11 2024 Simone Caronni <negativo17@gmail.com> - 3:560.35.03-2
|
||||
- Add kernel 6.11 patch.
|
||||
|
||||
* Wed Aug 21 2024 Simone Caronni <negativo17@gmail.com> - 3:560.35.03-1
|
||||
- Update to 560.35.03.
|
||||
|
||||
* Tue Aug 06 2024 Simone Caronni <negativo17@gmail.com> - 3:560.31.02-1
|
||||
- Update to 560.31.02.
|
||||
|
||||
* Mon Aug 05 2024 Simone Caronni <negativo17@gmail.com> - 3:560.28.03-1
|
||||
- Update to 560.28.03.
|
||||
|
||||
* Tue Jul 02 2024 Simone Caronni <negativo17@gmail.com> - 3:555.58.02-1
|
||||
- Update to 555.58.02.
|
||||
|
||||
* Thu Jun 27 2024 Simone Caronni <negativo17@gmail.com> - 3:555.58-1
|
||||
- Update to 555.58.
|
||||
|
||||
* Thu Jun 06 2024 Simone Caronni <negativo17@gmail.com> - 3:555.52.04-1
|
||||
- Update to 555.52.04.
|
||||
|
||||
* Wed May 22 2024 Simone Caronni <negativo17@gmail.com> - 3:555.42.02-1
|
||||
- Update to 555.42.02.
|
||||
|
||||
* Fri Apr 26 2024 Simone Caronni <negativo17@gmail.com> - 3:550.78-1
|
||||
- Update to 550.78.
|
||||
|
||||
* Thu Apr 18 2024 Simone Caronni <negativo17@gmail.com> - 3:550.76-1
|
||||
- Update to 550.76.
|
||||
|
||||
* Sun Mar 24 2024 Simone Caronni <negativo17@gmail.com> - 3:550.67-1
|
||||
- Update to 550.67.
|
||||
|
||||
* Sat Mar 09 2024 Simone Caronni <negativo17@gmail.com> - 3:550.54.14-2
|
||||
- Enable aarch64.
|
||||
|
||||
* Sun Mar 03 2024 Simone Caronni <negativo17@gmail.com> - 3:550.54.14-1
|
||||
- Update to 550.54.14.
|
||||
|
||||
* Tue Feb 06 2024 Simone Caronni <negativo17@gmail.com> - 3:550.40.07-1
|
||||
- Update to 550.40.07.
|
||||
|
||||
* Tue Feb 06 2024 Simone Caronni <negativo17@gmail.com> - 3:545.29.06-2
|
||||
- Add patch to fix build with the latest 6.6/6.7 kernels.
|
||||
|
||||
* Fri Dec 01 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.06-1
|
||||
- Update to version 545.29.06.
|
||||
|
||||
* Tue Nov 14 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.02-3
|
||||
- Update location of configuration file.
|
||||
|
||||
* Mon Nov 13 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.02-2
|
||||
- Trim changelog.
|
||||
- Drop custom signing and compressing in favour of kmodtool.
|
||||
- Allow building proprietary or open source modules.
|
||||
- Adjust compile command to match with what Nvidia ships nowadays.
|
||||
|
||||
* Tue Oct 31 2023 Simone Caronni <negativo17@gmail.com> - 3:545.29.02-1
|
||||
- Update to 545.29.02.
|
||||
|
||||
* Wed Oct 18 2023 Simone Caronni <negativo17@gmail.com> - 3:545.23.06-1
|
||||
- Update to 545.23.06.
|
||||
|
||||
* Fri Sep 22 2023 Simone Caronni <negativo17@gmail.com> - 3:535.113.01-1
|
||||
- Update to 535.113.01.
|
||||
|
||||
* Thu Aug 24 2023 Simone Caronni <negativo17@gmail.com> - 3:535.104.05-1
|
||||
- Update to 535.104.05.
|
||||
|
||||
* Wed Aug 09 2023 Simone Caronni <negativo17@gmail.com> - 3:535.98-1
|
||||
- Update to 535.98.
|
||||
|
||||
* Wed Jul 19 2023 Simone Caronni <negativo17@gmail.com> - 3:535.86.05-1
|
||||
- Update to 535.86.05.
|
||||
|
||||
* Thu Jun 15 2023 Simone Caronni <negativo17@gmail.com> - 3:535.54.03-1
|
||||
- Update to 535.54.03.
|
||||
|
||||
* Tue Jun 13 2023 Simone Caronni <negativo17@gmail.com> - 3:535.43.02-1
|
||||
- Update to 535.43.02.
|
||||
|
||||
* Fri Mar 24 2023 Simone Caronni <negativo17@gmail.com> - 3:530.41.03-1
|
||||
- Update to 530.41.03.
|
||||
|
||||
* Wed Mar 08 2023 Simone Caronni <negativo17@gmail.com> - 3:530.30.02-1
|
||||
- Update to 530.30.02.
|
||||
|
||||
* Fri Feb 10 2023 Simone Caronni <negativo17@gmail.com> - 3:525.89.02-1
|
||||
- Update to 525.89.02.
|
||||
|
||||
* Fri Jan 20 2023 Simone Caronni <negativo17@gmail.com> - 3:525.85.05-1
|
||||
- Update to 525.85.05.
|
||||
|
||||
* Mon Jan 09 2023 Simone Caronni <negativo17@gmail.com> - 3:525.78.01-1
|
||||
- Update to 525.78.01.
|
||||
|
||||
* Tue Nov 29 2022 Simone Caronni <negativo17@gmail.com> - 3:525.60.11-1
|
||||
- Update to 525.60.11.
|
||||
|
||||
* Thu Oct 13 2022 Simone Caronni <negativo17@gmail.com> - 3:520.56.06-1
|
||||
- Update to 520.56.06.
|
||||
|
||||
* Wed Sep 21 2022 Simone Caronni <negativo17@gmail.com> - 3:515.76-1
|
||||
- Update to 515.76.
|
||||
|
||||
* Mon Aug 08 2022 Simone Caronni <negativo17@gmail.com> - 3:515.65.01-1
|
||||
- Update to 515.65.01.
|
||||
|
||||
* Wed Jun 29 2022 Simone Caronni <negativo17@gmail.com> - 3:515.57-1
|
||||
- Update to 515.57.
|
||||
|
||||
* Wed Jun 01 2022 Simone Caronni <negativo17@gmail.com> - 3:515.48.07-1
|
||||
- Update to 515.48.07.
|
||||
|
||||
* Thu May 12 2022 Simone Caronni <negativo17@gmail.com> - 3:515.43.04-1
|
||||
- Update to 515.43.04.
|
||||
|
||||
* Mon May 02 2022 Simone Caronni <negativo17@gmail.com> - 3:510.68.02-1
|
||||
- Update to 510.68.02.
|
||||
|
||||
* Mon Mar 28 2022 Simone Caronni <negativo17@gmail.com> - 3:510.60.02-1
|
||||
- Update to 510.60.02.
|
||||
|
||||
* Mon Feb 14 2022 Simone Caronni <negativo17@gmail.com> - 3:510.54-1
|
||||
- Update to 510.54.
|
||||
|
||||
* Wed Feb 02 2022 Simone Caronni <negativo17@gmail.com> - 3:510.47.03-1
|
||||
- Update to 510.47.03.
|
||||
@@ -0,0 +1,9 @@
|
||||
project "pkg" {
|
||||
rpm {
|
||||
spec = "nvidia-open-kmod.spec"
|
||||
}
|
||||
labels {
|
||||
mock = 1
|
||||
subrepo = "nvidia"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild nvidia-kmod-575.51.02-x86_64/kernel/Kbuild
|
||||
--- nvidia-kmod-575.51.02-x86_64.old/kernel/Kbuild 2025-04-22 18:54:37.758155663 +0200
|
||||
+++ nvidia-kmod-575.51.02-x86_64/kernel/Kbuild 2025-04-22 18:54:45.069483044 +0200
|
||||
@@ -75,21 +75,15 @@
|
||||
$(eval include $(src)/$(_module)/$(_module).Kbuild))
|
||||
|
||||
|
||||
-#
|
||||
-# Define CFLAGS that apply to all the NVIDIA kernel modules. EXTRA_CFLAGS
|
||||
-# is deprecated since 2.6.24 in favor of ccflags-y, but we need to support
|
||||
-# older kernels which do not have ccflags-y. Newer kernels append
|
||||
-# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
|
||||
-#
|
||||
-
|
||||
-EXTRA_CFLAGS += -I$(src)/common/inc
|
||||
-EXTRA_CFLAGS += -I$(src)
|
||||
-EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
|
||||
-EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
|
||||
-EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\"
|
||||
+ccflags-y += -std=gnu17
|
||||
+ccflags-y += -I$(src)/common/inc
|
||||
+ccflags-y += -I$(src)
|
||||
+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
|
||||
+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
|
||||
+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\"
|
||||
|
||||
ifneq ($(SYSSRCHOST1X),)
|
||||
- EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
|
||||
+ ccflags-y += -I$(SYSSRCHOST1X)
|
||||
endif
|
||||
|
||||
# Some Android kernels prohibit driver use of filesystem functions like
|
||||
@@ -99,57 +93,57 @@
|
||||
PLATFORM_IS_ANDROID ?= 0
|
||||
|
||||
ifeq ($(PLATFORM_IS_ANDROID),1)
|
||||
- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
|
||||
+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
|
||||
else
|
||||
- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
|
||||
+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -Wno-unused-function
|
||||
+ccflags-y += -Wno-unused-function
|
||||
|
||||
ifneq ($(NV_BUILD_TYPE),debug)
|
||||
- EXTRA_CFLAGS += -Wuninitialized
|
||||
+ ccflags-y += -Wuninitialized
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -fno-strict-aliasing
|
||||
+ccflags-y += -fno-strict-aliasing
|
||||
|
||||
ifeq ($(ARCH),arm64)
|
||||
- EXTRA_CFLAGS += -mstrict-align
|
||||
+ ccflags-y += -mstrict-align
|
||||
endif
|
||||
|
||||
ifeq ($(NV_BUILD_TYPE),debug)
|
||||
- EXTRA_CFLAGS += -g
|
||||
+ ccflags-y += -g
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -ffreestanding
|
||||
+ccflags-y += -ffreestanding
|
||||
|
||||
ifeq ($(ARCH),arm64)
|
||||
- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a
|
||||
- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,)
|
||||
+ ccflags-y += -mgeneral-regs-only -march=armv8-a
|
||||
+ ccflags-y += $(call cc-option,-mno-outline-atomics,)
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel
|
||||
+ ccflags-y += -mno-red-zone -mcmodel=kernel
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),powerpc)
|
||||
- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align
|
||||
+ ccflags-y += -mlittle-endian -mno-strict-align
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -DNV_UVM_ENABLE
|
||||
-EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
|
||||
-EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
|
||||
-EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER
|
||||
+ccflags-y += -DNV_UVM_ENABLE
|
||||
+ccflags-y += $(call cc-option,-Werror=undef,)
|
||||
+ccflags-y += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
|
||||
+ccflags-y += -DNV_KERNEL_INTERFACE_LAYER
|
||||
|
||||
#
|
||||
# Detect SGI UV systems and apply system-specific optimizations.
|
||||
#
|
||||
|
||||
ifneq ($(wildcard /proc/sgi_uv),)
|
||||
- EXTRA_CFLAGS += -DNV_CONFIG_X86_UV
|
||||
+ ccflags-y += -DNV_CONFIG_X86_UV
|
||||
endif
|
||||
|
||||
ifdef VGX_FORCE_VFIO_PCI_CORE
|
||||
- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE
|
||||
+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE
|
||||
endif
|
||||
|
||||
WARNINGS_AS_ERRORS ?=
|
||||
@@ -183,7 +177,7 @@
|
||||
|
||||
NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags)
|
||||
|
||||
-NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie
|
||||
+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie
|
||||
NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
|
||||
NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
|
||||
NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
|
||||
diff -Naur nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild
|
||||
--- nvidia-kmod-575.51.02-x86_64.old/kernel-open/Kbuild 2025-04-22 18:54:37.828156191 +0200
|
||||
+++ nvidia-kmod-575.51.02-x86_64/kernel-open/Kbuild 2025-04-22 18:54:45.069786396 +0200
|
||||
@@ -75,21 +75,15 @@
|
||||
$(eval include $(src)/$(_module)/$(_module).Kbuild))
|
||||
|
||||
|
||||
-#
|
||||
-# Define CFLAGS that apply to all the NVIDIA kernel modules. EXTRA_CFLAGS
|
||||
-# is deprecated since 2.6.24 in favor of ccflags-y, but we need to support
|
||||
-# older kernels which do not have ccflags-y. Newer kernels append
|
||||
-# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
|
||||
-#
|
||||
-
|
||||
-EXTRA_CFLAGS += -I$(src)/common/inc
|
||||
-EXTRA_CFLAGS += -I$(src)
|
||||
-EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
|
||||
-EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
|
||||
-EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\"
|
||||
+ccflags-y += -std=gnu17
|
||||
+ccflags-y += -I$(src)/common/inc
|
||||
+ccflags-y += -I$(src)
|
||||
+ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
|
||||
+ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
|
||||
+ccflags-y += -DNV_VERSION_STRING=\"575.51.02\"
|
||||
|
||||
ifneq ($(SYSSRCHOST1X),)
|
||||
- EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
|
||||
+ ccflags-y += -I$(SYSSRCHOST1X)
|
||||
endif
|
||||
|
||||
# Some Android kernels prohibit driver use of filesystem functions like
|
||||
@@ -99,57 +93,57 @@
|
||||
PLATFORM_IS_ANDROID ?= 0
|
||||
|
||||
ifeq ($(PLATFORM_IS_ANDROID),1)
|
||||
- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
|
||||
+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
|
||||
else
|
||||
- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
|
||||
+ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -Wno-unused-function
|
||||
+ccflags-y += -Wno-unused-function
|
||||
|
||||
ifneq ($(NV_BUILD_TYPE),debug)
|
||||
- EXTRA_CFLAGS += -Wuninitialized
|
||||
+ ccflags-y += -Wuninitialized
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -fno-strict-aliasing
|
||||
+ccflags-y += -fno-strict-aliasing
|
||||
|
||||
ifeq ($(ARCH),arm64)
|
||||
- EXTRA_CFLAGS += -mstrict-align
|
||||
+ ccflags-y += -mstrict-align
|
||||
endif
|
||||
|
||||
ifeq ($(NV_BUILD_TYPE),debug)
|
||||
- EXTRA_CFLAGS += -g
|
||||
+ ccflags-y += -g
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -ffreestanding
|
||||
+ccflags-y += -ffreestanding
|
||||
|
||||
ifeq ($(ARCH),arm64)
|
||||
- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a
|
||||
- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,)
|
||||
+ ccflags-y += -mgeneral-regs-only -march=armv8-a
|
||||
+ ccflags-y += $(call cc-option,-mno-outline-atomics,)
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel
|
||||
+ ccflags-y += -mno-red-zone -mcmodel=kernel
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),powerpc)
|
||||
- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align
|
||||
+ ccflags-y += -mlittle-endian -mno-strict-align
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -DNV_UVM_ENABLE
|
||||
-EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
|
||||
-EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
|
||||
-EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER
|
||||
+ccflags-y += -DNV_UVM_ENABLE
|
||||
+ccflags-y += $(call cc-option,-Werror=undef,)
|
||||
+ccflags-y += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
|
||||
+ccflags-y += -DNV_KERNEL_INTERFACE_LAYER
|
||||
|
||||
#
|
||||
# Detect SGI UV systems and apply system-specific optimizations.
|
||||
#
|
||||
|
||||
ifneq ($(wildcard /proc/sgi_uv),)
|
||||
- EXTRA_CFLAGS += -DNV_CONFIG_X86_UV
|
||||
+ ccflags-y += -DNV_CONFIG_X86_UV
|
||||
endif
|
||||
|
||||
ifdef VGX_FORCE_VFIO_PCI_CORE
|
||||
- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE
|
||||
+ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE
|
||||
endif
|
||||
|
||||
WARNINGS_AS_ERRORS ?=
|
||||
@@ -183,7 +177,7 @@
|
||||
|
||||
NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags)
|
||||
|
||||
-NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie
|
||||
+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie
|
||||
NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
|
||||
NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
|
||||
NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
|
||||
@@ -0,0 +1,66 @@
|
||||
# Build only the akmod package and no kernel module packages:
|
||||
%define buildforkernels akmod
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: nvidia-open-kmod
|
||||
Version: 570.144
|
||||
Release: 1%?dist
|
||||
Summary: NVIDIA display driver kernel module
|
||||
Epoch: 3
|
||||
License: NVIDIA License
|
||||
URL: http://www.nvidia.com/object/unix.html
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run
|
||||
%dnl Patch0: nvidia-kernel-ccflags-y.patch
|
||||
Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version}
|
||||
Requires: akmods
|
||||
|
||||
|
||||
# Get the needed BuildRequires (in parts depending on what we build for):
|
||||
BuildRequires: kmodtool
|
||||
|
||||
# kmodtool does its magic here:
|
||||
%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
|
||||
|
||||
%description
|
||||
The NVidia %{version} display driver kernel module for kernel %{kversion}.
|
||||
|
||||
%prep
|
||||
# Error out if there was something wrong with kmodtool:
|
||||
%{?kmodtool_check}
|
||||
# Print kmodtool output for debugging purposes:
|
||||
kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
|
||||
|
||||
sh %{SOURCE0} -x --target nvidia-kmod-%{version}-%{_arch}
|
||||
%setup -T -D -n nvidia-kmod-%{version}-%{_arch}
|
||||
%autopatch -p1
|
||||
|
||||
rm -f */dkms.conf
|
||||
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
mkdir _kmod_build_${kernel_version%%___*}
|
||||
cp -fr kernel* _kmod_build_${kernel_version%%___*}
|
||||
done
|
||||
|
||||
%build
|
||||
export MODULE_VARIANT=kernel-open
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
pushd _kmod_build_${kernel_version%%___*}/
|
||||
make %{?_smp_mflags} -C ${MODULE_VARIANT} \
|
||||
KERNEL_UNAME="${kernel_version%%___*}" modules
|
||||
popd
|
||||
done
|
||||
|
||||
%install
|
||||
export MODULE_VARIANT=kernel-open
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
||||
install -p -m 0755 _kmod_build_${kernel_version%%___*}/${MODULE_VARIANT}/*.ko \
|
||||
%{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
||||
done
|
||||
%{?akmod_install}
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
@@ -0,0 +1,3 @@
|
||||
import "andax/nvidia.rhai" as nvidia;
|
||||
|
||||
rpm.version(nvidia::nvidia_driver_version());
|
||||
Reference in New Issue
Block a user