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.
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.
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 220.127.116.11 for an x86 architecture, download adeos patch adeos-ipipe-18.104.22.168-x86-2.4.09.patch 3).
Extract kernel sources :
$ tar xjpf linux-22.214.171.124.tar.bz2
Extract Xenomai sources :
$ tar xjpf xenomai-2.5.2.tar.bz2
Copy the adeos patch in the Xenomai source tree :
$ mv adeos-ipipe-126.96.36.199-x86-2.6-02.patch 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-188.8.131.52/ --adeos=ksrc/arch/x86/patches/adeos-ipipe-184.108.40.206-x86-2.6-02.patch --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
Next configure your kernel with $ make menuconfig command or use my configuration file :
$ cp config_roboard.txt linux-220.127.116.11/.config
Then you can launch the build process that will result in a nice debian package4) :
$ cd linux-18.104.22.168 $ make-kpkg --uc --us buildpackage exec debian/rules DEBIAN_REVISION=22.214.171.124-10.00.Custom UNSIGN_CHANGELOG=YES UNSIGN_SOURCE=YES buildpackage ... ... ... echo done > debian/stamp/build/buildpackage
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-126.96.36.199_188.8.131.52-10.00.Custom_i386.deb
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.
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
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 ....