[Home]Installation On Debian

Last edit: Peter Favrholdt on June 27, 2006 21:48 (5199 days, 6 hours and 17 minutes ago) (diff)
Rtai.Dk | RecentChanges | Preferences | DIAPM RTAI

Installation of RTAI on Debian


Hint: RTAI 3.1 packages for Debian Sid have been built. For more information see

  1. [RTAI Debian packages accepted by ftpmaster] (RTAI 3.1-test3)
  2. [Debian packages of RTAI/kilauea online for test + comments] (RTAI pre 3.0)
  3. (or [search the mailing list archive]).

1. Install Debian (for Debian Woody and RTAI 21.1.xx)

  1. Install Debian, preferably using the bf24 boot image and ext3 filesystem
  2. Get the kernel sources: apt-get install kernel-sources-something
  3. Extract kernel sources: cd /usr/src/; tar xjf kernel-sources-something

2. Kernel compile (without patch)

This is done to get a kernel config matching your machine.

Furthermore it is advisable to do a normal kernel build and installation without RTAI. This ensures you understand the kernel build process and installation before applying the RTAI patch. You cannot blame RTAI that you are not able to build and install a standard kernel.

First you should configure the kernel using make menuconfig (see Configure Kernel for advisory on this).

There are two ways to build a kernel on debian:

  1. The "normal" Linux way"
  2. The "debian way" using make-kpkg (producing a kernel package which can be installed using dpkg -i)

The "normal Linux way"

  1. make dep
  2. make bzImage
  3. make modules
  4. make modules_install
  5. make install
  6. if you're using initrd do mkinitrd something
  7. lilo
  8. reboot and ensure you have a working system.

The "debian way"

Check that gcc -v is 2.95.x. You can change the symbolic link /usr/bin/gcc

  1. make dep
  2. make-kpkg clean
  3. Get root privileges.
  4. make-kpkg [--append-to-version -rtai] [--revision=rev.0X] kernel-image
  5. cd ..
  6. dpkg -i kernel-image-XYZ
  7. if you're using initrd do mkinitrd something
  8. lilo or grub
  9. reboot and ensure you have a working system.

3. Patch the kernel with RTAI

  1. Download rtai-24.1.11.tgz to your homedir
  2. tar xzf rtai-24.1.11.tgz
  3. cd /usr/src/kernel-source-2.4.17
  4. su
  5. patch -p1 < /home/peter/rtai-24.1.11/patches/patch-2.4.18-rthal5g

Q: Should I run the RTHAL or ADEOS patches, or both?

A: One or the other. Make sure that the patch version matches up exacty = with your Linux kernel version at any rate. RTHAL seems to be more tested = by the user community as of the time of this writing. By using ADEOS, = however, you will be using the future of RTAI and will help developers = pinpoint minor problems.

4. Kernel compile (with patch)

Repeat the steps from section 2.

Remember to enable CONFIG_RTHAL in the "Processor type and features" menu.

5. Compile RTAI

Follow directions in ~/rtai-24.1.11/README.INSTALL

  1. After compiling add the line 'prune rtaisyms' to /etc/modules.conf (or you will get the message
"rtaisyms not an ELF binary")

(A better way is to create a file /etc/modutils/rtai with the line 'prune rtaisyms' and run update-modules).

6. Set the Scheduler

7. Test using the latency calibration example

Try running latency_calibration to check that your RTAI installation works.

If the latency calibration example makes your computer freeze try the following:
If your box is a uniprocessor, disable the SMP support and the local APIC/IO-APIC supports from your RTAI-enabled (via the rthal patch) kernel. And rebuild _all_ after a "make distclean" under both trees, first Linux, then RTAI.

Edit text of this page | View other revisions | Download Rtai.dk