RTAI and RTnet from Debian built-in packages |
Automated installation on DebianFor installation from sources, go here.UdevRTAI modules create devices rtai_sham et rtf*. You need to add them to udev:touch /etc/udev/rules.d/92-rtai.rulesEditer ensuite ce fichier comme suit : ACTION!="add|change", GOTO="rtai_end" KERNEL=="rtf*", MODE="0666" KERNEL=="rtai*", MODE="0666" LABEL="rtai_end" Memlock SizeAmount of locked memory in address space is 32Kb under Debian. You need to increase it for real-time use. Edit /etc/security/limits.conf and add this line at the end:* hard memlock 8192 Add user to src groupAdd your user account to src group in order to have access to directory /usr/srcadduser your_user_name srcClose your session and then reconnect for changes applying. Get sources packagesUse normal user account (non root account) for these steps.cd mkdir rtai cd rtai Get and install built-in packages (Linux-2.6.30.5 with RTAI-3.7.1)wget http://trainsim.ebvmultimedia.net/dl/librtai-dev_3.7.1-2_i386.deb wget http://trainsim.ebvmultimedia.net/dl/librtai1_3.7.1-2_i386.deb wget http://trainsim.ebvmultimedia.net/dl/linux-headers-2.6.30.5-rtai_r1_i386.deb wget http://trainsim.ebvmultimedia.net/dl/linux-image-2.6.30.5-rtai_r1_i386.deb wget http://trainsim.ebvmultimedia.net/dl/linux-source-2.6.30.5-rtai_r1_all.deb wget http://trainsim.ebvmultimedia.net/dl/rtai-doc_3.7.1-2_all.deb wget \ http://trainsim.ebvmultimedia.net/dl/rtai-modules-2.6.30.5-rtai_3.7.1-2+r1_i386.deb wget http://trainsim.ebvmultimedia.net/dl/rtai-source_3.7.1-2_i386.deb wget http://trainsim.ebvmultimedia.net/dl/rtai_3.7.1-2_i386.deb su dpkg -i librtai1_3.7.1-2_i386.deb dpkg -i librtai-dev_3.7.1-2_i386.deb dpkg -i linux-headers-2.6.30.5-rtai_r1_i386.deb dpkg -i linux-image-2.6.30.5-rtai_r1_i386.deb dpkg -i linux-source-2.6.30.5-rtai_r1_all.deb dpkg -i rtai_3.7.1-2_i386.deb dpkg -i rtai-source_3.7.1-2_i386.deb dpkg -i rtai-modules-2.6.30.5-rtai_3.7.1-2+r1_i386.deb cd /usr/src/ ln -s linux-headers-2.6.30.5-rtai/ linux NOTE: If you have a multiprocessor computer (SMP system), dedicate last core/CPU to real-time tasks could increse performances. Edit /boot/grub/menu.lst and add parameter isolcpus at the end of RTAI kernel line. Paramter value is the number of last processor (counter start from 0) : 1 for dual-core, 3 for quad-core kernel /vmlinuz-2.6.30.5-rtai root=/dev/sda5 ro isolcpus=1Reboot your computer. rebootBoot with RTAI kernel. Regenerate Linux kernel dependanciescd /usr/src/linux cp Module.symvers Module.symvers.old cat /usr/realtime/modules/Module.symvers >> Module.symvers ln -s /usr/realtime/modules/ /lib/modules/2.6.30.5-rtai/rtai depmod -a RTAI Testscd /usr/realtime/testsuite/user/latency; time ./run cd /usr/realtime/testsuite/user/preempt/; time ./run cd /usr/realtime/testsuite/user/switches/; ./run cd /usr/realtime/testsuite/kern/latency/; time ./run cd /usr/realtime/testsuite/kern/preempt/; time ./run cd /usr/realtime/testsuite/kern/switches/; ./run RTnetInstallationPerform RTAI installation first. cd /usr/src wget http://trainsim.ebvmultimedia.net/dl/rtnet-0.9.11.tar.bz2 tar xvjf rtnet-0.9.11.tar.bz2 cd rtnet make menuconfigChoose RTAI in configuration. make su make install run mknod /dev/rtnet c 10 240 Tests/sbin/rtnet start rtping |