* 必要なもの [#p83bb874] - PC (Dell PowerEdge 840 を使用.FC5 をインストールしておく) - linux カーネルのソース ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.21.tar.bz2 - RTAI のソース(2008.6月現在,最新版は 3.6.1) https://www.rtai.org/RTAI/rtai-3.6.1.tar.bz2 * 参考にしたもの [#kde7a0b7] - http://kojima.plala.jp/rtai.html - https://mail.rtai.org/pipermail/rtai/2006-February/014410.html RTAI を Fedora Core にインストールする話 - https://mail.rtai.org/pipermail/rtai/2006-September/015985.html - http://www.blogger.com/feeds/5740550295288139350/posts/default/4404957623563932948 subarchtecture を PC-compatible に設定する必要がある,という記述 - http://www-online.kek.jp/~yasu/Kouryukai02/odagiri-presentation.pdf RTLinux 他,Real Time OS の比較 - http://forums.fedoraforum.org/showthread.php?t=149968 具体的なインストール手順について * インストール手順 [#r8d4d939] + linuxカーネルとRTAIのソースを /usr/src/ におく. + ソースを展開してパッチをあてる # cd /usr/src # bunzip2 -c linux-2.6.20.21.tar.bz2 | tar xvf - # bunzip2 -c rtai-3.6.1.tar.bz2 | tar xvf - # cd linux-2.6.20.21 # patch -p1 < ../rtai-3.6.1/base/arch/i386/patches/hal-linux-2.6.20.21-i386-1.12-03.patch patching file Makefile patching file arch/i386/Kconfig (略) patching file mm/mlock.c patching file mm/vmalloc.c + カーネルパラメータの設定 # cp /boot/config-2.6.20-1.2320.fc5 .config # make oldconfig (略) Interrupt pipeline (IPIPE) [Y/n/?] (NEW) (リターンキーを押す,計4箇所,全てデフォルトでリターンを押す) # make menuconfig (以下,順不同,要修正) * Lodable module support → Module versioning support を外す.(マニュアルに指示あり) * Processor type and features o Subarchtecture Type: PC-compatible o Processor family: Processor family : Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon o Toshiba Laptop support 外す o Dell laptop support 外す * Bus options (PCI, PCMCIA, EISA, MCA, ISA) o PCCard(PCMCIA/CardBus) support 外す * Power management support o ACPI Support 外す o APM BIOS Support 外す o CPU Frequency scaling 外す * Networking o IrDA 外す o Bluetooth 外す o Networking option Network packet filtering framework (Netfilter) 外す DDCP Configuration (EXPERIMENTAL) 外す SCTP Configuration (EXPERIMENTAL) 外す TIPC Configuration (EXPERIMENTAL) 外す Asynchronous Transfer Mode (ATM) (EXPERIMENTAL) 外す DECnet: router support (EXPERIMENTAL) 外す The IPX protocol 外す Appletalk protocol support 外す WAN route 外す QoS and/or fair queueing 外す Network testing 外す * Device Drivers o IEEE1394 外す o ISDN 外す o Telephony Support 外す o Sound 外す o Multimedia devices 3つ全て外す o MMC/SD Card support 外す Parallel port support 外す Fusion MPT device support 全部外す Machintosh device drivers 全部外す Character devices Watchdog Cards 外す Sony Vaio Programmable I/O Control Device support 外す USB support 外す(外れていると思ってた) DMA Engine support 外す o EDAC 外す o Virtualization 外す -- 編集結果 [[.config>/:RTAI/.config]] + コンパイル・インストール # make # make modules_install # make install + リブート + BIOSの設定 Integrated Devices Embedded Gb NIC ... Enabled without PXE CPU Information Logical Processor ... Enabled → Disabled Adjacent Cache Line Prefetch ... Enabled → Disabled Hardware Prefetcher ... Enabled → Disabled (他にもいくつかあり,要確認) + RTAI 本体のコンパイル・インストール # cd /usr/src # ln -s linux-2.6.20.21 linux # cd rtai-3.6.1 # make menuconfig Machine (x86) ---> Number of CPUs を 2→1 に変更 # make # make modules_install + テストプログラムの実行 # cd /usr/realtime/testsuite/kern/latency/ # ./run * * * Type ^C to stop this application. * * ## RTAI latency calibration tool ## # period = 100000 (ns) # avrgtime = 1 (s) # do not use the FPU # start the timer # timer_mode is oneshot RTAI Testsuite - KERNEL latency (all data in nanoseconds) RTH| lat min| ovl min| lat avg| lat max| ovl max| overruns RTD| -2023| -2023| -51| 16120| 16120| 0 RTD| -2014| -2023| -58| 16010| 16120| 0 RTD| -2014| -2023| -89| 15956| 16120| 0 RTD| -2014| -2023| -51| 16202| 16202| 0 RTD| -2014| -2023| -98| 16056| 16202| 0 RTD| -2014| -2023| -65| 16066| 16202| 0 RTD| -2014| -2023| -97| 16082| 16202| 0 RTD| -2014| -2023| -61| 16065| 16202| 0 RTD| -2014| -2023| -90| 15183| 16202| 0 RTD| -2014| -2023| -66| 16184| 16202| 0 RTD| -2014| -2023| -106| 16059| 16202| 0 RTD| -2014| -2023| -62| 16092| 16202| 0 RTD| -2014| -2023| -78| 16133| 16202| 0 RTD| -2014| -2023| -57| 16077| 16202| 0 RTD| -2014| -2023| -96| 15986| 16202| 0 RTD| -2014| -2023| -73| 16020| 16202| 0 RTD| -2014| -2023| -90| 15986| 16202| 0 RTD| -2014| -2023| -57| 15925| 16202| 0 RTD| -2014| -2023| -100| 16069| 16202| 0 RTD| -2108| -2108| -71| 16020| 16202| 0 RTD| -2014| -2108| -82| 16149| 16202| 0 RTH| lat min| ovl min| lat avg| lat max| ovl max| overruns RTD| -2014| -2108| -77| 16140| 16202| 0 RTD| -2014| -2108| -81| 16059| 16202| 0 RTD| -2014| -2108| -81| 16059| 16202| 0