<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wikilegacy.armadeus.com/index.php?action=history&amp;feed=atom&amp;title=Xenomai_manual_installation</id>
	<title>Xenomai manual installation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wikilegacy.armadeus.com/index.php?action=history&amp;feed=atom&amp;title=Xenomai_manual_installation"/>
	<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Xenomai_manual_installation&amp;action=history"/>
	<updated>2026-04-28T13:21:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Xenomai_manual_installation&amp;diff=12035&amp;oldid=prev</id>
		<title>WikiSysop: /* Xenomai kernel space support */</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Xenomai_manual_installation&amp;diff=12035&amp;oldid=prev"/>
		<updated>2013-09-04T16:07:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Xenomai kernel space support&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:07, 4 September 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l103&quot;&gt;Line 103:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 103:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  $ cd $ARMADEUS_ROOT&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  $ cd $ARMADEUS_ROOT&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  $ make &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;linux26&lt;/del&gt;-menuconfig&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  $ make &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;linux&lt;/ins&gt;-menuconfig&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You should see the new entry :&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You should see the new entry :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://wikilegacy.armadeus.com/index.php?title=Xenomai_manual_installation&amp;diff=6113&amp;oldid=prev</id>
		<title>JulienB: moved from Xenomai page</title>
		<link rel="alternate" type="text/html" href="http://wikilegacy.armadeus.com/index.php?title=Xenomai_manual_installation&amp;diff=6113&amp;oldid=prev"/>
		<updated>2009-03-11T15:29:03Z</updated>

		<summary type="html">&lt;p&gt;moved from Xenomai page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Note|Xenomai is now (starting from Armadeus 3.1 release) integrated in our Buildroot. Following instructions are only given as references !}}&lt;br /&gt;
&lt;br /&gt;
==Explanation of the process used to install &amp;amp; deploy Xenomai on Buildroot==&lt;br /&gt;
&lt;br /&gt;
The main steps are:&lt;br /&gt;
* Installation of Adeos, an interrupt pipeline&lt;br /&gt;
* Creation of the Xenomai project directories used for this tutorial&lt;br /&gt;
* Downloading of Xenomai, extract &amp;amp; patch the sources&lt;br /&gt;
* Preparation of the Armadeus Linux kernel to support Xenomai&lt;br /&gt;
* Compilation of Xenomai&lt;br /&gt;
* Deployment of the Xenomai user space applications into the target root file system&lt;br /&gt;
* Validation of the installation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Naming conventions :&lt;br /&gt;
In this document, the following naming conventions will be applied :&lt;br /&gt;
* Xeno or xeno will be used to reference Xenomai&lt;br /&gt;
* $ARMADEUS_ROOT will be used to reference the root directory of the Xenomai project&lt;br /&gt;
&lt;br /&gt;
==Install Adeos==&lt;br /&gt;
&lt;br /&gt;
First of all, you need to deploy a working Adeos on your board.&lt;br /&gt;
This can easily be done by following [[Adeos  | these instructions]].&lt;br /&gt;
&lt;br /&gt;
==Create your Xenomai project folder architecture==&lt;br /&gt;
&lt;br /&gt;
Xenomai will create some files to be deployed. By default, the command&lt;br /&gt;
&amp;#039;&amp;#039;make install&amp;#039;&amp;#039; will copy the files into the following directories :&lt;br /&gt;
* &amp;#039;&amp;#039;/usr/xenomai/*&amp;#039;&amp;#039; contain test programs, includes, ...&lt;br /&gt;
* &amp;#039;&amp;#039;/usr/share/xenomai/*&amp;#039;&amp;#039; contain the documentation.&lt;br /&gt;
&lt;br /&gt;
To have a clean but integrated folder architecture, we will create some specific&lt;br /&gt;
directories to install theses files. Later, we will copy them into the board&amp;#039;s&lt;br /&gt;
root filesystem so Xenomai testing programs  will be available on the apf.&lt;br /&gt;
&lt;br /&gt;
Also, because Xenomai documentation installed is quite huge (several Mb), we&lt;br /&gt;
will avoid to copy it on the board.&lt;br /&gt;
&lt;br /&gt;
 $ mkdir $ARMADEUS_ROOT/xenomai&lt;br /&gt;
 $ mkdir $ARMADEUS_ROOT/xenomai/root_dir&lt;br /&gt;
 $ mkdir $ARMADEUS_ROOT/xenomai/root_dir/xenodoc&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;$ARMADEUS_ROOT/xenomai/root_dir/usr&amp;#039;&amp;#039; will contain all Xenomai target specific&lt;br /&gt;
files. This directory will be transfered to the board.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;$ARMADEUS_ROOT/xenomai/root_dir/xenodoc&amp;#039;&amp;#039; will contain Xenomai documentation&lt;br /&gt;
that won&amp;#039;t be transfered to the board.&lt;br /&gt;
&lt;br /&gt;
==Download &amp;amp; patch==&lt;br /&gt;
&lt;br /&gt;
Well, let&amp;#039;s start by downloading Xenomai sources.&lt;br /&gt;
&lt;br /&gt;
 $ cd $ARMADEUS_ROOT/xenomai&lt;br /&gt;
 $ wget http://download.gna.org/xenomai/stable/xenomai-2.4.3.tar.bz2&lt;br /&gt;
 $ tar xvjf xenomai-2.4.3.tar.bz2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To compile Xenomai-2.4.3 with the current uClibc used within the Armadeus project&lt;br /&gt;
(uClibc-0.9.29), we will have to patch :&lt;br /&gt;
* Xenomai sources (See [[https://mail.gna.org/public/xenomai-help/2008-03/msg00043.html | here]])&lt;br /&gt;
* uClibc sources (See [[http://sourceforge.net/mailarchive/forum.php?thread_name=4803E169.30708%40free.fr&amp;amp;forum_name=armadeus-forum | this thread]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To patch Xenomai sources :&lt;br /&gt;
&lt;br /&gt;
 $ cd $ARMADEUS_ROOT/xenomai/xenomai-2.4.3&lt;br /&gt;
 $ wget https://mail.gna.org/public/xenomai-help/2008-03/bin5IoYobpAwu.bin&lt;br /&gt;
 $ patch -p0 &amp;lt; bin5IoYobpAwu.bin&lt;br /&gt;
   patching file src/skins/posix/thread.c&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To patch uClibc :&amp;lt;br /&amp;gt;&lt;br /&gt;
This patch has been inserted into the Armadeus project, starting from revision&lt;br /&gt;
799. Update your svn tree to make sure it will be applied.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compilation==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Xenomai kernel space support===&lt;br /&gt;
&lt;br /&gt;
Xenomai is a co-kernel cooperating with Linux. This suite is made of two parts :&lt;br /&gt;
* The Xenomai kernel: It is provided as a patch to the regular Linux kernel and can be compiled as a full part of the kernel or as a regular module.&lt;br /&gt;
* Xenomai user space data: This set of file contains:&lt;br /&gt;
** header files used to compile Xenomai applications&lt;br /&gt;
** Binary files to validate and measure the performace of Xenomai&lt;br /&gt;
&lt;br /&gt;
This section describe how to compile the kernel space for Xenomai.&lt;br /&gt;
&lt;br /&gt;
Here we will patch the Armadeus Linux kernel to add Xenomai features.&lt;br /&gt;
This is automatically done via the Xenomai script &amp;#039;&amp;#039;prepare-kernel.sh&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 $ cd $ARMADEUS_ROOT/xenomai/xenomai-2.4.3&lt;br /&gt;
 $ ./scripts/prepare-kernel.sh --linux=$ARMADEUS_ROOT/buildroot/build_arm/linux-2.6.24.3/ --arch=arm&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;--linux&amp;#039;&amp;#039; is used to specify which kernel we want to patch&lt;br /&gt;
* &amp;#039;&amp;#039;--arch&amp;#039;&amp;#039; is used to specify for which platform we want to patch (arm in our case)&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s configure the Xenomai kernel :&lt;br /&gt;
&lt;br /&gt;
 $ cd $ARMADEUS_ROOT&lt;br /&gt;
 $ make linux26-menuconfig&lt;br /&gt;
&lt;br /&gt;
You should see the new entry :&lt;br /&gt;
 Real-time sub-system  ---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter in it and check the following to compile Xenomai as a part of the Linux kernel :&lt;br /&gt;
 [*] Xenomai&lt;br /&gt;
   &amp;lt;*&amp;gt; Nucleus &lt;br /&gt;
   [*]   Pervasive real-time support in user-space&lt;br /&gt;
   [ ]     Interrupt shield support&lt;br /&gt;
   [*]     Priority coupling support&lt;br /&gt;
   [*]   Optimize as pipeline head&lt;br /&gt;
   (32)  Number of pipe devices&lt;br /&gt;
   (512) Number of registry slots&lt;br /&gt;
   (128) Size of the system heap (Kb)&lt;br /&gt;
   (32)  Size of the private stack pool (Kb)&lt;br /&gt;
   [*]   Statistics collection&lt;br /&gt;
   [ ]   Debug support&lt;br /&gt;
   [ ]   Shared interrupts&lt;br /&gt;
      Timing  ---&amp;gt;&lt;br /&gt;
      Scalability  ---&amp;gt;&lt;br /&gt;
      Machine  ---&amp;gt;&lt;br /&gt;
      Interfaces  ---&amp;gt;&lt;br /&gt;
      Drivers  ---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionaly, to enable / disable the different available skins, go into &amp;quot;&amp;#039;&amp;#039;Interfaces  ---&amp;gt;&amp;#039;&amp;#039;&amp;quot; :&lt;br /&gt;
 &amp;lt;*&amp;gt; Native API  ---&amp;gt;&lt;br /&gt;
 &amp;lt;*&amp;gt; POSIX API  ---&amp;gt;&lt;br /&gt;
 &amp;lt; &amp;gt; pSOS+ emulator  ---&amp;gt;&lt;br /&gt;
 &amp;lt; &amp;gt; uITRON API  ---&amp;gt;&lt;br /&gt;
 &amp;lt; &amp;gt; VRTX emulator  ---&amp;gt;&lt;br /&gt;
 &amp;lt; &amp;gt; VxWorks emulator  ---&amp;gt;&lt;br /&gt;
 &amp;lt; &amp;gt; RTAI emulator  ---&amp;gt;&lt;br /&gt;
 &amp;lt;*&amp;gt; Real-Time Driver Model  ---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, compile Xenomai:&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
===Xenomai User Space support===&lt;br /&gt;
&lt;br /&gt;
Because we need to cross compile Xenomai applications for ARM, we will use the&lt;br /&gt;
cross compilations tools provided by Armadeus/Buildroot.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s update our PATH accordingly :&lt;br /&gt;
 $ export PATH=$ARMADEUS_ROOT/buildroot/build_armv4t/staging_dir/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
We are now ready to start the user space compilation.&lt;br /&gt;
&lt;br /&gt;
First, let&amp;#039;s configure Xeno and create the makefiles :&lt;br /&gt;
 $ cd $ARMADEUS_ROOT/xenomai/xenomai-2.4.3&lt;br /&gt;
 $ ./configure --enable-arm-mach=imx --host=arm-linux --datarootdir=/xenodoc&lt;br /&gt;
  &lt;br /&gt;
* &amp;#039;&amp;#039;--enable-arm-mach&amp;#039;&amp;#039; : We want to build Xeno for the i.MX (ARM) architecture&lt;br /&gt;
* &amp;#039;&amp;#039;--host&amp;#039;&amp;#039; :  Prefix used for all compilation tools&lt;br /&gt;
* &amp;#039;&amp;#039;--datarootdir&amp;#039;&amp;#039; :&lt;br /&gt;
&lt;br /&gt;
Finally, compile user space utilities.&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
==Deploy==&lt;br /&gt;
&lt;br /&gt;
First, install Xenomai data in $ARMADEUS_ROOT/xenomai/root-dirs/target&lt;br /&gt;
 $ cd $ARMADEUS_ROOT/xenomai/xenomai-2.4.3&lt;br /&gt;
 $ make DESTDIR=$ARMADEUS_ROOT/xenomai/root-dir install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This command will install all Xenomai data in $ARMADEUS_ROOT/xenomai/root-dir.&lt;br /&gt;
Have a look in this directory. Note that it contains two sub directories,&lt;br /&gt;
&amp;#039;&amp;#039;xenodoc&amp;#039;&amp;#039; and &amp;#039;&amp;#039;usr&amp;#039;&amp;#039;. &amp;#039;&amp;#039;xenodoc&amp;#039;&amp;#039; contains all documentation regarding&lt;br /&gt;
Xenomai. As said previously, we will not copy xenodoc on the board.&lt;br /&gt;
Instead, we will only transfert the required files to run Xeno applications&lt;br /&gt;
on the APF. These files are located under &amp;#039;&amp;#039;usr/xenomai&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before modifying the board&amp;#039;s root filesystem, we will first make a backup of it.&lt;br /&gt;
 $ cp -R $ARMADEUS_ROOT/buildroot/project_build_armv4t/apf9328/root $ARMADEUS_ROOT/buildroot/project_build_armv4t/apf9328/root.orig&lt;br /&gt;
&lt;br /&gt;
We can now copy Xeno data to the board&amp;#039;s root filesystem:&lt;br /&gt;
 $ cp -R $ARMADEUS_ROOT/xenomai/root-dir/usr/* $ARMADEUS_ROOT/buildroot/project_build_armv4t/apf9328/root/usr/&lt;br /&gt;
&lt;br /&gt;
And generate the target filesystem&lt;br /&gt;
 $ cd $ARMADEUS_ROOT&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
You can now [[Target_Software_Installation | transfer]] the rootfs and the kernel&lt;br /&gt;
on the APF.&lt;br /&gt;
&lt;br /&gt;
==Validate the installation==&lt;br /&gt;
&lt;br /&gt;
Boot the APF and logon as root.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can double check Xeno is installed correctly :&lt;br /&gt;
 $ dmesg | grep Xenomai&lt;br /&gt;
  I-pipe: Domain Xenomai registered.&lt;br /&gt;
  Xenomai: hal/arm started.&lt;br /&gt;
  Xenomai: real-time nucleus v2.4.3 (Back to Shalla-Bal) loaded.&lt;br /&gt;
  Xenomai: starting native API services.&lt;br /&gt;
  Xenomai: starting POSIX services.&lt;br /&gt;
  Xenomai: starting RTDM services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will now update our environment to add Xenomai features. On the APF, run the following commands:&lt;br /&gt;
 $ export LD_LIBRARY_PATH=/usr/xenomai/lib:$LD_LIBRARY_PATH&lt;br /&gt;
 $ export PATH=/usr/xenomai/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
To make the changes permanent, add &amp;#039;&amp;#039;/usr/xenomai/lib&amp;#039;&amp;#039; to &amp;#039;&amp;#039;$ARMADEUS_ROOT/buildroot/project_build_armv4t/apf9328/root/etc/ld.so.conf&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now we can run the performance test provided by Xenomai:&lt;br /&gt;
 $ xeno-test&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://www.xenomai.org Xenomai website]&lt;br /&gt;
* [[Adeos | Adeos installation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Real-Time]]&lt;/div&gt;</summary>
		<author><name>JulienB</name></author>
	</entry>
</feed>