


                Open RTLinux Installation Instructions

                            FSM Labs, Inc.
                        http://www.fsmlabs.com

Abstract:

This document is intended to guide the user through the installation
steps needed to compile and install RTLinux from the Web.


Contents

  * Preparing for Installation
      + Downloading Linux Kernel
      + Notes on other software

  * RTLinux Installation
  * Post Installation and Running RTLinux Programs
  * Documentation and Sources of Help
  * About this document ...

Preparing for Installation

Downloading Linux Kernel

In order to compile the RTLinux kernel, first you need to download the
kernel for which RTLinux was built. To do so, note that there are
patches in patches directory by the name kernel_patch*. For
RTLinux 3.1, these files are:

  * kernel_patch-2.4.20-rtl, and
  * kernel_patch-2.4.29-rtl

Where:

  * kernel_patch-2.4.20-rtl is for kernel 2.4.20 which can be found at
    http://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.20.tar.gz

  * kernel_patch-2.4.29-rtl is for kernel 2.4.29 which can be found at
    http://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.29.tar.gz

Notes on other software

Please make sure you have all software required to run the specific
kernel version. This information can be found in Documentation/Changes
file in the kernel tree.

In particular, RedHat 7.0 and 7.1 systems tend to have problems with
compiling RTLinux 2.4.x kernels because of wrong gcc versions in these
distributions. If you use a 2.4.x kernel on a recent RedHat system, you
need to change the
CC              = $(CROSS_COMPILE)gcc
in the Linux kernel Makefile to
CC              = kgcc

In others Linux distributions it is convenient to use a 2.95 version of gcc

RTLinux Installation

 1. Choose a directory for RTLinux installation. In this example, we
    will use $(YOUR_RTL_ROOT). We will also assume that you have put
    Linux kernels and the RTlinux distributions into $(PATH_TARFILES).
    You can choose any other directories for your installation.

 2. unpack the chosen Linux kernel into this directory:

      + rm -rf $(YOUR_RTL_ROOT)
      + mkdir $(YOUR_RTL_ROOT)
      + cd $(YOUR_RTL_ROOT)
      + tar xzf $(PATH_TARFILES)/linux-2.4.20.tar.gz

 3. unpack the RTLinux distribution:

      + tar xzf $(PATH_TARFILES)/rtlinux-3.1.tar.gz

 4. Patch the kernel with the RTLinux patch:

      + cd linux
      + patch -p1 < ../rtlinux-3.1/patches/kernel_patch-2.4.20-rtl


 5. Next, you need to configure the Linux kernel:

      + make config OR make menuconfig OR make xconfig

    Enabling APM support is not recommended. APM BIOS calls may have
    unpredictable effect on real-time performance.
    
    Disable local APIC support. This option is not supported in the 
    free version of RTLinux.

    On Alpha machines, you need to enable RTLinux Support
    (CONFIG_RTLINUX). On i386 and PPC, this is done automatically.

    Please make sure to specify the correct CPU type for the target
    machine.

 6. Compile the Linux kernel and modules:

      + make bzImage On PPC and Alpha use make vmlinux
      + make modules

    Install the Linux kernel and modules:

      + make modules_install
      + cp arch/i386/boot/bzImage /boot/rtzImage For non-x86, please
        use procedures appropriate for your boot loader.

 7. (x86-only) Configure LILO. To do so, edit /etc/lilo.conf to contain
    the following piece (you only need to do this once):

    image=/boot/rtzImage
            label=rtlinux
            read-only
            root=/dev/hda1

    WARNING: replace root=/dev/hda1 in the above with your root
    filesystem. The easiest way to find out which filesystem it should
    be, take a look at the existing entry in your /etc/lilo.conf for
    "root=". Alternatively, type "df", and look for the line for "/" in
    the "mounted on" column. The corresponding entry in the
    "Filesystem" column is your root filesystem.

 8. Install LILO:
      + /sbin/lilo

    Restart the computer:

      + /sbin/shutdown -r now

    Load the RTLinux kernel: At the LILO: prompt, press "Shift" or
    "Tab". This will give you a listing of the available kernels.
    Enter:

      + rtlinux

    The RTLinux kernel should boot.

    The next step is to compile RTLinux proper.

      + cd $(YOUR_RTL_ROOT)/rtlinux-3.1
      + ln -sf $(YOUR_RTL_ROOT)/linux linux

 9. Configure RTLinux:
      + make config OR make menuconfig OR make xconfig

10. Compile RTLinux:
      + make
      + make devices

Post Installation and Running RTLinux Programs

To be able to run any programs, you must first load the rtlinux
modules. To do so, type:

  * cd $(YOUR_RTL_ROOT)/rtlinux-3.1
  * scripts/insrtl

You can also try running the examples. To do so, simply go to the
appropriate directory under $(YOUR_RTL_ROOT)/rtlinux-3.1/examples and
follow the instructions in the corresponding README file.

Documentation and Sources of Help

In case of problems, please consult the FAQ first, available in the
docs/ directory.

If all of the above fails, you can obtain help from your peers via the
rtl@rtlinux.org mailing list for which you can un/subscribe to via
http://www.rtlinux.org/mailing_lists.html .

FSM Labs further provides commercial support, development, and
training. Please contact FSM Labs at

    business@fsmlabs.com

or visit their website at

    http://www.fsmlabs.com

for additional information.

About this document ...

Copyright: 2001 FSM Labs, Inc.
-----------------------------------------------------------------------


    support@fsmlabs.com

-----------------------------------------------------------------------

Michael Barabanov