Building teaseme

Currently you can only build teaseme on linux (or maybe another UNIX). I use the GCC 2.95.2 compiler, we have had problems with older compilers.

You need a special build tool called 'makeme' to build teaseme. makeme is available in Debian/unstable (if you're running debian).

If you don't have Debian, then you'll need a java interpreter installed, and a copy of my makeme build tool, http://makeme.sourceforge.net/. Unfortunately this depends on the ANTLR compiler-compiler, see http://antlr.org. (There is an antlr jar file at http://kissme.sourceforge.net/antlrall.jar).

You must also create a makeme script that is called by the Makefile. My script lives in /usr/bin/ and looks like this:

#!/bin/bash
#wrapper script to run the makeme build tool
CLASSPATH=/usr/share/java/repository:/usr/share/java/antlrall.jar java gnu.makeme.MakeMe $@

Modify it to suit your java environment.

To compile type:

make kernel
to build the linux kernel module.
make user
makes a normal linux process which you can run like other programs
make rjk
compiles teaseme against the RJK kernel.

Getting teaseme

On UNIX, get the source from CVS:

CVS

cvs -d:pserver:anonymous@cvs.teaseme.sourceforge.net:/cvsroot/teaseme login 
                         
cvs -z3 -d:pserver:anonymous@cvs.teaseme.sourceforge.net:/cvsroot/teaseme co current

The sourceforge teaseme project page is at http://sourceforge.net/projects/teaseme.
You can view the CVS code at http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/?cvsroot=teaseme.

File Releases

The latest release is 0.01:

0.01:

teaseme JVM source
teaseme classpath source files
teaseme classpath binary files

0.00 (very old):

teaseme JVM: http://download.sourceforge.net/teaseme/teaseme-0.00.tar.gz
teaseme classpath library: http://download.sourceforge.net/teaseme/teaseme-classpath-0.00.tar.gz

Running

The makefiles generate an object file called teaseme.o for the kernel module.

This contains the JVM. Currently it is hard-coded to look for its classes in /usr/share/teaseme/classpath/. It is also hard-coded to run teaseme.system.init (was jos.system.init).

For the user-space build, just type

./teaseme 
the class libraries must be in the same place.

Class libraries

I've uploaded the source for the classpath files that the kissme/teaseme JVM depends on

Check out the module "teaseme_classpath" in CVS.

cvs -d:pserver:anonymous@cvs.teaseme.sourceforge.net:/cvsroot/teaseme login 
                         
cvs -z3 -d:pserver:anonymous@cvs.teaseme.sourceforge.net:/cvsroot/teaseme co teaseme_classpath

Running the JVM

I run it with: insmod -m -v -x teaseme.o

Before you run it, make sure you unpack the classpath files in:

/usr/share/teaseme/classpath

ie, java/lang/String.class would be at:

/usr/share/teaseme/classpath/java/lang/String.class

It will print messages to the console. (View with dmesg)

Type rmmod teaseme to unload it.

The VM does clean up the GC heap when you unload it, but it will still eat up kernel memory if you do this too many times. (Check how much free memory there is with free. If you're not careful you'll have to reset your machine).

As you should know, installing a kernel module is dangerous and could destroy all your data. You have been warned.

Running the JVM with the RJK kernel

Currently we have not got teaseme to run with RJK. But this is how to do it:

1. Grab the RJK kernel and bootdisk.
2. Build teaseme with 'make rjk'
3. Unzip the bootdisk (gzip -d __bootdisk_file__)
4. mount the bootdisk: mount -o loop __bootdisk_file__ /floppy
5. copy teaseme.o to the bootdisk: cp teaseme.o /floppy
6. edit the /grub/menu.lst on the floppy to have teaseme.o in the module= section
6. unmount the bootdisk: umount /floppy
7. boot the bootdisk (copy it to a floppy with dd and reboot) or (boot it with bochs)


Generating stack traces

If teaseme segfaults and you need to find out where the error is, a stack trace can help. To do this, make sure you use the -v -m -x flags when installing the module.

Next run ksymoops -v bvmlinux where bvmlinux is an uncompressed copy of your kernel. Then paste the Oops report into ksymoops.

Contact jewel at pixie.co.za for more info.


Last modified: Thu Mar 22 09:01:18 UTC 2001