#!/bin/bash # # Some common variables # OR1K_WEB=../../www/cores/or1k/ats/or32-rtems OR1K_WEB_LAST=$OR1K_WEB/last_ok OK_STR="Test Passed" FAIL_STR="Test Failed" ALL_STABLE=1 # # Allocate test pool directory # mkdir or1k cd or1k # # Copy script for web visitors' reference # cp ../or1k_ats_rtems.sh $OR1K_WEB/or1k_ats_rtems.txt # # Start with binutils # date > checkout_binutils.txt 2>&1 nice /usr/bin/cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d binutils or1k/binutils >> checkout_binutils.txt 2>&1 mkdir b-b cd b-b date > ../build_binutils.txt 2>&1 ../binutils/configure --target=or32-rtems --prefix=/home/oc/testpool/or1k/or32-rtems >> ../build_binutils.txt 2>&1 nice /usr/bin/make all install >> ../build_binutils.txt 2>&1 BUILD_BINUTILS_STATUS=$? export PATH=/home/oc/testpool/or1k/or32-rtems/bin:$PATH cd .. rm -rf binutils # # Copy all log files into or1k web directory # cp checkout_binutils.txt $OR1K_WEB cp build_binutils.txt $OR1K_WEB # # Check if binutils was built and installed correctly # if [ $BUILD_BINUTILS_STATUS = 0 ]; then echo "$OK_STR (`date`)" > $OR1K_WEB/build_binutils.status cp $OR1K_WEB/build_binutils.status $OR1K_WEB_LAST cp $OR1K_WEB/checkout_binutils.txt $OR1K_WEB_LAST cp $OR1K_WEB/build_binutils.txt $OR1K_WEB_LAST else ../notice_developers.sh or1k/binutils $OR1K_WEB_LAST/build_binutils.status < build_binutils.txt echo "$FAIL_STR (`date`)" > $OR1K_WEB/build_binutils.status ALL_STABLE=0 fi # # Start with gcc # date > checkout_newlib_gcc.txt 2>&1 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 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 cd gcc ./contrib/egcs_update --touch > /dev/null ln -s ../newlib/newlib . cd .. mkdir b-gcc cd b-gcc date > ../build_newlib_gcc.txt 2>&1 nice ../gcc/configure --target=or32-rtems \ --with-gnu-as --with-gnu-ld --with-newlib --verbose \ --enable-threads --prefix=/home/oc/testpool/or1k/or32-rtems --enable-languages="c" >> ../build_newlib_gcc.txt 2>&1 nice /usr/bin/make all install >> ../build_newlib_gcc.txt 2>&1 BUILD_GCC_STATUS=$? cd .. rm -rf gcc # # Copy all log files into or1k web directory # cp checkout_newlib_gcc.txt $OR1K_WEB cp build_newlib_gcc.txt $OR1K_WEB # # Check if newlib/gcc was built and installed correctly # if [ $BUILD_GCC_STATUS = 0 ]; then echo "$OK_STR (`date`)" > $OR1K_WEB/build_newlib_gcc.status cp $OR1K_WEB/build_newlib_gcc.status $OR1K_WEB_LAST cp $OR1K_WEB/checkout_newlib_gcc.txt $OR1K_WEB_LAST cp $OR1K_WEB/build_newlib_gcc.txt $OR1K_WEB_LAST else ../notice_developers.sh or1k/newlib $OR1K_WEB_LAST/build_newlib_gcc.status < build_newlib_gcc.txt echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_newlib_gcc.status ALL_STABLE=0 fi # # Start with gdb # date > checkout_gdb.txt 2>&1 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 mkdir b-gdb cd b-gdb date > ../build_gdb.txt 2>&1 ../gdb/configure --target=or32-rtems --prefix=/home/oc/testpool/or1k/or32-rtems >> ../build_gdb.txt 2>&1 nice /usr/bin/make all install >> ../build_gdb.txt 2>&1 BUILD_GDB_STATUS=$? cd .. rm -rf gdb # # Copy all log files into or1k web directory # cp checkout_gdb.txt $OR1K_WEB cp build_gdb.txt $OR1K_WEB # # Check if gdb was built and installed correctly # if [ $BUILD_GDB_STATUS = 0 ]; then echo "$OK_STR (`date`)" > $OR1K_WEB/build_gdb.status cp $OR1K_WEB/build_gdb.status $OR1K_WEB_LAST cp $OR1K_WEB/checkout_gdb.txt $OR1K_WEB_LAST cp $OR1K_WEB/build_gdb.txt $OR1K_WEB_LAST else ../notice_developers.sh or1k/gdb-5.0 $OR1K_WEB_LAST/build_gdb.status < build_gdb.txt echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_gdb.status ALL_STABLE=0 fi # # Start with or1ksim # date > checkout_or1ksim.txt 2>&1 nice /usr/bin/cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d or1ksim or1k/or1ksim >> checkout_or1ksim.txt 2>&1 cd or1ksim date > ../build_or1ksim.txt 2>&1 ../or1ksim/configure --target=or32-rtems --prefix=/home/oc/testpool/or1k/or32-rtems >> ../build_or1ksim.txt 2>&1 nice /usr/bin/make all install >> ../build_or1ksim.txt 2>&1 BUILD_OR1KSIM_STATUS=$? cd .. rm -rf or1ksim # # Copy all log files into or1k web directory # cp checkout_or1ksim.txt $OR1K_WEB cp build_or1ksim.txt $OR1K_WEB # # Check if or1ksim was built and installed correctly # if [ $BUILD_OR1KSIM_STATUS = 0 ]; then echo "$OK_STR (`date`)" > $OR1K_WEB/build_or1ksim.status cp $OR1K_WEB/build_or1ksim.status $OR1K_WEB_LAST cp $OR1K_WEB/checkout_or1ksim.txt $OR1K_WEB_LAST cp $OR1K_WEB/build_or1ksim.txt $OR1K_WEB_LAST else ../notice_developers.sh or1k/or1ksim $OR1K_WEB_LAST/build_or1ksim.status < build_or1ksim.txt echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_or1ksim.status ALL_STABLE=0 fi # # rtag sources as ats-stable if everything worked # cd .. if [ "$1" == "ats" ]; then if [ $ALL_STABLE = 1 ]; then nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/binutils > /dev/null 2>&1 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 nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/gcc > /dev/null 2>&1 nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/gdb-5.0 > /dev/null 2>&1 nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9 rtag -FR ats-stable or1k/or1ksim > /dev/null 2>&1 fi fi # # Clean testpool # rm -rf or1k