You are on page 1of 15

RTOS & Computer Control System

RTAI Installation
พิเชษฐ์ บุญหนุน
pished.bunnun@nectec.or.th

ศูนย์เทคโนโลยีอิเล็กทรอนิกส์และคอมพิวเตอร์แห่งชาติ

RTOS & Computer Control System – p. 1


ขั้นตอนการติดตั้ง
ติดตั้ง Linux แนะนำ Debian
Download Source Code ของ RTAI จาก www.rtai.org
Download Linux’s Kernel จาก www.kernel.org
Compile RT-Kernel
Test RT-Kernel
Compile RT-Module
Test RT-Module

RTOS & Computer Control System – p. 2


Compile RT-Kernel
/usr/src/> tar jxvf linux-xxx.tar.bz2
/usr/src/> tar jxvf rtai-xxx.tar.bz2
/usr/src/> ln -s linux-xxx linux
/usr/src/> cd linux
/usr/src/linux/> patch -p1
<../rtai-xxx/rtai-core/arch/i386/patches/hal-xxx.patch
/usr/src/linux/> make xconfig

RTOS & Computer Control System – p. 3


Compile RT-Kernel

RTOS & Computer Control System – p. 4


Compile RT-Kernel
จะต้อง : Enable loadable module support and Disable set
version information on all module symbols.

RTOS & Computer Control System – p. 5


Compile RT-Kernel
จะต้อง : Enable Adeos support as a module.

RTOS & Computer Control System – p. 6


Compile RT-Kernel
จะต้อง : Disable Power Management support.

RTOS & Computer Control System – p. 7


Compile RT-Kernel
จะต้อง : Disable ACPI Support.

RTOS & Computer Control System – p. 8


Compile RT-Kernel
จะต้อง : Enable IDE Driver that support your computer.

RTOS & Computer Control System – p. 9


Compile RT-Kernel
จะต้อง : Enable File Systems type that support your File
Systems.

RTOS & Computer Control System – p. 10


Compile RT-Kernel
คำสั่งที่เป็นประโยชน์
dmesg | less
lsmod
mount
lspci

RTOS & Computer Control System – p. 11


Compile RT-Kernel
/usr/src/linux/> make dep
/usr/src/linux/> make
/usr/src/linux/> make modules
/usr/src/linux/> make modules install
/usr/src/linux/> make install
/usr/src/linux/> vim /etc/lilo.conf
/usr/src/linux/> lilo
/usr/src/linux/> reboot

RTOS & Computer Control System – p. 12


Test RT-Kernel
/etc/lilo.conf
default=rtai
image=/boot/vmlinuz-2.4.18-bf24
label=LinuxOld
read-only
image=/boot/vmlinuz-2.4.24-adeos
label=rtai
read-only
Test RT-Kernel
/> uname -a
/> modprobe adeos

RTOS & Computer Control System – p. 13


Compile RT-Module
/usr/src/rtai-xxx/> make gconfig
/usr/src/rtai-xxx/> make install

RTOS & Computer Control System – p. 14


Test RT-Module
/usr/realtime/testsuite/kern/latency/> ./run

RTOS & Computer Control System – p. 15

You might also like