nvidia: converted to GLVND

This commit is contained in:
Matt Housh 2018-08-11 13:42:30 -05:00
parent 1def6a6347
commit cb363308ad
7 changed files with 181 additions and 123 deletions

View File

@ -2,6 +2,9 @@ drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/OpenCL/ drwxr-xr-x root/root etc/OpenCL/
drwxr-xr-x root/root etc/OpenCL/vendors/ drwxr-xr-x root/root etc/OpenCL/vendors/
-rw-r--r-- root/root etc/OpenCL/vendors/nvidia.icd -rw-r--r-- root/root etc/OpenCL/vendors/nvidia.icd
drwxr-xr-x root/root etc/vulkan/
drwxr-xr-x root/root etc/vulkan/icd.d/
-rw-r--r-- root/root etc/vulkan/icd.d/nvidia_icd.json
drwxr-xr-x root/root lib/ drwxr-xr-x root/root lib/
drwxr-xr-x root/root lib/modules/ drwxr-xr-x root/root lib/modules/
drwxr-xr-x root/root lib/modules/<kernel-version>/ drwxr-xr-x root/root lib/modules/<kernel-version>/
@ -15,34 +18,52 @@ drwxr-xr-x root/root lib/udev/rules.d/
-rw-r--r-- root/root lib/udev/rules.d/90-nvidia-uvm.rules -rw-r--r-- root/root lib/udev/rules.d/90-nvidia-uvm.rules
drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/ drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/nvidia-cuda-mps-control
-rwxr-xr-x root/root usr/bin/nvidia-cuda-mps-server
-rwxr-xr-x root/root usr/bin/nvidia-debugdump -rwxr-xr-x root/root usr/bin/nvidia-debugdump
-rwsr-xr-x root/root usr/bin/nvidia-modprobe
-rwxr-xr-x root/root usr/bin/nvidia-persistenced -rwxr-xr-x root/root usr/bin/nvidia-persistenced
-rwxr-xr-x root/root usr/bin/nvidia-settings -rwxr-xr-x root/root usr/bin/nvidia-settings
-rwxr-xr-x root/root usr/bin/nvidia-smi -rwxr-xr-x root/root usr/bin/nvidia-smi
-rwxr-xr-x root/root usr/bin/nvidia-xconfig -rwxr-xr-x root/root usr/bin/nvidia-xconfig
drwxr-xr-x root/root usr/lib/ drwxr-xr-x root/root usr/lib/
-rwxr-xr-x root/root usr/lib/libGL.so.390.77 lrwxrwxrwx root/root usr/lib/libEGL_nvidia.so.0 -> libEGL_nvidia.so.
lrwxrwxrwx root/root usr/lib/libGL_so_1_2_nvidia -> libGL.so.390.77 -rwxr-xr-x root/root usr/lib/libEGL_nvidia.so.390.77
lrwxrwxrwx root/root usr/lib/libOpenCL.so -> libOpenCL.so.1.0.0 lrwxrwxrwx root/root usr/lib/libGLESv1_CM_nvidia.so.1 -> libGLESv1_CM_nvidia.so.390.77
-rwxr-xr-x root/root usr/lib/libGLESv1_CM_nvidia.so.390.77
lrwxrwxrwx root/root usr/lib/libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.390.77
-rwxr-xr-x root/root usr/lib/libGLESv2_nvidia.so.390.77
lrwxrwxrwx root/root usr/lib/libGLX_nvidia.so.0 -> libGLX_nvidia.so.390.77
-rwxr-xr-x root/root usr/lib/libGLX_nvidia.so.390.77
-rwxr-xr-x root/root usr/lib/libOpenCL.so.1.0.0 -rwxr-xr-x root/root usr/lib/libOpenCL.so.1.0.0
lrwxrwxrwx root/root usr/lib/libcuda.so -> libcuda.so.390.77
lrwxrwxrwx root/root usr/lib/libcuda.so.1 -> libcuda.so.390.77
-rwxr-xr-x root/root usr/lib/libcuda.so.390.77 -rwxr-xr-x root/root usr/lib/libcuda.so.390.77
lrwxrwxrwx root/root usr/lib/libnvcuvid.so -> libnvcuvid.so.390.77
lrwxrwxrwx root/root usr/lib/libnvcuvid.so.1 -> libnvcuvid.so.390.77
-rwxr-xr-x root/root usr/lib/libnvcuvid.so.390.77 -rwxr-xr-x root/root usr/lib/libnvcuvid.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-cfg.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-cfg.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-compiler.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-compiler.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-eglcore.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-encode.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-encode.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-fatbinaryloader.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-fatbinaryloader.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-fbc.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-fbc.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-glcore.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-glcore.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-glsi.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-gtk2.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-gtk2.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-gtk3.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-gtk3.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-ifr.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-ifr.so.390.77
lrwxrwxrwx root/root usr/lib/libnvidia-ml.so -> libnvidia-ml.so.390.77
lrwxrwxrwx root/root usr/lib/libnvidia-ml.so.1 -> libnvidia-ml.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-ml.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-ml.so.390.77
lrwxrwxrwx root/root usr/lib/libnvidia-opencl.so -> libnvidia-opencl.so.390.77
lrwxrwxrwx root/root usr/lib/libnvidia-opencl.so.1 -> libnvidia-opencl.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-opencl.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-opencl.so.390.77
lrwxrwxrwx root/root usr/lib/libnvidia-ptxjitcompiler.so -> libnvidia-ptxjitcompiler.so.390.77
lrwxrwxrwx root/root usr/lib/libnvidia-ptxjitcompiler.so.1 -> libnvidia-ptxjitcompiler.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-ptxjitcompiler.so.390.77
-rwxr-xr-x root/root usr/lib/libnvidia-tls.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-tls.so.390.77
drwxr-xr-x root/root usr/lib/nvidia/
drwxr-xr-x root/root usr/lib/nvidia/xorg/
lrwxrwxrwx root/root usr/lib/nvidia/xorg/libglx.so -> libglx.so.390.77
lrwxrwxrwx root/root usr/lib/nvidia/xorg/libglx.so.1 -> libglx.so.390.77
-rwxr-xr-x root/root usr/lib/nvidia/xorg/libglx.so.390.77
drwxr-xr-x root/root usr/lib/tls/ drwxr-xr-x root/root usr/lib/tls/
-rwxr-xr-x root/root usr/lib/tls/libnvidia-tls.so.390.77 -rwxr-xr-x root/root usr/lib/tls/libnvidia-tls.so.390.77
drwxr-xr-x root/root usr/lib/vdpau/ drwxr-xr-x root/root usr/lib/vdpau/
@ -54,19 +75,17 @@ drwxr-xr-x root/root usr/lib/xorg/modules/
drwxr-xr-x root/root usr/lib/xorg/modules/drivers/ drwxr-xr-x root/root usr/lib/xorg/modules/drivers/
-rwxr-xr-x root/root usr/lib/xorg/modules/drivers/nvidia_drv.so -rwxr-xr-x root/root usr/lib/xorg/modules/drivers/nvidia_drv.so
drwxr-xr-x root/root usr/lib/xorg/modules/extensions/ drwxr-xr-x root/root usr/lib/xorg/modules/extensions/
-rwxr-xr-x root/root usr/lib/xorg/modules/extensions/libglx.so.390.77
lrwxrwxrwx root/root usr/lib/xorg/modules/extensions/libglx_so_nvidia -> libglx.so.390.77
-rwxr-xr-x root/root usr/lib/xorg/modules/libnvidia-wfb.so.390.77
drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/X11/
drwxr-xr-x root/root usr/share/X11/xorg.conf.d/
-rw-r--r-- root/root usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
drwxr-xr-x root/root usr/share/applications/ drwxr-xr-x root/root usr/share/applications/
-rw-r--r-- root/root usr/share/applications/nvidia-settings.desktop -rw-r--r-- root/root usr/share/applications/nvidia-settings.desktop
drwxr-xr-x root/root usr/share/man/ drwxr-xr-x root/root usr/share/glvnd/
drwxr-xr-x root/root usr/share/man/man1/ drwxr-xr-x root/root usr/share/glvnd/egl_vendor.d/
-rw-r--r-- root/root usr/share/man/man1/nvidia-persistenced.1.gz -rw-r--r-- root/root usr/share/glvnd/egl_vendor.d/10_nvidia.json
-rw-r--r-- root/root usr/share/man/man1/nvidia-settings.1.gz
-rw-r--r-- root/root usr/share/man/man1/nvidia-smi.1.gz
-rw-r--r-- root/root usr/share/man/man1/nvidia-xconfig.1.gz
drwxr-xr-x root/root usr/share/nvidia/ drwxr-xr-x root/root usr/share/nvidia/
-rw-r--r-- root/root usr/share/nvidia/nvidia-application-profiles-390.77-key-documentation -rw-r--r-- root/root usr/share/nvidia/nvidia-application-profiles-390.77-key-documentation
-rw-r--r-- root/root usr/share/nvidia/nvidia-application-profiles-390.77-rc
drwxr-xr-x root/root usr/share/pixmaps/ drwxr-xr-x root/root usr/share/pixmaps/
-rw-r--r-- root/root usr/share/pixmaps/nvidia-settings.png -rw-r--r-- root/root usr/share/pixmaps/nvidia-settings.png

View File

@ -1,2 +1,3 @@
2097834b5b5f1fca0b82dd5518e11cb6 10-nvidia-drm-outputclass.conf
4511024cc556d0c6e7c467b6789524e2 90-nvidia-uvm.rules 4511024cc556d0c6e7c467b6789524e2 90-nvidia-uvm.rules
6b17b58232eb02f1563319a1a78898c6 NVIDIA-Linux-x86_64-390.77.run d741d5bb82146f1a90839fea781c07f3 NVIDIA-Linux-x86_64-390.77-no-compat32.run

View File

@ -1,6 +1,7 @@
untrusted comment: verify with /etc/ports/opt.pub untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/Y72bRyWJNdPqJFh+G1LOiePVxwRxPm94axWyzxypKFjnt6pHeR6o65w81lxgo215ScXIIrzIShP47oTKZIbrgw= RWSE3ohX2g5d/Tja9Skvi5LFu+c5VqWVOwqfylM/P2Ed7n63BkjLuglDsQY/bxbWNF5i9NVCp2BNrD/8hyMvmo2+I0Nho3GM2wQ=
SHA256 (Pkgfile) = 62eb310a273bca81299d1d0b8c288e0b9b509733e7c884be41b340285015b94b SHA256 (Pkgfile) = ae3cf0969ae777f33673131c694e5131aa3579418f77e82421b3469a081b9bc3
SHA256 (.footprint) = a3a7494c359b635a45f54c1b3b79395284774b089c55e29e5ab078897970c885 SHA256 (.footprint) = 2898477f874e0b8f1acd0fec90830b4d067a0b8343a888793ebfa91ee10a95d6
SHA256 (NVIDIA-Linux-x86_64-390.77.run) = e51c5784520e73c179a57cf0dcd3a4c673d8142b28415a060066d83633637282 SHA256 (NVIDIA-Linux-x86_64-390.77-no-compat32.run) = 6eb950dc4b59697d12d79a975b2c21a5e3cde49a12b61432d7e836110a06a6ea
SHA256 (90-nvidia-uvm.rules) = c35c61cebf5bf9a112ac06539bdc670a388afa4b50a7f8223a114fbeafedb140 SHA256 (90-nvidia-uvm.rules) = c35c61cebf5bf9a112ac06539bdc670a388afa4b50a7f8223a114fbeafedb140
SHA256 (10-nvidia-drm-outputclass.conf) = 4a72c70d7e348102f8c159b3f58973218bc740de1d86830f7cbee1c40744929c

View File

@ -0,0 +1,13 @@
# This xorg.conf.d configuration snippet configures the X server to
# automatically load the nvidia X driver when it detects a device driven by the
# nvidia-drm.ko kernel module. Please note that this only works on Linux kernels
# version 3.9 or higher with CONFIG_DRM enabled, and only if the nvidia-drm.ko
# kernel module is loaded before the X server is started.
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
ModulePath "/usr/lib/nvidia/xorg"
ModulePath "/usr/lib/xorg/modules"
EndSection

View File

@ -1,87 +1,126 @@
# Description: nVIDIA Linux Display Driver (long lived branch version) # Description: NVIDIA Linux Display Driver (long lived branch)
# URL: http://www.nvidia.com/ # URL: http://www.nvidia.com/
# Maintainer: Matt Housh, jaeger at crux dot ninja # Maintainer: Matt Housh, jaeger at crux dot ninja
# Depends on: gtk gl-select # Depends on: gtk gtk3 libglvnd
name=nvidia name=nvidia
version=390.77 version=390.77
release=1 release=2
source=(http://us.download.nvidia.com/XFree86/Linux-x86_64/$version/NVIDIA-Linux-x86_64-$version.run \ source=(http://us.download.nvidia.com/XFree86/Linux-x86_64/$version/NVIDIA-Linux-x86_64-$version-no-compat32.run \
90-nvidia-uvm.rules) 90-nvidia-uvm.rules 10-nvidia-drm-outputclass.conf)
build() { build() {
sh NVIDIA-Linux-x86_64-$version.run --extract-only sh NVIDIA-Linux-x86_64-$version-no-compat32.run --extract-only
cd NVIDIA-Linux-x86_64-$version cd NVIDIA-Linux-x86_64-$version-no-compat32
# libraries # X driver and GLX extension
install -d $PKG/usr/lib/{tls,vdpau} install -d $PKG/usr/lib/xorg/modules/{drivers,extensions}
install -m 0755 libGL.so.$version $PKG/usr/lib install -m 0755 nvidia_drv.so $PKG/usr/lib/xorg/modules/drivers/
install -m 0755 libOpenCL.so.1.0.0 $PKG/usr/lib install -d -m 0755 $PKG/usr/lib/nvidia/xorg
install -m 0755 libcuda.so.$version $PKG/usr/lib install -m 0755 libglx.so.$version $PKG/usr/lib/nvidia/xorg/
install -m 0755 libnvidia-cfg.so.$version $PKG/usr/lib ln -s libglx.so.$version $PKG/usr/lib/nvidia/xorg/libglx.so
install -m 0755 libnvidia-compiler.so.$version $PKG/usr/lib ln -s libglx.so.$version $PKG/usr/lib/nvidia/xorg/libglx.so.1
install -m 0755 libnvidia-encode.so.$version $PKG/usr/lib
install -m 0755 libnvidia-fbc.so.$version $PKG/usr/lib
install -m 0755 libnvidia-glcore.so.$version $PKG/usr/lib
install -m 0755 libnvidia-gtk2.so.$version $PKG/usr/lib
install -m 0755 libnvidia-gtk3.so.$version $PKG/usr/lib
install -m 0755 libnvidia-ifr.so.$version $PKG/usr/lib
install -m 0755 libnvidia-ml.so.$version $PKG/usr/lib
install -m 0755 libnvidia-opencl.so.$version $PKG/usr/lib
install -m 0755 libnvidia-tls.so.$version $PKG/usr/lib
install -m 0755 libnvcuvid.so.$version $PKG/usr/lib
install -m 0755 tls/libnvidia-tls.so.$version $PKG/usr/lib/tls
install -m 0755 libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau
install -m 0755 libnvidia-fatbinaryloader.so.$version $PKG/usr/lib
ln -s libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau/libvdpau_nvidia.so.1 # EGL and OpenGL ES libraries and config
ln -s libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau/libvdpau_nvidia.so install -d $PKG/usr/lib
install -m 0755 libGLESv1_CM_nvidia.so.$version $PKG/usr/lib/
ln -s libGLESv1_CM_nvidia.so.$version $PKG/usr/lib/libGLESv1_CM_nvidia.so.1
install -m 0755 libGLESv2_nvidia.so.$version $PKG/usr/lib/
ln -s libGLESv2_nvidia.so.$version $PKG/usr/lib/libGLESv2_nvidia.so.2
install -D -m 0644 10_nvidia.json $PKG/usr/share/glvnd/egl_vendor.d/10_nvidia.json
ln -s libnvcuvid.so.$version $PKG/usr/lib/libnvcuvid.so.1 # wayland EGL library and config
ln -s libnvcuvid.so.$version $PKG/usr/lib/libnvcuvid.so #install -d $PKG/usr/share/egl/egl_external_platform.d
#install -m 0755 libnvidia-egl-wayland.so.1.0.2 $PKG/usr/lib/
#install -m 0644 10_nvidia_wayland.json $PKG/usr/share/egl/egl_external_platform.d/
ln -s libnvidia-ml.so.$version $PKG/usr/lib/libnvidia-ml.so.1 # GLVND vendor implementation libraries
ln -s libnvidia-ml.so.$version $PKG/usr/lib/libnvidia-ml.so install -m 0755 libGLX_nvidia.so.$version $PKG/usr/lib/
ln -s libGLX_nvidia.so.$version $PKG/usr/lib/libGLX_nvidia.so.0
install -m 0755 libEGL_nvidia.so.$version $PKG/usr/lib/
ln -s libEGL_nvidia.so.$verison $PKG/usr/lib/libEGL_nvidia.so.0
ln -s libOpenCL.so.1.0.0 $PKG/usr/lib/libOpenCL.so # vulkan ICD config
install -d $PKG/etc/vulkan/icd.d
sed -i -e 's,__NV_VK_ICD__,libGLX_nvidia.so.0,g' nvidia_icd.json.template
install -m 0644 nvidia_icd.json.template $PKG/etc/vulkan/icd.d/nvidia_icd.json
# xorg driver/extensions # driver component libraries
install -d $PKG/usr/lib/xorg/modules/{drivers,extensions} install -m 0755 libnvidia-cfg.so.$version $PKG/usr/lib/
install -m 0755 nvidia_drv.so $PKG/usr/lib/xorg/modules/drivers install -m 0755 libnvidia-compiler.so.$version $PKG/usr/lib/
install -m 0755 libglx.so.$version $PKG/usr/lib/xorg/modules/extensions install -m 0755 libnvidia-eglcore.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-wfb.so.$version $PKG/usr/lib/xorg/modules install -m 0755 libnvidia-glcore.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-glsi.so.$version $PKG/usr/lib/
# nvidia programs amd man-pages # vendor VDPAU library
install -d $PKG/usr/{bin,share/man/man1} install -D -m 0755 libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau/libvdpau_nvidia.so.$version
install -m 0755 nvidia-{debugdump,persistenced,settings,smi,xconfig} \ ln -s libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau/libvdpau_nvidia.so.1
$PKG/usr/bin ln -s libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau/libvdpau_nvidia.so
install -m 0644 nvidia-{persistenced,settings,smi,xconfig}.1.gz \
$PKG/usr/share/man/man1
# desktop file and icon # CUDA libraries
install -d $PKG/usr/share/{applications,pixmaps} install -m 0755 libcuda.so.$version $PKG/usr/lib/
sed -i 's:__UTILS_PATH__:/usr/bin: ; s:__PIXMAP_PATH__:/usr/share/pixmaps:' nvidia-settings.desktop ln -s libcuda.so.$version $PKG/usr/lib/libcuda.so.1
install -m 0644 nvidia-settings.desktop $PKG/usr/share/applications ln -s libcuda.so.$version $PKG/usr/lib/libcuda.so
install -m 0644 nvidia-settings.png $PKG/usr/share/pixmaps install -m 0755 libnvidia-fatbinaryloader.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-ptxjitcompiler.so.$version $PKG/usr/lib/
ln -s libnvidia-ptxjitcompiler.so.$version $PKG/usr/lib/libnvidia-ptxjitcompiler.so.1
ln -s libnvidia-ptxjitcompiler.so.$version $PKG/usr/lib/libnvidia-ptxjitcompiler.so
# additional symlinks required by gl-select # OpenCL libraries and config
ln -s libGL.so.$version $PKG/usr/lib/libGL_so_1_2_nvidia install -m 0755 libOpenCL.so.1.0.0 $PKG/usr/lib/
ln -s libglx.so.$version $PKG/usr/lib/xorg/modules/extensions/libglx_so_nvidia install -m 0755 libnvidia-opencl.so.$version $PKG/usr/lib/
ln -s libnvidia-opencl.so.$version $PKG/usr/lib/libnvidia-opencl.so.1
ln -s libnvidia-opencl.so.$version $PKG/usr/lib/libnvidia-opencl.so
install -D -m 0644 nvidia.icd $PKG/etc/OpenCL/vendors/nvidia.icd
# opencl icd file # CUDA MPI applications
install -m 0644 -D nvidia.icd $PKG/etc/OpenCL/vendors/nvidia.icd install -d $PKG/usr/bin
install -m 0755 nvidia-cuda-mps-control $PKG/usr/bin/
install -m 0755 nvidia-cuda-mps-server $PKG/usr/bin/
# nvidia-uvm module udev rule # TLS libraries
install -d $PKG/lib/udev/rules.d install -m 0755 libnvidia-tls.so.$version $PKG/usr/lib/
install -m 0644 $SRC/90-nvidia-uvm.rules $PKG/lib/udev/rules.d/90-nvidia-uvm.rules install -d $PKG/usr/lib/tls
install -m 0755 tls/libnvidia-tls.so.$version $PKG/usr/lib/tls/
# nvidia-settings registry key file # monitoring and management API library
install -D -m 0644 nvidia-application-profiles-$version-key-documentation \ install -m 0755 libnvidia-ml.so.$version $PKG/usr/lib/
$PKG/usr/share/nvidia/nvidia-application-profiles-$version-key-documentation
# kernel modules # applications
cd kernel install -m 4755 nvidia-modprobe $PKG/usr/bin/
IGNORE_CC_MISMATCH=1 make module install -m 0755 nvidia-{xconfig,settings,smi,debugdump,persistenced} \
install -d -m 0755 $PKG/lib/modules/`uname -r`/extra $PKG/usr/bin/
install -m 0644 *.ko $PKG/lib/modules/`uname -r`/extra/
# nvidia-settings UI libraries
install -m 0755 libnvidia-gtk{2,3}.so.$version $PKG/usr/lib/
# encoding/decoding libraries
install -m 0755 libnvcuvid.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-encode.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-ifr.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-fbc.so.$version $PKG/usr/lib/
# X driver config
install -D -m 0644 $SRC/10-nvidia-drm-outputclass.conf \
$PKG/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
# application profile keys and documentation
install -d -m 0755 $PKG/usr/share/nvidia
install -m 0644 nvidia-application-profiles-$version-rc $PKG/usr/share/nvidia/
install -m 0644 nvidia-application-profiles-$version-key-documentation $PKG/usr/share/nvidia/
# desktop file and icon
install -d $PKG/usr/share/{applications,pixmaps}
sed -i -e 's,__UTILS_PATH__,/usr/bin,' -e 's,__PIXMAP_PATH__,/usr/share/pixmaps,' nvidia-settings.desktop
install -m 0644 nvidia-settings.desktop $PKG/usr/share/applications/
install -m 0644 nvidia-settings.png $PKG/usr/share/pixmaps/
# nvidia-uvm udev rules file
install -D -m 0644 $SRC/90-nvidia-uvm.rules $PKG/lib/udev/rules.d/90-nvidia-uvm.rules
# kernel modules
cd kernel
IGNORE_CC_MISMATCH=1 make module
install -d $PKG/lib/modules/$(uname -r)/extra
install -m 0644 *.ko $PKG/lib/modules/$(uname -r)/extra/
} }

View File

@ -1,5 +1,5 @@
README for nvidia 1xx.xx README for nvidia 1xx.xx+
@ -7,38 +7,3 @@ README for nvidia 1xx.xx
If using udev, add your user to the "video" group to be able to If using udev, add your user to the "video" group to be able to
use the nvidia devices required for 3d to function properly. use the nvidia devices required for 3d to function properly.
*** NOTE for users of legacy hardware ***
Before installing this port, take a look at the Legacy GPU list on
nvidia's site: http://www.nvidia.com/object/IO_32667.html
If your hardware is supported by either the 1.0-96xx or 1.0-71xx
driver series, install the corresponding port instead of this one.
POST-INSTALL
Use opt/gl-select from ports to select the correct gl/glx
libraries and extensions like so:
# gl-select use nvidia
POST-REMOVE
Use opt/gl-select from ports to revert to the xorg gl/glx libraries
and extensions like so:
# gl-select use xorg
When UPGRADING/DOWNGRADING the nvidia port (where the version changes),
use gl-select to revert to xorg and then re-select nvidia in order to
refresh the libGLcore and libGL symlinks, like so:
# prt-get update nvidia
# gl-select use xorg; gl-select use nvidia

20
nvidia/pre-install Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# check for root privileges needed for gl-select
if [ ! $(id -u) -eq 0 ]; then
echo "root privileges needed to run this pre-install script!"
exit 1
fi
# is gl-select available?
if [ -x /usr/bin/gl-select ]; then
printf '%b' "\033[33;1mNOTE: With the introduction of GLVND, gl-select is no
longer needed. This pre-install script will reset gl-select
to its default xorg setting if needed. It is recommended that
gl-select be uninstalled after installing libglvnd and
upgrading mesa3d.\033[0m\n"
# is nvidia currently selected?
if /usr/bin/gl-select status | grep -q 'nvidia.*is selected'; then
/usr/bin/gl-select use xorg
fi
fi