Sample menu:


11 Juni 2014:
hart_0.4.6 released!

sourceforge project site »

CSS ist valide!

Valid XHTML 1.0 Strict Logo

RTAI navigation

Installation RTAI


UBUNTU 12.04 - 32 bit

Install the following packages to proceed:

Installation of all components

Installation 3.8.13 RTAI kernel

Taken from and
sudo su
cd /usr/src/
cvs co vulcano
sudo ln -s vulcano rtai
git clone git://
cd linux-stable
git branch linux-3.8-rtai origin/linux-3.8.y
git checkout linux-3.8-rtai
git apply ../vulcano/base/arch/x86/patches/hal-linux-3.8.13-x86-4.patch
git commit -a -m 'applied the rtai patch hal-linux-3.8.13-x86-4.patch'
Download the newest debian package linux-image-3.8.0-42-generic_3.8.0-42.62~precise1_i386.deb from and save it to /usr/src
sudo su
cd /usr/src
dpkg-deb -x linux-image-3.8.0-35-generic_3.8.0-42.62~precise1_i386.deb linux-image
cp linux-image/boot/config-* linux-stable/.config
cd linux-stable
make menuconfig
Important: It is needed to deselect "Module versioning support" under "Enable loadable module support".
In the next step, a linux-image and a linux-headers debian packages containing the rtai kernel will be generated:
make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-rtai
Now install linux-image package and the linux-header package with dpkg
cd /usr/src
sudo dpkg -i linux-image-3.8.13-rtai_3.8.13-rtai-{x}_i386.deb
sudo dpkg -i linux-headers-3.8.13-rtai_3.8.13-rtai-{x}_i386.deb
The number {x} depends on how many linux-image-3.8.13-rtai and linux-headers-3.8.13-rtai deb packages are in /usr/src.
Reboot in the new installed RTAI-kernel.
By using this command it is possible to check, if the right kernel was loaded after a reboot:
uname -r
The output of uname -r should now contain rtai.

RTAI ( first step

cd /usr/src/rtai
sudo make menuconfig
Ensure directories are correct:
sudo make
sudo make install
sed -i 's/\(PATH=\"\)/\1\/usr\/realtime\/bin:/' /etc/environment
now run export PATH=/usr/realtime/bin:$PATH for each open shell or do logout and login.

Starting RTAI

now run export PATH=/usr/realtime/bin:$PATH for each open shell or do logout and login Now we need to load the rtai modules.
/sbin/insmod /usr/realtime/modules/rtai_smi.ko
/sbin/insmod /usr/realtime/modules/rtai_hal.ko
/sbin/insmod /usr/realtime/modules/rtai_lxrt.ko
/sbin/insmod /usr/realtime/modules/rtai_fifos.ko
/sbin/insmod /usr/realtime/modules/rtai_sem.ko
/sbin/insmod /usr/realtime/modules/rtai_mbx.ko
/sbin/insmod /usr/realtime/modules/rtai_msg.ko
/sbin/insmod /usr/realtime/modules/rtai_netrpc.ko
/sbin/insmod /usr/realtime/modules/rtai_shm.ko
Copy the lines to /usr/local/bin/start_rtai
Do a sudo chmod a+x /usr/local/bin/start_rtai

SCILAB 5.4.1

cd /opt
sudo wget
sudo tar xvzf scilab-5.4.1.bin.linux-i686.tar.gz
sudo ln -s /opt/scilab-5.4.1/bin/scilab /usr/local/bin/scilab54


(svn -version)

cd /usr/local/src
sudo svn checkout qrtailab
cd qrtailab
Edit qrtailab.config and replace '/usr/include/qwt/' with '/usr/include/qwt-qt4/' and '-lqwt' with '-lqwt-qt4'
sudo qmake-qt4
sudo make
sudo make install

HART Toolbox (

Chose a directory (/home/username/software, ...)

(svn -version)

svn checkout hart-code
Go in your hart-directory.
Edit Makefile and set 'SCILAB = ...' to the binary file of scilab 5.4.1
Warning: sudo make will not install RTAI module! Either be a normal user and install HART or change to root (using sudo su) and then do make.
cd /...../scilab-xxx/contrib
sudo ln -s {link to hart-toolbox} .

It is important to add -o to your rtai executable in order get a good realtime! The default setting uses the periodic mode. The hard timer will run in oneshot mode when using the "-o" options, which works better for same systems and slow sampling rates (<10kHz).

Gratulation you are finished!