summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-05-02 15:11:39 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-05-02 15:14:40 -0500
commit37f34371810e1033643b2bd79977b86a7d66a488 (patch)
tree836ecb060b6e88473f70db5846c3902d886626b8
parentrtems-testing shell scripts: Use env not eval (diff)
downloadrtems-testing-37f34371810e1033643b2bd79977b86a7d66a488.tar.bz2
vm-help: Virtual Machine Helpers
-rw-r--r--vm-help/README7
-rwxr-xr-xvm-help/build_bsp55
-rwxr-xr-xvm-help/build_schedsim53
-rwxr-xr-xvm-help/do_doxygen68
-rwxr-xr-xvm-help/do_tools16
5 files changed, 199 insertions, 0 deletions
diff --git a/vm-help/README b/vm-help/README
new file mode 100644
index 0000000..b4cb303
--- /dev/null
+++ b/vm-help/README
@@ -0,0 +1,7 @@
+This directory contains helper scripts and instructions for setting
+up the RTEMS CentOS VM.
+
++ build_bsp - helper script to "build_bsp CPU BSP"
++ build_schedsim - helper script to build Scheduler Simulator
++ do_doxygen - helper script to build RTEMS Doxygen
++ do_tools - helper script to build toolset using RSB
diff --git a/vm-help/build_bsp b/vm-help/build_bsp
new file mode 100755
index 0000000..c9cef20
--- /dev/null
+++ b/vm-help/build_bsp
@@ -0,0 +1,55 @@
+#! /bin/sh
+#
+# Simple script to build CPU/BSP
+#
+# Assumes ${HOME}/rtems-4.11-work
+#
+# Must be edited to change configure settings
+
+if [ $# -ne 2 ] ; then
+ echo Usage: $0 CPU BSP
+ exit 1
+fi
+
+cd ${HOME}/rtems-4.11-work
+if [ $? -ne 0 ] ; then
+ echo "Assumed location of RTEMS is incorrect"
+ exit 1
+fi
+
+CPU=$1
+BSP=$2
+
+rm -rf b-${BSP}
+mkdir b-${BSP}
+cd b-${BSP}
+
+# Comment out the one in each set you do not want
+DEBUG="--enable-rtems-debug"
+# DEBUG=""
+
+#TESTS="--enable-tests"
+TESTS="--enable-tests=samples"
+
+SMP="--disable-smp"
+#SMP="--enable-smp"
+
+#POSIX="--enable-posix"
+POSIX="--disable-posix"
+# NET="--enable-networking"
+NET="--disable-networking"
+
+CXX="--enable-cxx"
+# CXX="--disable-cxx"
+
+# Now invoke configure and make using the arguments selected
+../rtems/configure --target=${CPU}-rtems4.11 --enable-rtemsbsp=${BSP} \
+ --prefix=${HOME}/rtems-4.11-work/bsp-install \
+ ${NET} ${POSIX} ${SMP} ${DEBUG} ${TESTS} ${CXX} \
+ --enable-maintainer-mode \
+ >c.log 2>&1 && \
+make -j6 >b.log 2>&1
+status=$?
+echo $status
+exit $status
+
diff --git a/vm-help/build_schedsim b/vm-help/build_schedsim
new file mode 100755
index 0000000..abaffa9
--- /dev/null
+++ b/vm-help/build_schedsim
@@ -0,0 +1,53 @@
+#! /bin/sh
+#
+# Simple script to build scheduler simulator
+#
+# Assumes ${HOME}/rtems-4.11-work
+#
+# Must be edited to change configure settings
+
+cd ${HOME}/rtems-4.11-work
+if [ $? -ne 0 ] ; then
+ echo "Assumed root of RTEMS source code is incorrect"
+ exit 1
+fi
+
+if [ ! -d rtems-schedsim ] ; then
+ echo "rtems-schedsim not present"
+ exit 1
+fi
+
+if [ ! -d rtems ] ; then
+ echo "rtems is not present"
+ exit 1
+fi
+
+if [ ! -r rtems-schedsim/configure ] ; then
+ echo "rtems-schedsim is not bootstrapped"
+ exit 1
+fi
+
+rm -rf b-schedsim
+mkdir b-schedsim
+cd b-schedsim
+
+SMP="--disable-smp"
+#SMP="--enable-smp"
+
+DEBUG="--enable-rtems-debug"
+# DEBUG=""
+
+# Now invoke configure and make using the arguments selected
+../rtems-schedsim/configure \
+ CFLAGS_FOR_BUILD="-O2 -g" \
+ CXXFLAGS_FOR_BUILD="-O2 -g" \
+ ${SMP} ${DEBUG} \
+ --enable-rtemsdir=${HOME}/rtems-4.11-work/rtems \
+ --prefix=${HOME}/rtems-4.11-work/schedsim-install \
+ --enable-maintainer-mode \
+ >c.log 2>&1 && \
+make >b.log 2>&1
+status=$?
+echo $status
+exit $status
+
diff --git a/vm-help/do_doxygen b/vm-help/do_doxygen
new file mode 100755
index 0000000..f3337e4
--- /dev/null
+++ b/vm-help/do_doxygen
@@ -0,0 +1,68 @@
+#! /bin/bash -x
+#
+# Generate Doxygen for Head
+#
+
+# Assumes Virtual Machine Setup
+
+if [ ! -r ~/rtems-4.11-work/setenv ] ; then
+ echo Assume RTEMS VM configuration. Fix me for directories
+ exit 1
+fi
+
+. ~/rtems-4.11-work/setenv
+
+type mscgen 2>/dev/null
+if [ $? -ne 0 ] ; then
+ echo "Warning! "
+ echo " Missing mscgen. If you want to generate the complete figure set,"
+ echo " visit http://www.mcternan.me.uk/mscgen/ and look for RPMs and Yum"
+ echo " instructions."
+ echo ""
+ echo " This is not necessary but some figures will be missing."
+fi
+
+# RTEMS Source
+# Where to put the Doxygen and Texinfo output
+onlineDoc=~/rtems-4.11-work/onlinedocs/
+
+test -d ${onlineDoc} || mkdir ${onlineDoc}
+
+# BEGIN SuperCore Doxygen
+do_doxy()
+{
+ d=${onlineDoc}/doxygen
+ outdir=${d}/cpukit
+
+ rm -rf ${outdir}
+ test -d ${outdir} || mkdir -p ${outdir}
+ cd $r
+ cd ..
+ rm -rf b-doc
+ mkdir b-doc
+ cd b-doc
+ $r/configure --target=sparc-rtems4.11 --enable-rtemsbsp=sis \
+ --disable-networking --disable-tests >c.log 2>&1
+ make -j3 preinstall >b.log 2>&1
+ cd sparc-rtems4.11/c/sis/cpukit
+
+ #mv Doxyfile Doxyfile.tmp
+ sed -e "s,^OUTPUT_DIRECTORY.*=.*$,OUTPUT_DIRECTORY = ${outdir}-tmp," \
+ -e "s,^STRIP_FROM_PATH.*=.*$,STRIP_FROM_PATH = ," \
+ -e "s,^INPUT.*=.*lib.*$,INPUT = ," \
+ <Doxyfile >../../../sis/lib/include/Doxyfile
+
+ cd ../../../sis/lib/include
+
+ doxygen >${d}/doxy.log 2>&1
+
+ if [ $? -eq 0 ] ; then
+ rm -rf ${outdir}
+ mv ${outdir}-tmp ${outdir}
+ fi
+ cd $r/..
+}
+# END SuperCore Doxygen
+
+do_doxy
+exit 0
diff --git a/vm-help/do_tools b/vm-help/do_tools
new file mode 100755
index 0000000..a15b0da
--- /dev/null
+++ b/vm-help/do_tools
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+if [ $# -eq 0 ] ; then
+ echo NO ARGUMENTS
+ exit 1
+fi
+
+# NEWLIB_HEAD="--macros=snapshots/newlib-head.mc"
+
+for tool in $*
+do
+ # --force when building all
+ time ../source-builder/sb-set-builder \
+ --log=l-${tool}.txt \
+ --prefix=${HOME}/rtems-4.11-work/tools 4.11/rtems-${tool}
+done