User Tools

Site Tools

Return to Home page


This shows you the differences between two versions of the page.

Link to this comparison view

cs:rtai_configuration [2019/02/26 14:33] (current)
Line 1: Line 1:
 +====== RTAI configuration ======
 +Patch the kernel, in the directory of the kernel run this line:
 +<code bash>
 +patch -p1 -b < ../​../​rtai-3.9/​base/​arch/​x86/​patches/​hal-linux-
 +===== Notes for RTAI 3.9 =====
 +When I tryed to install RTAI 3.9 in Ubuntu 12.04 with kernel 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 <code bash>​apt-get install gcc-multilib</​code>​
 +  * 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 <code bash>
 +cd /​usr/​include/​
 +mv gnu gnu.sav
 +ln -fs i386-linux-gnu/​gnu gnu</​code>​
 +  * 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:
 +<code c>
 +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]

You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url:
/web/htdocs/ ยท Last modified: 2019/02/26 14:33 (external edit)

Privacy Policy