-
Notifications
You must be signed in to change notification settings - Fork 11
/
linux-AMD-SDK-2.4-2.6-upgrade-downgrade
174 lines (139 loc) · 6 KB
/
linux-AMD-SDK-2.4-2.6-upgrade-downgrade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
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 that is part of cgminer: linux-usb-cgminer
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 my current linux USB script, to install 2.4 SDK 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 (and you don't need 2.5, 2.4 is OK to use instead)
Now 2.4 SDK doesn't touch the drivers that fglrx etc. 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)