Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions srcpkgs/nvidia-open-dkms/files/dkms.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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`nproc` 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"
37 changes: 37 additions & 0 deletions srcpkgs/nvidia-open-dkms/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Template file for 'nvidia-open-dkms'
pkgname=nvidia-open-dkms
version=550.107.02
revision=1
archs="x86_64"
depends="dkms nvidia"
short_desc="NVIDIA Linux open GPU kernel module source"
maintainer="mike7d7 <mike7d7@proton.me>"
license="GPL-2.0-only, MIT"
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=b96ed0ab2c9d03f76ff85098d08523d4aaa041c580565a7905fe6add69ba2569
replaces="nvidia-dkms>=0"
dkms_modules="nvidia-open-dkms ${version}"
triggers="dkms initramfs-regenerate"


do_install() {
vmkdir usr/src/nvidia-open-dkms-${version}
vcopy "*" usr/src/nvidia-open-dkms-${version}
cp ${FILESDIR}/dkms.conf ${DESTDIR}/usr/src/nvidia-open-dkms-${version}/dkms.conf
vsed -e "s/__VERSION_STRING/${version}/" -i ${DESTDIR}/usr/src/nvidia-open-dkms-${version}/dkms.conf

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
vlicense COPYING

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