links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Building a Unix/Linux VM
Last updated at 12:04 pm UTC on 19 October 2006
The latest is at VMMaker.

If you really need to do it the old way, read on....

From an email from Marcus Denker to the Squeak mailing list on 25 Sep 2001:

(Warning: this is for hacking. So everything uses the latest and not well tested stuff. (e.g. unix-vm 3.1pre1 instead of 3.0). Do not build a production VM with this versions if you don't know what you are doing...)

Stage I: Recompiling the Unix-Source-Distribution

1. go to http://www-sor.inria.fr/~piumarta/squeak/ and download Squeak-3.1a-4164pre1-src.tar.gz
2. unpack it with
tar xvzf Squeak-3.1a-4164pre1-src.tar.gz
3. cd Squeak-3.1a-4164
4. read BUILD.UnixSqueak
5. to compile the vm do
mkdir build
cd build
and you will have a brand new vm in your build-dir.
6. get http://www.rowledge.org/tim/squeak/SqueakVMBuilderCertificate.pdf and look at it. (only look. You can try to find someone to sign it after you completed at least Stage II ;-) )

Stage II: regeneration the code from the Image

(Do the following or use VMmaker described below -ajh)

1. get the latest image (or the one that's suppost to go with you version of the unix-source-tree).
2. start squeak:
3. go to the class "Interpreter", look at the class-methods.
4. in the Method translate:doInlinig there is a comment, select
Interpreter translate: 'interp.c' doInlining: true.
and doIt! (this will take some time...)
5. do "InterpreterSupportCode writeSupportFiles" (to be safe)
6. copy all the generated .c and .h files to the the "src/generated" directory.
(don't copy platform.exports... or delete the "#ifdef UNIX" stuff. This should be fixed...)
7. go to your build dir and say "make".
8. Print http://www.rowledge.org/tim/squeak/SqueakVMBuilderCertificate.pdf

Stage III: testing a VM inside the image.

Yes, there is really a reason to write a VM in Squeak (or Slang). (Besides not wanting to write C, of course. But writing Slang is
like writing C with Smalltalk syntax, so this point is somewhat
questionable anyway...)
The real reason: You can develop and DEBUG the VM inside Squeak! For more, see the class comment of "InterpreterSimulator" (and InterpreterSimulatorLSB/InterpreterSimulatorMSB).

A follow email up from Tim Rowledge on how to use the VMMaker:

Historical interest only -see LEx's page mentioned at the top

From a working system as downloaded, make sure it is at update level 4343 or thereabouts.
1. Get the VMMaker stuff from SqueakMap
2. File in the changeset and unzip the zip. It should become a directory called platforms in your cwd.
3. Do "VMMakerTool openInWorld"
4. Drag plugins from the leftmost list into either the internal plugins list or the external plugins list - or leave them in the leftmost list to avoid making them. You need many of them in order to work at all, but you can live without Klatt, Mpeg3, Squeak3D, sound, serial, midi, joystick.
5. Press the 'generate all' button and wait a few moments. You should now have a source tree in a directory called 'src'. Unfortunately, due to a serious weakness in Squeak's file handling, you will need to set executable permissions for some of the files in src/utils and src/configure (do 'chmod 755 src/configure' and 'chmod 755 src/util/').

Then, stealing from Markus
> 4. read BUILD.UnixSqueak
> 5. to compile the vm do
> mkdir build
> cd build
> make
> and you will have a brand new vm in your build-dir.
Remember to cp squeak and .lib/.so to your working directory so you can use them... (or do 'make install' to install them in your bin and lib directory so 'squeak' can be executed from anywhere. -ajh).