fix: more Nvidia tweaks, fluent-bit version bump

This commit is contained in:
Stefan Reimer 2022-09-07 14:27:15 +02:00
parent f50fa392d4
commit 9d8a6941c5
5 changed files with 32 additions and 14 deletions

View File

@ -1,7 +1,7 @@
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
pkgname=fluent-bit
pkgver=1.9.7
pkgver=1.9.8
pkgrel=0
pkgdesc="Fast and Lightweight Log processor and forwarder"
url="https://fluentbit.io/"
@ -82,7 +82,7 @@ package() {
}
sha512sums='
c4b778fb8494d4efa8b14834224e568c2c21540ed698551b96502a05ccdd7ce23cf8ca09dbba3e0e77786d7ba6788dd158c926fe07fa3564f1bd906bc4613656 fluent-bit-1.9.7.tar.gz
2beb52c3043345e9b8c6abdb3e6c5382c77bc68f2962d9faefee085e7ff6f17f417fa8d8940227b256dbf28f91a8dddd2d2b6d369f413d94fe8d9fd8049fbc8c fluent-bit-1.9.8.tar.gz
f6431397c80a036980b5377b51e38aec25dfceeb8dbe4cd54dce1f6e77d669d9f8daf983fcc96d25332385888f1809ced5e8ab0e8ccfcd93d19494036e3dc949 fluent-bit.confd
8ba6c8e84dee90176f9b4375fb2c6444fa5d32fa601d9bcf3ea7960fec87f1ef664f175caf08bd0b052843e971efdbf08e2a5cd180ad9a8f23ff2c5cb233814f fluent-bit.initd
6bd7d8b4da93a17f29b6ea1e0286ea226d0e376024284741110936779b3229bd8d6cd03ffbdc5d3b4842294e7f32a888de0dd16b0851b65d91b062ca58530ea0 chunkio-static-lib-fts.patch

View File

@ -18,10 +18,7 @@ build() {
}
package() {
#/bin/bash
# Install basic nvidia-smi inck. libnvidia-ml, libcuda into /lib64 as this is hardcoded in the nvidia-container-toolkit bins
mkdir -p "$pkgdir"/usr/glibc-compat/lib/nvidia "$pkgdir"/usr/sbin
mkdir -p "$pkgdir"/usr/glibc-compat/lib/nvidia "$pkgdir"/usr/sbin "$pkgdir"/lib/firmware/nvidia/"$pkgver"
# tell glibc compat about our libs
mkdir -p "$pkgdir"/usr/glibc-compat/etc/ld.so.conf.d
@ -29,6 +26,10 @@ package() {
cd "$srcdir"/NVIDIA-Linux-x86_64-$pkgver
# GSP firmware
cp firmware/gsp.bin "$pkgdir"/lib/firmware/nvidia/"$pkgver"/gsp.bin
# Various bins
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
@ -39,6 +40,7 @@ package() {
# cross checked via .manifest for targets and symlinks
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"
# inspired from Gentoo x11-drivers/nvidia-drivers
for lib in $LIBS; do
native=$(grep $lib .manifest | grep _LIB | grep NATIVE | grep -v SYMLINK | awk '{print $1}')
if [ -n "$native" ]; then

View File

@ -0,0 +1,9 @@
# Load and unload nvidia-uvm module
ACTION=="add", DEVPATH=="/bus/pci/drivers/nvidia", RUN+="/sbin/modprobe nvidia-uvm"
ACTION=="remove", DEVPATH=="/bus/pci/drivers/nvidia", RUN+="/sbin/modprobe -r nvidia-uvm"
# This will create the device nvidia device nodes
ACTION=="add", DEVPATH=="/bus/pci/drivers/nvidia", RUN+="/usr/sbin/nvidia-smi"
# Create the device node for the nvidia-uvm module
ACTION=="add", DEVPATH=="/module/nvidia_uvm", SUBSYSTEM=="module", RUN+="/usr/sbin/create-nvidia-uvm-dev-node.sh"

View File

@ -3,15 +3,16 @@
pkgname=nvidia-open-gpu
pkgver=515.65.01
pkgrel=0
pkgdesc="NVIDIA Linux open GPU kernel modules incl. GSP firmware"
pkgdesc="NVIDIA Linux open GPU kernel modules"
url="https://github.com/NVIDIA/open-gpu-kernel-modules"
arch="x86_64"
license="MIT OR GPL-2.0"
makedepends="bash linux-headers linux-virt-dev xz"
options="!checkp !strip"
makedepends="bash linux-headers linux-virt-dev"
options="!check"
source="nvidia-$pkgver.tar.gz::https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/$pkgver.tar.gz
NVIDIA-Linux-x86_64-$pkgver.run::https://download.nvidia.com/XFree86/Linux-x86_64/$pkgver/NVIDIA-Linux-x86_64-$pkgver.run"
91-nvidia.rules
create-nvidia-uvm-dev-node.sh"
builddir="$srcdir/open-gpu-kernel-modules-$pkgver"
@ -37,12 +38,13 @@ package() {
gzip -9 -c kernel-open/$m > "$pkgdir"/lib/modules/$KERNEL_VERSION/kernel/$m.gz
done
# Add gsp firmware see: https://download.nvidia.com/XFree86/Linux-x86_64/$pkgver/README/gsp.html
mkdir -p "$pkgdir"/lib/firmware/nvidia/"$pkgver"
sh "$srcdir"/NVIDIA-Linux-x86_64-$pkgver.run -x -s && cp NVIDIA-Linux-x86_64-$pkgver/firmware/gsp.bin "$pkgdir"/lib/firmware/nvidia/"$pkgver"/gsp.bin
# Add some udev rules to automate node handling
install -Dm644 "$srcdir"/91-nvidia.rules "$pkgdir"/lib/udev/rules.d/91-nvidia.rules
install -Dm755 "$srcdir"/create-nvidia-uvm-dev-node.sh "$pkgdir"/usr/sbin/create-nvidia-uvm-dev-node.sh
}
sha512sums='
c2ff6fd02272b6981a65e7e14c6b636f0113e21da910898c27682f58e60fa8e6deea3670081c57e4961fb5e7794eef8eddb90d134ba1892536a8468c5dc9d669 nvidia-515.65.01.tar.gz
5221a4ac071eb39a37a841f19cfe4983286dc35e918956b40604404ef36c122612475df7b9a391a9a70bd60f44e598c8a0e5ec54ccc3e90d51f01e1b2fbe5e33 NVIDIA-Linux-x86_64-515.65.01.run
b16b86ded8601ff802477e2b191c5728290014f90bb85ad6ec0e5b7e84f8004c467f5b6c66b80dc5d205fb70a3900ac286764a3829ca3ad3b8a3a5fd0b73a702 91-nvidia.rules
8335bd69c482da1f67b5cddd31a0b40d01b5c627aeca137b40ac7776cb3e7475767bec808a972ed739c26914207aca264324c41496f6fb579d910c8477f7cc1c create-nvidia-uvm-dev-node.sh
'

View File

@ -0,0 +1,5 @@
#!/bin/sh
D=$(grep nvidia-uvm /proc/devices | awk '{print $1}')
mknod -m 666 /dev/nvidia-uvm c $D 0 || true
mknod -m 666 /dev/nvidia-uvm-tools c $D 1 || true