	Real-Time Linux Frequently Asked Questions

	Michael Barabanov (baraban@fsmlabs.com)
	Copyright VJY Associates L.L.C. 1999. All rights reserved.


	
Q: What is RTLinux?

A. RTLinux -- RealTime Linux -- is a modified version of 
the Linux kernel that supports hard realtime operation plus a collection
of loadable kernel modules that provide a small fast realtime operating
system on top of Linux. RTLinux is distributed by FSMLabs. FSMLabs
can be found on the network at www.fsmlabs.com


Q: Why do I get messages about unresolved symbols?

A: Try doing a full recompilation: make mrproper in the Linux kernel directory;
make mrproper in rtl. Reboot, and your problem should go away. In general,
recompiles from scratch tend to solve most problems.


Q: Why does the RT-Linux kernel crash?

A: There are several possible causes.

- You may be using the wrong kernel.  The new versions of "patch"
distributed with Redhat 6.0 and other new versions fail SILENTLY
if you use the wrong kernel version.

- Some distributions contain kernel sources with other patches
applied. These patches may or may not be compatible with RT-Linux. The
kernels that come with redhat generally will not work with the RTLinux
patch.
If unsure, try downloading the kernel sources from ftp.kernel.org,
www.kernel.org or one of its mirrors.

- Check that you specify the correct CPU type. For example, if you
have a Pentium, be sure to change the CPU type from the default 686 to P5.

- gcc 2.7.2.3 or egcs 1.1.2 (2.91) is recommended for kernel compilation.
If your gcc has different version, this may be a problem.

RedHat systems are fine. On newer Debian systems, you need to install
the gcc272 package.
On my system I have made the following symbolic links:
/usr/bin/gcc -> /usr/bin/gcc272
/usr/bin/cc -> /usr/bin/gcc272

If nothing works, please report the problem to the mailing list
(rtl@rtlinux.org).



Q: How do I compile my own programs for RT-Linux?

A: You need to put the following line into your Makefile:
include rtl.mk
The rtl.mk file is created in the rtl/ directory
during compilation of Real-Time Linux.
It contains the paths to include files and compiler options.

You need to put the rtl.mk file into a place where `make' can find it,
for example, into /usr/local/include, or the current directory.

Simple programs can be compiled with 
make -f rtl.mk rt_process.o


Q: How do I use shared memory in real-time Linux?

A: Look in rtl/drivers/mbuff


Q: Why do I get messages about unresolved symbols in rtl_fifo.o: (rtl_register_chrdev
and rtl_unregister_chrdev)?

A: You need to load the rtl_posixio.o module from the system directory. Alternatively,
comment out the
#define CONFIG_RTL_POSIX_IO   1
line from include/rtl_conf.h and recompile.

To save yourself the trouble of figuring out what modules need to be loaded,
type make install, and then
modprobe rtl_sched
modprobe rtl_fifo

This will load modules needed for running basic real-time programs.


Q: Why do the programs using the old (versions 1.x and older) RT-Linux API
fail to compile?

A: You need to uncomment CONFIG_RTL_USE_V1_API in include/rtl_conf.h and
recompile the system. Note: when CONFIG_RTL_USE_V1_API is enabled, the
time units for the new API's time-related functions, e.g. gethrtime are
no longer nanoseconds, but 8254 ticks (see the next question).
Therefore it is best not to mix two APIs in the same program.


Q: What are the time units in RTL versions 1.x? What does rt_get_time() return?

A: They are the ticks of the PC timer, 8254. There are 1193180 ticks
in a second. rt_get_time() returns the number of 8254 ticks since the rtl_time
module was installed with insmod.


Q. What is FSMLabs? 
A. FSMLabs  (Finite State Machine Labs) is the  development lab for RealTime
Linux (RTLinux) and for some embedded Linux work as well. The lab is part
of VJY Associates LLC, New Mexico. 

Q.  What version of Realtime Linux is provided on the Zentropix CD?

A. Zentropix has two CDs. On has an early version of RTLinux, the other has
something called RTAI which was originally a RTLinux variant, but now
according to its author, is something on its own. The RTLinux authors
are not connected with this release and believe that labeling it as 
"RealTime Linux" is misleading 


Q. What is the difference between RTAI and RTLinux?
A. The authors of RTAI have developed an incompatible API starting
from the RTLinux base code. 


