5 sh
"NVIDIA-Linux-x86_64-$version-no-compat32.run" --extract-only
6 cd "NVIDIA-Linux-x86_64-$version-no-compat32"
9 install -Dm755 nvidia_drv.so
"$1/usr/lib/xorg/modules/drivers/nvidia_drv.so"
11 # GLX extension module for X
12 install -Dm755 "libglx.so.$version" "$1/usr/lib/nvidia/xorg/libglx.so.$version"
14 # Ensure that X finds glx
15 ln -s "libglx.so.$version" "$1/usr/lib/nvidia/xorg/libglx.so.1"
16 ln -s "libglx.so.$version" "$1/usr/lib/nvidia/xorg/libglx.so"
18 install -Dm755 "libGLX_nvidia.so.$version" "$1/usr/lib/libGLX_nvidia.so.$version"
19 ln -s "libGLX_nvidia.so.$version" "$1/usr/lib/libGLX_nvidia.so.0"
20 ln -s "libGLX_nvidia.so.$version" "$1/usr/lib/libGLX_nvidia.so.indirect"
23 install -Dm644 nvidia.icd
"$1/etc/OpenCL/vendors/nvidia.icd"
24 install -Dm755 "libnvidia-compiler.so.$version" "$1/usr/lib/libnvidia-compiler.so.$version"
25 install -Dm755 "libnvidia-opencl.so.$version" "$1/usr/lib/libnvidia-opencl.so.$version"
28 install -Dm755 "libEGL_nvidia.so.$version" "$1/usr/lib/libEGL_nvidia.so.$version"
29 install -Dm755 "libGLESv1_CM_nvidia.so.$version" "$1/usr/lib/libGLESv1_CM_nvidia.so.$version"
30 install -Dm755 "libGLESv2_nvidia.so.$version" "$1/usr/lib/libGLESv2_nvidia.so.$version"
31 install -Dm644 "10_nvidia.json" "$1/usr/share/glvnd/egl_vendor.d/10_nvidia.json"
34 install -Dm755 "libnvidia-glcore.so.$version" "$1/usr/lib/libnvidia-glcore.so.$version"
35 install -Dm755 "libnvidia-eglcore.so.$version" "$1/usr/lib/libnvidia-eglcore.so.$version"
36 install -Dm755 "libnvidia-glsi.so.$version" "$1/usr/lib/libnvidia-glsi.so.$version"
39 install -Dm755 "libnvidia-ifr.so.$version" "$1/usr/lib/libnvidia-ifr.so.$version"
40 install -Dm755 "libnvidia-fbc.so.$version" "$1/usr/lib/libnvidia-fbc.so.$version"
41 install -Dm755 "libnvidia-encode.so.$version" "$1/usr/lib/libnvidia-encode.so.$version"
42 install -Dm755 "libnvidia-cfg.so.$version" "$1/usr/lib/libnvidia-cfg.so.$version"
43 install -Dm755 "libnvidia-ml.so.$version" "$1/usr/lib/libnvidia-ml.so.$version"
44 #install -Dm755 "libnvidia-ngx.so.$version" "$1/usr/lib/libnvidia-ngx.so.$version"
45 #install -Dm755 "libnvidia-glvkspirv.so.$version" "$1/usr/lib/libnvidia-glvkspirv.so.$version"
48 sed -i 's/__NV_VK_ICD__/libGLX_nvidia.so.0/' nvidia_icd.json.template
49 install -Dm644 "nvidia_icd.json.template" "$1/usr/share/vulkan/icd.d/nvidia_icd.json"
50 #install -Dm644 "nvidia_layers.json" "$1/usr/share/vulkan/implicit_layer.d/nvidia_layers.json"
53 install -Dm755 "libvdpau_nvidia.so.$version" "$1/usr/lib/vdpau/libvdpau_nvidia.so.$version"
55 ln -s "libvdpau_nvidia.so.$version" "$1/usr/lib/vdpau/libvdpau_nvidia.so.1"
56 ln -s "libvdpau_nvidia.so.$version" "$1/usr/lib/vdpau/libvdpau_nvidia.so"
59 install -Dm755 "libnvidia-tls.so.$version" "$1/usr/lib/libnvidia-tls.so.$version"
62 install -Dm755 "libcuda.so.$version" "$1/usr/lib/libcuda.so.$version"
63 install -Dm755 "libnvcuvid.so.$version" "$1/usr/lib/libnvcuvid.so.$version"
65 # PTX JIT Compiler (Parallel Thread Execution (PTX) is a pseudo-assembly language for CUDA)
66 install -Dm755 "libnvidia-ptxjitcompiler.so.$version" "$1/usr/lib/libnvidia-ptxjitcompiler.so.$version"
69 #install -Dm755 "libnvoptix.so.$version" "$1/usr/lib/libnvoptix.so.$version"
70 #install -Dm755 "libnvidia-rtcore.so.$version" "$1/usr/lib/libnvidia-rtcore.so.$version"
71 #install -Dm755 "libnvidia-cbl.so.$version" "$1/usr/lib/libnvidia-cbl.so.$version"
74 #install -Dm755 "libnvidia-opticalflow.so.$version" "$1/usr/lib/libnvidia-opticalflow.so.$version"
76 # UI library for nvidia-settings
77 install -Dm755 "libnvidia-gtk3.so.$version" "$1/usr/lib/libnvidia-gtk3.so.$version"
79 # Fat (multiarchitecture) binary loader
80 install -Dm755 "libnvidia-fatbinaryloader.so.$version" "$1/usr/lib/libnvidia-fatbinaryloader.so.$version"
83 install -Dm755 nvidia-xconfig
"$1/usr/bin/nvidia-xconfig"
84 install -Dm644 nvidia-xconfig
.1.gz
"$1/usr/share/man/man1/nvidia-xconfig.1.gz"
87 install -Dm755 nvidia-smi
"$1/usr/bin/nvidia-smi"
88 install -Dm644 nvidia-smi
.1.gz
"$1/usr/share/man/man1/nvidia-smi.1.gz"
91 install -Dm755 nvidia-cuda-mps-server
"$1/usr/bin/nvidia-cuda-mps-server"
92 install -Dm755 nvidia-cuda-mps-control
"$1/usr/bin/nvidia-cuda-mps-control"
93 install -Dm644 nvidia-cuda-mps-control
.1.gz
"$1/usr/share/man/man1/nvidia-cuda-mps-control.1.gz"
96 install -Dm4755 nvidia-modprobe
"$1/usr/bin/nvidia-modprobe"
97 install -Dm644 nvidia-modprobe
.1.gz
"$1/usr/share/man/man1/nvidia-modprobe.1.gz"
100 install -Dm755 nvidia-persistenced
"$1/usr/bin/nvidia-persistenced"
101 install -Dm644 nvidia-persistenced
.1.gz
"$1/usr/share/man/man1/nvidia-persistenced.1.gz"
104 install -Dm755 nvidia-settings
"$1/usr/bin/nvidia-settings"
105 install -Dm644 nvidia-settings
.1.gz
"$1/usr/share/man/man1/nvidia-settings.1.gz"
106 #install -Dm644 nvidia-settings.png "$1/usr/share/pixmaps/nvidia-settings.png"
107 #install -Dm644 nvidia-settings.desktop "$1/usr/share/applications/nvidia-settings.desktop"
108 #sed -e "s:__UTILS_PATH__:/usr/bin:" -e "s:__PIXMAP_PATH__:/usr/share/pixmaps:" -i \
109 # "$1/usr/share/applications/nvidia-settings.desktop"
111 # application profiles
112 install -Dm644 "nvidia-application-profiles-$version-rc" \
113 "$1/usr/share/nvidia/nvidia-application-profiles-$version-rc"
114 install -Dm644 "nvidia-application-profiles-$version-key-documentation" \
115 "$1/usr/share/nvidia/nvidia-application-profiles-$version-key-documentation"
118 for lib
in "$1/usr/lib/"*.so
*; do
119 soname
=$
(dirname "$lib")/$
(readelf
-d "$lib" |
awk '/SONAME/ { print $5 }' |
tr -d '[]')
120 base
=$
(echo "$soname" |
sed -r 's/(.*).so.*/\1.so/')
121 [ -e "$soname" ] ||
ln -s "$(basename "$lib")" "$soname"
122 [ -e "$base" ] ||
ln -s "$(basename "$soname")" "$base"
125 #for f in /usr/lib/libGL.so*; do install -Dm755 "$f" "$1/usr/lib/$f.bak"; done
126 #install -Dm755 "libGL.so.$version" "$1/usr/lib/libGL.so.$version"
127 #ln -s "libGL.so.$version" "$1/usr/lib/libGL.so.1"
128 #ln -s "libGL.so.1" "$1/usr/lib/libGL.so"
131 patch -Np1 -i ..
/kernel-4.16.
patch
134 install -Dm644 -t "$1/usr/lib/modules/${KERNEL_UNAME:-$(uname -r)}/extra" .
/*.ko