Friday, November 11, 2011

Install OpenCL on Backtrack 5

NOTE: You might need to make some minor tweaks depending on your system.
Let's begin:
  • First of all before we start we want to make sure that our system is up to date.
root@bt:~# apt-get update && apt-get upgrade
  • Before we go on with installing the ATI drivers we need to get our kernel source prepared.
root@bt:~# prepare-kernel-sources
root@bt:~# cd /usr/src/linux
root@bt:~# cp -rf include/generated/* include/linux/
  • Now that we are set up it's time to download the ATI drivers.
root@bt:~# wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-9-x86.x86_64.run
root@bt:~# chmod +x ati-driver-installer-11-9-x86.x86_64.run
root@bt:~# ./ati-driver-installer-11-9-x86.x86_64.run
root@bt:~# reboot






Opencl01.png


  • Before we are finished there is one more thing that we need to install, The AMD Accelerated Parallel Processing (APP) SDK, this one needs to be installed according to your CPU architecture.
For 32 bit architecture:
root@bt:~# wget http://developer.amd.com/Downloads/AMD-APP-SDK-v2.5-lnx32.tgz 
root@bt:~# tar -xvzf AMD-APP-SDK-v2.5-lnx32.tgz
root@bt:~# ./Install-AMD-APP.sh
For 64 bit architecture:
root@bt:~# wget http://developer.amd.com/Downloads/AMD-APP-SDK-v2.5-lnx64.tgz 
root@bt:~# tar -xvzf AMD-APP-SDK-v2.5-lnx64.tgz
root@bt:~# ./Install-AMD-APP.sh
  • We will also need cmake and cmake++ along with some other library files.
First we install the libraries and cmake:
root@bt:~# apt-get install libroot-python-dev libboost-python-dev zlib1g-dev libssl-dev cmake libboost1.40-all-dev
Before we can install cmake++ we need to set the ATI Stream paths:
root@bt:~# echo "ATISTREAMSDKROOT=/opt/AMDAPP
root@bt:~# export ATISTREAMSDKROOT" >> ~/.bashrc
root@bt:~# source ~/.bashrc
Now we can proceed with the installation:
root@bt:~# svn co https://calpp.svn.sourceforge.net/svnroot/calpp calpp
root@bt:~# cd calpp/trunk
root@bt:~# cmake .



Opencl02.png


root@bt:~# make
root@bt:~# make install
  • In addition now we can install Pyrit with the OpenCL option.
root@bt:~# svn checkout http://pyrit.googlecode.com/svn/trunk/ /tmp/pyrit
root@bt:~# cd /tmp/pyrit/pyrit && python setup.py build && python setup.py install
root@bt:~# cd /tmp/pyrit/cpyrit_opencl && python setup.py build && python setup.py install
  • Now we can test Pyrit.
root@bt:~# pyrit list_cores
root@bt:~# pyrit benchmark

Opencl03.png    
Ref: http://www.backtrack-linux.org

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...