Xenomai 2.3.0 on Ubuntu 6.10
March 3rd, 2007I have been developing with Xenomai on a real-time embedded project and just got around to getting my desktop system rigged up with Adeos and Xenomai. I had been primarily doing driver development on the embedded platform, so I didn’t need Xenomai on my PC. However, I am now working on more of the application layer and would really like to build first on the PC and then port to the embedded platform.
The first step is getting a Ubuntu kernel built with Xenomai/Adeos. I had some trouble getting the patched Ubuntu sources to take the Adeos patch without freezing during the boot process, so I went with vanilla 2.6.19 sources from Kernel.org and rolled them into a Debian package.
Step 1. Get pre-requisite packages
apt-get install build-essential
apt-get install kernel-package
apt-get install gcc
apt-get install libncurses5
apt-get install libncurses5-dev
(additional packages may be needed, but most will be available on a developer’s workstation)
Step 2. Download Sources
Download Xenomai 2.3.0, the Linux Kernel 2.6.19.7. Also grab the up-to-date Adeos patch for 2.6.19 from the Adeos site.
Step 3. Extract Files
Create a directory (as root) /usr/src/xenomai-kernel and extract the kernel and xenomai sources into this directory.
Step 4. Apply the Adeos Patch
cd /usr/src/xenomai-kernel/linux-2.6.19.7
patch -p1 < ../adeos-ipipe-2.6.19-i386-1.7-03.patch
Step 5. Add Xenomai to the Kernel
cd /usr/src/xenomai-kernel/xenomai-2.3.0
scripts/prepare-kernel.sh --linux=../linux-2.6.19.7 --arch=i386
Step 6. Configure Kernel
There are a number of configuration gotchas that are not all documented very well. What documentation does exist can be found in the Xenomai FAQ.
I found the following issues particular troublesome:
- Disable Frequency Scaling
- Disable HPET (there are two settings for this on different screens - grep the .config file for HPET if in doubt)
- Select a processor that is Pentium Classic or greater to get TSC support (user-land programs will complain loudly if not present). In particular, 586/K5/5×86/6×86/6×86MX is a less than ideal processor choice since it does not provide TSC.
The config that I used can be downloaded here. Copy it into the Linux source directory as “.config” and then run make menuconfig to customize.
Step 7. Build Debian Kernel Packages
From the Linux kernel directory run:
make-kpkg --initrd kernel_image kernel_headers
The two debs (one for the headers and one for the image) will be deposited in the parent directory.
Step 8. Install Packages
dpkg -i linux-image-2.6.19.7-adeos-xenomai2.3.0_2.6.19.7-adeos-xenomai2.3.0-10.00.Custom_i386.deb
dpkg -i linux-headers-2.6.19.7-adeos-xenomai2.3.0_2.6.19.7-adeos-xenomai2.3.0-10.00.Custom_i386.deb
I then edited /boot/grub/menu.lst to remove the quiet and splashscreen parameters from this kernel (so that I could see console output).
Step 9. Install Third Party Modules
After booting into the new kernel, I had to re-install the NVidia drivers. For this I use Albert Milone’s Envy script. If you have that installed and need to update the ATI or NVidia drivers, just run “envy” after your X Server fails to start. Follow the prompts (elect to NOT have it modify the Xorg.conf file) and you’ll be set to go.
I’m not sure that I would install Kernel Debs from an unknown source, but for the less scrupulous out there, here are the debs that I created from following this procedure:
-
linux-headers-2.6.19.7-adeos-xenomai2.3.0_2.6.19.7-adeos-xenomai2.3.0-10.00.Custom_i386.deb
-
linux-image-2.6.19.7-adeos-xenomai2.3.0_2.6.19.7-adeos-xenomai2.3.0-10.00.Custom_i386.deb
These debs were built with the previously referenced configuration and could be considered a kitchen-sink build. The kernel targets an SMP Pentium Classic with lots of drivers available as modules.
77 Responses to “Xenomai 2.3.0 on Ubuntu 6.10”
Leave a Reply
You must be logged in to post a comment.
March 3rd, 2007 at 8:33 pm
[…] post by tlaurenzo and powered by Img Fly […]
April 3rd, 2007 at 10:34 am
Hi,
I used your instructions but when I execute xeno-test I encounter the error:
“Error inserting xeno_timerbench: kernel does not have module support
Xenomai:native skin or CONFIG_XENO_OPT_PERVASIVE disabled.
(modprobe xeno_native?)”.
I tried also with your debs, but it’s the same.
Of course I used:
- Ubuntu 6.10
- Xenomai 2.3.0
- Kernel 2.6.19.7
Any real-time application I try to execute, I have this error:
“Xenomai: native skin or CONFIG_XENO_OPT_PERVASIVE disabled.
(modprobe xeno_native?)”.
Thanks
April 14th, 2007 at 8:11 pm
Jenny, I have run into issues where Xenomai will not load because of some weird hardware configurations. Check the dmesg output for Xenomai error messages. I had this problem on my Dell 1100 laptop and no matter how hard I tried, I could not get it to work. Apparently it is a buggy BIOS (Dell laptops are notorious for TERRIBLE bios’s). Unfortunately, even under the best of situations, Xenomai is targeted at known hardware that is not “weird”. A lot of consumer desktop systems qualify as “weird” as far as Xenomai and Linux are concerned.
My need for Xenomai right now is for an embedded Blackfin project. I finally just bit the bullet and started developing exclusively for that target and have stopped trying to get Xenomai working on my run of the mill desktop. Even with a hardware configuration that worked, I experienced terrible latency — most probably due to all of the power management and such on consumer systems.