CAD CAM EDM DRO - Yahoo Group Archive

Re: Setting up Linux for EMC

Posted by Matt Shaver
on 1999-05-28 01:54:22 UTC
> From: "Tim Goldstein" <timg@...>
>
> The talk on the list about the NIST EMC software has been enough to get
me
> motivated to setup RedHat 5.2 Linux on my shop computer. I have played a
> little with Linux previously, so the basic setup went OK and the system
is
> running X-windows just fine and is communicating to my Windows NT
computers
> over the network just fine. I have loaded the RTLinux file from the NIST
> site into my /usr/src directory and have run the tar command to unpack it
> and all is fine.
>
> The patch utility seems to run OK except that it seems there are a lot of
> files it can't find to patch, but when it completes I now see a number of
> RTL references in my Linux directory.
>
> My problem starts when I try to run "make mrproper" from the linux
> directory. I get a message that says "make:*** No rule to make target
> 'mrproper'. Stop." I get this same error if I try any of the "make
config"
> variations also. Any idea what I am doing wrong and how to get the make
> function to run?

I think the problem is that you can't use the kernel source that comes on
the RedHat CD. You must get an updated version for the RTLinux patch to
work. Here are some brief instructions I got from Fred Proctor and which I
have expanded and edited:

EMC Software Installation Instructions

These instructions assume you have Redhat Linux 5.2 already installed and
X Windows correctly configured.

1. Update the Linux kernel headers and sources. These updates are needed
for the RT-Linux patch to work properly. The updates are at:

http://www.redhat.com/swr/ftp.redhat.com/redhat/updates/5.2/i386/

as Red Hat Package Manager (RPM) files. Download the kernel-headers and
kernel-source packages as well as the update for the X server you are using
and anything else that strikes your fancy into a directory of your choice.
I have always downloaded and updated everything.

As user 'root', cd to the directory containing the update RPM files and do:

rpm -Uvh kernel-headers-2.0.36-3.i386.rpm
rpm -Uvh kernel-source-2.0.36-3.i386.rpm
rpm -Uvh etc... for all the remaining updates you downloaded

When updating the kernel headers you will probably get an error message
saying something like "script failed to complete". I have always ignored
this error and there was no problem. You may get a message about
"dependencies". This means that the RPM you are trying to update depends
upon another update being installed first. The dependencies will be listed
and you must update those RPMs first. Usually, I just do:

rpm -Uvh *.rpm

repeatedly until I get messages indicating that all the RPMs are updated
and nothing more can be done.

2. Install the RT-Linux patch, available at:

ftp://ftp.isd.cme.nist.gov/pub/emc/emcsoft/release9J.tgz

Download this file and place it into /usr/src.

As user 'root', do:

cd /usr/src
tar xzvf rtlinux-0.9J
cd linux
patch -p1 < ../kernel-patch
cd ../rtl
make all

3. Recompile the kernel.

As user 'root' from a terminal window in X, do:

cd /usr/src/linux
make xconfig

You need to be running X Windows for the 'make xconfig' line to work. If
you don't want to run X, you can do 'make config', and configure in text
mode. You would do well to take some time with this process and eliminate
any modules or kernel support for hardware you don't have or features you
won't use or don't need. This will SPEED THE BOOT PROCESS and DRASTICALLY
REDUCE THE TIME NEEDED TO COMPILE THE KERNEL! Failure to heed this advice
probably won't cause any problems, but the command 'make modules' can take
more than an hour to execute if many modules are to be built. Configure
your kernel to your liking, or leave it as-is by clicking 'Save and Exit'.
Now continue with the kernel compile:

make dep
make clean
make zlmage
make modules
make modules-install
cp arch/i386/boot/zImage /boot/vmlinuz

If there were errors that prevent the kernel from being compiled, the file
'arch/i386/boot/zImage' won't exist and thus can't be copied. If you have
trouble go back to the beginning of this step, reconfigure, and try again.

4. Edit /etc/lilo.conf so that it looks somewhat like this:

boot=/dev/XXX <-- leave xxx as is, e.g., hda1
map=/boot/map
install=/boot/boot.b
prompt timeout=50
image=/boot/vmlinuz <-- change this to /boot/vmlinuz
label=rtlinux
root=/dev/XXX <-- leave XXX as is, e.g., hda1
read-only
append='mem=XXm"<-- XX = the number of MB of RAM you have - 1

31 for a 32MB system, 63 for a 64MB system, etc.

5. Run LILO to set up your machine to boot the new kernel.

As user 'root' do:

/sbin/lilo

and then reboot.

6. Now you need to get the EMC software from:

ftp://ftp.isd.cme.nist.gov/pub/emc/emcsoft/linux_2_0_36/

and put it into /usr/local/nist. This is available as one big file named
emc-DD-MMM-YYYY.tgz, where DD = the day, MMM = the month, and YYYY = the
year that the file was created, or 4 smaller files that will each fit on a
floppy. To use the small files you can copy them onto the disk from
floppies and then use 'cat' to combine them back into one file.

7. Unpack the files and install the software.

As user 'root', do:

cd /usr/local/nist
tar xzvf emc-DD-MMM-YYYY
./install

This will build all the programs and put all the files where they belong.

8. Configure the script that runs the EMC and the .ini file that controls
its operation.

This is a big subject in itself, however you can try out the software by
getting these two files:

http://www.erols.com/mshaver/run.64step378
http://www.erols.com/mshaver/64stepper.ini

and putting them in /usr/local/nist/emc. These files assume you have
followed the above instructions about where to put the software. They are
also specific for machines with 64MB of RAM. If you have a different amount
of RAM you must edit these files to replace all instances of the string
0x3F00000 with a value such as:

0x1F00000 for 16MB systems
0x2F00000 for 32MB systems
0x7F00000 for 128MB systems
etc..

These files also depend upon there being a parallel port at address 378h.
This corresponds to LPT1 in DOS and if you only have one port it will most
likely be this. If not you must edit these files to replace all instances
of the string 0x378 with 0x278 or 0x3BC, whichever is appropriate. Be sure
to disconnect anything plugged into the port you use since this version of
the EMC toggles bits to run stepper motors and could cause "interesting"
things to happen to printers. The advantage of trying out the EMC using
these files is that there is no other hardware required. To start the EMC:

As user 'root' from a terminal window in X, do:

cd /usr/local/nist/emc
./run.64step378

Of course if you edited the files you may also have changed their names so
use the appropriate command. Note that the 'run.' script refers to the
'.ini' file explicitly by name, so if you change the name of the '.ini'
file you will need to edit the 'run.' script to match.

As always, if any of your impossible mission team is caught or killed...
oh, wait a minute, that's from some different instructions. Anyway, if you
have questions (you will), just call or write and I'll do my best to help
you get going.

Good Luck (you'll need it),

Matt Shaver
(410) 521-3715
mshaver@...

Discussion Thread

Tim Goldstein 1999-05-27 22:20:39 UTC Setting up Linux for EMC Matt Shaver 1999-05-28 01:54:22 UTC Re: Setting up Linux for EMC