By Yu,JSK Version 20090406

Installation of CUDA 2.1 on Debian4.0+DRBL with kernel 2.6.28.7


DRIVER: MANUALLY INSTALL nvidia.ko

1.  Get the CUDA driver, say   
    http://www.nvidia.com.tw/object/thankyou_linux_tw.html?url=/compute/cuda/2_1/drivers/NVIDIA-Linux-x86_64-180.22-pkg2.run

2.  Unpack the driver by -x option (extract only):
    sh ./NVIDIA-Linux-x86_64-180.22-pkg2.run -x

    This will create a subdir called NVIDIA-Linux-x86_64-180.22-pkg2 under $PWD.

3.  Compile the driver by a pre-defined kernel source tree and install to target directory:
    cd NVIDIA-Linux-x86_64-180.22-pkg2
    ./nvidia-installer -e

    Skip the WARNING about "WARNING: You do not appear to have an NVIDIA GPU supported by the 180.22....", press OK.
    Accept the license terms.
    Supply with "Kernel module installation path", say /temp if differs from /lib/modules/$KVER/kernel/drivers/video.
 (Or pre-made dir /etc/q199/lib.modules/2.6.28.7/kernel/drivers/video)

    Say NO to skip download a precompiled kernel from ftp://download.nvidia.com.
    Say OK to "compile a new kernel interface".
    Supply with kernel source path, say /temp/linux-2.6.28.7 if the desired version differs from those in /usr/src/$KVER


    An error about "ERROR: Unable to load the kernel module 'nvidia.ko'......" will appear if no NVIDIA graphic cards are
    installed in current machine. It is OK since the driver nvidia.ko has already been generated under
    ./usr/src/nv/nvidia.ko
    Use "find ./ -name nvidia.ko -print" to loate it. That driver can be forced to load by
    "insmod $FULL_PATH/nvidia.ko"


4. some directories:

  X installation prefix (only under rare circumstances should this be changed
  from the default):
   /usr  ==>  /etc/q199/usr

  WARNING: nvidia-installer was forced to guess the X library path '/usr/lib'
           and X module path '/usr/lib/xorg/modules'; these paths were not
           queryable from the system.  If X fails to find the NVIDIA X driver
           module, please install the `pkg-config` utility and the X.Org
           SDK/development package for your distribution and reinstall the
           driver.

                                       OK

  X library installation path (only under rare circumstances should this be
  changed from the default):
   /usr/lib  ==> /etc/q199/usr/lib

  X module installation path (only under rare circumstances should this be
  changed from the default):
   /usr/lib/xorg/modules  ==>  /etc/q199/usr/lib/xorg/modules

  OpenGL installation prefix (only under rare circumstances should this be
  changed from the default):
   /usr  ==>  /etc/q199/usr

  Documentation installation prefix (only under rare circumstances should this
  be changed from the default):
   /usr  ==>  /etc/q199/usr

  Compat32 installation chroot (only under rare circumstances should this be
  changed from the default):
   /emul/ia32-linux  ==>  /etc/q199/emul/ia32-linux

  Compat32 installation prefix (only under rare circumstances should this be
  changed from the default):
   /usr  ==>  /etc/q199/usr

  Install NVIDIA's OpenGL header files?

                               Yes  

  Install NVIDIA's 32-bit compatibility OpenGL libraries?

                               Yes  


  The following operations will be performed to install the NVIDIA Accelerated
  Graphics Driver for Linux-x86_64.  Is this acceptable?

                               Yes

  CONTINUE on all errors because DRBL remote files cannot (and SHOULD NOT) be changed!


  ERROR: The runtime configuration check failed for the library
         'libGL.so.180.22' (expected:
         '/etc/q199/emul/ia32-linux/etc/q199/usr/lib/libGL.so.1', found:
         '/usr/lib32/libGL.so.1').  The most likely reason for this is that
         conflicting OpenGL libraries are installed in a location not
         inspected by `nvidia-installer`.  Please be sure you have uninstalled
         any third-party OpenGL and/or third-party graphics driver packages.

                                       OK




TOOLKIT: for CUDA 2.0, get the SuSE 10.2 version; 
         for CUDA 2.1, use SLED10-sp2 version
Install toolkit:
     sh ./cudatoolkit_2.1_linux64_sled10-sp2.run
     Verifying archive integrity... All good.
Uncompressing NVIDIA CUDA....................................................................................................................................................................................................................................................................................................................................................
Enter install path (default /usr/local/cuda, '/cuda' will be appended): /etc/q199

* Please make sure your PATH includes /etc/q199/cuda/bin
* Please make sure your LD_LIBRARY_PATH includes /etc/q199/cuda/lib
*   or add /etc/q199/cuda/lib to /etc/ld.so.conf and run ldconfig as root

* Please read the release notes in /etc/q199/cuda/doc/

* To uninstall CUDA, delete /etc/q199/cuda
* Installation Complete


!!!!!! suse10.3 version of CUDA 2.1 toolkit *CANNOT* run on Debian 4.0, "File format not recognized" ERROR with libcudart.so
!!!!!! suse10.2 version of CUDA 2.0 toolkit can be run on Debian 4.0


SDK:
     sh ./cuda-sdk-linux-2.10.1215.2015-3233425.run
Verifying archive integrity... All good.
Uncompressing NVIDIA CUDA SDK....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Enter install path (default ~/NVIDIA_CUDA_SDK): /etc/q199/NVIDIA_CUDA_SDK


Could not locate CUDA.  Enter the full path to CUDA.
If you do not know the path, accept the default and then
modify the CUDA_INSTALL_PATH variable in
/etc/q199/NVIDIA_CUDA_SDK/common/common.mk.

Enter CUDA install path (default /usr/local/cuda): /etc/q199/cuda



========================================
Configuring SDK Makefile (/etc/q199/NVIDIA_CUDA_SDK/common/common.mk)...
========================================
* Please make sure your PATH includes /etc/q199/cuda/bin
* Please make sure your LD_LIBRARY_PATH includes /etc/q199/cuda/lib
* To uninstall the NVIDIA CUDA SDK, please delete /etc/q199/NVIDIA_CUDA_SDK
* Installation Complete


!!!!!!! Then cd to /etc/q199/NVIDIA_CUDA_SDK and run "make".
        May need to symbolically link /etc/q199/usr/lib/libcuda.so to some lib directory that can be found by linker.