2022-08-31 13:51:59 +00:00
|
|
|
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
2022-09-06 11:30:04 +00:00
|
|
|
pkgname=nvidia-open-gpu
|
2023-08-18 15:17:00 +00:00
|
|
|
#pkgver=535.86.05
|
2023-07-04 15:10:30 +00:00
|
|
|
pkgver=525.125.06
|
2022-08-31 13:51:59 +00:00
|
|
|
pkgrel=0
|
2022-09-07 12:27:15 +00:00
|
|
|
pkgdesc="NVIDIA Linux open GPU kernel modules"
|
2022-08-31 13:51:59 +00:00
|
|
|
url="https://github.com/NVIDIA/open-gpu-kernel-modules"
|
|
|
|
arch="x86_64"
|
|
|
|
license="MIT OR GPL-2.0"
|
2022-09-07 12:27:15 +00:00
|
|
|
makedepends="bash linux-headers linux-virt-dev"
|
|
|
|
options="!check"
|
2022-08-31 13:51:59 +00:00
|
|
|
|
|
|
|
source="nvidia-$pkgver.tar.gz::https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/$pkgver.tar.gz
|
2022-09-07 12:27:15 +00:00
|
|
|
91-nvidia.rules
|
|
|
|
create-nvidia-uvm-dev-node.sh"
|
2022-09-06 11:30:04 +00:00
|
|
|
|
2022-08-31 13:51:59 +00:00
|
|
|
builddir="$srcdir/open-gpu-kernel-modules-$pkgver"
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# Hack running the build inside a container other uname -r returns host kernel
|
|
|
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
|
|
|
|
|
|
|
make KERNEL_UNAME=$KERNEL_VERSION
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
2023-04-26 17:22:52 +00:00
|
|
|
depends="linux-virt~$(echo $KERNEL_VERSION | sed -e 's/-.*$//')"
|
2022-08-31 13:51:59 +00:00
|
|
|
|
|
|
|
modules="nvidia.ko \
|
|
|
|
nvidia-drm.ko \
|
|
|
|
nvidia-modeset.ko \
|
|
|
|
nvidia-uvm.ko \
|
|
|
|
nvidia-peermem.ko"
|
|
|
|
|
|
|
|
mkdir -p "$pkgdir"/lib/modules/$KERNEL_VERSION/kernel
|
|
|
|
for m in $modules; do
|
|
|
|
gzip -9 -c kernel-open/$m > "$pkgdir"/lib/modules/$KERNEL_VERSION/kernel/$m.gz
|
|
|
|
done
|
|
|
|
|
2022-09-07 12:27:15 +00:00
|
|
|
# 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
|
2022-08-31 13:51:59 +00:00
|
|
|
}
|
|
|
|
|
2023-07-04 15:10:30 +00:00
|
|
|
sha512sums="
|
|
|
|
4cedcf56e87c93354bc56d168de64b30866cf0b8fba2d2861ac60893b43f8140fa29626c4825af8250c420f9228fd1b64c93750cc50dd210040b4e7c4927e90a nvidia-525.125.06.tar.gz
|
2022-09-07 12:27:15 +00:00
|
|
|
b16b86ded8601ff802477e2b191c5728290014f90bb85ad6ec0e5b7e84f8004c467f5b6c66b80dc5d205fb70a3900ac286764a3829ca3ad3b8a3a5fd0b73a702 91-nvidia.rules
|
|
|
|
8335bd69c482da1f67b5cddd31a0b40d01b5c627aeca137b40ac7776cb3e7475767bec808a972ed739c26914207aca264324c41496f6fb579d910c8477f7cc1c create-nvidia-uvm-dev-node.sh
|
2023-07-04 15:10:30 +00:00
|
|
|
"
|