what's the sequence to compile rtai?

Maximilian Heise max.heise at gmx.net
Wed Oct 13 14:51:54 CEST 2004


Hello,

i'll post my own installation instructions for rtai-3.1 on Fedora Core 2
(FC2) here. They are mainly notes to guide myself step by step through
installing, so that i'm not forgetting anything. Hope this helps you too.

Also check out the following sites under README first. I found them
**very** helpful.

If anybody else on the list has comments or improvements to my
installations instructions, please post them. I'd be always glad to save
time in the future;)

Also, if you plan to use a v2.6 kernel on RH9, i think you should at
least update modutils for the transition from v2.4->v2.6. Follow the
requirements outlined in the linux kernel readme.

Ciao
Max



README FIRST:
-------------
consult http://rtai.dk/cgi-bin/gratiswiki.pl
consult README.INSTALL out of the rtai-3.1.tar.bz2
consult http://www.captain.at/programming/rtai/
consult http://www.rtai.org
consult rtai mailing list archive at https://mail.rtai.org/pipermail/rtai/


Get rtai from:
---------
wget http://download.gna.org/rtai/stable/v3/rtai-3.1.tar.bz2


Testing and Unpacking:
-------
cd /usr/src
tar tvjf rtai-3.1.tar.bz2 && echo OK
should give OK as the last line

tar xvjf rtai-3.1.tar.bz2 && echo OK
should again give OK as the last line


read README.INSTALL:
--------------------
cd rtai-3.1
less README.INSTALL
read the section about "Bootstraping with vesuvio in 7 steps"
as well as the rest
quit with :q



Unpack the pristine kernel source in /usr/src:
----------------------------------------------
cd /usr/src
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.8.1.tar.bz2
tar xvjf linux-2.6.8.1.tar.bz2 && echo OK
should again give OK as the last line

mv linux-2.6.8.1 linux-2.6.8.1-adeos
cd linux-2.6.8.1-adeos
make mrproper
patch -p1 < ../rtai-3.1/rtai-core/arch/i386/patches/hal7-2.6.8.1.patch
&& echo OK
copy old .config from previous kernel install if any
make xconfig || make menuconfig || make config
make && make modules_install && make install
note that this is for kernel v2.6, for kernel v2.4 it is
make dep && make bzImage && make modules && make modules_install && make
install

Make sure that:
---------------
"Adeos" is selected (Adeos Support -> Adeos Support)
"Loadable module support -> Module versioning support" is disabled
"Kernel hacking" -> Compile the kernel with frame pointers" is disabled
Power managment is disabled in the bios
USB legacy support is disabled in the bios

edit /boot/grub/grub.conf:
---------------------------
emacs /boot/grub/grub.conf
set default= to the right kernel. Note that index starts at 0
quit with CTRL-X CTRL-C

set the linux symbolic link in /usr/src:
------------------------------------------
cd /usr/src
rm linux
ln -s linux-2.6.8.1-adeos linux
check the header include files in /usr/include
linux, asm and asm-generic should point to /usr/src/linux
do symbolic links if necessary

RTAI:
-----
cd /usr/src
mkdir rtai-3.1-builddir && cd rtai-3.1-builddir

Import the old config if any:
-----------------------------
copy .rtai_config
make -f ../rtai-3.1/makefile srctree=../rtai-3.1 oldconfig

Configure by:
--------------
make -f ../rtai-3.1/makefile srctree=../rtai-3.1 menuconfig

Compile:
--------
make -f ../rtai-3.1/makefile srctree=../rtai-3.1
or
make

Cleanup before, if an older installation is already present:
---------------
rm -rf /usr/realtime

Install:
---------
make install, as root of course

TEST:
-----
cd /usr/realtime/testsuite/kern/latency/
./run

If latency is to high, try disabling the HDD DMA access and disable USB
legacy support in the bios.
Also try disabling Power management in the bios (if possible).


-- 
max.heise at gmx.net
Maximilian.Heise at upc.es
Maximilian HEISE
Key fingerprint = 1801 8B78 CF81 B20E 5529  0F84 4E59 8AB5 D5D4 0E99




More information about the Rtai mailing list