OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [web_uploads/] [ats/] [or32-uclinux/] [or1k_ats_uclinux.txt] - Blame information for rev 1767

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1767 root
#!/bin/bash
2
 
3
#
4
# This script if used as part of ATS needs to be invoked with
5
# argument 'ats'. All build directories will be removed.
6
#
7
# W/o any argument this script can be used to
8
# install the openrisc uclinux toolchain. It should automatically
9
# checkout all the sources, automatically build all the tools and
10
# install them. If you modify the sources, you can't commit back
11
# to CVS because sources are checked out as anonymous. Build
12
# directories are not removed.
13
#
14
 
15
#
16
# Some common variables
17
#
18
if [ "$1" == "ats" ]; then
19
        OR1K_WEB=../../www/cores/or1k/ats/or32-uclinux
20
        OR1K_WEB_LAST=$OR1K_WEB/last_ok
21
        INSTALL_PREFIX=/home/oc/testpool/or1k/or32-uclinux
22
        export PATH=$PATH:/usr/local/bin
23
else
24
        OR1K_WEB=.
25
        OR1K_WEB_LAST=$OR1K_WEB/last_ok
26
        INSTALL_PREFIX=/opt/or32-uclinux
27
fi
28
OK_STR="Test Passed"
29
FAIL_STR="Test Failed"
30
ALL_STABLE=1
31
 
32
#
33
# Allocate test pool directory
34
#
35
mkdir or1k
36
cd or1k
37
 
38
#
39
# Copy script for web visitors' reference
40
#
41
cp ../or1k_ats_uclinux.sh $OR1K_WEB/or1k_ats_uclinux.txt
42
 
43
#
44
# Start with binutils
45
#
46
date > checkout_binutils.txt 2>&1
47
nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d binutils or1k/binutils >> checkout_binutils.txt 2>&1
48
mkdir b-b
49
cd b-b
50
date > ../build_binutils.txt 2>&1
51
uname -a >> ../build_binutils.txt 2>&1
52
../binutils/configure --target=or32-uclinux --prefix=$INSTALL_PREFIX >> ../build_binutils.txt 2>&1
53
nice /usr/bin/make all install >> ../build_binutils.txt 2>&1
54
BUILD_BINUTILS_STATUS=$?
55
export PATH=$INSTALL_PREFIX/bin:$PATH
56
cd ..
57
if [ "$1" == "ats" ]; then
58
        rm -rf binutils
59
fi
60
#
61
# Copy all log files into or1k web directory
62
#
63
cp checkout_binutils.txt $OR1K_WEB
64
cp build_binutils.txt $OR1K_WEB
65
#
66
# Check if binutils was built and installed correctly
67
#
68
if [ $BUILD_BINUTILS_STATUS = 0 ]; then
69
        echo "$OK_STR (`date`)" > $OR1K_WEB/build_binutils.status
70
        cp $OR1K_WEB/build_binutils.status $OR1K_WEB_LAST
71
        cp $OR1K_WEB/checkout_binutils.txt $OR1K_WEB_LAST
72
        cp $OR1K_WEB/build_binutils.txt $OR1K_WEB_LAST
73
else
74
        ../notice_developers.sh or1k/binutils $OR1K_WEB_LAST/build_binutils.status < build_binutils.txt
75
        echo "$FAIL_STR (`date`)" >  $OR1K_WEB/build_binutils.status
76
        ALL_STABLE=0
77
fi
78
 
79
#
80
# Start with gcc
81
#
82
date > checkout_gcc.txt 2>&1
83
nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d gcc or1k/gcc-3.2.3 >> checkout_gcc.txt 2>&1
84
mkdir b-gcc
85
cd b-gcc
86
date > ../build_gcc.txt 2>&1
87
uname -a >> ../build_gcc.txt 2>&1
88
nice ../gcc/configure --target=or32-uclinux \
89
        --with-gnu-as --with-gnu-ld --verbose \
90
        --enable-threads --prefix=$INSTALL_PREFIX \
91
        --local-prefix=$INSTALL_PREFIX/or32-uclinux --enable-languages="c" >> ../build_gcc.txt 2>&1
92
nice /usr/bin/make all install >> ../build_gcc.txt 2>&1
93
BUILD_GCC_STATUS=$?
94
cd ..
95
#
96
# Copy all log files into or1k web directory
97
#
98
cp checkout_gcc.txt $OR1K_WEB
99
cp build_gcc.txt $OR1K_WEB
100
#
101
# Check if gcc was built and installed correctly
102
#
103
if [ $BUILD_GCC_STATUS = 0 ]; then
104
        echo "$OK_STR (`date`)" > $OR1K_WEB/build_gcc.status
105
        cp $OR1K_WEB/build_gcc.status $OR1K_WEB_LAST
106
        cp $OR1K_WEB/checkout_gcc.txt $OR1K_WEB_LAST
107
        cp $OR1K_WEB/build_gcc.txt $OR1K_WEB_LAST
108
else
109
        ../notice_developers.sh or1k/gcc-3.2.3 $OR1K_WEB_LAST/build_gcc.status < build_gcc.txt
110
        echo "$FAIL_STR (`date`)">  $OR1K_WEB/build_gcc.status
111
        ALL_STABLE=0
112
fi
113
 
114
#
115
# Start with gdb
116
#
117
date > checkout_gdb.txt 2>&1
118
nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d gdb or1k/gdb-5.0 >> checkout_gdb.txt 2>&1
119
mkdir b-gdb
120
cd b-gdb
121
date > ../build_gdb.txt 2>&1
122
uname -a >> ../build_gdb.txt 2>&1
123
../gdb/configure --target=or32-uclinux --prefix=$INSTALL_PREFIX >> ../build_gdb.txt 2>&1
124
nice /usr/bin/make all install >> ../build_gdb.txt 2>&1
125
BUILD_GDB_STATUS=$?
126
cd ..
127
if [ "$1" == "ats" ]; then
128
        rm -rf gdb
129
fi
130
#
131
# Copy all log files into or1k web directory
132
#
133
cp checkout_gdb.txt $OR1K_WEB
134
cp build_gdb.txt $OR1K_WEB
135
#
136
# Check if gdb was built and installed correctly
137
#
138
echo $BUILD_GDB_STATUS
139
if [ $BUILD_GDB_STATUS = 0 ]; then
140
        echo "$OK_STR (`date`)" > $OR1K_WEB/build_gdb.status
141
        cp $OR1K_WEB/build_gdb.status $OR1K_WEB_LAST
142
        cp $OR1K_WEB/checkout_gdb.txt $OR1K_WEB_LAST
143
        cp $OR1K_WEB/build_gdb.txt $OR1K_WEB_LAST
144
else
145
        ../notice_developers.sh or1k/gdb-5.0 $OR1K_WEB_LAST/build_gdb.status < build_gdb.txt
146
        echo "$FAIL_STR (`date`)">  $OR1K_WEB/build_gdb.status
147
        ALL_STABLE=0
148
fi
149
 
150
#
151
# Start with or1ksim
152
#
153
date > checkout_or1ksim.txt 2>&1
154
nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d or1ksim or1k/or1ksim >> checkout_or1ksim.txt 2>&1
155
cd or1ksim
156
date > ../build_or1ksim.txt 2>&1
157
uname -a >> ../build_or1ksim.txt 2>&1
158
../or1ksim/configure --target=or32-uclinux --prefix=$INSTALL_PREFIX >> ../build_or1ksim.txt 2>&1
159
nice /usr/bin/make all install >> ../build_or1ksim.txt 2>&1
160
BUILD_OR1KSIM_STATUS=$?
161
cd ..
162
#
163
# Copy all log files into or1k web directory
164
#
165
cp checkout_or1ksim.txt $OR1K_WEB
166
cp build_or1ksim.txt $OR1K_WEB
167
#
168
# Check if or1ksim was built and installed correctly
169
#
170
if [ $BUILD_OR1KSIM_STATUS = 0 ]; then
171
        echo "$OK_STR (`date`)" > $OR1K_WEB/build_or1ksim.status
172
        cp $OR1K_WEB/build_or1ksim.status $OR1K_WEB_LAST
173
        cp $OR1K_WEB/checkout_or1ksim.txt $OR1K_WEB_LAST
174
        cp $OR1K_WEB/build_or1ksim.txt $OR1K_WEB_LAST
175
else
176
        ../notice_developers.sh or1k/or1ksim $OR1K_WEB_LAST/build_or1ksim.status < build_or1ksim.txt
177
        echo "$FAIL_STR (`date`)">  $OR1K_WEB/build_or1ksim.status
178
        ALL_STABLE=0
179
fi
180
 
181
#
182
# Start with uclinux
183
#
184
date > checkout_uclinux.txt 2>&1
185
nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d uClinux-2.0.x \
186
or1k/uclinux/uClinux-2.0.x >> checkout_uclinux.txt 2>&1
187
mkdir uclinux
188
mv uClinux-2.0.x uclinux
189
cd uclinux/uClinux-2.0.x
190
sed -e 's/^LIBGCC/#LIBGCC/; /^#LIBGCC/ a \
191
LIBGCC = '$INSTALL_PREFIX'\/lib\/gcc-lib\/or32-uclinux\/3.2.3\/libgcc.a' \
192
< arch/or32/Rules.make > arch/or32/Rules.make.edited
193
mv arch/or32/Rules.make.edited arch/or32/Rules.make
194
sed -e 's/^CONFIG_NET/#CONFIG_NET/; /^#CONFIG_NET/ a \
195
CONFIG_NET=n' < arch/or32/defconfig > arch/or32/defconfig.edited
196
mv arch/or32/defconfig.edited arch/or32/defconfig
197
nice make oldconfig >> ../../build_uclinux.txt 2>&1
198
nice make dep >> ../../build_uclinux.txt 2>&1
199
nice /usr/bin/make all >> ../../build_uclinux.txt 2>&1
200
BUILD_UCLINUX_STATUS=$?
201
touch uart0.rx
202
echo -e "run 40000000 hush\nq" | or32-uclinux-sim -f sim.cfg linux -i > /dev/null
203
cp uart0.tx ../../or1ksim_uclinux.txt
204
cd ../../
205
#
206
# Copy all log files into or1k web directory
207
#
208
cp checkout_uclinux.txt $OR1K_WEB
209
cp build_uclinux.txt $OR1K_WEB
210
cp or1ksim_uclinux.txt $OR1K_WEB
211
#
212
# Check if uclinux was built and installed correctly
213
#
214
if [ $BUILD_UCLINUX_STATUS = 0 ]; then
215
        echo "$OK_STR (`date`)" > $OR1K_WEB/build_uclinux.status
216
        cp $OR1K_WEB/build_uclinux.status $OR1K_WEB_LAST
217
        cp $OR1K_WEB/checkout_uclinux.txt $OR1K_WEB_LAST
218
        cp $OR1K_WEB/build_uclinux.txt $OR1K_WEB_LAST
219
else
220
        ../notice_developers.sh or1k/uclinux $OR1K_WEB_LAST/build_uclinux.status < build_uclinux.txt
221
        echo "$FAIL_STR (`date`)">  $OR1K_WEB/build_uclinux.status
222
        ALL_STABLE=0
223
fi
224
if [ `grep Executing or1ksim_uclinux.txt | wc -l` -gt 0 ]; then
225
        echo "$OK_STR (`date`)" > $OR1K_WEB/or1ksim_uclinux.status
226
        cp $OR1K_WEB/or1ksim_uclinux.status $OR1K_WEB_LAST
227
        cp $OR1K_WEB/or1ksim_uclinux.txt $OR1K_WEB_LAST
228
else
229
        ../notice_developers.sh or1k/uclinux $OR1K_WEB_LAST/or1ksim_uclinux.status < or1ksim_uclinux.txt
230
        echo "$FAIL_STR (`date`)">  $OR1K_WEB/or1ksim_uclinux.status
231
        ALL_STABLE=0
232
fi
233
 
234
#
235
# Start with uclibc
236
#
237
date > checkout_uclibc.txt 2>&1
238
nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d uclibc \
239
or1k/uclibc >> checkout_uclibc.txt 2>&1
240
cd uclibc
241
date > ../build_uclibc.txt 2>&1
242
uname -a >> ../build_uclibc.txt 2>&1
243
ln -s ./extra/Configs/Config.cross.or32.uclinux Config
244
sed -e 's/^KERNEL_SOURCE/#KERNEL_SOURCE/; /^#KERNEL_SOURCE/ a \
245
KERNEL_SOURCE = '`pwd`'\/..\/uclinux\/uClinux-2.0.x' < Config > Config.edited
246
sed -e 's/^DEVEL_PREFIX/#DEVEL_PREFIX/; /^#DEVEL_PREFIX/ a \
247
DEVEL_PREFIX = '$INSTALL_PREFIX < Config.edited > Config
248
rm Config.edited
249
nice /usr/bin/make all install >> ../build_uclibc.txt 2>&1
250
BUILD_UCLIBC_STATUS=$?
251
 
252
pushd .
253
cd $INSTALL_PREFIX/bin
254
rm -f ar as cc cpp gasp gcc ld nm objcopy objdump ranlib size strings strip jar grepjar
255
popd
256
cd ../b-gcc
257
date > ../rebuild_gcc.txt 2>&1
258
uname -a >> ../rebuild_gcc.txt 2>&1
259
nice ../gcc/configure --target=or32-uclinux \
260
        --with-gnu-as --with-gnu-ld --verbose \
261
        --enable-threads --prefix=$INSTALL_PREFIX \
262
        --local-prefix=$INSTALL_PREFIX/or32-uclinux --enable-languages="c" >> ../rebuild_gcc.txt 2>&1
263
nice make all install >> ../rebuild_gcc.txt 2>&1
264
REBUILD_GCC_STATUS=$?
265
cd ..
266
 
267
#
268
# Check or1ksim testbench
269
#
270
cd or1ksim/testbench
271
date > ../../or1ksim_testbench.txt 2>&1
272
CFLAGS="-nostdlib" ./configure --target=or32-uclinux --host=or32-uclinux >> ../../or1ksim_testbench.txt 2>&1
273
export PATH=$PATH:..
274
make check >> ../../or1ksim_testbench.txt 2>&1
275
cd ../..
276
#
277
# Copy all log files into or1k web directory
278
#
279
cp or1ksim_testbench.txt $OR1K_WEB
280
#
281
# Check if or1ksim testbench passed OK
282
#
283
if [ `grep passed or1ksim_testbench.txt | wc -l` -gt 0 ]; then
284
        echo "$OK_STR (`date`)" > $OR1K_WEB/or1ksim_testbench.status
285
        cp $OR1K_WEB/or1ksim_testbench.status $OR1K_WEB_LAST
286
        cp $OR1K_WEB/or1ksim_testbench.txt $OR1K_WEB_LAST
287
else
288
        ../notice_developers.sh or1k/or1ksim/testbench $OR1K_WEB_LAST/or1ksim_testbench.status < or1ksim_testbench.txt
289
        echo "$FAIL_STR (`date`)">  $OR1K_WEB/or1ksim_testbench.status
290
        ALL_STABLE=0
291
fi
292
if [ "$1" == "ats" ]; then
293
        rm -rf uclibc uclinux gcc or1ksim
294
fi
295
#
296
# Copy all log files into or1k web directory
297
#
298
cp checkout_uclibc.txt $OR1K_WEB
299
cp build_uclibc.txt $OR1K_WEB
300
cp rebuild_gcc.txt $OR1K_WEB
301
#
302
# Check if uclibc was built and installed correctly
303
#
304
if [ $BUILD_UCLIBC_STATUS = 0 ]; then
305
        echo "$OK_STR (`date`)" > $OR1K_WEB/build_uclibc.status
306
        cp $OR1K_WEB/build_uclibc.status $OR1K_WEB_LAST
307
        cp $OR1K_WEB/checkout_uclibc.txt $OR1K_WEB_LAST
308
        cp $OR1K_WEB/build_uclibc.txt $OR1K_WEB_LAST
309
else
310
        ../notice_developers.sh or1k/uclibc $OR1K_WEB_LAST/build_uclibc.status < build_uclibc.txt
311
        echo "$FAIL_STR (`date`)">  $OR1K_WEB/build_uclibc.status
312
        ALL_STABLE=0
313
fi
314
if [ $REBUILD_GCC_STATUS = 0 ]; then
315
        echo "$OK_STR (`date`)" > $OR1K_WEB/rebuild_gcc.status
316
        cp $OR1K_WEB/rebuild_gcc.status $OR1K_WEB_LAST
317
        cp $OR1K_WEB/rebuild_gcc.txt $OR1K_WEB_LAST
318
else
319
        ../notice_developers.sh or1k/gcc-3.2.3 $OR1K_WEB_LAST/rebuild_gcc.status < rebuild_gcc.txt
320
        echo "$FAIL_STR (`date`)">  $OR1K_WEB/rebuild_gcc.status
321
        ALL_STABLE-0
322
fi
323
 
324
#
325
# rtag sources as ats-stable if everything worked
326
#
327
cd ..
328
if [ "$1" == "ats" ]; then
329
        if [ $ALL_STABLE = 1 ]; then
330
                nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/binutils > /dev/null 2>&1
331
                nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/gcc-3.2.3 > /dev/null 2>&1
332
                nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/gdb-5.0 > /dev/null 2>&1
333
                nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/or1ksim > /dev/null 2>&1
334
                nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/uclinux > /dev/null 2>&1
335
                nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/uclibc > /dev/null 2>&1
336
        fi
337
fi
338
 
339
#
340
# Clean testpool
341
#
342
if [ "$1" == "ats" ]; then
343
        rm -rf or1k
344
fi

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.