Difference between revisions of "Xenomai"
(→Explanation of the process used to install Xenomai) |
(→Explanation of the process used to install Xenomai) |
||
Line 9: | Line 9: | ||
==Explanation of the process used to install Xenomai== | ==Explanation of the process used to install Xenomai== | ||
− | {{Note|Xenomai has only be tested on [[APF9328]] and [[APF27]].}} | + | {{Note|Xenomai has only be really tested on [[APF9328]] and [[APF27]] with 2.6.29 kernel.}} |
The main steps are: | The main steps are: | ||
Line 17: | Line 17: | ||
* validation of the Xenomai behaviour. | * validation of the Xenomai behaviour. | ||
− | {{Note|These steps must be done with a fresh view or, at least, after having suppressed buildroot/output/built/linux-x.y.z directory.}} | + | {{Note|These steps must be done with a fresh compiled view or, at least, after having suppressed buildroot/output/built/linux-x.y.z directory.}} |
===Selecting Xenomai package=== | ===Selecting Xenomai package=== | ||
Line 29: | Line 29: | ||
Real-Time ---> | Real-Time ---> | ||
[*] Xenomai Userspace | [*] Xenomai Userspace | ||
+ | |||
Kernel ---> | Kernel ---> | ||
Linux Kernel Extensions | Linux Kernel Extensions | ||
Line 55: | Line 56: | ||
===Kernel greater than 2.6.29=== | ===Kernel greater than 2.6.29=== | ||
− | For kernels greater than 2.6.29, it's needed to suppress all patches in buildroot/packages/xenomai and modify URL and patch name: | + | For kernels greater than 2.6.29, it's needed to suppress all patches in ''buildroot/packages/xenomai/'' and then modify URL and Adeos patch name: |
+ | ====2.6.38==== | ||
<pre class="config"> | <pre class="config"> | ||
Kernel ---> | Kernel ---> | ||
− | Linux Kernel Extensions | + | Linux Kernel Extensions ---> |
[*] Adeos/Xenomai Real-time patch | [*] Adeos/Xenomai Real-time patch | ||
+ | (http://download.gna.org/adeos/patches/v2.6/$(BR2_ARCH)) Adeos patch URL | ||
+ | (adeos-ipipe-2.6.38.8-arm-1.18-09.patch) Path for Adeos patch file | ||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Xenomai kernel space support=== | ===Xenomai kernel space support=== |
Revision as of 21:25, 19 April 2013
Contents
What is Xenomai ?
Xenomai is a real time co-kernel which cooperates with Linux via Adeos. With its help, hard real time applications can be developed 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, Xenomai 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.
Note: These steps must be done with a fresh compiled view or, at least, after having suppressed buildroot/output/built/linux-x.y.z directory. |
Selecting Xenomai package
- First of all, you need to select Xenomai package and Adeos patch in Buildroot menuconfig:
$ make menuconfig
Package Selection for the target ---> Real-Time ---> [*] Xenomai Userspace Kernel ---> Linux Kernel Extensions [*] Adeos/Xenomai Real-time patch
- Exit and save your configuration
- If you plan to use xeno-test (Xenomai performance tool) then CONFIG_ASH_GETOPTS should be activated in Busybox:
$ make busybox-menuconfig
Shells ---> Choose your default shell (ash) ---> --- ash --- Ash Shell Options ... [*] Builtin getopt to parse positional parameters
- Exit and save your configuration
- rebuild Busybox & Buildroot:
$ make busybox-clean && make
Kernel greater than 2.6.29
For kernels greater than 2.6.29, it's needed to suppress all patches in buildroot/packages/xenomai/ and then modify URL and Adeos patch name:
2.6.38
Kernel ---> Linux Kernel Extensions ---> [*] Adeos/Xenomai Real-time patch (http://download.gna.org/adeos/patches/v2.6/$(BR2_ARCH)) Adeos patch URL (adeos-ipipe-2.6.38.8-arm-1.18-09.patch) Path for Adeos patch file
Xenomai kernel space support
- At first time, to have Linux kernel patched with Xenomai and Adeos patches, you must type:
$ make
- Then you can configure the Xenomai kernel options from Linux menuconfig:
$ make linux-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 linux && 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 Xenomai 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 linux-menuconfig
And disable following options:
Real-time sub-system ---> [ ] Xenomai and Kernel Features ---> [ ] Interrupt pipeline
- The second solution is to destroy the kernel tree :
$ make linux-dirclean
Userspace / package
For disabling userspace/package part :
$ make menuconfig
and disable Xenomai
Package Selection for the target ---> [ ] Xenomai
then use the dirclean command:
$ make xenomai-dirclean