talimat 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # Tanım: Linux için nVIDIA ekran kartı sürücüsü
  2. # URL: http://www.nvidia.com/
  3. # Paketçi: milisarge
  4. # Gerekler: gtk2 gl-select kernel
  5. # Grup: sürücü
  6. isim=nvidia
  7. surum=390.42
  8. devir=1
  9. kaynak=(http://us.download.nvidia.com/XFree86/Linux-x86_64/$surum/NVIDIA-Linux-x86_64-$surum-no-compat32.run \
  10. 90-nvidia-uvm.rules)
  11. derle() {
  12. sh NVIDIA-Linux-x86_64-$surum-no-compat32.run --extract-only
  13. cd NVIDIA-Linux-x86_64-$surum-no-compat32
  14. # libraries
  15. install -d $PKG/usr/lib/{tls,vdpau}
  16. install -m 0755 libGL.so.$surum $PKG/usr/lib
  17. install -m 0755 libOpenCL.so.1.0.0 $PKG/usr/lib
  18. install -m 0755 libcuda.so.$surum $PKG/usr/lib
  19. install -m 0755 libnvidia-cfg.so.$surum $PKG/usr/lib
  20. install -m 0755 libnvidia-compiler.so.$surum $PKG/usr/lib
  21. install -m 0755 libnvidia-encode.so.$surum $PKG/usr/lib
  22. install -m 0755 libnvidia-fbc.so.$surum $PKG/usr/lib
  23. install -m 0755 libnvidia-glcore.so.$surum $PKG/usr/lib
  24. install -m 0755 libnvidia-gtk2.so.$surum $PKG/usr/lib
  25. install -m 0755 libnvidia-gtk3.so.$surum $PKG/usr/lib
  26. install -m 0755 libnvidia-ifr.so.$surum $PKG/usr/lib
  27. install -m 0755 libnvidia-ml.so.$surum $PKG/usr/lib
  28. install -m 0755 libnvidia-opencl.so.$surum $PKG/usr/lib
  29. install -m 0755 libnvidia-tls.so.$surum $PKG/usr/lib
  30. install -m 0755 libnvcuvid.so.$surum $PKG/usr/lib
  31. install -m 0755 tls/libnvidia-tls.so.$surum $PKG/usr/lib/tls
  32. install -m 0755 libvdpau_nvidia.so.$surum $PKG/usr/lib/vdpau
  33. install -m 0755 libnvidia-fatbinaryloader.so.$surum $PKG/usr/lib
  34. ln -s libvdpau_nvidia.so.$surum $PKG/usr/lib/vdpau/libvdpau_nvidia.so.1
  35. ln -s libvdpau_nvidia.so.$surum $PKG/usr/lib/vdpau/libvdpau_nvidia.so
  36. ln -s libnvcuvid.so.$surum $PKG/usr/lib/libnvcuvid.so.1
  37. ln -s libnvcuvid.so.$surum $PKG/usr/lib/libnvcuvid.so
  38. ln -s libnvidia-ml.so.$surum $PKG/usr/lib/libnvidia-ml.so.1
  39. ln -s libnvidia-ml.so.$surum $PKG/usr/lib/libnvidia-ml.so
  40. ln -s libOpenCL.so.1.0.0 $PKG/usr/lib/libOpenCL.so
  41. # xorg driver/extensions
  42. install -d $PKG/usr/lib/xorg/modules/{drivers,extensions}
  43. install -m 0755 nvidia_drv.so $PKG/usr/lib/xorg/modules/drivers
  44. install -m 0755 libglx.so.$surum $PKG/usr/lib/xorg/modules/extensions
  45. install -m 0755 libnvidia-wfb.so.$surum $PKG/usr/lib/xorg/modules
  46. # nvidia programs amd man-pages
  47. install -d $PKG/usr/{bin,share/man/man1}
  48. install -m 0755 nvidia-{debugdump,persistenced,settings,smi,xconfig} \
  49. $PKG/usr/bin
  50. install -m 0644 nvidia-{persistenced,settings,smi,xconfig}.1.gz \
  51. $PKG/usr/share/man/man1
  52. # desktop file and icon
  53. install -d $PKG/usr/share/{applications,pixmaps}
  54. sed -i 's:__UTILS_PATH__:/usr/bin: ; s:__PIXMAP_PATH__:/usr/share/pixmaps:' nvidia-settings.desktop
  55. install -m 0644 nvidia-settings.desktop $PKG/usr/share/applications
  56. install -m 0644 nvidia-settings.png $PKG/usr/share/pixmaps
  57. # additional symlinks required by gl-select
  58. ln -s libGL.so.$surum $PKG/usr/lib/libGL_so_1_2_nvidia
  59. ln -s libglx.so.$surum $PKG/usr/lib/xorg/modules/extensions/libglx_so_nvidia
  60. # opencl icd file
  61. install -m 0644 -D nvidia.icd $PKG/etc/OpenCL/vendors/nvidia.icd
  62. # nvidia-uvm module udev rule
  63. install -d $PKG/lib/udev/rules.d
  64. install -m 0644 $SRC/90-nvidia-uvm.rules $PKG/lib/udev/rules.d/90-nvidia-uvm.rules
  65. # nvidia-settings registry key file
  66. install -D -m 0644 nvidia-application-profiles-$surum-key-documentation \
  67. $PKG/usr/share/nvidia/nvidia-application-profiles-$surum-key-documentation
  68. # kernel modules
  69. #cd /lib/modules/`uname -r`/build
  70. #gunzip < /proc/config.gz > .config
  71. #make oldconfig
  72. #make prepare
  73. #make scripts
  74. #cp /lib/modules/`uname -r`/build/include/generated/autoconf.h /lib/modules/`uname -r`/build/include/linux/autoconf.h
  75. #cd -
  76. cd kernel
  77. #make SYSSRC=/lib/modules/"`uname -r`/build" module
  78. rm -rf /lib/modules/`uname -r`/build/vmlinux
  79. IGNORE_CC_MISMATCH=1 make module
  80. install -D -m 0644 nvidia.ko $PKG/lib/modules/`uname -r`/extra/nvidia.ko
  81. install -D -m 0644 nvidia-uvm.ko $PKG/lib/modules/`uname -r`/extra/nvidia-uvm.ko
  82. install -D -m 0644 nvidia-modeset.ko $PKG/lib/modules/`uname -r`/extra/nvidia-modeset.ko
  83. install -D -m 0644 nvidia-drm.ko $PKG/lib/modules/`uname -r`/extra/nvidia-drm.ko
  84. gzip "${PKG}/lib/modules/`uname -r`/extra/"*.ko
  85. install -d -m755 "${PKG}/etc/modprobe.d"
  86. echo "blacklist nouveau" >> "${PKG}/etc/modprobe.d/nouveau_blacklist.conf"
  87. }