forked from Imagelibrary/rtems
Restored joel's changes after merging old version from Ralf.
This commit is contained in:
109
scripts/buildall
109
scripts/buildall
@@ -3,6 +3,8 @@
|
|||||||
# Generate all the specs and then cycle through building them.
|
# Generate all the specs and then cycle through building them.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
RTEMS_DIR=`dirname $0`
|
||||||
|
|
||||||
# This is the full list .. hppa1.1 does not build now.
|
# This is the full list .. hppa1.1 does not build now.
|
||||||
#ALL_TARGETS="hppa1.1-rtems i386-rtems i960-rtems m68k-rtems \
|
#ALL_TARGETS="hppa1.1-rtems i386-rtems i960-rtems m68k-rtems \
|
||||||
# m68k-rtemself mips64orion-rtems \
|
# m68k-rtemself mips64orion-rtems \
|
||||||
@@ -15,7 +17,38 @@ ALL_TARGETS="i386-rtems i960-rtems m68k-rtems \
|
|||||||
|
|
||||||
# This is what we are building this time
|
# This is what we are building this time
|
||||||
#TARGETS=${ALL_TARGETS}
|
#TARGETS=${ALL_TARGETS}
|
||||||
TARGETS="i386-rtems m68k-rtems powerpc-rtems sh-rtems"
|
TARGETS="sh-rtems"
|
||||||
|
|
||||||
|
testing=no
|
||||||
|
|
||||||
|
binutils=990901
|
||||||
|
gcc=2.95.1
|
||||||
|
gdb=4.18
|
||||||
|
newlib=1.8.2
|
||||||
|
buildroot=/opt/tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Now get started
|
||||||
|
#
|
||||||
|
start=`date`
|
||||||
|
|
||||||
|
|
||||||
|
echo PATH=$PATH
|
||||||
|
|
||||||
|
if [ ${testing} = yes ] ; then
|
||||||
|
ECHO=echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
installed_count=`rpm -qa | grep rtems | wc -l`
|
||||||
|
if [ ${installed_count} -ne 0 ] ; then
|
||||||
|
echo This script should be run with NO rtems RPMs installed.
|
||||||
|
echo It appears that the following rtems RPMs are installed:
|
||||||
|
echo
|
||||||
|
rpm -qa | grep rtems
|
||||||
|
echo
|
||||||
|
echo Please remove these and restart this script.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Some linux distributions use /usr/src/packages
|
# Some linux distributions use /usr/src/packages
|
||||||
# redhat uses /usr/src/redhat
|
# redhat uses /usr/src/redhat
|
||||||
@@ -34,41 +67,79 @@ fi
|
|||||||
# Now generate all the specs
|
# Now generate all the specs
|
||||||
for target in ${TARGETS}
|
for target in ${TARGETS}
|
||||||
do
|
do
|
||||||
./mkspec ${target}
|
${ECHO} ${RTEMS_DIR}/mkspec ${target}
|
||||||
done
|
done
|
||||||
|
|
||||||
# clean up a bit before we start
|
# clean up a bit before we start
|
||||||
cd ${dst}
|
cd ${dst}
|
||||||
test -d log || mkdir log
|
test -d log || mkdir log
|
||||||
|
|
||||||
# do all the binutils
|
|
||||||
|
# do all the tools
|
||||||
for target in ${TARGETS}
|
for target in ${TARGETS}
|
||||||
do
|
do
|
||||||
rpm -ba --buildroot=/opt/tmp \
|
logfile=log/${target}-binutils
|
||||||
${dst}/${target}-binutils.spec >log/${target}-binutils 2>&1
|
specfile=${dst}/${target}-binutils-${binutils}.spec
|
||||||
rm -rf ${dst}/../BUILD/${target}-binutils
|
echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
|
||||||
rm -rf /opt/tmp/opt
|
if [ ${testing} = no ] ; then
|
||||||
|
rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
|
||||||
|
fi
|
||||||
|
${ECHO} rm -rf ${dst}/../BUILD/${target}-binutils*
|
||||||
|
${ECHO} rm -rf ${buildroot}/opt
|
||||||
|
|
||||||
# now build gdb
|
# now build gdb
|
||||||
rpm -ba --buildroot=/opt/tmp \
|
logfile=log/${target}-gdb
|
||||||
${dst}/${target}-gdb.spec >log/${target}-gdb 2>&1
|
specfile=${dst}/${target}-gdb-${gdb}.spec
|
||||||
rm -rf ${dst}/../BUILD/${target}-gdb
|
echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
|
||||||
rm -rf /opt/tmp/opt
|
if [ ${testing} = no ] ; then
|
||||||
|
rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
|
||||||
|
fi
|
||||||
|
${ECHO} rm -rf ${dst}/../BUILD/${target}-gdb*
|
||||||
|
${ECHO} rm -rf ${buildroot}/opt
|
||||||
|
|
||||||
# now build gcc/newlib
|
# now build gcc/newlib
|
||||||
# NOTE: This requires having binutils installed and we immediately
|
# NOTE: This requires having binutils installed and we immediately
|
||||||
# remove it once finished.
|
# remove it once finished.
|
||||||
rpm -i ${dst}/../RPMS/i386/${target}-binutils-19991011-0.i386.rpm
|
${ECHO} rpm -i ${dst}/../RPMS/i386/${target}-binutils-${binutils}-0.i386.rpm
|
||||||
|
|
||||||
rpm -ba --buildroot=/opt/tmp \
|
logfile=log/${target}-gccnewlib
|
||||||
${dst}/${target}-gcc_newlib.spec >log/${target}-gccnewlib 2>&1
|
specfile=${dst}/${target}-gcc-${gcc}-newlib-${newlib}.spec
|
||||||
rm -rf ${dst}/../BUILD/${target}-gcc_newlib
|
echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
|
||||||
rm -rf /opt/tmp/opt
|
if [ ${testing} = no ] ; then
|
||||||
|
rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
|
||||||
|
fi
|
||||||
|
${ECHO} rm -rf ${dst}/../BUILD/${target}-gcc*
|
||||||
|
${ECHO} rm -rf ${buildroot}/opt
|
||||||
|
|
||||||
rpm -e `rpm -qa | grep rtems`
|
echo uninstalling binutils for ${target}
|
||||||
|
if [ ${testing} = no ] ; then
|
||||||
|
rpm -e `rpm -qa | grep rtems`
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
mv ${dst}/../RPMS/i386/*.rpm /usr3/rtems_cds/test_cd/RPMS
|
staging_dir=/usr3/rtems_cds/test_cd/linux
|
||||||
mv ${dst}/../SRPMS/*.rpm /usr3/rtems_cds/test_cd/SRPMS
|
|
||||||
|
|
||||||
|
${ECHO} mkdir ${staging_dir}
|
||||||
|
${ECHO} mkdir ${staging_dir}/RPMS
|
||||||
|
${ECHO} mkdir ${staging_dir}/SRPMS
|
||||||
|
|
||||||
|
echo Moving RPMs to CD staging directory
|
||||||
|
for file in `ls -1 ${dst}/../RPMS/i386/*.rpm 2>/dev/null`
|
||||||
|
do
|
||||||
|
${ECHO} mv ${file} ${staging_dir}/RPMS
|
||||||
|
done
|
||||||
|
|
||||||
|
echo Moving SRPMs to CD staging directory
|
||||||
|
for file in `ls -1 ${dst}/../SRPMS/*.rpm 2>/dev/null`
|
||||||
|
do
|
||||||
|
${ECHO} mv ${file} ${staging_dir}/SRPMS
|
||||||
|
done
|
||||||
|
|
||||||
|
# Now we are done
|
||||||
|
|
||||||
|
stop=`date`
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Started: " $start
|
||||||
|
echo "Finished: " $stop
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user