Big post
I guess I'll ask ckolivas about putting this into cgminer as a separate file:
AMD-SDK upgrade/downgrade in Linux
==================================
Firstly to install the 2.4 SDK is just as I have said in my linux
USB install script.
My script has exactly the same effect as the cgminer README except
that I copy all the files into the target directories rather than
linking to any of them
(this is mandatory on USB persistent storage coz casper doesn't
keep /opt)
Anyway from the current linux USB script it is:
-----------------------------------------------------------
12) get AMD-APP-SDK-v2.4-lnx64.tgz from
http://developer.amd.com/sdks/amdappsdk/downloads/pages/default.aspx (
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.4-lnx64.tgz )
sudo su
cd /opt
(replace /home/ubuntu/ with wherever you put the file: )
tar -xvzf /home/ubuntu/AMD-APP-SDK-v2.4-lnx64.tgz
cd AMD-APP-SDK-v2.4-lnx64/
cp -pv lib/x86_64/* /usr/lib/
rsync -avl include/CL/ /usr/include/CL/
tar -xvzf icd-registration.tgz
rsync -avl etc/OpenCL/ /etc/OpenCL/
ldconfig
sync
shutdown -r now
-----------------------------------------------------------
I believe SDK 2.5 is exactly the same but replace "2.4" with "2.5"
everywhere - anyone who knows otherwise please tell me.
Also if anyone does know if it is exactly the same please tell
me and I can remove these comments
However, I'm certain it really is exactly the same but have never
touched 2.5
Now 2.4 SDK doesn't touch the drivers that fglrx+++ installs
However, the 2.6 SDK does
So before installing the 2.6 SDK it is best to rename the 2 files
that it overwrites in case you need to go back.
It saves from having to repair the fglrx installs
(which I'd guess is a simple command in apt but I'm not an apt guru)
but it is also so easy to do that it's best just to manually do it.
The two library files are of course in /usr/lib/
libaticalcl.so libaticalrt.so
IF YOU ARE ALREADY USING FGLRX DRIVER 12.1 OR NEWER:
then you don't want to overwrite libaticalrt.so and libaticalcl.so
So you DON'T want to do 2 steps listed below marked (*A*) and (*B*)
(*A*) If your fglrx is before 12.0:
-----------------------------------------------------------
cd /usr/lib/
sudo mv -v libaticalrt.so libaticalcl.so.old
sudo mv -v libaticalcl.so libaticalcl.so.old
-----------------------------------------------------------
It is mandatory to remove the 2.4 SDK first if you installed it using
ckolivas' README since the first link causes issues - see the bottom of
this for the details of how to remove the 2.4 SDK if you used ckolivas'
README to install it
Next install 2.6 manually so you know exactly what is changed.
Also this means you won't overwrite the fglrx drivers if you
don't want to.
Remember don't do the step below (*B*) if you already have
fglrx 12.1 or newer
To install 2.6 it's:
-----------------------------------------------------------
get AMD-APP-SDK-v2.6-lnx64.tgz from
http://developer.amd.com/sdks/amdappsdk/downloads/pages/default.aspx (
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.6-lnx64.tgz )
sudo su
cd /opt
mkdir SDK2.6
cd SKD2.6/
(replace /home/ubuntu/ with wherever you put the file: )
tar -xvf /home/ubuntu/AMD-APP-SDK-v2.6-lnx64.tgz
tar -xvf AMD-APP-SDK-v2.6-RC3-lnx64.tgz
cd AMD-APP-SDK-v2.6-RC3-lnx64/
cp -pv lib/x86_64/* /usr/lib/
cp -pv lib/*.so /usr/lib/ <- (*B*)
rsync -avl include/CL/ /usr/include/CL/
cd ..
tar -xvzf icd-registration.tgz
rsync -avl etc/OpenCL/ /etc/OpenCL/
ldconfig
sync
shutdown -r now
-----------------------------------------------------------
Now the last part - how to get back to 2.4 from 2.6.
It's not much different except you need to put back the
two old library files if you installed the 2 new ones
IF YOU DIDN'T DO STEPS (*A*) AND (*B*) ABOVE:
then of course you don't need to undo them.
i.e. you don't need to do the 3 steps below marked (*C*)
You of course don't need to repeat the download if you already
have the file.
And you don't need to repeat the 'tar' commands if everything
is still in /opt
To downgrade the 2.6 SDK back to the 2.4 SDK:
-----------------------------------------------------------
12) get AMD-APP-SDK-v2.4-lnx64.tgz from
http://developer.amd.com/sdks/amdappsdk/downloads/pages/default.aspx (
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.4-lnx64.tgz )
sudo su
(First cleanup the old 2.6 SDK non-fglrx files)
rm -rvf /usr/include/CL/
rm -rvf /etc/OpenCL/
cd /usr/lib/
rm -v libamdocl64.so libGLEW.so libglut.so libOpenCL.so libOpenCL.so.1 libSlotMaximizerAg.so libSlotMaximizerBe.so
cd /opt
(replace /home/ubuntu/ with wherever you put the file: )
tar -xvf /home/ubuntu/AMD-APP-SDK-v2.4-lnx64.tgz
cd AMD-APP-SDK-v2.4-lnx64/
cp -pv lib/x86_64/* /usr/lib/
rsync -avl include/CL/ /usr/include/CL/
tar -xvf icd-registration.tgz
rsync -avl etc/OpenCL/ /etc/OpenCL/
cd /usr/lib/ <- (*C*)
mv -v libaticalrt.so.old libaticalcl.so <- (*C*)
mv -v libaticalcl.so.old libaticalcl.so <- (*C*)
ldconfig
sync
shutdown -r now
-----------------------------------------------------------
Edit: added the 2.6 cleanup just in case in the future is causes some problem
Edit2: someone asked how to remove 2.4 ...
If you installed it the way I said to install it then:
-----------------------------------------------------------
sudo su
rm -rvf /usr/include/CL/
rm -rvf /etc/OpenCL/
cd /usr/lib/
rm -v libamdocl64.so libGLEW.so libglut.so libOpenCL.so libOpenCL.so.1
-----------------------------------------------------------
Edit3: how to remove 2.4 if you used ckolivas' README to install it
This will be necessary if you want to upgrade from 2.4 to 2.6 the way I documented
(due to the 1st link):
-----------------------------------------------------------
sudo su
rm -vf /usr/include/CL
rm -rvf /etc/OpenCL/
cd /usr/lib/
rm -v libamdocl64.so libGLEW.so libglut.so libOpenCL.so libOpenCL.so.1
-----------------------------------------------------------
(just the first 'rm' is different coz it's a link not a directory)