Commit 21a6a18f authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Updates on the build script as used for GR740 tests.

parent 7d83c6c7
Pipeline #326 skipped
#!/bin/bash
#
# This script builds the RTEMS/SPARC cross-compiler
# and leon2/leon3/ngmp BSPs.
# This script builds the RTEMS/SPARC cross-compiler and the
# Leon2/Leon3/NGMP BSPs.
#
# To have a reproducible setup, it would be prudent if you
# executed this script under a Debian jessie chroot,
......@@ -20,15 +20,15 @@
# Then chroot inside it and run this script:
#
# chroot /opt/jessie-chroot
# /path/to/build.rtems.4.11.sh
# /path/to/build.rtems.4.12.sh
# Stop on any error
set -e
DATE=$(date +"%Y.%m.%d")
mkdir -p /root/rtems.build.logs
BUILD_LOG=/root/rtems.build.logs/${DATE}.log
mkdir -p ~/rtems.build.logs
BUILD_LOG=~/rtems.build.logs/${DATE}.log
[ -f ${BUILD_LOG} ] && {
echo "There's already a build log:"
echo " " ${BUILD_LOG}
......@@ -39,16 +39,17 @@ BUILD_LOG=/root/rtems.build.logs/${DATE}.log
# Record the output in $BUILD_LOG (see matching brace)
{
# Begin by checking out the RTEMS Source Builder
mkdir -p /root/development/rtems/src
RSB=/root/development/rtems/src/rtems-source-builder-${DATE}
RTPREFIX=/opt/rtems-4.11-${DATE}
mkdir -p ~/development/rtems/src
RSB=~/development/rtems/src/rtems-source-builder-${DATE}
RTPREFIX=/opt/rtems-4.12-${DATE}
rm -rf ${RTPREFIX}
[ ! -d $RSB ] && {
cd /root/development/rtems/src/
cd ~/development/rtems/src/
git clone git://git.rtems.org/rtems-source-builder.git rtems-source-builder-${DATE}
}
cd $RSB
git checkout -f 4.11
git checkout -f 5ff2c0aa94a6fdb8b2b93fd7b16ea4284f6df5bf
# Verify that we have all we need to build
source-builder/sb-check
......@@ -66,16 +67,13 @@ BUILD_LOG=/root/rtems.build.logs/${DATE}.log
# [ ! -d sources ] && {
# mkdir -p sources
# cd sources
# cp -al /root/development/rtems/src/rtems-source-builder.working/rtems/sources/* .
# cp -al ~/development/rtems/pkg_sources/* .
# cd ..
# for i in config/tools/*cfg ; do
# cat "$i" | sed 's,ftp://ftp.gnu.org,http://ftp.gnu.org,;s,ftp://gcc.gnu.org,http://gcc.gnu.org,;' > "$i".new && mv "$i".new "$i"
# done
# }
# Build the cross compiler
# (we're in the master branch, which is currently the "unofficial" 4.11)
../source-builder/sb-set-builder --log=stage1.log --prefix=${RTPREFIX} 4.11/rtems-sparc
# (we're in the master branch, which is currently the "unofficial" 4.12)
../source-builder/sb-set-builder --log=stage1.log --prefix=${RTPREFIX} 4.12/rtems-sparc
# Add the cross compiler to the PATH and checkout RTEMS
export PATH=${RTPREFIX}/bin:$PATH
......@@ -84,16 +82,16 @@ BUILD_LOG=/root/rtems.build.logs/${DATE}.log
git clone https://github.com/RTEMS/rtems.git rtems-git
}
cd rtems-git
git checkout -f 4.11
git checkout -f c6556e2ecc6b80f981bb210d541544f24b7f59df
./bootstrap
cd ..
rm -rf build.${DATE}
mkdir build.${DATE}
cd build.${DATE}
../rtems-git/configure \
--target=sparc-rtems4.11 --prefix=${RTPREFIX} \
--enable-rtemsbsp="leon2 leon3" --enable-posix \
--enable-cxx --enable-networking
--target=sparc-rtems4.12 --prefix=${RTPREFIX} \
--enable-rtemsbsp="leon2 leon3 ngmp" --enable-posix \
--enable-smp --enable-cxx --enable-networking
make all
make install
} |& tee ${BUILD_LOG}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment