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 the top-level directory by the name kernel_patch*. For RTLinux 3.1, these files are: * kernel_patch-2.2.19, and * kernel_patch-2.4.4 Where: * kernel_patch-2.2.19 is for kernel 2.2.19 which can be found at http://ftp.kernel.org/pub/linux/kernel/v2.2/linux-2.2.19.tar.gz * kernel_patch-2.4 is for Linux kernel 2.4.4 which can be found at http://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.4.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 RTLinux Installation 1. Choose a directory for RTLinux installation. In this example, we will use /usr/src/rtlinux. We will also assume that you have put Linux kernels and the rtlinux distributions into /var/tmp. You can choose any other directories for your installation. 2. unpack the chosen Linux kernel into this directory: + rm -rf /usr/src/rtlinux + mkdir /usr/src/rtlinux + cd /usr/src/rtlinux + tar xzf /var/tmp/linux-2.2.19.tar.gz 3. unpack the RTLinux distribution: + tar xzf /var/tmp/rtlinux-3.1.tar.gz 4. Patch the kernel with the RTLinux patch: + cd linux + patch -p1 < ../rtlinux-3.1/kernel_patch-2.2.19 OR, if you're using a 2.4.xx kernel: + cd linux + patch -p1 < /usr/src/rtlinux/kernel_patch-2.4.4 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. 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 /usr/src/rtlinux/rtlinux-3.1 + ln -sf /usr/src/rtlinux/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 /usr/src/rtlinux/rtlinux-3.1 * scripts/insrtl You can also try running the examples. To do so, simply go to the appropriate directory under /usr/src/rtlinux/rtlinux-3.1/examples and follow the instructions in the corresponding README file. Documentation and Sources of Help The docs/html/GettingStarted document contains a brief introduction to RTLinux. Additional documents in docs/html also provide information about other aspects to RTLinux such as web installation, CD installation, FAQ, and RTiC-Lab. 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 2001-07-26