Difference between revisions of "LXRT-Howto"

From Mca2
Jump to navigationJump to search
m (Protected "LXRT-Howto" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
 
Line 11: Line 11:
 
* boot your rtai-enabled system
 
* boot your rtai-enabled system
 
* Copy the compiled rtai modules (rtai_hal.o/ko, rtai_lxrt.o/ko, rtai_sem.o/ko and rtai_serial.o/ko) and the mca module (mca_lxrt_extension.o/ko) to your module directory<br>
 
* Copy the compiled rtai modules (rtai_hal.o/ko, rtai_lxrt.o/ko, rtai_sem.o/ko and rtai_serial.o/ko) and the mca module (mca_lxrt_extension.o/ko) to your module directory<br>
{{cmd|[~]$ cd /tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules <br>
+
<pre>
[/tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules]$ mkdir /lib/modules/LINUX_VERSION/kernel/rtai <br>
+
  [~]$ cd /tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules  
[/tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules]$ cp rtai_hal.MOD_EXT rtai_lxrt.MOD_EXT rtai_sem.MOD_EXT rtai_serial.MOD_EXT /lib/modules/LINUX_VERSION/kernel/rtai <br>
+
  [/tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules]$ mkdir /lib/modules/LINUX_VERSION/kernel/rtai <br>
[/tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules]$ cd /tmp/rtai-test/mca2.4.x <br>
+
  [/tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules]$ cp rtai_hal.MOD_EXT rtai_lxrt.MOD_EXT rtai_sem.MOD_EXT rtai_serial.MOD_EXT /lib/modules/LINUX_VERSION/kernel/rtai <br>
[/tmp/rtai-test/mca2.4.x]$ cp export/i686_Linux_telelift_debug/mca_lxrt_extension.MOD_EXT /lib/modules/LINUX_VERSION/kernel/rtai <br>
+
  [/tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules]$ cd /tmp/rtai-test/mca2.4.x <br>
[/tmp/rtai-test/mca2.4.x]$ depmod -a}}
+
  [/tmp/rtai-test/mca2.4.x]$ cp export/i686_Linux_telelift_debug/mca_lxrt_extension.MOD_EXT /lib/modules/LINUX_VERSION/kernel/rtai <br>
 +
  [/tmp/rtai-test/mca2.4.x]$ depmod -a
 +
</pre>
 
:Note: if you copy all compiled rtai modules into the kernel module directory make sure to set the link rtai_ksched.MOD_EXT to rtai_lxrt.MOD_EXT to be sure the correct scheduler is taken on modprobe.
 
:Note: if you copy all compiled rtai modules into the kernel module directory make sure to set the link rtai_ksched.MOD_EXT to rtai_lxrt.MOD_EXT to be sure the correct scheduler is taken on modprobe.
 
* Load kernel modules (easiest modprobe way)
 
* Load kernel modules (easiest modprobe way)
{{cmd|[~]$ modprobe mca_lxrt_extension}}
+
<pre>
 +
  [~]$ modprobe mca_lxrt_extension
 +
</pre>
 
* Load kernel modules (step by step insmod way) <br>
 
* Load kernel modules (step by step insmod way) <br>
 
:If you have an adeos kernel with adeos compiled as module, first you need to insmod that
 
:If you have an adeos kernel with adeos compiled as module, first you need to insmod that
{{cmd|[~]$ insmod adeos}}
+
<pre>
 +
  [~]$ insmod adeos
 +
</pre>
 
:In all cases you then have to insmod the following
 
:In all cases you then have to insmod the following
{{cmd|[~]$ insmod rtai_hal <br>
+
<pre>
[~]$ insmod rtai_lxrt <br>
+
  [~]$ insmod rtai_hal
[~]$ insmod rtai_sem <br>
+
  [~]$ insmod rtai_lxrt
[~]$ insmod mca_lxrt_extension}}
+
  [~]$ insmod rtai_sem
 +
  [~]$ insmod mca_lxrt_extension
 +
</pre>
 
* If using the rtai_serial driver in your MCA-program you also have to insmod that module:
 
* If using the rtai_serial driver in your MCA-program you also have to insmod that module:
{{cmd|[~]$ insmod rtai_serial}}
+
<pre>
 +
  [~]$ insmod rtai_serial
 +
</pre>
 
:Or with individual configuration parameters e.g.:
 
:Or with individual configuration parameters e.g.:
{{cmd|[~]$ <nowiki> insmod rtai_serial spconfig=0x02f8,3,0xd400,14,0xd000,14 spbufsiz=0x4000 </nowiki>}}
+
<pre>
 +
  [~]$ <nowiki> insmod rtai_serial spconfig=0x02f8,3,0xd400,14,0xd000,14 spbufsiz=0x4000 </nowiki>
 +
</pre>
 
   
 
   
 
=== Testing ===
 
=== Testing ===
 
* Test it
 
* Test it
{{cmd|[/tmp/rtai-test/rta]$ time_test<br>
+
<pre>
}}
+
  [/tmp/rtai-test/rta]$ time_test
 +
</pre>
 
:Call time_test twice with --no-lxrt and compare the summarized measured time values.
 
:Call time_test twice with --no-lxrt and compare the summarized measured time values.

Latest revision as of 15:02, 2 July 2010

LXRT-HOWTO

This section gives a step by step example on how LXRT could be used with mca2.

Compiling

Installing

  • Install your kernel/modules
  • boot your rtai-enabled system
  • Copy the compiled rtai modules (rtai_hal.o/ko, rtai_lxrt.o/ko, rtai_sem.o/ko and rtai_serial.o/ko) and the mca module (mca_lxrt_extension.o/ko) to your module directory
  [~]$ cd /tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules 
  [/tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules]$ mkdir /lib/modules/LINUX_VERSION/kernel/rtai <br>
  [/tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules]$ cp rtai_hal.MOD_EXT rtai_lxrt.MOD_EXT rtai_sem.MOD_EXT rtai_serial.MOD_EXT /lib/modules/LINUX_VERSION/kernel/rtai <br>
  [/tmp/rtai-test/rtai-RTAI_VERSION-linux-LINUX_VERSION-install/modules]$ cd /tmp/rtai-test/mca2.4.x <br>
  [/tmp/rtai-test/mca2.4.x]$ cp export/i686_Linux_telelift_debug/mca_lxrt_extension.MOD_EXT /lib/modules/LINUX_VERSION/kernel/rtai <br>
  [/tmp/rtai-test/mca2.4.x]$ depmod -a
Note: if you copy all compiled rtai modules into the kernel module directory make sure to set the link rtai_ksched.MOD_EXT to rtai_lxrt.MOD_EXT to be sure the correct scheduler is taken on modprobe.
  • Load kernel modules (easiest modprobe way)
  [~]$ modprobe mca_lxrt_extension
  • Load kernel modules (step by step insmod way)
If you have an adeos kernel with adeos compiled as module, first you need to insmod that
  [~]$ insmod adeos
In all cases you then have to insmod the following
  [~]$ insmod rtai_hal
  [~]$ insmod rtai_lxrt
  [~]$ insmod rtai_sem
  [~]$ insmod mca_lxrt_extension
  • If using the rtai_serial driver in your MCA-program you also have to insmod that module:
  [~]$ insmod rtai_serial
Or with individual configuration parameters e.g.:
  [~]$  insmod rtai_serial spconfig=0x02f8,3,0xd400,14,0xd000,14 spbufsiz=0x4000 

Testing

  • Test it
  [/tmp/rtai-test/rta]$ time_test
Call time_test twice with --no-lxrt and compare the summarized measured time values.