1 |
1767 |
root |
#!/bin/bash
|
2 |
|
|
|
3 |
|
|
#
|
4 |
|
|
# Some common variables
|
5 |
|
|
#
|
6 |
|
|
OR1K_WEB=../../www/cores/or1k/ats/or32-rtems
|
7 |
|
|
OR1K_WEB_LAST=$OR1K_WEB/last_ok
|
8 |
|
|
OK_STR="Test Passed"
|
9 |
|
|
FAIL_STR="Test Failed"
|
10 |
|
|
ALL_STABLE=1
|
11 |
|
|
|
12 |
|
|
#
|
13 |
|
|
# Allocate test pool directory
|
14 |
|
|
#
|
15 |
|
|
mkdir or1k
|
16 |
|
|
cd or1k
|
17 |
|
|
|
18 |
|
|
#
|
19 |
|
|
# Copy script for web visitors' reference
|
20 |
|
|
#
|
21 |
|
|
cp ../or1k_ats_rtems.sh $OR1K_WEB/or1k_ats_rtems.txt
|
22 |
|
|
|
23 |
|
|
#
|
24 |
|
|
# Start with binutils
|
25 |
|
|
#
|
26 |
|
|
date > checkout_binutils.txt 2>&1
|
27 |
|
|
nice /usr/bin/cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d binutils or1k/binutils >> checkout_binutils.txt 2>&1
|
28 |
|
|
mkdir b-b
|
29 |
|
|
cd b-b
|
30 |
|
|
date > ../build_binutils.txt 2>&1
|
31 |
|
|
../binutils/configure --target=or32-rtems --prefix=/home/oc/testpool/or1k/or32-rtems >> ../build_binutils.txt 2>&1
|
32 |
|
|
nice /usr/bin/make all install >> ../build_binutils.txt 2>&1
|
33 |
|
|
BUILD_BINUTILS_STATUS=$?
|
34 |
|
|
export PATH=/home/oc/testpool/or1k/or32-rtems/bin:$PATH
|
35 |
|
|
cd ..
|
36 |
|
|
rm -rf binutils
|
37 |
|
|
#
|
38 |
|
|
# Copy all log files into or1k web directory
|
39 |
|
|
#
|
40 |
|
|
cp checkout_binutils.txt $OR1K_WEB
|
41 |
|
|
cp build_binutils.txt $OR1K_WEB
|
42 |
|
|
#
|
43 |
|
|
# Check if binutils was built and installed correctly
|
44 |
|
|
#
|
45 |
|
|
if [ $BUILD_BINUTILS_STATUS = 0 ]; then
|
46 |
|
|
echo "$OK_STR (`date`)" > $OR1K_WEB/build_binutils.status
|
47 |
|
|
cp $OR1K_WEB/build_binutils.status $OR1K_WEB_LAST
|
48 |
|
|
cp $OR1K_WEB/checkout_binutils.txt $OR1K_WEB_LAST
|
49 |
|
|
cp $OR1K_WEB/build_binutils.txt $OR1K_WEB_LAST
|
50 |
|
|
else
|
51 |
|
|
../notice_developers.sh or1k/binutils $OR1K_WEB_LAST/build_binutils.status < build_binutils.txt
|
52 |
|
|
echo "$FAIL_STR (`date`)" > $OR1K_WEB/build_binutils.status
|
53 |
|
|
ALL_STABLE=0
|
54 |
|
|
fi
|
55 |
|
|
|
56 |
|
|
#
|
57 |
|
|
# Start with gcc
|
58 |
|
|
#
|
59 |
|
|
date > checkout_newlib_gcc.txt 2>&1
|
60 |
|
|
nice /usr/bin/cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d newlib or1k/newlib-1.10.0 >> checkout_newlib_gcc.txt 2>&1
|
61 |
|
|
nice /usr/bin/cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d gcc or1k/gcc >> checkout_newlib_gcc.txt 2>&1
|
62 |
|
|
cd gcc
|
63 |
|
|
./contrib/egcs_update --touch > /dev/null
|
64 |
|
|
ln -s ../newlib/newlib .
|
65 |
|
|
cd ..
|
66 |
|
|
mkdir b-gcc
|
67 |
|
|
cd b-gcc
|
68 |
|
|
date > ../build_newlib_gcc.txt 2>&1
|
69 |
|
|
nice ../gcc/configure --target=or32-rtems \
|
70 |
|
|
--with-gnu-as --with-gnu-ld --with-newlib --verbose \
|
71 |
|
|
--enable-threads --prefix=/home/oc/testpool/or1k/or32-rtems --enable-languages="c" >> ../build_newlib_gcc.txt 2>&1
|
72 |
|
|
nice /usr/bin/make all install >> ../build_newlib_gcc.txt 2>&1
|
73 |
|
|
BUILD_GCC_STATUS=$?
|
74 |
|
|
cd ..
|
75 |
|
|
rm -rf gcc
|
76 |
|
|
#
|
77 |
|
|
# Copy all log files into or1k web directory
|
78 |
|
|
#
|
79 |
|
|
cp checkout_newlib_gcc.txt $OR1K_WEB
|
80 |
|
|
cp build_newlib_gcc.txt $OR1K_WEB
|
81 |
|
|
#
|
82 |
|
|
# Check if newlib/gcc was built and installed correctly
|
83 |
|
|
#
|
84 |
|
|
if [ $BUILD_GCC_STATUS = 0 ]; then
|
85 |
|
|
echo "$OK_STR (`date`)" > $OR1K_WEB/build_newlib_gcc.status
|
86 |
|
|
cp $OR1K_WEB/build_newlib_gcc.status $OR1K_WEB_LAST
|
87 |
|
|
cp $OR1K_WEB/checkout_newlib_gcc.txt $OR1K_WEB_LAST
|
88 |
|
|
cp $OR1K_WEB/build_newlib_gcc.txt $OR1K_WEB_LAST
|
89 |
|
|
else
|
90 |
|
|
../notice_developers.sh or1k/newlib $OR1K_WEB_LAST/build_newlib_gcc.status < build_newlib_gcc.txt
|
91 |
|
|
echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_newlib_gcc.status
|
92 |
|
|
ALL_STABLE=0
|
93 |
|
|
fi
|
94 |
|
|
|
95 |
|
|
#
|
96 |
|
|
# Start with gdb
|
97 |
|
|
#
|
98 |
|
|
date > checkout_gdb.txt 2>&1
|
99 |
|
|
nice /usr/bin/cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d gdb or1k/gdb-5.0 >> checkout_gdb.txt 2>&1
|
100 |
|
|
mkdir b-gdb
|
101 |
|
|
cd b-gdb
|
102 |
|
|
date > ../build_gdb.txt 2>&1
|
103 |
|
|
../gdb/configure --target=or32-rtems --prefix=/home/oc/testpool/or1k/or32-rtems >> ../build_gdb.txt 2>&1
|
104 |
|
|
nice /usr/bin/make all install >> ../build_gdb.txt 2>&1
|
105 |
|
|
BUILD_GDB_STATUS=$?
|
106 |
|
|
cd ..
|
107 |
|
|
rm -rf gdb
|
108 |
|
|
#
|
109 |
|
|
# Copy all log files into or1k web directory
|
110 |
|
|
#
|
111 |
|
|
cp checkout_gdb.txt $OR1K_WEB
|
112 |
|
|
cp build_gdb.txt $OR1K_WEB
|
113 |
|
|
#
|
114 |
|
|
# Check if gdb was built and installed correctly
|
115 |
|
|
#
|
116 |
|
|
if [ $BUILD_GDB_STATUS = 0 ]; then
|
117 |
|
|
echo "$OK_STR (`date`)" > $OR1K_WEB/build_gdb.status
|
118 |
|
|
cp $OR1K_WEB/build_gdb.status $OR1K_WEB_LAST
|
119 |
|
|
cp $OR1K_WEB/checkout_gdb.txt $OR1K_WEB_LAST
|
120 |
|
|
cp $OR1K_WEB/build_gdb.txt $OR1K_WEB_LAST
|
121 |
|
|
else
|
122 |
|
|
../notice_developers.sh or1k/gdb-5.0 $OR1K_WEB_LAST/build_gdb.status < build_gdb.txt
|
123 |
|
|
echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_gdb.status
|
124 |
|
|
ALL_STABLE=0
|
125 |
|
|
fi
|
126 |
|
|
|
127 |
|
|
#
|
128 |
|
|
# Start with or1ksim
|
129 |
|
|
#
|
130 |
|
|
date > checkout_or1ksim.txt 2>&1
|
131 |
|
|
nice /usr/bin/cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d or1ksim or1k/or1ksim >> checkout_or1ksim.txt 2>&1
|
132 |
|
|
cd or1ksim
|
133 |
|
|
date > ../build_or1ksim.txt 2>&1
|
134 |
|
|
../or1ksim/configure --target=or32-rtems --prefix=/home/oc/testpool/or1k/or32-rtems >> ../build_or1ksim.txt 2>&1
|
135 |
|
|
nice /usr/bin/make all install >> ../build_or1ksim.txt 2>&1
|
136 |
|
|
BUILD_OR1KSIM_STATUS=$?
|
137 |
|
|
cd ..
|
138 |
|
|
rm -rf or1ksim
|
139 |
|
|
#
|
140 |
|
|
# Copy all log files into or1k web directory
|
141 |
|
|
#
|
142 |
|
|
cp checkout_or1ksim.txt $OR1K_WEB
|
143 |
|
|
cp build_or1ksim.txt $OR1K_WEB
|
144 |
|
|
#
|
145 |
|
|
# Check if or1ksim was built and installed correctly
|
146 |
|
|
#
|
147 |
|
|
if [ $BUILD_OR1KSIM_STATUS = 0 ]; then
|
148 |
|
|
echo "$OK_STR (`date`)" > $OR1K_WEB/build_or1ksim.status
|
149 |
|
|
cp $OR1K_WEB/build_or1ksim.status $OR1K_WEB_LAST
|
150 |
|
|
cp $OR1K_WEB/checkout_or1ksim.txt $OR1K_WEB_LAST
|
151 |
|
|
cp $OR1K_WEB/build_or1ksim.txt $OR1K_WEB_LAST
|
152 |
|
|
else
|
153 |
|
|
../notice_developers.sh or1k/or1ksim $OR1K_WEB_LAST/build_or1ksim.status < build_or1ksim.txt
|
154 |
|
|
echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_or1ksim.status
|
155 |
|
|
ALL_STABLE=0
|
156 |
|
|
fi
|
157 |
|
|
|
158 |
|
|
#
|
159 |
|
|
# rtag sources as ats-stable if everything worked
|
160 |
|
|
#
|
161 |
|
|
cd ..
|
162 |
|
|
if [ "$1" == "ats" ]; then
|
163 |
|
|
if [ $ALL_STABLE = 1 ]; then
|
164 |
|
|
nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/binutils > /dev/null 2>&1
|
165 |
|
|
nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/newlib-1.10.0 > /dev/null 2>&1
|
166 |
|
|
nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/gcc > /dev/null 2>&1
|
167 |
|
|
nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/gdb-5.0 > /dev/null 2>&1
|
168 |
|
|
nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/or1ksim > /dev/null 2>&1
|
169 |
|
|
fi
|
170 |
|
|
fi
|
171 |
|
|
|
172 |
|
|
|
173 |
|
|
#
|
174 |
|
|
# Clean testpool
|
175 |
|
|
#
|
176 |
|
|
rm -rf or1k
|