2022-09-06 11:30:04 +00:00
|
|
|
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
pkgname=nvidia-drivers
|
2024-07-18 18:58:33 +00:00
|
|
|
pkgver=555.58.02
|
2022-09-06 11:30:04 +00:00
|
|
|
pkgrel=0
|
|
|
|
pkgdesc="NVIDIA Driver"
|
|
|
|
url="https://www.nvidia.com/download/index.aspx"
|
|
|
|
arch="x86_64"
|
|
|
|
license="MIT OR GPL-2.0"
|
|
|
|
makedepends="bash xz"
|
|
|
|
depends="glibc-bin"
|
|
|
|
options="!check !strip !tracedeps"
|
|
|
|
|
|
|
|
source="NVIDIA-Linux-x86_64-$pkgver.run::https://download.nvidia.com/XFree86/Linux-x86_64/$pkgver/NVIDIA-Linux-x86_64-$pkgver.run"
|
|
|
|
|
|
|
|
build() {
|
|
|
|
sh "$srcdir"/NVIDIA-Linux-x86_64-$pkgver.run -x -s
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-09-07 12:27:15 +00:00
|
|
|
mkdir -p "$pkgdir"/usr/glibc-compat/lib/nvidia "$pkgdir"/usr/sbin "$pkgdir"/lib/firmware/nvidia/"$pkgver"
|
2022-09-06 11:30:04 +00:00
|
|
|
|
|
|
|
# tell glibc compat about our libs
|
|
|
|
mkdir -p "$pkgdir"/usr/glibc-compat/etc/ld.so.conf.d
|
|
|
|
echo "/usr/glibc-compat/lib/nvidia" > "$pkgdir"/usr/glibc-compat/etc/ld.so.conf.d/nvidia.conf
|
|
|
|
|
|
|
|
cd "$srcdir"/NVIDIA-Linux-x86_64-$pkgver
|
|
|
|
|
2022-09-07 12:27:15 +00:00
|
|
|
# GSP firmware
|
2023-07-04 15:10:30 +00:00
|
|
|
cp firmware/*.bin "$pkgdir"/lib/firmware/nvidia/"$pkgver"/
|
2022-09-07 12:27:15 +00:00
|
|
|
|
|
|
|
# Various bins
|
2022-09-06 11:30:04 +00:00
|
|
|
SBINS="nvidia-smi nvidia-debugdump nvidia-cuda-mps-control nvidia-cuda-mps-server nvidia-persistenced"
|
|
|
|
for f in $SBINS; do
|
|
|
|
cp $f "$pkgdir"/usr/sbin
|
|
|
|
done
|
|
|
|
|
|
|
|
# which libs are from debug log at runtime
|
|
|
|
# LIBS=$(grep "missing library" /var/log/nvidia-container-toolkit.log | awk '{print $7}' | sort | uniq)
|
|
|
|
# cross checked via .manifest for targets and symlinks
|
2023-10-05 16:46:40 +00:00
|
|
|
LIBS="libEGL_nvidia.so libGLESv1_CM_nvidia.so libGLESv2_nvidia.so libGLX_nvidia.so libcuda.so libcudadebugger.so libnvcuvid.so libnvidia-allocator.so libnvidia-cbl.so libnvidia-cfg.so libnvidia-compiler.so libnvidia-eglcore.so libnvidia-encode.so libnvidia-fatbinaryloader.so libnvidia-fbc.so libnvidia-glcore.so libnvidia-glsi.so libnvidia-glvkspirv.so libnvidia-ifr.so libnvidia-ml.so libnvidia-ngx.so libnvidia-nscq.so libnvidia-opencl.so libnvidia-opticalflow.so libnvidia-pkcs11.so libnvidia-ptxjitcompiler.so libnvidia-rtcore.so libnvidia-tls.so libnvoptix.so libvdpau_nvidia.so libnvidia-gpucomp.so libnvidia-nvvm.so"
|
2022-09-06 11:30:04 +00:00
|
|
|
|
2022-09-07 12:27:15 +00:00
|
|
|
# inspired from Gentoo x11-drivers/nvidia-drivers
|
2022-09-06 11:30:04 +00:00
|
|
|
for lib in $LIBS; do
|
|
|
|
native=$(grep $lib .manifest | grep _LIB | grep NATIVE | grep -v SYMLINK | awk '{print $1}')
|
|
|
|
if [ -n "$native" ]; then
|
|
|
|
cp $native "$pkgdir"/usr/glibc-compat/lib/nvidia
|
|
|
|
|
|
|
|
links="$(grep $native .manifest | grep SYMLINK | grep -v COMPAT32 | awk '{print $1}')"
|
|
|
|
for target in $links; do
|
|
|
|
ln -s /usr/glibc-compat/lib/nvidia/$native "$pkgdir"/usr/glibc-compat/lib/nvidia/$target
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2023-07-04 15:10:30 +00:00
|
|
|
sha512sums="
|
2024-07-18 18:58:33 +00:00
|
|
|
7a8c84c15d87d2cf5f6261b12d3d683e0a7a1847d7c5461b3995f78b8dd862272fd11be07018593a8d5ef5d8274040f15b9e6fe92e9212dcd7a97be668852433 NVIDIA-Linux-x86_64-555.58.02.run
|
2023-07-04 15:10:30 +00:00
|
|
|
"
|