Author: Herb Johnson and Chris Albertson Date: 970923 Revision: #1 970923 Key Words: computation
ALPHA version 0.61, Sept 1 1997 Herb Johnson and Chris Albertson, TASS
authored by Herb Johnson
I have reformatted Herb's document slightly to try to make
the Microsoft WORD document read properly in HTML.
Michael Richmond, 10/25/97.
I've accumulated all the TASS mail traffic, private and posted, on Linux, RT Linux and the TASS Mark
III driver for Linux. Then I distilled it into a "Q&A" format, roughly in the form someone would want to
read in order to install (or consider) using this suite of software. The "questions" to be answered by this
document are given below. I've also compiled some history of TASS Linux driver development.
>
"Linux" is a freely distributed Unix-based operating system with a lot of software tools and programs. "RT
Linux" is a development of the Linux kernel to support "real-time" operations. The "kernel" is the core of
the operating system. The "TASS driver" is a program written to use the RT features added to Linux to
support the TASS Mark III camera under Linux, remotely or locally.
What you need to do to use Linux, Linux-RT, and the TASS driver is:
As of Aug 97, Chris and I have come up with the means to minimize some of the above steps. We
recommend a convenient distribution of Linux. We describe where to obtain all the above stuff. All this
may change.
In this version of the document [0.61] the information on obtaining and installing Linux is complete. The
info on compiling the kernel with RT is complete up to the point of installing the new kernel. The rest of
the info needs debugging but should be in the ballpark. However, this is an ALPHA document, which is
to say the information in it is incomplete and may be inaccurate in details. But it is more useful to have it
available as "clues" as to what you need to do, than not to have this document at all.
The appropriate questions are:
I [Herb Johnson] am the author of this note, although much of it is edited from Chris Albertson's mail on
this subject. So I'll take the hit for any errors or omissions. But as all these things are moving targets, I
can't guarantee that any of this information will still hold true in a week, month or year.
Herb Johnson
Revision history:
rev 0.61 1 Sept 97 HRJ
Conservatively decided to use 2.0.27 sources and original 0.5 kernel patch.
Downloaded 2.0.27 from Linux Web site kernel distributor.
Patch worked with no errors, produced
bootable diskette but could not load RT test program
modules successfully. Corrected docs accordingly.
rev 0.6 27 Aug 97
RT linux for 2.0.29 works for 2.0.30! This document with corrections/additions by Chris.
Introduction written. Document reorganized. The instructions for modifying the kernel and installing new
kernel sources have not been "verified". I'm releasing this document so folks can read it and get the right
stuff to get Linux running.
rev 0.58 20 Aug 97
Added info on files for RT Linux. Updated RT Linux install for 2.0.29 *as best I can guess them*!!
Some corrections to the history as given by Chris recently. More emphasis on MS-DOS co-existance
with Linux.
rev 0.55 18 Aug 97 -
review by Chris
rev 0.5 20 Aug 97
first alpha release of document
Chris: My test system is an 8MB 486DX and has no monitor or keyboard just
an Ethernet card. It has only 80MB of disk space for Linux and
40MB for DOS 6.22 The drive is an old ESDI model.
Herb: Whatever hardware you have, document what each card is and what it does. (If you have full
documentation on your video card and monitor, that would be very helpful at a later point.) This is not
absolutely necessary to get Linux running, but it is to tune it up and to get best performance. Read the rest
of the Linux installation notes to get some particulars.
Herb: You need Linux, in a particular and unmodified version of the kernel, installed on a PC.
You need the RT Linux patches to that kernel, and you need to recompile the kernel.
You need the TASS driver software from wherever Chris has archived it. You will also need to obtain a
libary, CFITSIO, to support this TASS driver.
Herb: By late August, Chris tried all three distributions in this set, and the Red Hat 4.2 was the "least
painful" of them. It also has the appropriate 2.0.30 kernel in it for the 2.0.29 kernel version of RT Linux.
Chris: I found the four-disk Tri_Linux set in my mailbox when I got home
Early Sunday morning. Just a stiff envelope with four disks each
in a white paper CD envelope. minimalist packaging. $1.65 1st class
stamp got it here. Apearently they mailed it shortly after my order.
Here is a clue about what to do with the CD. It comes with zero printed documentation. All this is
covered in some files buried 8 directories deep someplace on the disk. [Herb: There is documentation on
the CD-ROM. It is in HTML format and you'll need a Web browser to read them or to print them.] There
is also copious quanities of documentation on-line (http://www.redhat.com/)
Document all your hardware:
Figure out if you want to have any drives or partitions of drives for MS-DOS/Windows and what
you want for Linux. Back up anything you might want to save on the
system you are installing Linux opon: you'll probably lose it.
You'll need to have some system around that can run MS-DOS with a CD-ROM
to produce the Linux boot-up floppies: your final Linux system need not
have an MS DOS partition, but it's a very good idea. For instance, I have an IDE drive on my Linux
system with MS-DOS on it, and a SCSI drive with Linux. The boot program of Linux called "LILO" will
let youboot either Linux or MS-DOS (or other OS's).
Chris adds: "You do want a way to boot DOS for at least two reasons: 1)Many ethernet
cards have EEPROM that holds setup info like what IRQ and base address.
You _will_ need to move the Ethernet card off its default 0x300 base
address as I noticed that is where the MkIII card likes to live.
The set up and diagnostic program that comes with the card will need
DOS. You can program the card in a DOS machine, pull it out and stuff
it back in the Linux machine but what I pain. 2)Also you will likely
want to run TM3GETxx on the machine so make a DOS partition. There
is no need for Win95 DOS is enough.
Chris says:
Herb's Installation notes: (Aug 1997)
NOTE: If you do not know what monitor you have, then use "generic monitor"
or "generic multisync." THE WRONG INFORMATION here could
DAMAGE YOUR MONITOR when you run X-windows! But you
don't have to run Xwindows to run Linux or the TASS driver.
Then it asked about "LILO installation." This is how Linux boots up.
It offers either a hard disk bootup or a floppy: your choice here. Then choose the appropriate
hard disk partition to boot. After configuring LILO, it asked to reboot the installed Linux.
Rescue Modes (From the Red Hat docs):
(Note: the simplest thing to do may be to reinstall everything, rather than go through this stuff. -- Herb)
When things go wrong, there are several ways to work on fixing them. However, they require that you
understand the system well. This manual can't teach you what to do, but we will present the ways that you
can use our products to get into rescue modes where you can use your own knowledge to rescue the
system.
If your system boots, but does not allow you to log in when it has completed booting, you can use the
single or emergency boot option. At the LILO boot: prompt, type linux single in order to boot in single-
user mode. In single-user mode, your local filesystems will be mounted, but your network will not be
activated. In emergency mode, almost nothing will be set up.
Only the root filesystem will be mounted, and it will be mounted read-only.
The installation floppy set can also be used as a rescue disk set. When you boot the boot floppy, type
rescue at the boot prompt. The install process will ask a few questions, request that you insert the second
disk, and set up shells on VC 1 and VC 2. The shell that is running is ash, a minimal bourne shell with no
history or command-line editing.
This is a good question. There are zillions of them. Since you (presumably) have
the recommended Tri-Linux CD's, you don't need a book with a Linux
CD in it (many of them have one, but the CD's are generally several months
old.). I generally recommend you find a large bookstore and browse through
their books until you find one or two that suit you. You can also go to
various computer shows and get discounted books, new or not so new:
newer is better, but old is not so bad. You can also get cheap Linux CD's.
A book I (Herb Johnson) recommend for beginners is Running Linux (2nd
Edition) by Matt Welsh and Lar Kaufman (O'Reilly and Assoc. publ.) Although
the contents are dated roughly from late 1996, almost all the stuff holds up
well. For our purposes, Matt refers often to the Red Hat distribution. This
book is well-recommended, and it seems to assume you have a few clues about
MS-DOS and Linux, but not too many. It's better-written than most of these books (no surprise, Matt
Welsh is the author of several books in the freely distributed Linux Documentation Project docs).
Don't forget to read the many README files buried in various parts of the Linux system. For example,
there are README's in the kernel source directories. On the Red Hat CD there is a /doc/HOWTO
directory with several gzipped "how to" documents in text form. Use the commands
to copy and unzipped the document into an appropriate directory. The Kernel howto is recommended
reading.
You might know that Linux kernel sources are distributed with almost all distributions. But as Chris
recently pointed out:
"Also note that the .30 source included in RH4.2 is +not+ pure generic source as released to the world by
Linus T. The folks at RH applied some .31 "Pre-release" fixes. So what RH4.2 comes with should be
called .30a or .30 1/2 So even if someone tells you it works on .30 ask where they got .30 from."
The Web site for the Linux Documentation Project is
Use your FTP or Web browser to connect to these sites and look for the kernel sources in a "tarred" and
GZIPped format, for instance "linux_kernel_2.0.29.tgz" or "linux_kernel_2.0.27.tar.gz". Download it, it
should be about 6 megabytes.
Chris: If you have not already found RT Linux check this site:
From the RT Linux Web site:
There are currently [Aug 97] two versions of RT-Linux:
The stable version is 0.5 and is supplied as patches against
Linux 2.0
[Herb: as of late Aug 97, the patches for 2.0.29 seem to work for 2.0.30.]
First you may have to install the correct version of the kernel. This means you need to install the
appropriate kernel sources and then compile them, and then install the compiled kernel on your system. In
the Linux world this is a common thing to do. For the RT modifications to the kernel, you have to install
the RT changes to the kernel sources before compiling.
On Fri, 1 Aug 1997, Neville Ellement wrote the following. I've [Herb] edited it to reflect my experiences.
"Earlier this year I posted [in the RT Linux maillist] how I installed RT-Linux. Because this still seems to
be a problem I`ve just posted a little longer (and hopefully more precise) version of Till Christian
Siering's
[Note: this "configuration" requires you to know a lot about how LILO works, how your system boots,
your configuration of hard drives and their partitions. If you don't know these things, you may not be able
to complete this installation. - Herb]
[If there are error messages here, you may have had problems with the LILO installation of the new
kernel and its "map" of supported kernel routines; or with compiling the new kernel. - Herb]
On Thu, 17 Jul 1997 00:04:12 -0700, Chris Albertson
This new RT Linux driver version now comes with one very primitive client. I call it a "command client."
You start it up in an xterm (the command is "cclient") and it gives you a prompt
<"tass"> you can then type anything you could have typed at the server. All the commands like "begin"
and "set_xxx" work just as before. The old way still works too. The server still reads from the keyboard.
You can run multiple copies of the client if you want. This sounds useless but it permits you to start and
kill clients while the server is running. It also demonstrates that the server can manage multiple
simultaneous client connections. More importantly, it gives you a way to login via the Internet, issue a few
comands, then drop the connection. So now, to run remotely you no longer need to stay logged in all
night.
The client will also run on a non-Linux UNIX box. So you can run a TASS camera from your Sun
SPARC Workstation.
Date: Tue, 19 Aug 1997 01:22:42 -0700
Herb, the last driver version TASS_Driver_26JUN97.tgz is now at ftp.logicon.com/open/Albertson/
I think 26JUN includes a minimal client. The whole thing should run on your system with no
TASS hardware. It should stay there for a few days at least. Also pick up TASS_Driver_LIBS.tgz. You
will need this to compile. CFITSIO is also required.
You can see by reading the Makefile in TASS_Driver_26JUN97 that I install libraries to the /usr/local/lib
and include files to /usr/local/include. As per RedHat convention anything not installed with RPM
should go into the /usr/local/* tree. You can ignore the TASSClientServer-12MAY97.tgz it is a demo
program to show how a client/server interface works. You can read the source for the client side just to
see how it works. It was writtenfor readability so it should be not to bad.
Directory of /open/Albertson
From: Chris Albertson
Chris: (Aug 97) If the kernel files patched by the RT patch were unchanged from 2.0.29 to .30 then the
RT patch should work on .30 The patch program will let you know if there are problems.
Also note that the .30 source included in RH4.2 is +not+ pure
generic source as released to the world by Linus T. The folks
at RH applied some .31 "Pre-release" fixes. So what RH4.2
comes with should be called .30a or .30 1/2 So even if someone
tells you it works on .30, ask where they got .30 from.
For me getting .29 was the simplest, but if the patch applies
to RH's .30 1/2 good.
[As for testing,] all I can say is try it. To apply a patch just 'cd" to the top
of the source tree. (The directory that contains the big README
file on how to apply patches and compile/install new kernels.)
It should be /usr/src/linux/ and type "patch < fullpathtopatchfile".
There is also a man page on patch.
Another clue, if you look inside the patch file there are filenames
of the files to be patched. Look at what directory these names are
relative to. cd to there. If you get a random patchfile some day
with no instructions that is how to figure it out. A patchfile is
realy just a set of editor commands for a very simple editior.
Chris: (June 97) I have RH4.1 and may get 4.2 In either case you will need
a 2.0.27 or 2.0.29 kernel source tree. RH 4.1 comes with
2.0.27. So this is a no-brainer _if_ you can find it still.
There is always FTP. You could download the whole RH4.1
overnight if you have a fast connection. But I would rather
keep up to date with 4.2 and "downgrade" the Kernel
You can have multiple kernel versions. In /usr/src, make "linux"
is a symbolic link to 2.0.27 or 2.0.29 or 2.0.30. You just
change what it points to before you compile. You'll notice that
/lib/modules is setup already for multiple kernel versions. It
normally contains directorys "2.0.27" and so on.
So if you get RH4.2, mv /usr/src/linux to /usr/src/linux-2.0.30
then "untar" a linux 2.0.29 kernel source tar file. and mv it
to linux-2.0.29. Next make a link "ln -s linux-2.0.29 linux"
Now apply te RT patch and recompile. You may want to test your
ability to recompile before applying the RT patch. You may also
want to copy the good Kernel image that came with RH to something
like "vmlinuz.sav" and to a floppy with "dd". Use the floppy to
boot if things are messed up. It is always good to have a boot
floppy. You can also try using the "make zdisk" make target
when compiling RT Kernel. The zdisk terget puts the new Kernel
image on a floppy and does not overwrite the one on the hard disk.
Now you boot RT from a floppy and eject the floppy to boot the
"clean" RH4.2 kernel. (Don't you just hate it when there are 18
ways to do the same job?)
If this is not clear let me know.
Chris: (Aug 25 97) FYI here is how the code it the RT Linux driver works. The approach
is a little diferent. Credit Norman for the design. The key diference here is that the software _never
waits_ There are three main tasks (plus some minor ones not shown.) The main line logic of each task is
given below.
Timing is fixed by the 8KHz interrupt rate. For a triplet there are 2400 pixels per line (800/CCD) So it
takes 2400/8192 (.29) seconds to read out one line. The RT Linux driver does not drive the hardware at
it's maximum rate. The intent of the design was to use the minimum number of CPU cycles per pixel.
Chris: (Aug 27 97)I am very unlikely to make big changes to the RT portion of the driver. If I do and I
hear it causes problems on a 2.0.30 1/2 based RT system I'll fix it.
The RT portion of the system amounts to about 10% of the total and
has been tested out by Nick. It is basically finished now.
Most of the driver is just normal C code that would compile and
run even on a Sun under Solaris. If the example RT programs included
with the RT patch work [with a given version of the Linux kernel,] then the driver will work. In other
words, if someone has a system where the examples work and the driver fails
I'll fix the driver. The driver doesn't do anything that is not in
the example code so I can feel safe in saying that.
Chris (Aug 22 97) If the .29 --> .30 changes were not it the same area as the RT patches then there is a
good chance building an RT version of .30 could work. If it builds and compiles cleanly there is a good
chance it will run. Only testing can determine if it runs. There is one bug in .27RT I did not find until
running it for weeks. It is minor but shows that bugs can hide for a long time. RT breaks the Linux
adjtime system call. This is the call used to Adjust the clock, to make it run a little faster or slower. I
Figured it would be good for the real-time computer to have it's clock synced to a source tracable to a
standard. xntpd can do that over the internet and keep your clock sync'd to within a couple ms, even over
the phone line. Sounds good but xntpd and RT linux don't work to together.
Now I sync the system clock to an external source, write the system clock to the CMOS clock then don't
run a time sync deamon and depend on the system clock. This works to within a few seconds per day.
In the summer of 1996, there were discussions about some alternative operating system for the
TASS camera than MS-DOS. Given the need to have freely available software whenever
possible, Linux seemed a reasonable choice. During August 1996, Chris Albertson
raised these issues (as summarized by Herb):
"User-class" features include graphics, tools, functions, human interface. The
"controler-class" stuff includes features of camera timing, pumping the data from
the camera, tweaking control parameters.
All of the general support, networking, graphical interface, etc. issues could likely
be resolved with Linux, running in one system or in two. But, it was NOT clear
that Linux (or many convenient OS's) could deal with running a set of real-time
camera tasks AND support a robust user and network interface in one (PC) box
with one processor, or even with one box devoted only to data collection and camera
control.
Meanwhile, Norman Molhant continued to develop "tm3get10, version 1.0 ", the
TASS Data Acquisition Program for MS-DOS, and debated building a Linux version
as demand dictated and pending further refinement of what "remote control" of
a TASS camera meant. There was a tacit agreement that for any remote operation,
a more elaborate computing environment was needed that was also inexpensive.
Linux certainly fitted that description, but there was some question as to its
ability to handle real-time needs and to work uninterruptedly to collect the
data from the CCD device. Other issues included graphics, speed of data transfer
if two computers were used,
About this time, a modification to Linux kernel called "Real-Time Linux" was
under development and became known to members of TASS. The following is
a description of this from the developers:
Victor Yodaiken, Department of Computer Science,
New Mexico Institute of Technology, Socorro NM 87801
yodaiken@nmt.edu
These real-time features and Linux were discussed by Norman, Herb, and Chris. Chris began to put
together a Linux driver from those discussions and the inputs of TASS camera owners. Norman worked
on a port of the "tm3get" program from MS-DOS to Linux, but had problems with stabilizing Linux
on his system. However, Norman did create the Tass MkIII Finite State Automata, a version of the
hardware access features of tm3get, which Chris used in all his subsequent versions of the driver.as the
essential core for camera operations.
Chris led discussions of the "sockets" interface between the camera "server" program and the "client"
programs that would accept the camera data. The advantage of this methodology is that networking and
distributed processing require no additional programming. These issues would arise whether the clinet
was on the same computer as the camera or for remote operation..
Meanwhile, Molhant came up in December with some minor mods to Linux
to support a real-time camera, including a change to the kernel clock timer, and
publically speced out what a Linux-based TASS server
and client should do. By January 97 Chris had roughed out much of the code for both client
and server and offered an "alpha" version for comment. After further development
in March, Chris re-introduced the idea of RT Linux as a means to simplify driver
development. He found RT patches easy to install and to get
running, and effective in some "toy" real-time tasks. By taking code from tm3get,
Chris suggested a robust Linux driver could be completed in short order.
In April Chris listed the modules features
needed to complete a testable Linux RT-based TASS driver. Camera owners Nickolas
and Glenn responded to Chris's proposals with discussions of the details and their
interests in using such a driver.
Concurrently with this discussion was the details of Linux distributions. By consensus
Red Hat's latest distribution was recommended. However, Linux moved rapidly to a new kernel
version just ahead of the kernel necessary for the RT patches. After some discussion
Herb Johnson found a cheap distribution from Linux Systems Labs that included the
latest Red Hat (4.2) distribution with kernel 2.0.30, and other distributions with the
earlier kernel 2.0.29 necessary for the RT patches to that kernel.
Chris continued to develop the driver with considerable help from Norman and his prior
work on tm3get. In May Chris posted a version suitable for testing:
[Chris later commented on the CFITSIO libraries used by the driver:]
As the RT Linux driver collects data, I notice quite a bit of collection
occurs before the CFITSIO package commits the data to disk. This keeps the
disk heads from bouncing around as we write in rotation to three files (six
in the overlap areas.)
You can get the latest CFITSIO (two versions newer then mine, I found
out) from ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/ get file
cfitsio123.tar.Z or via the web at
The current version is v1.23 (24 April 97) It is in ANSI C and compiles
just fine with GNU gcc. There is also a version for DOS and Macintosh
that I have not looked at.
In the next release you'll need some other libraries to compile the
driver. I'll try to collect all these and put them in one place. - Chris
TASS members Norman, Nicholas Besler, now could test the actual code and
comment back to Chris or send corrections, and development ramped up accordingly
Documentation mentioned along the way included the following:
By June 1997 the driver was less prone to simply crashing and sometimes trashing
the file system, as Chris and the others focused in on features and services of the
new driver and the client/server relationship with other programs. The driver
was robust enough that Nick could run the camera remotely. There was some
reexamination about data values, files, camera parameters and such, in order to produce
data consistent with our FITS standards and with the tm3get program. After
resolving these critical issues, Chris gave consideration to mnitoring camera
conditions for camera safety and proper operation. This discussion continues
through August, the time this note was written.
By late June the driver was producing consistent data , needing only minor recoding
to correct some camera assumptions and to be comparable to the tm3get program.
In Aug 1997, the TASS driver was tested further. Discussion between Chris and
Herb centered on documenting and getting the "right" kernel version and "proper" sources. This became
moot when RT user Erik Thiele
Introduction
install Linux;
obtain the proper unmodified kernel sources;
obtain the proper RT Linux kernel patches;
patch and recompile the Linux kernel sources,
and test it with the RT test software;
obtain the TASS driver and the CFITSIO library software;
obtain and install the TASS driver and test it with its test software.
(note: the history will give you some clues about all the above.)
What hardware do I need?
What software do I need?
Where do I get Linux?
From: Herb Johnson
How do I prepare to install Linux?
use a keyboard with 12 function keys (old ones don't have F11 and F12)
know your hard disks and controllers
know what chips your video card uses
know your mouse
...and prepare a few formatted floppies.
How do I install the Linux Red Hat distribution CD?
1) Look on the CD for a file called x:\images\boot.img (using DOS)
2) ..and a DOS program x:\dosutils\rawrite.exe
3) Use rawrite to copy these files onto two formated 1.44 (3.5 inch) DOS
floppies (one each), one for boot and one for "supporting" (recovery)
x:\dosutils\rawrite -f x:\images\boot.img
x:\dosutils\rawrite -f x:\images\supp.img
rawrite should print out instructions (it asked for the diskette drive)
4) reboot using the new "boot" floppy. Follow the on-screen instructions.
5) Expect to trash your first install attempt. You'll know
better how to answer all the questions the second (third, fourth...)
time around.
Fortunately I've done this before, and even watched Michael Richmond
do it...well, his brother...It also helps to run one computer for
notes and the other for installation.
My Linux system is a 486, 16 megs ram, a SCSI drive and an IDE
drive, the latter with MS-DOS and Win 3.1 on it. Of course, the usual
assortment of cards for video and I/O.
I created the disks, rebooted from the boot disk, and got the Red Hat
Linux system install instructions, after asking if I wanted to "rescue"
a previous install or make a new one. It ran a screen/button driven
program which did not recognize my
mouse. To navigate the menus, I used TAB/arrow keys to select
which options I wanted, SPACE to select or deselect, and ENTER
to "click" the selection.
It asked about some of my hardware, then when I told it what disk
partition to install Linux on, it ran the Linux fdisk partitioning
program. This program is command line driven and has a help screen.
You will need to define a Linux swap partition (32 megs is reasonable
in general twice your available memory.) and a Linux native partition.
Some more questions and that step is done. (If you've set these up
previously for Linux you need not do this again.) You may want to create
the following partitions:
a Linux root partition for booting and the Linux system
a Linux partition for TASS stuff (if you mess up the Linux
system partition maybe you can keep this one stable)
a Linux swap partition (small, a few tens of megs depending)
an MS-DOS bootable partition (or separate drive).
Next is software installation, the various software packages.
A log of the software install will be in /tmp/install.log. It asks what
packages you want, then installs them automatically while you wait.
In my case, I went to look at Jupiter through my six-inch f/10
for about half an hour. When I came back, it asked what VGA and mouse I had
and other configuration information. You should know what hardware
you have, including the odd features of your video card and monitor.
What book(s) and documents should I have for Linux?
cp (where_ever_it_is)/(whatever)_HOWTO.gz .
[the "." means to this directory]
gzip -d (whatever)_HOWTO.gz
Where do I get the kernel sources?
http://sunsite.unc.edu/mdw/linux.html
This will get you to a number of resources for Linux and its documentation. For kernel sources, it will
probably direct you to:
ftp://ftp.kernel.org/pub/linux/kernel/v2.0/
and there are other sites too:
ftp://ftp.cs.helsinki.fi/pub/Software/Linux/Kernel/v2.0
ftp://sunsite.unc.edu//pub/Linux/kernel
ftp://tsx-11.mit.edu//pub/linux//kernels
ftp://ftp.funet.fi//pub/Linux//kernel
Where do I get RT Linux?
http://luz.cs.nmt.edu/~rtlinux/
How do I install RT Linux?
1. Go to the base source directory
cd /usr/src
2. Copy the Linux-Kernel sources to this directory
cp where_ever_it_is/linux-2_0_27_tar.gz .
3. Copy the rt-linux sources to this directory
cp where_ever_it_is/rtlinux-0.5.tgz .
4. Remove the linux Directory
rm linux
5. Install the Linux-Kernel sources [27 or 29 as appropriate] and create a link directory to them
tar -xzvf linux-2_0_27_tar.gz
mv linux linux-2.0.27
ln -s linux-2.0.27 linux
6. Install the rt-linux sources
tar -xzvf rtlinux-0.5.tgz
You might also look at /usr/src/linux/README for more information on rebuilding the kernel.
7. Check links to include directories
cd /usr/include
ls -al asm - should point to /src/linux/include/asm-i386
ls -al linux - should point to /src/linux/include/linux
ls -al scsi - should point to /usr/src/linux/include/scsi
8. Go to the base linux source directory
cd /usr/src/linux
9. Type
make mrproper
10. [Herb: Copy and patch with the updated patch for kernel
2.0.29 if that is your kernel
cd /usr/src/rtlinux-0.5
cp where_ever_it_is/kernel_patch_2_0_29 .
cd /user/src/linux
patch -sp2 <../rtlinux-0.5/kernel_patch_2_0_29
]
OR
10. Patch the Linux-Kernel from 0.5 [for kernel 2.0.27]
patch -sp2 <../rtlinux-0.5/kernel_patch
Note: if you get any messages, you may have modified kernel sources.
Try to get some other kernel sources.
11. Configure the kernel and don't forget to turn on module support
make menuconfig
You'll get some kind of menus.
Select your hardware as appropriate (SCSI controllers,
mouse, other things like that. Also select "module support".
12. Create the dependencies and clean up
make dep; make clean
13. Build the kernel and watch, whether -D__RT__ is defined as an Compiler Flag
make zImage
This will take a very long time, on the order of an hour,
depending on your system's speed.
14. Build the modules
make modules
15. Install the modules
make modules_install
You should now have a boot image in /usr/src/linux/arch/i386/boot
as "zImage".
cd /usr/src/linux/arch/i386/boot
check the boot image to make sure it knows what your root file system is:
rdev zImage
should return something like "root device /dev/hda1" or
"/dev/sda1" as appropriate.
To make a boot floppy:
(put MS-DOS formatted floppy in your 1.44 drive)
dd if=zImage of=/dev/fd0 bs=8192 (for drive A)
(the boot image will be copied to the floppy)
GOTO step 21 to reboot and check out your new kernel.
If you like what you see,
you can go to the steps below to replace your old kernel on
your root file system. If
you messed up, you can at least reboot on the old kernel.
16. If you've booted a few times on your new kernel via floppy,
or if you are confident after
compiling and want to immediately replace your old kernel:
Go to your root file system directory, where boot information is stored
( /boot on RedHat - this differs between different
distributions )
cd /boot
17. Copy the kernel image to this directory
cp /usr/src/linux/arch/i386/boot/zImage .
18. Replace the old System.map File (or back it up)
rm System.map (on RedHat this is a link to System.map-Version_Number)
cp /usr/src/linux/System.mp ./System.map-Version_Number
ln -s System.map-Version_Number System.map
19. Configure your Bootloader (assuming you use lilo)
cd /etc
vi lilo.conf
...
20. Install the new kernel
/sbin/lilo
21. Reboot
/sbin/reboot
22. Check, whether the rt-linux symbols are in the kernel
/sbin/ksyms -a | grep " "rt_ | wc -l
this should produce a 7.
23. Go to the 2task examples
cd /usr/src/rtlinux-0.5/testing/2tasks
24. Compile the example
make
25. Read the README file and create the special files for
the rt_fifo_new communication mechanism.
26. Insert the 2tasks example
/sbin/insmod ./rt_process.o
27. Run the user-space process
./app
Hopefully everything works!
++++++++++ end quote ++++++++
What comes with the TASS Linux RT driver?
From: Chris Albertson
Subject: TASS_Driver_26JUN97.tgz
What additional software is needed for the driver?
Subject: RT Linux driver - cfitsio
I wrote:
> > I am using CFISIO.
>
then Molhant Norman wrote:
> That's what I was afraid of. The version I have tried to use was 100% rotten.
> Translated from Fortran by f2c, it was chockfull of bugs. Unusable. So I
> had to write my own (much simpler and more straightforward) code.
>
Older versions where not so easy to use.
The new vertion of CFITSIO is very good. Not only is it easy to use but
it is reasonably good with it's I/O. It maintains a buffer pool of
n 4k blocks and tries to do as little I/O to disk as possable. You can
change n to add more or less buffering. I find that if you write more
or less in order the file grows in 4k increments. The manual is also
professional quality. You can get either the Postscript, ASCII or HTML
version.
As the RT Linux driver collects data, I notice quite a bit of collection
occurs before the CFITSIO package commits the data to disk. This keeps the
disk heads from bouncing around as we write in rotation to three files (six
in the overlap areas.)
You can get the latest version (two versions newer then mine, I found
out) from ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/ get file
cfitsio123.tar.Z or via the web at
http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio_release.html
The current version is v1.23 (24 April 97) It is in ANSI C and compiles
just fine with GNU gcc. There is also a version for DOS and Macintosh
that I have not looked at. [Herb: as of Aug the current version is 1.25.]
In the next release you'll need some other libraries to compile the
driver. I'll try to collect all these and put them in one place.
--Chris
What if I need to work with another Linux kernel version?
How do I install another kernel version?
How does the TASS RT driver work?
1) This routine is tied to a 8KHz timer interrupt. Notice there is
no loop. The periodic interrupt provides this feature.
Send Shift and Start ADC for pixel N
Read High Byte, Low Byte for pixel N-1
Row Count = Row Count + 1
if Row Count == limit then set ROW_DONE
Notice there is no delay between the first two lines. The 125u-sec
period is such that we don't realy have to test the ADC ready bit.
2) This routine runs at a fixed rate of 10Hz. Again there is
no loop.
If ROW_DONE is set then
Move row into the FIFO queue.
set Row Count = 0
endif
return
The FIFO can hold up to about 12 seconds worth of data.
So the next task need not keep up in real-time
3) This task runs at its own rate:
loop (forever)
If (there is data present in the FIFO queue) then
Read one row from FIFO queue
Append row to current output file(s)
else
sleep
endif
end loop
Are there any bugs or upgrade problems with RT Linux and the TASS driver?
What is the history of the TASS Linux driver?
> latency time for task switching vs. TASS task timings, and the predictabilty of that latency.
( Most UNIXs have some random latency that is not controllable.)
> sorting out priorities of tasks
> robust, real-time graphical interface for user control and review
> how much real-time user control?
> networking support
> updates and commercial support
> good development tools
> wide availability of products used
> one processor or many? one box or many?
> A clear division between user tool and controller needs:
> RT-Linux is a Linux kernel with hard real-time tasks.
> Current versions run on the x86 architectures only.
> Real-time tasks are run as loadable modules and may
> be periodic or interrupt driven. On a 120MHz Pentium,
> we have reliably run tasks with periods of 150 micro-seconds.
> This is a development release and undoubtedly there are bugs
> to be found and aspects of the design that should be changed.
> We are actively looking for interesting test applications.
> If you have a candidate application and want some assistance,
> email to rtlinux@luz.nmt.edu.
> If you develop an application, please tell us about it.
>
>
> FTP. ftp://luz.cs.nmt.edu/pub/rtlinux/2.0.0.1/
> Web. http://luz.cs.nmt.edu/~rtlinux/
> Email. rtlinux@luz.cs.nmt.edu
Date: Fri, 02 May 1997
From: Chris Albertson
Subject: RT Linux Driver - ready for test
Chris: For those who have asked for it...
I have posted a copy of the RT Linux driver on
storm.fnal.gov/incoming/TASS_Driver.tgz There
is another copy on ftp.logicon.com/open/chris.
It is a 93Kbyte gziped tar file.
****The program is _NOT_ finished yet.****
Please do NOT put this on any web page. This
file's "time to live" should be about 7 days.
Scratch it after then.
Unpack the file then read the readme.
One thing that is not in the README file:
You need to make a change if you have real
tass Mk III hardware. There are two drivers
in the RT Task (t3_driver) one called tass_fsa
and one called tass_sim. One talks to real
hardware, the other simulated hardware. See
comments at the top of tass-fsa.c to change
the setting. Later there will be a config
file to set this now you simply re-compile.
I am going out of town shortly. I'll
be back Monday morning so if you have
questions I'll get to them then.
http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio_release.html
------------------------------------------------------
Sorry, I just re-read my AAA_README file and it does not give
instructions for switching from simulated to live hardware. So do this:
1) In file tass-fsa.c find the lines that read as follows:
/* This driver operates in two modes. It is controled by the current */
/* setting of TASS_mode. Change the setting of the asignment below */
/* to change the defaultmode. */
int TASS_mode = HW_SIMULATED; /* curent mode */
change "HW_SIMULATED" to "HW_PRESENT" then recompile by typing
"make".
----------------------------------------------------------
++++++++++++++++ BEGIN SAMPLE SESSION (May 13) +++++++++++++++++++
[chris@rabbit Driver]$ ./t3_server
Could not create file X0R_0580.974 ...
trying X0R_0580.9744
rt_driver: RT_Driver started
HELP
Commands are not case sensitive.
Date: Thu, 26 Jun 1997 22:20:39 -0700
From: Chris Albertson
Subject: New RT Linux TASS Driver on storm
I just put two files on storm's /incoming directory. You
will need them both. Get
TASS_Driver_26JUN97.tgz
TASS_Driver_LIBS.tgz
The LIBS file contains a couple directories inside combined
in one easy to download tar file. The libs are pre-built
just copy the *.h files to /usr/local/include and the
libxxx.a files to /usr/local/lib. The Makefile in
TASS_Driver_26JUN97.tgz looks in /usr/local for these.
From: Chris Albertson
Subject: RT Linux TASS driver, 01JUL97
Yet another version of the RT Linux driver is now on storm
/incoming. Many new features. One is command line arguments.
type "t3_server -h" for details. "t3_server -d" is a good
option for debugging as you will see more output to the screen.
The default is "UNIX like" and does not print anything
unless there is an error.
Also there are many more commands. Type "helP' for details.
The default startup "rc file" includes a help command so
you will see the list of commands on startup. So run the
driver in a window with a scrol bar as there are now 30+
commands
One more thing, you will need to install those library
files in /usr/local/lib and /usr/local/include. You
will find them pre-bult on sorm /incomming/TASS_libs.tgz