Note: Most of this was taken from the
Installation.txt that comes with RTLinux 3.1.
1. Make sure you have RedHat set up
appropriately.
When installing RedHat you need to perform a
Custom install and select Development, Kernel Development, Utilities, and
Select Individual Packages.
At the Individual Package Selection screen, go
to Development --> Languages and select compat-egcs.
Next go to Development --> Libraries and select compat-glibc. Select any
other packages you wish to install and continue the installation.
2. Download appropriate files.
Download RTLinux 3.1:
Download the Linux 2.4.4 kernel:
Place the files
linux-2.4.4.tar.gz
rtlinux-3.1.tar.gz
into /var/tmp
3. Unpack the files
rm –rf /usr/src/rtlinux
mkdir /usr/src/rtlinux
cd /usr/src/rtlinux
tar –xzf /var/tmp/linux-2.4.4.tar.gz
tar –xzf /var/tmp/rtlinux-3.1.tar.gz
4. Patch the kernel
cd linux
patch –p1 < /usr/src/rtlinux/rtlinux-3.1/kernel_patch-2.4.4
5. Configure the kernel
Before configuring the kernel, a line in the
Makefile needs to be edited. Open /usr/src/rtlinux/linux/Makefile with your
favorite editor. Change the line
CC =
$(CROSS_COMPILE)gcc
To
CC =
kgcc
Now run (run any one of these)
make config OR make menuconfig OR make xconfig
Be sure to disable APM support and select the
correct type of CPU.
6. Compile and install the kernel and modules
make dep
make bzImage
make modules
make modules_install
cp arch/i386/boot/bzImage /boot/rtzImage
7. Configure LILO
Edit /etc/lilo.conf and add the
following lines:
image=/boot/rtzImage
label=rtlinux
read-only
root=/dev/hda1
Note: replace root=/dev/hda1 with your root filesystem. Look at the other root= entries in lilo.conf to find out what this should be.
8. Install LILO and reboot
/sbin/lilo
/sbin/shutdown –r now
Select rtlinux from the RedHat
kernel selection screen.
9. Configure and Compile RTLinux
cd /usr/src/rtlinux/rtlinux-3.1
ln –sf /usr/src/rtlinux/linux linux
make config OR make menuconfig OR make
xconfig
make dep
make
make devices
make install
10. Post Installation
To be able to run any real time
programs, you need to load the RTLinux modules:
rtlinux start
To start RTLinux automatically upon
boot (if you select the rtlinux kernel), edit
/etc/rc.d/rc.local and put the
following at the end of the file:
if [ `cat /proc/sys/kernel/osrelease` =
“2.4.4-rtl” ]; then
/usr/bin/rtlinux start
fi
Note: In the above
code, a single quote ( ‘ ) is NOT used. The character used is a grave accent (
` ), which is above the TAB key on the keyboard.
11. Additional information
Additional information can be found
in
/usr/src/rtlinux/rtlinux-3.1/Installation.txt