Victor ,
RTL users

Attached is an updated version of my install file for RTLinux-2.2
I'll do the others as I get to them....
   soon I hope

      Phil Wilshire


Date: Thu, 11 Nov 1999 16:16:57 -0800
From: Phil Wilshire <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: [rtl] Version RTL 2.2 Install guide

Please use / read / comment

Modified by Victor Yodaiken for RTLinux2.2
Modified and corrected by Phil Wilshire 

Installing RTLinux...

    This guide is free; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.



(C) Phil Wilshire  2000


The steps are...
============================================================================
1 ... unpack the kit
============================================================================



The steps I use are :

1.1 get a clean kernel from ftp.us.kernel.org
1.2 get the patch file FOR THAT KERNEL.

1.3  move your current copy of /usr/src/linux ( if it is not a link ) to
     /usr/src/oldlinux



    check with
    ls -l  /usr/src
    links look like this

ls -l /usr/src/linux
lrwxrwxrwx   1 root     root           17 Aug 17  1998 /usr/src/linux ->
va-linux-2.0.34-1
( in this case just delete the link and do the untar )

    If you have to move a tree do
    cd /usr/src
    mv linux oldlinux


1.4 Create a working directory .. I use /usr/src

    cd /usr/src

  You may need to do this as root .

  This will allow you as a user to access this.
  NOTE: do most of your work as a regular user .. it's safer.
  
1.5 Untar the RTLinux tarball into /opt/rtl

   ie if the tarball is in /opt/download/rtl/rtlinux-2.2.tgz

   cd /usr/src/
   tar xvzf /opt/download/rtl/rtlinux-2.2.tgz

   This will create 
   /usr/src/rtlinux-2.2

   Loosen up the restrictions on this dir
   chmod -R a+rw rtlinux-2.2


1.6 Look in the INSTALL file and follow the instructions.
   for example

   ********************INSTALL******************************
1. put a fresh copy of Linux 2.2.14 in this directory under the name
"linux.

2. cd linux
   patch -p1 < ../kernel_patch
   ***********************************************************

This means take the linux-2.2.14.tar.gz tarball and put it where the 
install guide suggests.

   ie if the tarball is in
/opt/download/linux/linux-2.2.14.tar.gz

   cd /usr/src/rtlinux-2.2
   tar xvzf /opt/download/linux/linux-2.2.14.tar.gz

============================================================================
2.0 Patch the Kernel
============================================================================

2.1 Run the patch

    Now you can patch.

  cd /usr/src/rtlinux-2.2/linux 
  patch -p1 < ../kernel_patch


2.2 Check for Rejects
   There should be no none nada rejects.


Here is an example of a reject ...


--------------------------
Patching file arch/i386/kernel/irq.c using Plan A...
Hunk #1 failed at 39.
Hunk #2 succeeded at 236.
Hunk #3 succeeded at 280.

Hunk #21 succeeded at 1324.
1 out of 21 hunks failed--saving rejects to arch/i386/kernel/irq.c.rej
----------------------------------
You find any rejects like this

  cd /usr/src/rtlinux-2.2/linux 
  find ./ -name *.rej
 ./arch/i386/kernel/irq.c.rej

You can only patch once ( well sort of ) so start again if you trip up.
cleanup

  cd /usr/src/rtlinux-2.2/
  rm -rf linux
  tar xvzf /opt/download/linux/linux-2.2.14.tar.gz

============================================================================
3.0 Configure and compile the Kernel
============================================================================

3.1 look at what's running

Now we need to configure and compile the patched kernel.
First we need to look at what's running.


[wilshire@demosbc2 linux]$ /sbin/lsmod
Module                  Size  Used by
3c59x                  18952   1

Then we need to configure our new kernel.
We see the modules used and make sure that we 
configure the new kernel for the same ones.

3.2 Configure the kernel

cd /usr/src/rtlinux-2.2/linux
make menuconfig

and check options as required

Code maturity level options  ---> yes

Processor type and features  --->
        (PPro/6x86MX) Processor family

        [*] Symmetric multi-processing support 

Loadable module support  --->
        [*] Enable loadable module support
        [ ] Set version information on all symbols for modules
        [ ] Kernel module loader
General setup  --->         accept defaults
Plug and Play support  ---> accept defaults
Plug and Play support  ---> accept defaults
Networking options  --->    accept defaults
SCSI support  --->          accept defaults

Network device support  --->
        Ethernet (10 or 100Mbit)  --->
                [*] 3COM cards
                <M> 3c590/3c900 series (592/595/597) "Vortex/Boomerang" support
        ( in this case )
and finally

Kernel hacking  --->
        [*] Magic SysRq key
        
( this may come in handy )

Right having done all this ...
      save the configuration
      build the kernel

3.4 Compile the kernel

[wilshire@demosbc2 linux]$ make dep; make clean; make bzImage

go for a cup of tea , read your mail, write a manual ....10 minutes or
so.

You will end up with a new Kernel a new Symbol.map etc.

BEFORE you do anything else... set your system up to use this new kernel


go to root
su

3.5 Make/ Install the modules

make the modules
  make modules; make modules_install
watch the result here
 
[root@pasrack3 linux]# make modules_install
Installing modules under /lib/modules/2.2.14-rtl2.2/net
Installing modules under /lib/modules/2.2.14-rtl2.2/misc
the 
 /lib/modules/2.2.14-rtl2.2
shows you that just about every thing is well.



============================================================================
4.0 Set up boot / Lilo
============================================================================
copy the boot image to the right place
   cp arch/i386/boot/bzImage /boot/bzImageRTL20

copy the Symbol.map to the right place
   cp Symbol.map /boot/Symbol.mapRTL20

make the new symbol.map " active"
   rm /boot/Symbol.map
   ln -s /boot/Symbol.mapRTL22 /boot/Symbol.map

edit /etc/lilo.conf

It should look like ...
=======================================================
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50


image=/boot/bzImageRTL22
        label=linuxRTL22
        root=/dev/hda1
        append="mem=126M"
        read-only

image=/boot/bzImage
        label=linux
        root=/dev/hda1
        append="mem=126M"
        read-only
======================================================
#<keep another around just in case >

Run Lilo

[root@demosbc2 linux]# /sbin/lilo
Added linuxRTL22 *
Added linux


============================================================================
5.0 Boot 
============================================================================
Now is the time to reboot


Having rebooted we need to move the linux source link to our new source
tree.
We also shour create an rtl tree
rm /usr/src/linux
ln -s /usr/src/rtlinux-2.2/linux /usr/src/linux
rm /usr/src/rtl
ln -s /usr/src/rtlinux-2.2 /usr/src/rtl

============================================================================
6.0 Make the Modules
============================================================================
Now we can make the rtl modules

Check and adjust the date


[root@demosbc2 rtl]# date
Wed Nov 10 23:14:18 PST 1999
[root@demosbc2 rtl]# date 11111452
Thu Nov 11 14:52:00 PST 1999


cd /usr/src/rtlinux-2.2/rtl
make

....

Now you need to become root and do "make install"
[root@demosbc2 rtl]# make install

Testing for the mbuff device... mknod /dev/mbuff c 10 254
Testing for FIFOs... already existent.


Instaling modules in /lib/modules/2.2.14-rtl2.2/misc
/sbin/depmod -a
Installing man pages to /usr/local/man
Installing header /usr/include/rtlinux
install -c -m 644 rtl.mk /usr/include/rtlinux;

=======================set up your path============================
try lsmod
if you get 
[root@demosbc2 fp]# lsmod
bash: lsmod: command not found

do this
export PATH=/sbin:/$PATH
then try again

[root@demosbc2 fp]# lsmod
Module                  Size  Used by
3c59x                  19176   1 
=====================================================================
That's it for the main install..

============================================================================
7.0 Run the examples
============================================================================
Now for the examples

=========================fp=====================================
cd examples
cd fp
make
mv rt_process.o fp_tasks.o

export PATH=/sbin:$PATH  <- only if /sbin is not in your path
chmod a+x ../../insrtl   <- you need to do this only once
chmod a+x ../../rmrtl    <- and you need to do this only once
cd ../../; ./insrtl
cd examples/fp
make test

[root@demosbc2 fp]# make test
insmod fp_tasks.o
./fptest
         <---   use ^C to quit this
make: *** [test] Interrupt


[root@demosbc2 fp]# lsmod
Module                  Size  Used by
fp_tasks                 892   0  (unused)
rtl_fifo                5944   0  (unused)
rtl_posixio             6952   0  [rtl_fifo]
rtl_sched              35364   0  [fp_tasks rtl_posixio]
rtl_time                8424   0  [fp_tasks rtl_sched]
3c59x                  19176   1 

[root@demosbc2 fp]# rmmod fp_tasks
=====================================================================

[root@demosbc2 examples]# cd ../frank
[root@demosbc2 frank]# make
[root@demosbc2 frank]# make test 
.....
FIFO 2: Zappa 
FIFO 1: Frank 
FIFO 2: Zappa 
FIFO 2: Zappa 
FIFO 2: Zappa 
FIFO 1: Frank 
......
frank_app: now sending commands to stop RT-tasks

This all works
=============================================================================
[root@demosbc2 frank]# cd ../hello
[root@demosbc2 hello]# make

[root@demosbc2 hello]# make test
This is the simplest RTL program
First we remove any existing rtl-modules
You may see error warnings from "make" - ignore them
Type <return> to continue

rmmod sound
rmmod: module sound not loaded
make: [test] Error 1 (ignored)
rmmod rt_process
rmmod: module rt_process not loaded
make: [test] Error 1 (ignored)
rmmod frank_module
rmmod: module frank_module not loaded
make: [test] Error 1 (ignored)
(cd ../../; ./rmrtl)
Now insert the fifo and scheduler
Type <return> to continue

(cd ../../; ./insrtl)
Now start the real-time tasks  module
Type <return> to continue

Now let's stop the application
Type <return> to finish

[root@demosbc2 hello]# 
=========================look on the console to see any
messages=========

cd ../measurements
make 
make test

min:     9152, max:    17632
^C    <- do this to interrupt
make: *** [test] Interrupt

[root@pasrack3 measurements]# 


to look at some stuff try this
./monitor > m.out&
sleep(25)
./histplot m.out m.res
cat m.res | more

=====================================================================

That's enough for the examples....


Hope this helps
  Phil Wilshire ( May 25th 2000 )









=====================================================================
Example Reboot Problem.

I'm running RedHat and my ehternet card 
doesn't work now...

Solution #1 
something to do with 
cat /proc/version >/lib/modules/2.2.14-RTL2.2/.rhkmvtag
but this still does not work. I am working on it.


So

Solution #2
add 
# load up eth0
/sbin/modprobe eth0

to /etc/rc.d/rc.sysinit 
near the end



Hope this helps
    Phil Wilshire

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to