User Tools

Site Tools


cs:rtai_configuration
Return to Home page

RTAI configuration

Patch the kernel, in the directory of the kernel run this line:

patch -p1 -b < ../../rtai-3.9/base/arch/x86/patches/hal-linux-2.6.38.8-x86-2.11-02.patch

Notes for RTAI 3.9

When I tryed to install RTAI 3.9 in Ubuntu 12.04 with kernel 2.6.38.8 I have those problems:

  • I must set CONFIG_SPARSE_IRQ=y in kernel configuration, otherwise I have an error when I try to load rtai_hal.ko
  • I must add the included file #include <linux/sched.h> in base/include/rtai_lxrt.h
  • To resolve the error: /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory, use the command
    apt-get install gcc-multilib
  • To resolve the error: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory, use the commands
    cd /usr/include/
    mv gnu gnu.sav
    ln -fs i386-linux-gnu/gnu gnu
  • Problem on RTAI kernel patch, see later

RTAI kernel patch does not work properly. When the rtai_hal.ko RTAI module is loaded with IsolCpusMask (e.g. insmod rtai_hal.ko IsolCpusMask=0x02). It crashes with error message (using dmesg):

BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
IP: [<ffffffff8101b932>] __ipipe_set_irq_affinity+0x11/0x61

To solve the problem a solution is to modify the kernel file ./arch/x86/kernel/ipipe.c adding the code:

if (irq_to_desc(irq) == NULL)
	return CPU_MASK_NONE;

in the function __ipipe_set_irq_affinity(), just after the declaration cpusmask_t oldmask;. The the kernel must be recompiled.


If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it

You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/cs/rtai_configuration
/web/htdocs/www.skenz.it/home/data/pages/cs/rtai_configuration.txt · Last modified: 2024/04/08 22:35 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki
Privacy Policy