Initial commit
This commit is contained in:
9 files changed
+266
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
# Ignore BPM archives and signatures
|
||||||
|
*.bpm
|
||||||
|
*.bpm.sig
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Git repository
|
||||||
|
REPO="https://github.com/NVIDIA/open-gpu-kernel-modules.git"
|
||||||
|
|
||||||
|
# Get tag name using 'git ls-remote'
|
||||||
|
TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | cut -d'/' -f3 | grep '^580\.' | tail -n1 )
|
||||||
|
|
||||||
|
echo "$TAG_NAME"
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
name: nvidia-580xx-utils
|
||||||
|
description: Nvidia libraries, drivers and utilities
|
||||||
|
version: 580.178.04
|
||||||
|
revision: 1
|
||||||
|
url: https://www.nvidia.com/en-us/drivers/unix/
|
||||||
|
license: custom
|
||||||
|
maintainers:
|
||||||
|
- [email protected]
|
||||||
|
architecture: any
|
||||||
|
type: source
|
||||||
|
options:
|
||||||
|
- nostrip
|
||||||
|
downloads:
|
||||||
|
- url: https://download.nvidia.com/XFree86/Linux-x86_64/${BPM_PKG_VERSION}/NVIDIA-Linux-x86_64-${BPM_PKG_VERSION}.run
|
||||||
|
extract_to: ${BPM_SOURCE}
|
||||||
|
extract_strip_components: 1
|
||||||
|
checksum: 5975a86ee45bffcb626f51ae33d1169b108186a2ea47ad651e72f13fa4b6d6f9
|
||||||
|
split_packages:
|
||||||
|
- name: nvidia-580xx-utils
|
||||||
|
provides:
|
||||||
|
- nvidia-utils
|
||||||
|
- opengl-driver
|
||||||
|
- vulkan-driver
|
||||||
|
conflicts:
|
||||||
|
- nvidia-utils
|
||||||
|
- name: opencl-nvidia-580xx
|
||||||
|
description: OpenCL implementation for NVIDIA
|
||||||
|
provides:
|
||||||
|
- opencl-driver
|
||||||
|
- opencl-nvidia
|
||||||
|
conflicts:
|
||||||
|
- opencl-nvidia
|
||||||
|
- name: nvidia-580xx-kernel-modules
|
||||||
|
description: NVIDIA kernel modules
|
||||||
|
depends:
|
||||||
|
- dkms
|
||||||
|
- nvidia-580xx-utils=580.178.04
|
||||||
|
provides:
|
||||||
|
- nvidia-kernel-modules
|
||||||
|
conflicts:
|
||||||
|
- nvidia-kernel-modules
|
||||||
@@ -0,0 +1,160 @@
|
|||||||
|
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||||
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||||
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
|
# The prepare function is executed in the root of the temp directory
|
||||||
|
# This function is used for putting downloaded files to the correct location or applying patches
|
||||||
|
prepare() {
|
||||||
|
# Get install script filename
|
||||||
|
script=$(ls -1 NVIDIA-*.run | head -n1)
|
||||||
|
|
||||||
|
# Extract files
|
||||||
|
chmod +x "$script"
|
||||||
|
./"$script" --extract-only
|
||||||
|
|
||||||
|
# Move files to $BPM_SOURCE
|
||||||
|
mv "${script//.run/}"/* -t "$BPM_SOURCE"
|
||||||
|
rm -r "${script//.run/}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# The build function is executed in the source directory
|
||||||
|
# This function is used to compile the source code
|
||||||
|
package_nvidia-580xx-utils() {
|
||||||
|
# Install X driver
|
||||||
|
install -Dm755 nvidia_drv.so -t "$BPM_OUTPUT"/usr/lib/xorg/modules/drivers
|
||||||
|
rm nvidia_drv.so
|
||||||
|
|
||||||
|
# Install GLX client library
|
||||||
|
install -Dm755 libGLX_nvidia* -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
|
||||||
|
# Install GLX extension module for X
|
||||||
|
install -Dm755 libglxserver_nvidia* -t "$BPM_OUTPUT"/usr/lib/nvidia/xorg
|
||||||
|
|
||||||
|
install -d "$BPM_OUTPUT"/usr/share/glvnd/egl_vendor.d
|
||||||
|
install -d "$BPM_OUTPUT"/usr/share/egl/egl_external_platform.d
|
||||||
|
install -m755 15_nvidia_gbm.json -t "$BPM_OUTPUT"/usr/share/egl/egl_external_platform.d
|
||||||
|
|
||||||
|
install -d "$BPM_OUTPUT"/usr/lib/gbm
|
||||||
|
ln -sf /usr/lib/libnvidia-allactor.so.${BPM_PKG_VERSION} "$BPM_OUTPUT"/usr/lib/gbm/nvidia-drm_gbm.so
|
||||||
|
|
||||||
|
install -m755 10_nvidia.json "$BPM_OUTPUT"/usr/share/glvnd/egl_vendor.d
|
||||||
|
install -m755 10_nvidia_wayland.json "$BPM_OUTPUT"/usr/share/egl/egl_external_platform.d
|
||||||
|
|
||||||
|
# Install Vulkan core libraries
|
||||||
|
install -Dm755 libEGL_nvidia* -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
install -Dm755 libGLESv1_CM_nvidia* -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
install -Dm755 libGLESv2_nvidia* -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
|
||||||
|
# Install nvidia libraries
|
||||||
|
install -Dm755 libnvidia* -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
rm "$BPM_OUTPUT"/usr/lib/libnvidia-opencl.so*
|
||||||
|
|
||||||
|
# Install GLX client libraries
|
||||||
|
install -Dm755 libGLX_nvidia* -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
|
||||||
|
# Install VDPAU libraries
|
||||||
|
install -Dm755 libvdpau_nvidia* -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
|
||||||
|
# Install CUDA libraries
|
||||||
|
install -Dm755 libcuda* -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
install -Dm755 libnvcuvid* -t"$BPM_OUTPUT"/usr/lib
|
||||||
|
|
||||||
|
# Install optix ray tracing engine
|
||||||
|
install -Dm755 libnvoptix* -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
install -Dm755 nvoptix.bin -t "$BPM_OUTPUT"/usr/share/nvidia
|
||||||
|
|
||||||
|
# Symlink libraries
|
||||||
|
find "$BPM_OUTPUT" -type f -name '*.so*' ! -path '*xorg/*' -print0 | while read -d $'\0' _lib; do
|
||||||
|
_soname=$(dirname "${_lib}")/$(readelf -d "${_lib}" | grep -Po 'SONAME.*: \[\K[^]]*' || true)
|
||||||
|
_base=$(echo ${_soname} | sed -r 's/(.*)\.so.*/\1.so/')
|
||||||
|
[[ -e "${_soname}" ]] || ln -s $(basename "${_lib}") "${_soname}"
|
||||||
|
[[ -e "${_base}" ]] || ln -s $(basename "${_soname}") "${_base}"
|
||||||
|
done
|
||||||
|
ln -srf ../libnvidia-allactor.so.${BPM_PKG_VERSION} "$BPM_OUTPUT"/usr/lib/gbm/nvidia-drm_gbm.so
|
||||||
|
ln -sf libglxserver_nvidia.so.${BPM_PKG_VERSION} "$BPM_OUTPUT"/usr/lib/nvidia/xorg/libglxserver_nvidia.so.1
|
||||||
|
ln -sf libglxserver_nvidia.so.${BPM_PKG_VERSION} "$BPM_OUTPUT"/usr/lib/nvidia/xorg/libglxserver_nvidia.so
|
||||||
|
|
||||||
|
# Install firmware files
|
||||||
|
for fw in gsp_ga10x.bin gsp_tu10x.bin; do
|
||||||
|
install -Dm644 firmware/$fw -t "$BPM_OUTPUT"/usr/lib/firmware/nvidia/${BPM_PKG_VERSION}
|
||||||
|
done
|
||||||
|
|
||||||
|
# Vulkan icd
|
||||||
|
install -Dm644 nvidia_icd.json -t "$BPM_OUTPUT"/usr/share/vulkan/icd.d
|
||||||
|
|
||||||
|
# Install nvngx dll
|
||||||
|
install -Dm755 _nvngx.dll -t "$BPM_OUTPUT"/usr/lib/nvidia/wine
|
||||||
|
install -Dm755 nvngx.dll -t "$BPM_OUTPUT"/usr/lib/nvidia/wine
|
||||||
|
|
||||||
|
# Install nvidia-powerd
|
||||||
|
install -Dm644 "$BPM_WORKDIR"/nvidia-powerd.esv "$BPM_OUTPUT"/etc/esvm/services/nvidia-powerd.esv
|
||||||
|
install -Dm644 nvidia-dbus.conf -t "$BPM_OUTPUT"/usr/share/dbus-1/system.d
|
||||||
|
install -Dm755 "$BPM_WORKDIR"/nvidia-sleep.sh "$BPM_OUTPUT"/usr/libexec/system-sleep/nvidia.sh
|
||||||
|
|
||||||
|
# Install nvidia-settings desktop file and icon
|
||||||
|
sed -e 's|__UTILS_PATH__|/usr/bin|' \
|
||||||
|
-e 's|__PIXMAPTH_PATH__|/usr/share/pixmaps|' \
|
||||||
|
nvidia-settings.desktop | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/applications/nvidia-settings.desktop
|
||||||
|
install -Dm644 nvidia-settings.png -t "$BPM_OUTPUT"/usr/share/pixmaps
|
||||||
|
|
||||||
|
# Install application profiles
|
||||||
|
install -Dm644 nvidia-application-profiles-${BPM_PKG_VERSION}-key-documentation -t "$BPM_OUTPUT"/usr/share/nvidia
|
||||||
|
install -Dm644 nvidia-application-profiles-${BPM_PKG_VERSION}-rc -t "$BPM_OUTPUT"/usr/share/nvidia
|
||||||
|
|
||||||
|
# Install Xorg config for PRIME
|
||||||
|
install -Dm644 "$BPM_WORKDIR"/nvidia-drm-outputclass.conf "$BPM_OUTPUT"/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
|
||||||
|
|
||||||
|
# Install binaries
|
||||||
|
install -Dm755 nvidia-cuda-mps-control -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 nvidia-cuda-mps-server -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 nvidia-xconfig -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 nvidia-settings -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 nvidia-bug-report.sh "$BPM_OUTPUT"/usr/bin/nvidia-bug-report
|
||||||
|
install -Dm755 nvidia-debugdump -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 nvidia-smi -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm4755 nvidia-modprobe -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 nvidia-persistenced -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 nvidia-powerd -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 systemd/nvidia-sleep.sh -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 nvidia-ngx-updater -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
install -Dm755 "$BPM_WORKDIR"/prime-run -t "$BPM_OUTPUT"/usr/bin
|
||||||
|
|
||||||
|
# Install man pages
|
||||||
|
zcat nvidia-cuda-mps-control.1.gz | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/man/man1/nvidia-cuda-mps-control.1
|
||||||
|
zcat nvidia-xconfig.1.gz | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/man/man1/nvidia-xconfig.1
|
||||||
|
zcat nvidia-settings.1.gz | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/man/man1/nvidia-settings.1
|
||||||
|
zcat nvidia-smi.1.gz | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/man/man1/nvidia-smi.1
|
||||||
|
zcat nvidia-modprobe.1.gz | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/man/man1/nvidia-modprobe.1
|
||||||
|
zcat nvidia-persistenced.1.gz | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/man/man1/nvidia-persistenced.1
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/nvidia-utils/LICENSE
|
||||||
|
}
|
||||||
|
|
||||||
|
package_opencl-nvidia-580xx() {
|
||||||
|
install -Dm755 libnvidia-opencl.so.${BPM_PKG_VERSION} -t "$BPM_OUTPUT"/usr/lib
|
||||||
|
ln -sf libnvidia-opencl.so.${BPM_PKG_VERSION} "$BPM_OUTPUT"/usr/lib/libnvidia-opencl.so.1
|
||||||
|
ln -sf libnvidia-opencl.so.${BPM_PKG_VERSION} "$BPM_OUTPUT"/usr/lib/libnvidia-opencl.so
|
||||||
|
|
||||||
|
install -Dm644 nvidia.icd -t "$BPM_OUTPUT"/etc/OpenCL/vendors
|
||||||
|
install -Dm644 nvidia_layers.json -t "$BPM_OUTPUT"/usr/share/vulkan/implicit_layer.d
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/opencl-nvidia/LICENSE
|
||||||
|
}
|
||||||
|
|
||||||
|
package_nvidia-580xx-kernel-modules() {
|
||||||
|
# Install dkms files
|
||||||
|
install -d "$BPM_OUTPUT"/usr/src/nvidia-${BPM_PKG_VERSION}
|
||||||
|
cp -r kernel/* "$BPM_OUTPUT"/usr/src/nvidia-${BPM_PKG_VERSION}
|
||||||
|
sed -e "s/%VERSION%/${BPM_PKG_VERSION}/g" "$BPM_WORKDIR"/dkms.conf | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/src/nvidia-${BPM_PKG_VERSION}/dkms.conf
|
||||||
|
|
||||||
|
# Blacklist nouveau and nova modules
|
||||||
|
install -d "$BPM_OUTPUT"/usr/lib/modprobe.d
|
||||||
|
echo "blacklist nouveau" >> "$BPM_OUTPUT"/usr/lib/modprobe.d/nvidia.conf
|
||||||
|
echo "blacklist nova_core" >> "$BPM_OUTPUT"/usr/lib/modprobe.d/nvidia.conf
|
||||||
|
echo "blacklist nova_drm" >> "$BPM_OUTPUT"/usr/lib/modprobe.d/nvidia.conf
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/opencl-nvidia/LICENSE
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
PACKAGE_NAME="nvidia"
|
||||||
|
PACKAGE_VERSION="%VERSION%"
|
||||||
|
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 was generated by nvidia-installer at runtime.
|
||||||
|
BUILT_MODULE_NAME[0]="nvidia"
|
||||||
|
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"
|
||||||
|
BUILT_MODULE_NAME[1]="nvidia-uvm"
|
||||||
|
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"
|
||||||
|
BUILT_MODULE_NAME[2]="nvidia-modeset"
|
||||||
|
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"
|
||||||
|
BUILT_MODULE_NAME[3]="nvidia-drm"
|
||||||
|
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
Section "ServerLayout"
|
||||||
|
Identifier "layout"
|
||||||
|
Option "AllowNVIDIAGPUScreens"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "OutputClass"
|
||||||
|
Identifier "nvidia"
|
||||||
|
MatchDriver "nvidia-drm"
|
||||||
|
Driver "nvidia"
|
||||||
|
Option "AllowEmptyInitialConfiguration"
|
||||||
|
ModulePath "/usr/lib/nvidia/xorg"
|
||||||
|
EndSection
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
name: nvidia-powerd
|
||||||
|
description: NVIDIA Dynamic Boost deamon
|
||||||
|
type: background
|
||||||
|
start_cmd: /usr/bin/nvidia-powerd
|
||||||
|
exit_method: kill
|
||||||
|
restart: true
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
pre)
|
||||||
|
logger -t nvidia-sleep "Entering hibernation mode..."
|
||||||
|
/usr/sbin/nvidia-sleep.sh "hibernate"
|
||||||
|
;;
|
||||||
|
post)
|
||||||
|
logger -t nvidia-sleep "Exiting hibernation mode..."
|
||||||
|
/usr/sbin/nvidia-sleep.sh "resume"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"
|
||||||
Reference in new issue
Block a user