A good how-to: https://forum.litecoin.net/index.php/topic,3627.msg25602.html
Tag Archives: bitcoin
How to: cgminer (Bitcoin, Litecoin etc.) + AMD Radeon driver install on CentOS
UPDATE 7/7/13: If you want to use Catalyst drivers version 12.8 you will find that X won’t start (error msg: /usr/lib/xorg/modules/drivers/fglrx_drv.so: undefined symbol: noXFree86DRIExtension) if you installed CentOS 6.4. Catalyst > 12.8 will work fine. To fix that, you can downgrade to the Xorg version that ships with CentOS 6.3:
yum --disablerepo=\* --enablerepo=C6.3\* downgrade xorg\*
(You may also need to do: yum remove xorg-x11-drv-modesetting
)
Do this before you install Catalyst!
UPDATE END.
Here’s my how-to for cgminer / AMD Radeon drivers under CentOS 6.4, 32bit in this example. You can basically copy & paste every line and you should end up with a working mining rig.
Install required packages:
yum install wget system-config-firewall-tui openssh-clients kernel-devel-2.6.32-358.el6.i686 libcurl-devel ncurses-devel compat-libstdc++-33 screen xterm
yum groupinstall "X Window System" "Development tools"
Download and extract cgminer 3.7.2 – later versions don’t support GPU mining:
cd /root
wget http://ck.kolivas.org/apps/cgminer/3.7/cgminer-3.7.2.tar.bz2
tar xjvf cgminer-3.7.2.tar.bz2
Download AMD APP and ADL SDKs for cgminer compilation from:
AMD APP SDK: http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads
AMD ADL SDK: http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk
Install AMD APP SDK:
cd /opt
tar xvzf /root/AMD-APP-SDK-v2.8-lnx32.tgz
cd /
tar xvzf /opt/icd-registration.tgz
cd /opt
tar xvzf AMD-APP-SDK-v2.8-RC-lnx32.tgz
ln -s /opt/AMD-APP-SDK-v2.8-RC-lnx32/include/CL /usr/include
ln -s /opt/AMD-APP-SDK-v2.8-RC-lnx32/lib/x86/* /usr/lib/
Install AMD ADL SDK:
cd /root
mkdir ADL
mv ADL_SDK_5.0.zip ADL
cd ADL
unzip ADL_SDK_5.0.zip
cp include/*.h /root/cgminer-3.7.2/ADL_SDK
Build cgminer for Litecoin (with scrypt support):
cd /root/cgminer-3.7.2
(if you want to run the cgminer binary from everywhere)
CFLAGS="-O2 -Wall -march=native -I/opt/AMD-APP-SDK-v2.8-RC-lnx32/include" LDFLAGS="-L/opt/AMD-APP-SDK-v2.8-RC-lnx32/lib/x86" ./configure --enable-scrypt
make
make install
Install fglrx AMD graphics card drivers:
AMD Catalyst driver (fglrx) from: http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx
(e.g.
cd /root
wget http://www2.ati.com/drivers/linux/amd-catalyst-13.4-linux-x86.x86_64.zip
)
unzip amd-catalyst-13.4-linux-x86.x86_64.zip
chmod 700 amd-catalyst-13.4-linux-x86.x86_64.run
./amd-catalyst-13.4-linux-x86.x86_64.run --buildpkg RedHat/RHEL6
rpm -Uvh fglrx_p_i_c-12.104-1.i386.rpm
reboot
amdconfig --adapter=all --initial
If your mining rig is headless you can start X in a screen session:
screen
xinit
Detach screen session: CTRL+A+D
Create cgminer.sh and put this into the file:
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export DISPLAY=:0
cgminer --scrypt ...your parameters go here...
Make it executable:
chmod 700 cgminer.sh
Configure cgminer parameters as needed and start mining (./cgminer.sh
). Done!