Manual installation on a native platform

From TASTE
Jump to: navigation, search

Contents

Introduction

A VirtualBox image with TASTE already pre-configured is available at this address: http://download.tuxfamily.org/taste

This installation is based on a Debian Linux distribution.

However you might want to manually install TASTE on your own machine.

Apart from Debian distributions, successful installation has been tested on Ubuntu and FreeBSD. This chapter aims at providing help for manually installing TASTE on such OSes.


Step by step instructions

#########################
# AS the root user
#########################
adduser assert
cd /opt/
ln -s /home/assert/tool-inst ocarina-2.0w-suite-x86-linux-2016.svn
ln -s /opt/DMT-Tools DMT
apt-get update
apt-get install subversion libgtk2-gladexml-perl xpdf libgnome2-perl xterm libxml-parser-perl libxml-libxml-perl libgtk2-perl libfile-copy-recursive-perl nedit zip sudo libxml-libxml-simple-perl libbonoboui2-0 libgnome2-0 libgnomeui-0  libgnomevfs2-0  libgnome2-vfs-perl libgnomevfs2-common python-pexpect libxenomai-dev xenomai-runtime python-gtk2-dev gtkwave libdbd-sqlite3-perl libdbi-perl libsqlite3-dev sqlite3 xmldiff libxml2-dev qemu-system wmctrl python-ply tree python-llvm kate tk8.5 libtool python3-pip libxslt-dev libxml2-dev libarchive-dev libacl1-dev libattr1-dev libacl1 libattr1 python-lxml python-jinja2 libglib2.0-0 libmono-system-runtime4.0-cil libmono-corlib4.0-cil libmono-system-runtime-serialization-formatters-soap4.0-cil  libmono-system-web4.0-cil  libmono-system-xml4.0-cil libmono-system4.0-cil mono-runtime libmono-system-numerics4.0-cil libmono-system-data-linq4.0-cil libmono-corlib2.0-cil libmono-system2.0-cil python-pygraphviz postgresql-9.4 postgresql-client-9.4 postgresql-client-common postgresql-common pgadmin3 python-psycopg2 lcov libzmq3-dev python-coverage curl autoconf automake gnat ccache binfmt-support vim strace dos2unix python-antlr python-pip python3-pip git python-pyside python-pip python-matplotlib gcc procps bash-completion
. /etc/bash_completion
echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
visudo
(
  # add assert to passwordless sudoers:
  root	ALL=(ALL:ALL) ALL
+ assert  ALL=(root) NOPASSWD: ALL
)
vi /etc/sysctl.conf 
(
	add at the bottom:
	fs.mqueue.msg_max = 100
)
sysctl fs.mqueue.msg_max=100
# If you target RTEMS, copy the /opt/rtems-4.11 folder from the ASSERT VM under /opt
su - assert
#########################
# NOW AS the assert user
#########################
(copy from TASTE VM) /home/assert/assert_env.sh  into /home/assert/
( 
	add this sourcing at the end of your /home/assert/.bashrc : 
	. ~/assert_env.sh 
)
. ~/assert_env.sh 
svn co https://tecsw.estec.esa.int/svn/taste/branches/stable tool-src/
(answer: 'p' for permanently)
cd tool-src/
sudo mkdir -p /opt/Ellidiss-TASTE-linux/config/
sudo chmod 777 /opt/Ellidiss-TASTE-linux/config/
sudo chmod 777 /opt/Ellidiss-TASTE-linux/
pip install --user enum34 
pip install --user http://antlr3.org/download/Python/antlr_python_runtime-3.1.3.tar.gz
pip install --user singledispatch
mkdir -p ~/tool-inst/bin
cd ~/tool-src
(if anything breaks, cat /tmp/buildlog  and send it to me)
make

# Ellidiss tools - contributed by Javier Hidalgo
sudo rm -rf /opt/Ellidiss-TASTE-linux/* 
sudo cp -a /home/assert/tool-src/ellidiss/TASTE-linux/* /opt/Ellidiss-TASTE-linux/
for i in IVConfig.ini TASTE_IV_Properties.aadl TASTE_DV_Properties.aadl ; do
    sudo cp -a /home/assert/tool-src/misc/ellidiss/$i /opt/Ellidiss-TASTE-linux/config/
done
cat /opt/Ellidiss-TASTE-linux/config/IVConfig.ini | sed 's,./bin/asn2aadl.exe,/opt/DMT/asn2aadlPlus/asn2aadlPlus.py,' > /tmp/patched.$$ && sudo mv /tmp/patched.$$ /opt/Ellidiss-TASTE-linux/config/IVConfig.ini

# Fix path to Ellidiss tools, if missing
if ! grep Ellidi /home/assert/assert_env.sh > /dev/null ; then
    { cat /home/assert/assert_env.sh ; echo 'export PATH=$PATH:/opt/Ellidiss-TASTE-linux/' ; } > /tmp/env.$$ && mv /tmp/env.$$ /home/assert/assert_env.sh
fi


Process (OLD, DEPRECATED)

To install TASTE you need to follow these steps:

1) checkout the TASTE source from the subversion repository

2) install all dependencies using your OS package manager

3) build and install TASTE

4) try to build systems from the sample directories

5) (optionally) install additional tools (RTEMS)

Checkout the TASTE repo

To checkout the STABLE branch:

   svn co https://tecsw.estec.esa.int/svn/taste/branches/stable tool-src

Install dependencies

This part is OS-dependent, the name of the packages might change from one to the other. Ubuntu and Debian usually have the same package names, but other Linux distributions may differ.

On Ubuntu or Debian, do the following:


$ echo 100 | sudo tee /proc/sys/fs/mqueue/msg_max           # Increase the max number of messages per queue
$ echo 500000 | sudo tee /proc/sys/fs/mqueue/msgsize_max    # Increase the max message size

...to make your machine able to handle "deeper" message queues, and to make it permanent:

  # add this to /etc/sysctl.conf
  fs.mqueue.msg_max=100
  fs.mqueue.msgsize_max=500000

(This command is required to increase the size of system message queues, which is limited to 10 messages by default)

Then install these packages:

$ sudo apt-get install git python-pyside autotools-dev gnat ccache python-setuptools python-dev libfreetype6-dev sqlite3 \
               libpng12-dev python-antlr python-ply m4 automake autoconf swig python-pyparsing libxml-libxml-perl zip \
               libarchive-dev libacl1-dev libattr1-dev libacl1 libattr1 python-lxml python-jinja2 libglib2.0-0 \
               libgtk2-gladexml-perl xpdf libgnome2-perl xterm libxml-parser-perl libxml-libxml-perl libgtk2-perl \
               libfile-copy-recursive-perl sudo libxml-libxml-simple-perl libbonoboui2-0 libgnome2-0 libgnomeui-0 \
               libgnomevfs2-0  libgnome2-vfs-perl libgnomevfs2-common python-pexpect libxenomai-dev xenomai-runtime \
               python-gtk2-dev gtkwave libdbd-sqlite3-perl libdbi-perl libsqlite3-dev sqlite3 xmldiff libxml2-dev \
               qemu-system wmctrl python-pygraphviz postgresql pgadmin3 python-psycopg2 libmono-system-runtime4.0-cil \
               libmono-corlib4.0-cil libmono-system-runtime-serialization-formatters-soap4.0-cil  libmono-system-web4.0-cil \
               libmono-system-xml4.0-cil libmono-system4.0-cil mono-runtime libmono-system-numerics4.0-cil subversion \
               libmono-system-data-linq4.0-cil libmono-corlib2.0-cil libmono-system2.0-cil python-pip python-matplotlib kate \
               build-essential gnat


Note: on older versions of Ubuntu (e.g. 12.04) the version of python-matplotlib is too old. You need to install the latest version with:

$ sudo easy_install matplotlib

Note: For 64-bit systems it is necessary to install some 32 bit libraries (e.g. for Ubuntu 14.04 LTS):

$ sudo apt-get install libc6-i386 libxft2:i386 libxss1:i386 libcairo2:i386 libc6-dev:i386

Then install with the Python packaging system the following two components:

$ sudo pip install --upgrade sqlalchemy graphviz enum34 singledispatch
$ sudo pip install antlr_python_runtime --allow-external antlr_python_runtime --allow-unverified antlr_python_runtime


For the database-related features, you can initialize PostgreSQL by doing the following:

Edit `/etc/postgresql/9.1/main/pg_hba.conf`

And replace the line

local all all peer

with

local all all trust

Then, connect to the database as superuser:

$ sudo su - postgres

And type the following commands to create a taste user and grant privileges required to work with tables:

$ psql
$ create user taste with password 'tastedb';
$ alter user taste with superuser;
 <Ctrl-D> 

Next, go to your /opt directory and type the following (if you need RTEMS for Leon targets):

$ cd /opt
$ sudo wget http://download.tuxfamily.org/taste/tools/rtems4.11.tgz
$ sudo tar zxvf rtems-4.11.tar.bz2
$ cd /opt/rtems-4.11/sparc-rtems4.11/leon2/lib && ar d librtemsbsp.a gnatsupp.rel

Then add to your ~/.bash_profile (or ~/.bashrc) file the following lines:

$ export RTEMS_MAKEFILE_PATH_LEON=/opt/rtems-4.8/sparc-rtems4.8/leon2/
$ export PATH=$PATH:~/tool-src/ellidiss/TASTE-linux:/opt/rtems-4.8/bin

Next, in order to be able to build and install TASTE, you have to select a destination directory:

$ mkdir tool-inst
$ export PREFIX=/path/to/tool-inst
$ export PATH=/path/to/tool-inst/bin:"$PATH"

Last, set up the following environment variables:

$ export PATH=$PREFIX/share/OG:$PREFIX/share/aadl2glueC:$PREFIX/share/asn2aadlPlus:$PREFIX/share/asn1scc:$PREFIX/share/asn2dataModel:"$PATH"
$ export ASN1SCC=$PREFIX/share/asn1scc/asn1.exe

Build the source

$ cd /path/to/tool-src
$ make


If anything goes wrong, look at the log file:

$ cat /tmp/buildlog


It will indicate which component failed and will mostly give you the clue to fix the issue (package missing, PATH to be updated). If you need assistance, please send us this logfile so that we can trace what the problem is.

Try to build a TASTE system

$ cd /path/to/tool-src/testSuites/Regression_AADLv2/Demo_C
$ ./build_script.sh

Notes

TASTE targets embedded applications, running on monocore architectures. The runtime scheduler guarantees proper real-time execution only on those targets.

You can force the binary to use only one core. On Linux, use this syntax:

$ taskset -c 0 /path/to/my/binary
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox