Outils pour utilisateurs

Outils du site



This article describes how to install a Linux real-time operating system on a roboard RB-100 motherboard. It is based on the Ubuntu Linux distribution and the Xenomai/Adeos real-time solution.

Many thanks to :
Hardware used :
Downloads :

Linux Install

We install Ubuntu Desktop edition. But Server edition could be used too if you install from an USB CD-Rom drive2). Download the .iso image you choose and burn it on an USB Key (using UNetbootin or usb-creator-gtk for example).

Plug your USB Key on the roboard and power on your roboard. At boot time, press DEL to enter BIOS setup. Then go to Boot ⇒ Boot Device Priority ⇒ 1st Boot Device and select your USB key. Save your changes and exit.

The roboard boots now on your USB key. Install Ubuntu with your own options. If you need more informations about how to install Ubuntu, look at there : https://help.ubuntu.com/community/Installation

Press Restart and disconnect your USB Key when it is asked.

Patching kernel with Xenomai

You can do all the following actions on your desktop PC rather than on the roboard for more confort.

Download Xenomai, the kernel and its corresponding adeos-ipipe patch from the links given in the Downloads section.

If you want to use your own kernel version, for kernel X.X.X.X, download patch adeos-ipipe-X.X.X.X-ARCH-Y.Y-Y.patch. Where X is the kernel version, ARCH the architectire you plan to use and Y the version of the adeos patch. For example, if you want to patch kernel version for an x86 architecture, download adeos patch adeos-ipipe- 3).

Extract kernel sources :

 $ tar xjpf linux-

Extract Xenomai sources :

$ tar xjpf xenomai-2.5.2.tar.bz2

Copy the adeos patch in the Xenomai source tree :

$ mv adeos-ipipe- xenomai-2.5.2/ksrc/arch/x86/patches/

Enter Xenomai source directory :

$ cd xenomai-2.5.2/

Now prepare your kernel by applying suitable patches :

$ scripts/prepare-kernel.sh --linux=../linux- --adeos=ksrc/arch/x86/patches/adeos-ipipe- --arch=i586
patching file arch/x86/Kconfig
patching file arch/x86/include/asm/apic.h
patching file arch/x86/include/asm/apicdef.h
patching file mm/memory.c
patching file mm/mmu_context.c
patching file mm/vmalloc.c

Build patched kernel package

Next configure your kernel with $ make menuconfig command or use my configuration file :

$ cp config_roboard.txt linux-

Then you can launch the build process that will result in a nice debian package4) :

$ cd linux-
$ make-kpkg --uc --us buildpackage
echo done >  debian/stamp/build/buildpackage

Patched kernel install

Copy the xenomai sources you have already downloaded and the kernel package you have created on your USB key. Plug the USB key on your roboard. Then install first the kernel package with the following command:

$ sudo dpkg -i /media/USB_KEY/linux-image-

Copy the Xenomai sources archive on your roboard and decompress it.

$ sudo cp /media/USB_KEY/xenomai-2.5.2.tar.bz2 /usr/local/src/
$ cd /usr/local/src/
$ tar xjpf xenomai-2.5.2.tar.bz2

Now reboot the roboard and boot on your new kernel.

Build and install Xenomai libraries

Enter the directory where you decompressed the Xenomai sources archive to build and install user space libraries.

$ cd /usr/local/src/xenomai-2.5.2/
$ sudo ./configure
$ sudo make
$ sudo make install

Test Xenomai

Enter the native API example directory, build and launch the test which is a simple task repeated every seconds :

$ cd examples/native/
$ sudo make
$ sudo ./trivial-periodic 
Time since last turn: 1000.015421 ms
Time since last turn: 1000.009955 ms
Time since last turn: 999.989784 ms
Time since last turn: 999.999659 ms
Time since last turn: 1000.000116 ms
Time since last turn: 999.999863 ms
1) is needed to download softwares because Ubuntu does not support roboard ethernet card by default. Also, desktop PC makes kernel compilation faster.
2) Ubuntu Server edition can not be installed from an USB key for now
3) The kernel version trivial number could lightly differ. But it is more safe to keep same version for kernel and adeos patch
4) If the make-kpkg command is unavailable on your Ubuntu, install the following packages : build-essential kernel-package initramfs-tools fakeroot debconf-utils dpkg-dev debhelper bin86
robotics/computing/installer_xenomai_sur_une_roboard.txt · Dernière modification: 2012/09/20 10:52 (modification externe)