# 2015-10-09
#
# This is the procedure to get oclvanitygen running with AMD Raedon 7xxx
# on a fresh install of Ubuntu 64-bit. (tested with Ubuntu 12.04 and 14.04)
# install tools, dependencies and driver
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) restricted"
sudo apt-get update
sudo apt-get install build-essential git libssl-dev libpcre3-dev opencl-headers fglrx fglrx-dev
sudo env DISPLAY=:0.0 aticonfig --adapter=all --initial
sudo reboot
# get source and compile oclvanitygen
git clone https://github.com/samr7/vanitygen.git
cd vanitygen
wget https://nastyfans.org/download/patch-oclvanitygen-amd.diff
patch -p1 < patch-oclvanitygen-amd.diff
wget https://nastyfans.org/download/AMD-APP-SDK-v2.7-lib-lnx64.tar.gz
mkdir sdklib
tar -xzvf AMD-APP-SDK-v2.7-lib-lnx64.tar.gz -C sdklib
make oclvanitygen
# run oclvanitygen (from inside vanitygen directory)
env LD_LIBRARY_PATH=./sdklib ./oclvanitygen -D 0:0 -k 1Nasty