Difference between revisions of "Xenomai"

From ArmadeusWiki
Jump to: navigation, search
m (Explanation of the process used to install Xenomai)
m
Line 22: Line 22:
 
* validation of the Xenomai behaviour.
 
* validation of the Xenomai behaviour.
  
==Adding Xenomai==
+
===Selecting Xenomai package===
  
 
First of all, you need to select Xenomai package on buildroot menu:
 
First of all, you need to select Xenomai package on buildroot menu:
Line 28: Line 28:
 
  $ make menuconfig
 
  $ make menuconfig
 
</pre>
 
</pre>
In <b>''Package Selection for the target ---> ''</b> menu, you must enable <b>xenomai</b>
+
<pre class="config">
 +
Package Selection for the target --->
 +
    <*> Xenomai
 +
</pre>
  
==Xenomai kernel space support==
+
===Xenomai kernel space support===
  
 
In a first time for having kernel patched with Xenomai and Adeos patch, you must type :<br>
 
In a first time for having kernel patched with Xenomai and Adeos patch, you must type :<br>
Line 36: Line 39:
 
  $ make
 
  $ make
 
</pre>
 
</pre>
It's not necessary to wait for the complete compilation. After patch phase you could stopping the compilation with Ctrl-C command.<br>
+
It's not necessary to wait for the complete compilation. After patch phase you can stop the compilation with Ctrl-C command.<br>
 
   
 
   
 
Let's configure the Xenomai kernel :
 
Let's configure the Xenomai kernel :
Line 113: Line 116:
  
 
==Deinstalling or disabling Xenomai==
 
==Deinstalling or disabling Xenomai==
There are two part needed for disabling Xenomai features
+
There are two parts needed for disabling Xenomai features
 +
 
 
===Kernel===
 
===Kernel===
 
For disabling kernel part, two solutions are available
 
For disabling kernel part, two solutions are available

Revision as of 08:57, 12 March 2009

Page under construction... Construction.png Informations on this page are not guaranteed !!

What is Xenomai ?

Xenomai is a real time co-kernel which cooperate with Linux via Adeos. With its help hard real time applications can be developped and run on the Armadeus boards.

Thanks to Adeos, Xenomai will receive the interrupts first and decide to handle them or not. If not, they will then be transfered to the regular Linux kernel. Also, Xenomai provides a framework to develop applications which can be easily moved between the Real Time Xenomai environment and the regular Linux system. Moreover, Xeno provides a set of APIs (called "skins") that emulate traditional RTOSes such as VxWorks and pSOS and implement other APIs such as POSIX. Thus, porting third party real time applications to Xenomai is a fairly simple process.

Explanation of the process used to install Xenomai

The main steps are:

  • selection of Xenomai package on the Buildroot menuconfig,
  • selection of Xenomai features in Kernel menuconfig,
  • compilation of the new version,
  • validation of the Xenomai behaviour.

Selecting Xenomai package

First of all, you need to select Xenomai package on buildroot menu:

 $ make menuconfig
Package Selection for the target --->
    <*> Xenomai

Xenomai kernel space support

In a first time for having kernel patched with Xenomai and Adeos patch, you must type :

 $ make

It's not necessary to wait for the complete compilation. After patch phase you can stop the compilation with Ctrl-C command.

Let's configure the Xenomai kernel :

 $ make linux26-menuconfig

You should see the new entry :

 Real-time sub-system  --->

Enter in it and check the following to compile Xenomai as a part of the Linux kernel :

 [*] Xenomai
   <*> Nucleus 
   [*]   Pervasive real-time support in user-space
   [ ]     Interrupt shield support
   [*]     Priority coupling support
   [*]   Optimize as pipeline head
   (32)  Number of pipe devices
   (512) Number of registry slots
   (128) Size of the system heap (Kb)
   (32)  Size of the private stack pool (Kb)
   [*]   Statistics collection
   [ ]   Debug support
   [ ]   Shared interrupts
      Timing  --->
      Scalability  --->
      Machine  --->
      Interfaces  --->
      Drivers  --->

Additionaly, to enable / disable the different available skins, go into Interfaces ---> :

 <*> Native API  --->
 <*> POSIX API  --->
 < > pSOS+ emulator  --->
 < > uITRON API  --->
 < > VRTX emulator  --->
 < > VxWorks emulator  --->
 < > RTAI emulator  --->
 <*> Real-Time Driver Model  --->

Finally, compile everything:

 $ make

Deploy

You can now transfer the rootfs and the kernel on the APF.

Validate the installation

Boot the APF and logon as root.

You can double check Xeno is installed correctly :

 $ dmesg | grep Xenomai
  I-pipe: Domain Xenomai registered.
  Xenomai: hal/arm started.
  Xenomai: real-time nucleus v2.4.3 (Back to Shalla-Bal) loaded.
  Xenomai: starting native API services.
  Xenomai: starting POSIX services.
  Xenomai: starting RTDM services.

Now we can run the performance test provided by Xenomai:

 $ xeno-test

Deinstalling or disabling Xenomai

There are two parts needed for disabling Xenomai features

Kernel

For disabling kernel part, two solutions are available

The first solution is to unselect kernel's features :

 $ make linux26-menuconfig

In Real-time sub-system ---> menu, you must disable Xenomai
and in Kernel Features ---> menu, disable Interrupt pipeline

The second solution is to destroy the kernel tree :

 $ make linux26-dirclean

Software

For disabling software part :

 $ make menuconfig

In Package Selection for the target ---> menu, you must disable Xenomai and use the clean command

 $ make xenomai-dirclean

Links