Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Commit

Permalink
New package: nvidia-open-515.49.06
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Jul 10, 2022
1 parent 21ad7ae commit 8d548cc
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
1 change: 1 addition & 0 deletions srcpkgs/nvidia-open-dkms
27 changes: 27 additions & 0 deletions srcpkgs/nvidia-open/files/dkms.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PACKAGE_NAME="nvidia"
PACKAGE_VERSION="__VERSION_STRING"
AUTOINSTALL="yes"

# By default, DKMS will add KERNELRELEASE to the make command line; however,
# this will cause the kernel module build to infer that it was invoked via
# Kbuild directly instead of DKMS. The dkms(8) manual page recommends quoting
# the 'make' command name to suppress this behavior.
MAKE[0]="'make' -j__JOBS NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=${kernelver} modules"

# The list of kernel modules will be generated by nvidia-installer at runtime.
BUILT_MODULE_NAME[0]="nvidia"
BUILT_MODULE_LOCATION[0]="kernel-open"
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"
BUILT_MODULE_NAME[1]="nvidia-uvm"
BUILT_MODULE_LOCATION[1]="kernel-open"
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"
BUILT_MODULE_NAME[2]="nvidia-modeset"
BUILT_MODULE_LOCATION[2]="kernel-open"
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"
BUILT_MODULE_NAME[3]="nvidia-drm"
BUILT_MODULE_LOCATION[3]="kernel-open"
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"
BUILT_MODULE_NAME[4]="nvidia-peermem"
BUILT_MODULE_LOCATION[4]="kernel-open"
DEST_MODULE_LOCATION[4]="/kernel/drivers/video"

45 changes: 45 additions & 0 deletions srcpkgs/nvidia-open/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Template file for 'nvidia-open'
pkgname=nvidia-open
version=515.49.06
revision=1
wrksrc=open-gpu-kernel-modules-${version}
depends="nvidia-open-dkms-${version}_${revision}"
short_desc="NVIDIA open kernel modules"
maintainer="wael <40663@proton.me>"
license="GPL-2.0-only"
homepage="https://github.com/NVIDIA/open-gpu-kernel-modules"
changelog="https://github.com/NVIDIA/open-gpu-kernel-modules/blob/main/CHANGELOG.md"
distfiles="https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/${version}.tar.gz"
checksum=c83d461d9a1cedd1d596f1104fc9c0743bb6b46226dabd03b33f2e9e2a6536ee

do_install() {
# dkms pkg
vmkdir usr/src/nvidia-open-${version}
vcopy "*" usr/src/nvidia-open-${version}
cp ${FILESDIR}/dkms.conf ${DESTDIR}/usr/src/nvidia-open-${version}/dkms.conf
sed -e "s/__VERSION_STRING/${version}/" \
-e 's/__JOBS/$(nproc)/' \
-i ${DESTDIR}/usr/src/nvidia-open-${version}/dkms.conf

# blacklist nouveau & allow unsupported gpus
vmkdir usr/lib/modprobe.d
echo "blacklist nouveau" > ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf
echo "options nvidia NVreg_OpenRmEnableUnsupportedGpus=1" >> ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf
chmod 644 ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf

vdoc README.md
}

nvidia-open-dkms_package() {
short_desc="${_desc} - DKMS kernel module"
depends="dkms xbps-triggers>=0.121_1"
dkms_modules="nvidia-open ${version}"
# dkms must be before initramfs-regenerate to build modules before images
triggers="dkms initramfs-regenerate"
conflicts="nvidia-dkms>=0 nvidia470-dkms>=0 nvidia390-dkms>=0"

pkg_install() {
vmove usr/src
vmove usr/lib/modprobe.d
}
}

0 comments on commit 8d548cc

Please sign in to comment.