Finding a machine for EmStar Development
If you're developing with EmStar, you have two choices. First, you
can use the CENS computers. This is easier because we configure and
manage the computers for you. But, we have a limited number of
machines, and only one group can use one at a time. Your second
choice is to set up your own EmStar development workstation at home;
this can be tricky to set up, but gives you your own private resource.
Using CENS Development Machines
The easiest way to do EmStar development is to use the computers we've
already set up and configured to run EmStar. These three computers,
tako, dragon and tobiko, are Linux machines
maintained by CENS folks. To access them:
- Get yourself a CENS account; contact Eric (eoster at cens dot
ucla dot edu) if you didn't already sign up for one in class.
- Access the CENS network using our gateway host,
toro.cens.ucla.edu. (To access (almost) any CENS computer, you
must first log into Toro using SSH, then SSH into your desired target
machine.)
- From Toro, ssh to either Dragon or Tobiko. Use "w" to see if
anyone else is logged in who might be interfering with your work.
- Once you're on Dragon or Tobiko, check out the CENS source code
into your home directory, using the following commands:
cvs -d :pserver:anoncvs@cvs.cens.ucla.edu:/home/cvs/cvsroot login
(When prompted for a password, type anoncvs)
cvs -z9 -d :pserver:anoncvs@cvs.cens.ucla.edu:/home/cvs/cvsroot checkout emstar
(More detailed instructions on accessing the cvs repository can be
found here.)
- cd into your new emstar directory and type "make". The
instructions elsewhere on this site give more detail on how to use the
build system, and what the heck to do with all this software once it's
compiled (see the sections on Emrun and My First API).
Using LECS Lab Machines
If you are a member of the LECS laboratory, most workstations in the
lab can be used as EmStar workstations. The only trick is to make
sure you're using the latest version of the FUSD kernel module --
remove kfusd.o using rmmod (if it's inserted), and insmod kfusd.o that
you compile from the CENS CVS repository. If the module has trouble
inserting the first time, and you've recently used the old version of
the kernel module, try rebooting -- this works around a bug in the
devfs code of the kernel.
Gamayun, our 4-processor simulator machine, is configured with the
latest kfusd.o kernel module and can be used for EmStar simulations.
Using the LECS IPAQ Testbed
The testbed of 60-odd Compaq IPAQs set up in the LECS lab, which is
extensively described here,
is capable of running EmStar. The only problem is that most of them
have the old version of the FUSD kernel module installed. So, before
using emstar, make sure to remove the kfusd.o kernel module the IPAQs
are running, and insert a new version of kfusd.o that you compile from
the source in the CENS repository. Once you have the CENS sources
checked out, type "make ARCH=arm-linux" to cross-compile EmStar for
the IPAQs.
Setting up your own computer for EmStar use
If you are an experienced Linux user, and know how to compile your own
kernel, it shouldn't be too painful to set up. Using your own
computer for development frees you from contending with other people
for our currently somewhat limited resources. It also lets you do
local development, rather than doing everything over the network.
Please don't try to do this on your own unless you already know how
to compile and install the Linux kernel.
In theory, EmStar should be able to run on top of almost any standard
Linux distribution, but We have only used RedHat, and can't
guarantee that anything else will work. Use only Redhat 7.2 or
later.
There is one tricky thing you need to do to your Redhat 7.2 or better
installation: recompile your kernel to enable devfs, the device
filesystem. This is a feature that lets the kernel dynamically create
and destroy device-files under /dev, instead of relying on
device files sitting on a physical filesystem created by
mknod. We need this feature so that all of the various
devices used by EmStar programs can be created automatically.
The basic steps are:
- Install Redhat v 7.2 or better
- Get the latest version of the 2.4 kernel from kernel.org. 2.4.20 works very
nicely. Unpack the sources into /usr/src/linux. Configure the kernel
with whatever drivers are required for your computer (e.g. using "make
xconfig"). However, make one important change: under filesystems,
choose "devfs - device filesystem". You might need to check the "show
experimental options" dialog to be given this choice. Compile the
kernel but don't install it yet.
- Get the source for devfsd, the devfs control daemon,
e.g. from here. Use
the latest version, e.g. 1.3.25.
- Important, before you build devfsd, make sure you look at
the Makefile, and make sure it's pointing to the kernel sources you
just unpacked and compiled (e.g. the 2.4.20 sources in
/usr/src/linux). Build and install devfsd.
- Now install the kernel. In your grub.conf, add the option
"devfs=mount" to the kernel boot options. Also, you might need to
explicitly add a "root=/dev/hda1" or similar argument to tell the
kernel where to find its root partition.
- Reboot and pray.
If the system seems to generally work, check out and compile the CENS
CVS repository as described elsewhere. The kfusd.o module should
compile without complaint. Use insmod to insert
obj.i686-linux/fusd/kfusd.o; again, it should insert with no errors.
If this works, try running "obj.i686-linux/fusd/torturetest 10" and
make sure it exits with no errors.
If all that works -- celebrate! You now have an EmStar-Capable(TM)
system.
Last modified by jelson, 28 January 2003