This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
robotsoftware:mobotware:rtai [2012/02/20 15:04] claes [Installing RTAI] |
robotsoftware:mobotware:rtai [2012/03/01 17:10] claes [Compiling RTAI] |
||
---|---|---|---|
Line 7: | Line 7: | ||
* [[http:// | * [[http:// | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | <note warning> | ||
+ | *Ubuntu 11.10 | ||
+ | *RTAI 3.8.1 | ||
+ | *Linux Kernel 2.6.32.57 | ||
+ | </ | ||
===== Installing RTAI ===== | ===== Installing RTAI ===== | ||
Line 15: | Line 21: | ||
- Configure and compile your new Linux kernel. | - Configure and compile your new Linux kernel. | ||
- Reboot into the new real-time kernel. | - Reboot into the new real-time kernel. | ||
- | | + | /* |
- | - Configure and install COMEDI. | + | - Configure and install RTAI without COMEDI support. |
- | - Reconfigure and install RTAI with COMEDI support. | + | - Configure and install COMEDI. |
+ | - Reconfigure and install RTAI with COMEDI support. | ||
+ | */ | ||
=== How To === | === How To === | ||
Line 49: | Line 57: | ||
The latest stable RTAI packages can also be downloaded via Synaptic Package Manager, apt or aptitude. | The latest stable RTAI packages can also be downloaded via Synaptic Package Manager, apt or aptitude. | ||
+ | |||
+ | <note tip>You need to install all the rtai packages from the repositories, | ||
==== Patch the Kernel ==== | ==== Patch the Kernel ==== | ||
Line 60: | Line 70: | ||
==== Compiling the kernel ==== | ==== Compiling the kernel ==== | ||
- | There are many guides on the internet on how to compile a kernel. Here are link to a few to get you started, otherwise | + | There are many guides on the internet on how to compile a kernel. Here are link to a few to get you started, otherwise |
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
Line 68: | Line 78: | ||
These links may not be what you are looking for. It you have better links let me know and I will add/change the links. | These links may not be what you are looking for. It you have better links let me know and I will add/change the links. | ||
- | When you understand how to compile a kernel follow the instructions in the guide. The command we used to compile the kernel was | + | When you understand how to compile a kernel follow the instructions in the guide. |
+ | - Unpack kernel in /usr/src/ | ||
+ | - copy the configuration file from the current kernel | ||
+ | - patch the kernel | ||
+ | - Make the changes from the RTAI installation guide | ||
+ | - compile | ||
+ | The command we used to compile the kernel was | ||
make-kpkg --initrd --append-to-version=rtai | make-kpkg --initrd --append-to-version=rtai | ||
- | | + | If you are using an older RTAI patch you may get the following error: |
+ | include/ | ||
+ | To fix this disable sparse irq numbering (CONFIG_SPARSE_IRQ=n): | ||
==== Compiling RTAI ==== | ==== Compiling RTAI ==== | ||
We had alot of trouble when compiling RTAI. So test with differet configuration to get it compiled. | We had alot of trouble when compiling RTAI. So test with differet configuration to get it compiled. | ||
- | One big problem was the paths tho different libs. That was solved with the following script: | + | One big problem was the paths tho different libs. That was solved with the following script:\\ |
+ | Problem | ||
+ | / | ||
+ | Solution | ||
<file bash ad_cpath.sh> | <file bash ad_cpath.sh> | ||
#!/bin/bash | #!/bin/bash | ||
- | export C_INCLUDE_PATH=/ | + | export C_INCLUDE_PATH=/ |
export CPLUS_INCLUDE_PATH=/ | export CPLUS_INCLUDE_PATH=/ | ||
</ | </ | ||
Line 86: | Line 107: | ||
remember to make it runable with | remember to make it runable with | ||
chmod a+x ad_cpath.sh | chmod a+x ad_cpath.sh | ||
- | | + | Make sure you run the script. Or else the problem is not solved. |
+ | |||
Line 104: | Line 127: | ||
/ | / | ||
===== RTAI Modules ===== | ===== RTAI Modules ===== | ||
+ | To use RTAI, you have to load the modules that implement whatever RTAI capabilities you need. In version 3.8.1 the available core modules are the following: | ||
+ | *latency_rt.ko | ||
+ | *rtai_ksched.ko | ||
+ | *rtai_netrpc.ko | ||
+ | *rtai_tasklets.ko | ||
+ | *Module.symvers | ||
+ | *rtai_lxrt.ko | ||
+ | *rtai_sched.ko | ||
+ | *rtai_tbx.ko | ||
+ | *preempt_rt.ko | ||
+ | *rtai_math.ko | ||
+ | *rtai_sem.ko | ||
+ | *rtai_up.ko | ||
+ | *rtai_bits.ko | ||
+ | *rtai_mbx.ko | ||
+ | *rtai_serial.ko | ||
+ | *rtai_wd.ko | ||
+ | *rtai_calibrate.ko | ||
+ | *rtai_mq.ko | ||
+ | *rtai_shm.ko | ||
+ | *switches_rt.ko | ||
+ | *rtai_fifos.ko | ||
+ | *rtai_msg.ko | ||
+ | *rtai_smi.ko | ||
+ | *rtai_hal.ko | ||
+ | *rtai_mup.ko | ||
+ | *rtai_smp.ko | ||
- | + | Let's examine one by one. (This description is from ver. 1.3 so it needs to be updated) | |
- | To use RTAI, you have to load the modules that implement whatever RTAI capabilities you need. According to 1.3 release, available are the following core modules: | + | |
- | * rtai | + | |
- | * rtai_sched | + | |
- | * rtai_fifos | + | |
- | * rtai_shm | + | |
- | * lxrt | + | |
- | * rtai_pqueue | + | |
- | * rtai_pthread | + | |
- | * rtai_utils | + | |
- | + | ||
- | Let's examine one by one. | + | |
1) It is the really core module and nothing about the real time services can be done without it. | 1) It is the really core module and nothing about the real time services can be done without it. | ||
Line 188: | Line 227: | ||
6x) Posix RTAI modules. rtai_pthread.o provides hard real-time threads, where each | 6x) Posix RTAI modules. rtai_pthread.o provides hard real-time threads, where each | ||
| | ||
- | | + | |
+ | |||
+ | ===== RTAI API ===== | ||
+ | [[https:// | ||
+ | |||
+ | ===== Links that is somehow useful ===== | ||
+ | *[[https:// | ||
+ | *[[http:// | ||
+ | *http:// | ||
+ | *http:// |