hello all,
I've been playing around this weekend with installing EMC on the ZipSlack mini-distro from Slackware 7.0. This is one way to build a small Linux distro with RTLinux and EMC that can be installed on a windows hard drive without repartitioning and can be burned onto a cdrom for distribution to others
These notes cover the full installation process to go from a windows only system to a dual boot windows/Linux+RTL+EMC system so its a bit long
System requirements:
Download Zipslack
ftp://ftp.slackware.com/pub/slackware/slackware-7.0/zipslack/zipslack.zipunzip it to c:\ this creates a UMSDOS Linux filesystem in c:\linux. Edit the c:\linux\linux.bat file to boot from hda1
Download these additional packages
ftp://ftp.slackware.com/pub/slackware/slackware-7.0/slakware/And for a light, fast window manager download
- a11/tcsh.tgz C shell needed by EMC install scripts
- d1/ncurses.tgz new curses libs needed by keystick
- glibc.tgz some libs not included in zipslack
- tcl1/tcl.tgz the tcl/tk packages
- tclx.tgz
- tix.tgz
- tk.tgz
- x1/xbin.tgz the minimum Xf86 packages
- xcfg.tgz config files for X
- xfnts.tgz minimum font package
- xfsrv.tgz X font server
- xlib.tgz libs needed by X
- libc5x.tgz still used by EMC
- xpm.tgz may not be needed,but small
- xset.tgz X setup
- xprog.tgz X programming libs
- xvg16.tgz vga16 needed for resources and xset
- xsvga.tgz generic svga server,works for most cards or pick a server that matches your hardware
- xap1/tkdesk.tgz a file manager/editor for X
ftp://ftp.slackware.com/pub/slackware/slackware-7.0/contrib/icewm.tgzthese were all downloaded to
c:\zip_dl\
Also grab
Download rtlinux-2.0-prepatched.tgz from
ftp://ftp.rtlinux.com/rtlinux/v2/into c:\rtl_dl\
and emc-07-Jun-2000.tgz from
ftp://isdftp.cme.nist.gov/pub/emc/emcsoft/linux_2_2_13/into c:\emc_dl\
This was a total download of about 90Mb. I pulled it all thru a 56k modem in less than a day the whole thing expands to just over 378Mb installed.
Note:
The umsdos filesystem truncates long filenames when reading from the windows part of your hard drive so I've used wildcards and separate download directories to keep things fairly simple
Setup
Now from the win9X start menu select shutdown and restart in MS_DOS mode this reboots to a DOS prompt do not use a DOS box in windows. go to c:\linux and run linux.bat to load linux
(DOS prompt uses backslash "\")login as root
> cd \linux
> linux
Now to install the additional packages
(/DOS is the doorway to the rest of your hard drive under linux)
(Linux prompt uses slash "/")you may want to run the setup utility provided by ZipSlack,this lets you configure your network,timezone,cdrom terminal font,modem and serial mouse(PS/2 mice are autodetected) I didn't bother to do this step and had no real problems (optional)
# cd /DOS/zip_dl
# installpkg *.tgz
Now configure X
# xf86configand select ICEwm as the default window manager
# xwmconfig(ICEwm is the first selection so just hit <spacebar> then <enter> )
At this point you can
# startxfor a graphical install under a virtual console or keep going from the command prompt.
put EMC in the right place and untar it
# mkdir /usr/local/nistput RTLinux in the right place and untar it then remove the old linux link and create the new linux link
# cp /DOS/emc_dl/*.tgz /usr/local/nist
# cd /usr/local/nist
# tar -xzvf *.tgz
# cp /DOS/rtl_dl/*.tgz /usr/srcOK now that everything is in the right place its time to compile the real-time kernel
# cd /usr/src
# tar -xzvf *.tgz
# rm linux
# ln -s rtlinux-2.0/linux linux
# cd /usr/src/linuxselect the "load configuration from file" option import the Zipslack default config file from /boot/config. Under "cpu type and features" change the cpu type to match your system and select the hard real-time and smp options. Make no other changes at this time. This will give you a modular real-time kernel that will run on just about any hardware.
# make menuconfig
(or if you already started X)
# make xconfig
Now compile the real-time kernel
# make dep ;make clean ;make bzImageand replace vmlinuz and System.map
# make modules ;make modules_install
# mv /boot/system.map /boot/old_system.mapZipslack has no lilo.conf file to edit and rtl_2.0 does not use the "append mem" line anyway so...
# cp System.map /boot/system.map (note:the capitalization is correct)
# mv /vmlinuz /vmlinuz.old
# cp arch/i386/boot/bzImage /vmlinuz
# rebootWindows will restart automatically so you will have to shutdown and restart in DOS mode again just like before. When Linux starts up there will be some missing modules for pcmcia services but nothing that will keep RTL or EMC from working
or <ctrl>+<alt>+<del>
Log back in as root and make the real-time modules
# cd /usr/src/rtlinux-2.0/rtlYou can make and run the real-time examples now if you want
# make
# make install
now on to EMC
The emc-07-Jun-2000 release has four files that wind up being misplaced during the initial install this bash script will fix that for the second compile.
------------cut-here---------------
#! /bin/sh
# filename fix
# fix for emc-07-Jun-2000 misplaced files # place this file in the
/usr/local/nist directory # you may need to set executable permissions
on this # file with (# chmod 755 fix)
# this script will copy some files to the right # directories so that
the compiler can find them cp emc/plat/linux_2_2_13/include/emcglb.h emc/plat/rtlinux_2_0/include/emcglb.h
cp rcslib/plat/linux_2_2_13/include/inifile.h rcslib/plat/rtlinux_2_0/include/inifile.h
cp rcslib/plat/linux_2_2_13/include/rcs_defs.hh rcslib/plat/rtlinux_2_0/include/rcs_defs.hh
cp rcslib/plat/linux_2_2_13/include/dbg_mem.h rcslib/plat/rtlinux_2_0/include/dbg_mem.h
------------cut-here---------------
Build EMC
# cd /usr/local/nist
# ./install
# ./fix
# ./compile
You can now go to the emc directory,edit the .ini files and run
EMC.
To distribute this system to others
Reboot to windows and burn the whole c:\linux directory to a cdrom label it ZipEMC. You could also stay in Linux and uninstall or delete the packages and files that are not being used to save some space then reboot to windows and zip the linux directory back up. I haven't tried this yet but if you can trim the new zip file down to about 50-60Mb without breaking Linux you may be able to put it on an FTP site
To install ZipEMC on a different system just pop in the disk and copy the linux directory to c:\ then
Brian Pitt