Xenomai

From wiki.network-crawler.de

Contents

Abstract

Xenomai is the successor of RTAI/fusion

Installation

First download RTAI-hal (Adeos virtualization layer) Adeos patch.

I did:

cd /usr/src
wget http://download.gna.org/adeos/patches/v2.6/i386/adeos-ipipe-2.6.15-i386-1.3-04.patch
cd /usr/src/linux-2.6.15
make mrproper
patch -p1 < ../adeos-ipipe-2.6.15-i386-1.3-04.patch

But you can also give the path to prepare-kernel.sh

Download Xenomai at: Xenomai download section

  • Unpack it:
tar xfvj xenomai-2.1.0.tar.bz2 
  • Install it:
cd xenomai-2.1.0
scripts/prepare-kernel.sh --linux=/usr/src/linux-2.6.15 --arch=i386

Configure the kernel:

cd /usr/src/linux-2.6.15
make menuconfig

If you have problems with: can't open file "drivers/xenomai/16550A/Kconfig" - Bug workaround:

cd drivers/xenomai
ln -s 16550a/ 16550A

If you want to use Xenomai with SLIND:

cd /usr
mkdir /root/SLIND/installer_image/usr/xenomai/
ln -s /root/SLIND/installer_image/usr/xenomai/ xenomai
cd /usr/src/xenomai-2.1.0
make clean
configure --prefix=/usr/xenomai/ --host=i486-linux-uclibc CC=i486-linux-uclibc-gcc

Ok done now build your new kernel

make && make install

Then build Xenomai:

cd /usr/src/xenomai-2.1.0
./configure
make
make install

Latency test results:

kontron_xenomai:~# /usr/xenomai/testsuite/latency/latency
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period)
RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
RTD|      13.227|      13.949|      14.481|       0|      13.227|      14.481
RTD|      12.216|      13.972|      22.558|       0|      12.216|      22.558
RTD|      10.371|      13.945|      20.144|       0|      10.371|      22.558
RTD|       8.938|      13.932|      22.248|       0|       8.938|      22.558
RTD|      12.918|      14.188|      27.898|       0|       8.938|      27.898
RTD|      12.439|      13.949|      22.102|       0|       8.938|      27.898
RTD|      12.911|      13.965|      15.199|       0|       8.938|      27.898
RTD|      12.426|      13.949|      22.182|       0|       8.938|      27.898
RTD|      12.449|      13.949|      21.996|       0|       8.938|      27.898
RTD|      12.778|      13.949|      21.982|       0|       8.938|      27.898
RTD|       9.007|      13.925|      21.856|       0|       8.938|      27.898
RTD|      12.456|      14.045|      27.432|       0|       8.938|      27.898
RTD|      12.552|      14.075|      27.283|       0|       8.938|      27.898
RTD|      12.625|      13.949|      21.936|       0|       8.938|      27.898
RTD|      12.516|      13.949|      17.959|       0|       8.938|      27.898
RTD|      12.981|      13.969|      21.999|       0|       8.938|      27.898
RTD|      12.898|      13.949|      21.942|       0|       8.938|      27.898
RTD|      10.451|      13.949|      22.222|       0|       8.938|      27.898
RTD|       9.091|      13.929|      21.936|       0|       8.938|      27.898
RTD|      12.057|      14.168|      27.396|       0|       8.938|      27.898
RTD|      12.705|      13.949|      19.412|       0|       8.938|      27.898
---|------------|------------|------------|--------|-------------------------

I also tried the test with glibc and Xenomai 2.2.4 - see:

$ /usr/xenomai/testsuite/latency/latency
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat worst
RTD|       9.307|      10.440|      10.899|       0|       9.307|      10.899
RTD|       9.413|      10.470|      18.986|       0|       9.307|      18.986
RTD|       9.326|      10.420|      12.788|       0|       9.307|      18.986
RTD|       9.303|      10.420|      12.319|       0|       9.303|      18.986
RTD|       9.303|      10.420|      12.519|       0|       9.303|      18.986
RTD|       9.326|      10.420|      12.914|       0|       9.303|      18.986
RTD|       9.310|      10.420|      12.253|       0|       9.303|      18.986
RTD|       9.303|      10.420|      12.502|       0|       9.303|      18.986
RTD|       9.317|      10.420|      12.598|       0|       9.303|      18.986
RTD|       9.317|      10.420|      11.957|       0|       9.303|      18.986
RTD|       9.303|      10.420|      12.535|       0|       9.303|      18.986
RTD|       9.366|      10.420|      12.545|       0|       9.303|      18.986
RTD|       9.303|      10.414|      12.652|       0|       9.303|      18.986
RTD|       9.353|      10.410|      12.296|       0|       9.303|      18.986
RTD|       9.370|      10.410|      12.342|       0|       9.303|      18.986
RTD|       9.370|      10.410|      12.765|       0|       9.303|      18.986
RTD|       9.370|      10.410|      12.100|       0|       9.303|      18.986
RTD|       9.370|      10.410|      12.406|       0|       9.303|      18.986
RTD|       9.370|      10.410|      12.785|       0|       9.303|      18.986
RTD|       9.366|      10.410|      11.997|       0|       9.303|      18.986
RTD|       9.370|      10.410|      12.339|       0|       9.303|      18.986
RTT|  00:00:22  (periodic user-mode task, 100 us period, priority 99)


kontron_xenomai:~# cat /proc/cpuinfo
processor       : 0
vendor_id       : CentaurHauls
cpu family      : 6
model           : 7
model name      : VIA Samuel 2
stepping        : 3
cpu MHz         : 300.734
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu de tsc msr cx8 mtrr pge mmx 3dnow
bogomips        : 603.12

Notes

Compiling Xenomai 2.0 - in my case (with 2.6.14):

sh configure --with-cc=i486-linux-uclibc-gcc \
--host=i486-linux-uclibc \ 
--with-linux-dir=/lib/modules/2.6.14-ipipe/build \
--prefix=/usr/xenomai --disable-posix-skin --enable-rtdm-skin