add aarch64 support

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
el9
Dennis Gilmore 2 years ago committed by Nicolas Chauvet
parent 46c8e4c984
commit 39a75af339

1
.gitignore vendored

@ -1,3 +1,4 @@
NVIDIA-Linux-armv7l-gnueabihf-*.run NVIDIA-Linux-armv7l-gnueabihf-*.run
NVIDIA-Linux-x86-*.run NVIDIA-Linux-x86-*.run
NVIDIA-Linux-x86_64-*.run NVIDIA-Linux-x86_64-*.run
NVIDIA-Linux-aarch64-*.run

@ -1 +1,2 @@
SHA512 (NVIDIA-Linux-aarch64-515.76.run) = 5a6819b24e174458da26ae6435577e8190feb39b58e462698fe1ae5854af90d3883f61d6f45e1bd3029ce16bf10170b39e970696421c36f5d168ae5935a490ac
SHA512 (NVIDIA-Linux-x86_64-515.76.run) = 517e23855acfcded81dc65290ff7354796c6c01a6cde255fa173ab26358f0fbeae79de2f5919787dbdb4c384a57c003045a461870439bc0acf81a501657d8775 SHA512 (NVIDIA-Linux-x86_64-515.76.run) = 517e23855acfcded81dc65290ff7354796c6c01a6cde255fa173ab26358f0fbeae79de2f5919787dbdb4c384a57c003045a461870439bc0acf81a501657d8775

@ -26,12 +26,13 @@
Name: xorg-x11-drv-nvidia Name: xorg-x11-drv-nvidia
Epoch: 3 Epoch: 3
Version: 515.76 Version: 515.76
Release: 1%{?dist} Release: 2%{?dist}
Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards
License: Redistributable, no modification permitted License: Redistributable, no modification permitted
URL: http://www.nvidia.com/ URL: http://www.nvidia.com/
Source0: https://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run Source0: https://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run
Source1: https://download.nvidia.com/XFree86/Linux-aarch64/%{version}/NVIDIA-Linux-aarch64-%{version}.run
Source5: alternate-install-present Source5: alternate-install-present
Source6: nvidia.conf Source6: nvidia.conf
Source7: 60-nvidia.rules Source7: 60-nvidia.rules
@ -46,7 +47,7 @@ Source15: rhel_nvidia.conf
Source16: nvidia-power-management.conf Source16: nvidia-power-management.conf
Source17: 70-nvidia.preset Source17: 70-nvidia.preset
ExclusiveArch: x86_64 i686 ExclusiveArch: x86_64 i686 aarch64
# Xorg with PrimaryGPU # Xorg with PrimaryGPU
Requires: Xorg >= 1.19.0-3 Requires: Xorg >= 1.19.0-3
@ -171,7 +172,7 @@ Requires: libglvnd-glx%{?_isa} >= 0.2
Requires: libglvnd-opengl%{?_isa} >= 0.2 Requires: libglvnd-opengl%{?_isa} >= 0.2
%if 0%{?fedora} || 0%{?rhel} > 7 %if 0%{?fedora} || 0%{?rhel} > 7
Requires: vulkan-loader%{?_isa} Requires: vulkan-loader%{?_isa}
%ifarch x86_64 %ifarch x86_64 aarch64
# Fedora 35 has early XWayland support using recent egl-wayland # Fedora 35 has early XWayland support using recent egl-wayland
Requires: egl-wayland%{?_isa} %{?fc35: >= 1.1.9-2} Requires: egl-wayland%{?_isa} %{?fc35: >= 1.1.9-2}
%if 0%{?fedora} > 34 %if 0%{?fedora} > 34
@ -205,10 +206,15 @@ Advanced power management, preserve memory allocation on suspend/resume.
%prep %prep
%setup -q -c -T %setup -q -c -T
%ifarch i686 x86_64
sh %{SOURCE0} \ sh %{SOURCE0} \
--extract-only --target nvidiapkg-x86_64 --extract-only --target nvidiapkg
ln -s nvidiapkg-x86_64 nvidiapkg %else
%ifarch aarch64
sh %{SOURCE1} \
--extract-only --target nvidiapkg
%endif
%endif
%build %build
# Nothing to build # Nothing to build
@ -241,7 +247,7 @@ cp -a \
libnvidia-nvvm.so.%{version} \ libnvidia-nvvm.so.%{version} \
libnvidia-opticalflow.so.%{version} \ libnvidia-opticalflow.so.%{version} \
libnvidia-ptxjitcompiler.so.%{version} \ libnvidia-ptxjitcompiler.so.%{version} \
%ifarch x86_64 %ifarch x86_64 aarch64
libnvidia-cfg.so.%{version} \ libnvidia-cfg.so.%{version} \
%if 0%{?fedora} < 35 %if 0%{?fedora} < 35
libnvidia-egl-gbm.so.1.1.0 \ libnvidia-egl-gbm.so.1.1.0 \
@ -254,7 +260,9 @@ cp -a \
%{buildroot}%{_libdir}/ %{buildroot}%{_libdir}/
cp -af \ cp -af \
%ifnarch aarch64
libnvidia-compiler.so.%{version} \ libnvidia-compiler.so.%{version} \
%endif
libnvidia-opencl.so.%{version} \ libnvidia-opencl.so.%{version} \
libnvidia-tls.so.%{version} \ libnvidia-tls.so.%{version} \
%{buildroot}%{_libdir}/ %{buildroot}%{_libdir}/
@ -279,7 +287,7 @@ ln -sf ../libnvidia-allocator.so.%{version} %{buildroot}%{_libdir}/gbm/nvidia-dr
popd popd
%endif %endif
%ifarch x86_64 %ifarch x86_64 aarch64
# Vulkan config and symlink # Vulkan config and symlink
install -m 0755 -d %{buildroot}%{_datadir}/vulkan/{icd.d,implicit_layer.d}/ install -m 0755 -d %{buildroot}%{_datadir}/vulkan/{icd.d,implicit_layer.d}/
install -p -m 0644 nvidia_icd.json %{buildroot}%{_datadir}/vulkan/icd.d/ install -p -m 0644 nvidia_icd.json %{buildroot}%{_datadir}/vulkan/icd.d/
@ -310,9 +318,11 @@ install -p -m 0644 %{SOURCE7} %{buildroot}%{_udevrulesdir}
# UDev rules for nvidia-uvm # UDev rules for nvidia-uvm
install -p -m 0644 %{SOURCE10} %{buildroot}%{_udevrulesdir} install -p -m 0644 %{SOURCE10} %{buildroot}%{_udevrulesdir}
%ifarch x86_64
# Install dbus config # Install dbus config
install -m 0755 -d %{buildroot}%{_dbus_systemd_dir} install -m 0755 -d %{buildroot}%{_dbus_systemd_dir}
install -p -m 0644 nvidia-dbus.conf %{buildroot}%{_dbus_systemd_dir} install -p -m 0644 nvidia-dbus.conf %{buildroot}%{_dbus_systemd_dir}
%endif
# dracut.conf.d file, nvidia modules must never be in the initrd # dracut.conf.d file, nvidia modules must never be in the initrd
install -p -m 0755 -d %{buildroot}%{_dracut_conf_d}/ install -p -m 0755 -d %{buildroot}%{_dracut_conf_d}/
@ -320,8 +330,12 @@ install -p -m 0644 %{SOURCE12} %{buildroot}%{_dracut_conf_d}/
# Install binaries # Install binaries
install -m 0755 -d %{buildroot}%{_bindir} install -m 0755 -d %{buildroot}%{_bindir}
install -p -m 0755 nvidia-{bug-report.sh,debugdump,smi,cuda-mps-control,cuda-mps-server,ngx-updater,powerd} \ install -p -m 0755 nvidia-{bug-report.sh,debugdump,smi,cuda-mps-control,cuda-mps-server,ngx-updater} \
%{buildroot}%{_bindir} %{buildroot}%{_bindir}
%ifarch x86_64
install -p -m 0755 nvidia-powerd \
%{buildroot}%{_bindir}
%endif
# Install man pages # Install man pages
install -m 0755 -d %{buildroot}%{_mandir}/man1/ install -m 0755 -d %{buildroot}%{_mandir}/man1/
@ -357,11 +371,12 @@ mkdir -p %{buildroot}%{_sysconfdir}/nvidia
#Install the nvidia kernel modules sources archive #Install the nvidia kernel modules sources archive
mkdir -p %{buildroot}%{_datadir}/nvidia-kmod-%{version} mkdir -p %{buildroot}%{_datadir}/nvidia-kmod-%{version}
tar Jcf %{buildroot}%{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-x86_64.tar.xz kernel kernel-open tar Jcf %{buildroot}%{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-%{_arch}.tar.xz kernel kernel-open
%ifarch x86_64
#Install wine dll #Install wine dll
mkdir -p %{buildroot}%{_winedir} mkdir -p %{buildroot}%{_winedir}
install -p -m 0644 _nvngx.dll nvngx.dll %{buildroot}%{_winedir} install -p -m 0644 _nvngx.dll nvngx.dll %{buildroot}%{_winedir}
%endif
#RPM Macros support #RPM Macros support
mkdir -p %{buildroot}%{rpmmacrodir} mkdir -p %{buildroot}%{rpmmacrodir}
@ -386,7 +401,10 @@ install -p -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}
# Systemd units and script for suspending/resuming # Systemd units and script for suspending/resuming
mkdir %{buildroot}%{_systemd_util_dir}/system-{sleep,preset}/ mkdir %{buildroot}%{_systemd_util_dir}/system-{sleep,preset}/
install -p -m 0644 %{SOURCE17} %{buildroot}%{_systemd_util_dir}/system-preset/ install -p -m 0644 %{SOURCE17} %{buildroot}%{_systemd_util_dir}/system-preset/
install -p -m 0644 systemd/system/nvidia-{hibernate,powerd,resume,suspend}.service %{buildroot}%{_unitdir} install -p -m 0644 systemd/system/nvidia-{hibernate,resume,suspend}.service %{buildroot}%{_unitdir}
%ifarch x86_64
install -p -m 0644 systemd/system/nvidia-powerd.service %{buildroot}%{_unitdir}
%endif
install -p -m 0755 systemd/system-sleep/nvidia %{buildroot}%{_systemd_util_dir}/system-sleep/ install -p -m 0755 systemd/system-sleep/nvidia %{buildroot}%{_systemd_util_dir}/system-sleep/
install -p -m 0755 systemd/nvidia-sleep.sh %{buildroot}%{_bindir} install -p -m 0755 systemd/nvidia-sleep.sh %{buildroot}%{_bindir}
@ -468,7 +486,7 @@ fi ||:
%files kmodsrc %files kmodsrc
%dir %{_datadir}/nvidia-kmod-%{version} %dir %{_datadir}/nvidia-kmod-%{version}
%{rpmmacrodir}/macros.%{name}-kmodsrc %{rpmmacrodir}/macros.%{name}-kmodsrc
%{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-x86_64.tar.xz %{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-%{_arch}.tar.xz
%endif %endif
%ldconfig_scriptlets libs %ldconfig_scriptlets libs
@ -493,7 +511,7 @@ fi ||:
%{_libdir}/gbm/ %{_libdir}/gbm/
%{_libdir}/vdpau/libvdpau_nvidia.so.1 %{_libdir}/vdpau/libvdpau_nvidia.so.1
%{_libdir}/vdpau/libvdpau_nvidia.so.%{version} %{_libdir}/vdpau/libvdpau_nvidia.so.%{version}
%ifarch x86_64 %ifarch x86_64 aarch64
%{_datadir}/vulkan/implicit_layer.d/nvidia_layers.json %{_datadir}/vulkan/implicit_layer.d/nvidia_layers.json
%{_datadir}/vulkan/icd.d/nvidia_icd.json %{_datadir}/vulkan/icd.d/nvidia_icd.json
%{_libdir}/libnvidia-cfg.so.1 %{_libdir}/libnvidia-cfg.so.1
@ -511,10 +529,12 @@ fi ||:
%exclude %{_libdir}/libnvidia-vulkan-producer.so.515 %exclude %{_libdir}/libnvidia-vulkan-producer.so.515
%{_libdir}/libnvoptix.so.1 %{_libdir}/libnvoptix.so.1
%{_libdir}/libnvoptix.so.%{version} %{_libdir}/libnvoptix.so.%{version}
%ifarch x86_64
%{_winedir}/ %{_winedir}/
%endif %endif
%endif
%ifarch x86_64 %ifarch x86_64 aarch64
%files cuda %files cuda
%license nvidiapkg/LICENSE %license nvidiapkg/LICENSE
%config %{_sysconfdir}/OpenCL/vendors/nvidia.icd %config %{_sysconfdir}/OpenCL/vendors/nvidia.icd
@ -534,7 +554,9 @@ fi ||:
%{_libdir}/libcuda.so.%{version} %{_libdir}/libcuda.so.%{version}
%{_libdir}/libnvcuvid.so.1 %{_libdir}/libnvcuvid.so.1
%{_libdir}/libnvcuvid.so.%{version} %{_libdir}/libnvcuvid.so.%{version}
%ifnarch aarch64
%{_libdir}/libnvidia-compiler.so.%{version} %{_libdir}/libnvidia-compiler.so.%{version}
%endif
%{_libdir}/libnvidia-encode.so.1 %{_libdir}/libnvidia-encode.so.1
%{_libdir}/libnvidia-encode.so.%{version} %{_libdir}/libnvidia-encode.so.%{version}
%{_libdir}/libnvidia-ml.so %{_libdir}/libnvidia-ml.so
@ -549,7 +571,7 @@ fi ||:
%{_libdir}/libnvidia-opticalflow.so.%{version} %{_libdir}/libnvidia-opticalflow.so.%{version}
%{_libdir}/libnvidia-ptxjitcompiler.so.1 %{_libdir}/libnvidia-ptxjitcompiler.so.1
%{_libdir}/libnvidia-ptxjitcompiler.so.%{version} %{_libdir}/libnvidia-ptxjitcompiler.so.%{version}
%ifarch x86_64 %ifarch x86_64 aarch64
%{_modprobedir}/nvidia-uvm.conf %{_modprobedir}/nvidia-uvm.conf
%{_udevrulesdir}/60-nvidia-uvm.rules %{_udevrulesdir}/60-nvidia-uvm.rules
%endif %endif
@ -558,39 +580,50 @@ fi ||:
%{_libdir}/libnvcuvid.so %{_libdir}/libnvcuvid.so
%{_libdir}/libnvidia-encode.so %{_libdir}/libnvidia-encode.so
%ifarch x86_64 %ifarch x86_64 aarch64
%post power %post power
%systemd_post nvidia-hibernate.service %systemd_post nvidia-hibernate.service
%ifarch x86_64
%systemd_post nvidia-powerd.service %systemd_post nvidia-powerd.service
%endif
%systemd_post nvidia-resume.service %systemd_post nvidia-resume.service
%systemd_post nvidia-suspend.service %systemd_post nvidia-suspend.service
%preun power %preun power
%systemd_preun nvidia-hibernate.service %systemd_preun nvidia-hibernate.service
%ifarch x86_64
%systemd_preun nvidia-powerd.service %systemd_preun nvidia-powerd.service
%endif
%systemd_preun nvidia-resume.service %systemd_preun nvidia-resume.service
%systemd_preun nvidia-suspend.service %systemd_preun nvidia-suspend.service
%postun power %postun power
%systemd_postun nvidia-hibernate.service %systemd_postun nvidia-hibernate.service
%ifarch x86_64
%systemd_postun nvidia-powerd.service %systemd_postun nvidia-powerd.service
%endif
%systemd_postun nvidia-resume.service %systemd_postun nvidia-resume.service
%systemd_postun nvidia-suspend.service %systemd_postun nvidia-suspend.service
%files power %files power
%config %{_modprobedir}/nvidia-power-management.conf %config %{_modprobedir}/nvidia-power-management.conf
%ifarch x86_64
%{_bindir}/nvidia-powerd %{_bindir}/nvidia-powerd
%{_bindir}/nvidia-sleep.sh %{_unitdir}/nvidia-powerd.service
%{_dbus_systemd_dir}/nvidia-dbus.conf %{_dbus_systemd_dir}/nvidia-dbus.conf
%endif
%{_bindir}/nvidia-sleep.sh
%{_systemd_util_dir}/system-preset/70-nvidia.preset %{_systemd_util_dir}/system-preset/70-nvidia.preset
%{_systemd_util_dir}/system-sleep/nvidia %{_systemd_util_dir}/system-sleep/nvidia
%{_unitdir}/nvidia-hibernate.service %{_unitdir}/nvidia-hibernate.service
%{_unitdir}/nvidia-powerd.service
%{_unitdir}/nvidia-resume.service %{_unitdir}/nvidia-resume.service
%{_unitdir}/nvidia-suspend.service %{_unitdir}/nvidia-suspend.service
%endif %endif
%changelog %changelog
* Sun Sep 25 2022 Dennis Gilmore <dennis@ausil.us> - 3:515.76-2
- add initial aarch64 support
* Wed Sep 21 2022 Leigh Scott <leigh123linux@gmail.com> - 3:515.76-1 * Wed Sep 21 2022 Leigh Scott <leigh123linux@gmail.com> - 3:515.76-1
- Update to 515.76 - Update to 515.76

Loading…
Cancel
Save