milis/talimatname/genel/n/nvidia/talimat

105 lines
4.5 KiB
Plaintext
Raw Normal View History

2017-10-27 20:46:27 +02:00
# Tanım: nVIDIA Linux Display Driver
2017-05-29 20:13:08 +02:00
# URL: http://www.nvidia.com/
2017-10-27 20:46:27 +02:00
# Paketçi: milisarge
# Gerekler: gtk2 gl-select kernel
2017-05-29 20:13:08 +02:00
2017-10-28 14:10:23 +02:00
isim=nvidia
surum=381.22
devir=1
kaynak=(http://us.download.nvidia.com/XFree86/Linux-x86_64/$surum/NVIDIA-Linux-x86_64-$surum-no-compat32.run \
2017-05-29 20:13:08 +02:00
90-nvidia-uvm.rules)
2017-10-27 23:59:41 +02:00
derle() {
2017-10-28 14:10:23 +02:00
sh NVIDIA-Linux-x86_64-$surum-no-compat32.run --extract-only
cd NVIDIA-Linux-x86_64-$surum-no-compat32
2017-05-29 20:13:08 +02:00
# libraries
install -d $PKG/usr/lib/{tls,vdpau}
2017-10-28 14:10:23 +02:00
install -m 0755 libGL.so.$surum $PKG/usr/lib
2017-05-29 20:13:08 +02:00
install -m 0755 libOpenCL.so.1.0.0 $PKG/usr/lib
2017-10-28 14:10:23 +02:00
install -m 0755 libcuda.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-cfg.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-compiler.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-encode.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-fbc.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-glcore.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-gtk2.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-gtk3.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-ifr.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-ml.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-opencl.so.$surum $PKG/usr/lib
install -m 0755 libnvidia-tls.so.$surum $PKG/usr/lib
install -m 0755 libnvcuvid.so.$surum $PKG/usr/lib
install -m 0755 tls/libnvidia-tls.so.$surum $PKG/usr/lib/tls
install -m 0755 libvdpau_nvidia.so.$surum $PKG/usr/lib/vdpau
install -m 0755 libnvidia-fatbinaryloader.so.$surum $PKG/usr/lib
ln -s libvdpau_nvidia.so.$surum $PKG/usr/lib/vdpau/libvdpau_nvidia.so.1
ln -s libvdpau_nvidia.so.$surum $PKG/usr/lib/vdpau/libvdpau_nvidia.so
ln -s libnvcuvid.so.$surum $PKG/usr/lib/libnvcuvid.so.1
ln -s libnvcuvid.so.$surum $PKG/usr/lib/libnvcuvid.so
ln -s libnvidia-ml.so.$surum $PKG/usr/lib/libnvidia-ml.so.1
ln -s libnvidia-ml.so.$surum $PKG/usr/lib/libnvidia-ml.so
2017-05-29 20:13:08 +02:00
ln -s libOpenCL.so.1.0.0 $PKG/usr/lib/libOpenCL.so
# xorg driver/extensions
install -d $PKG/usr/lib/xorg/modules/{drivers,extensions}
install -m 0755 nvidia_drv.so $PKG/usr/lib/xorg/modules/drivers
2017-10-28 14:10:23 +02:00
install -m 0755 libglx.so.$surum $PKG/usr/lib/xorg/modules/extensions
install -m 0755 libnvidia-wfb.so.$surum $PKG/usr/lib/xorg/modules
2017-05-29 20:13:08 +02:00
# nvidia programs amd man-pages
install -d $PKG/usr/{bin,share/man/man1}
install -m 0755 nvidia-{debugdump,persistenced,settings,smi,xconfig} \
$PKG/usr/bin
install -m 0644 nvidia-{persistenced,settings,smi,xconfig}.1.gz \
$PKG/usr/share/man/man1
# desktop file and icon
install -d $PKG/usr/share/{applications,pixmaps}
sed -i 's:__UTILS_PATH__:/usr/bin: ; 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
# additional symlinks required by gl-select
2017-10-28 14:10:23 +02:00
ln -s libGL.so.$surum $PKG/usr/lib/libGL_so_1_2_nvidia
ln -s libglx.so.$surum $PKG/usr/lib/xorg/modules/extensions/libglx_so_nvidia
2017-05-29 20:13:08 +02:00
# opencl icd file
install -m 0644 -D nvidia.icd $PKG/etc/OpenCL/vendors/nvidia.icd
# nvidia-uvm module udev rule
install -d $PKG/lib/udev/rules.d
install -m 0644 $SRC/90-nvidia-uvm.rules $PKG/lib/udev/rules.d/90-nvidia-uvm.rules
# nvidia-settings registry key file
2017-10-28 14:10:23 +02:00
install -D -m 0644 nvidia-application-profiles-$surum-key-documentation \
$PKG/usr/share/nvidia/nvidia-application-profiles-$surum-key-documentation
2017-05-29 20:13:08 +02:00
# kernel modules
2017-06-04 02:02:30 +02:00
#cd /lib/modules/`uname -r`/build
#gunzip < /proc/config.gz > .config
#make oldconfig
#make prepare
#make scripts
#cp /lib/modules/`uname -r`/build/include/generated/autoconf.h /lib/modules/`uname -r`/build/include/linux/autoconf.h
#cd -
2017-05-31 21:42:45 +02:00
cd kernel
2017-06-04 02:02:30 +02:00
#make SYSSRC=/lib/modules/"`uname -r`/build" module
rm -rf /lib/modules/`uname -r`/build/vmlinux
2017-05-31 21:42:45 +02:00
IGNORE_CC_MISMATCH=1 make module
install -D -m 0644 nvidia.ko $PKG/lib/modules/`uname -r`/extra/nvidia.ko
install -D -m 0644 nvidia-uvm.ko $PKG/lib/modules/`uname -r`/extra/nvidia-uvm.ko
install -D -m 0644 nvidia-modeset.ko $PKG/lib/modules/`uname -r`/extra/nvidia-modeset.ko
install -D -m 0644 nvidia-drm.ko $PKG/lib/modules/`uname -r`/extra/nvidia-drm.ko
2017-06-04 02:02:30 +02:00
gzip "${PKG}/lib/modules/`uname -r`/extra/"*.ko
install -d -m755 "${PKG}/etc/modprobe.d"
echo "blacklist nouveau" >> "${PKG}/etc/modprobe.d/nouveau_blacklist.conf"
2017-05-29 20:13:08 +02:00
}