[Vm-dev] StackVM builds for RaspberryPi

tim Rowledge tim at rowledge.org
Sat Jul 6 03:52:34 UTC 2013


On 05-07-2013, at 6:00 PM, Casey Ransberger <casey.obrien.r at gmail.com> wrote:

> I'd like to give it a shot.
> 

OK; try this -

	• Get source tree from SVN - StackVM MC repositories & package loading
	• Create new generated sources - the svn copy is Cog stuff -
		• Load VMMaker 
		• Build new stack sources 
	• configure the build stuff 
	• remove some cruft that ought to never get into the files
		• from unixbuild/bld/plugins.int
			• IA32ABI (which didn't get vmm-made anyway)
			• CroquetPlugin 
		• from unixbuild/bld/plugins.ext
			• B3DAcceleratorPlugin 
			• BochsIA32Plugin
			• SqueakSSL
		• from unixbuild/bld/Makefile
			• CroquetPlugin
			• IA32ABI
			• BochsIA32Plugin
			• SqueakSSL
	• check vm/Makefile (derived from platforms/unix/vm/Makefile.in ?) has  sqUnixHeartbeat$o in the IOBJS list
	• make will then re-config some stuff because of those changes, 
	• so make *again* 

Load VMMaker
=========
For Stack/Cog use VMMaker.oscog, not vmmaker-oscog.
Load 'http://source.squeak.org/FFI' - FFI-Pools first
Load 'http://www.squeaksource.com/Speech' - SharedPool-Speech next
Load 'http://source.squeak.org/VMMaker' - VMMaker.oscog next
also need Balloon-Engine-Pools from vmmaker

Build new stack sources
=============== 
Use a src dir with different name to avoid overwriting Cog pre-built stuff. Say 'pi-stack-src' as shown here.

Note that during a first run it will probably complain about a dNU because Byte3ShiftNegated is nil - this seems to be some obscure issue in initialising values in ObjectMemory>byteSwapped: but that gets fixed simply by finding VMMaker>generateInterpreterFile in the stack, doing a restart and proceed. Really odd bug.

VMMaker
          generate: StackInterpreter
          to: (FileDirectory default directoryNamed: 'pi-stack-src') fullName
          platformDir: (FileDirectory default directoryNamed: 'platforms') fullName
          excluding: #(BrokenPlugin CroquetPlugin IA32ABIPlugin ImmX11Plugin InternetConfigPlugin MacMenubarPlugin NewsqueakIA32ABIPlugin QuicktimePlugin TestOSAPlugin ThreadedARMFFIPlugin ThreadedFFIPlugin ThreadedIA32FFIPlugin ThreadedPPCBEFFIPlugin VMProfileMacSupportPlugin)


configure the build stuff 
================
cd into unixbuild/bld (etc)
Note use of --with-src= to set directory where source was generated (StackVM source generation)

config for debug -
../../platforms//unix/config/configure  --without-npsqueak --with-x --with-src=pi-stack-src --disable-cogit CFLAGS="-g3 -O0-DUSE_GLOBAL_STRUCT -DUSE_GLOBAL_STRUCT_REG="r6" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DSTACKVM=1 -DDEBUGVM=1" Libs=-lpthread

config for non-debug
../../platforms//unix/config/configure  --without-npsqueak --with-x --with-src=pi-stack-src --disable-cogit CFLAGS="-g3 -O3 -DUSE_GLOBAL_STRUCT=1 -DUSE_GLOBAL_STRUCT_REG="r6" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DSTACKVM=1 -DDEBUGVM=0" Libs=-lpthread

ie.
no browser plugin  --without-npsqueak
with x11 dispaly stuff --with-x
use src from foo --with-src=foo
don't build cog, just stack --disable-cogit
Libs=-lpthread - thread stuff
set c flags to insane nonsense -
g3 - debug level information
-O3 - optimiser; use O0 for a debug vm, some files are carefully set to other value due to gcc bugs
-DUSE_GLOBAL_STRUCT=1 - use the big globals array
-DUSE_GLOBAL_STRUC_REG="r6" - set up  global register to point to array; r6 for Pi is only good one
-D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 - for file ptr sizeof
-DNDEBUG - no debug
-DITIMER_HEARTBEAT=1 - use the interval timer heartbeat for process checking
-DNO_VM_PROFILE=1 - don't include profiling code
-DSTACKVM=1 - enable stack vm
-DDEBUGVM=0 - don't do debug vm




tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Fractured Idiom:- RIGOR MORRIS - The cat is dead




More information about the Vm-dev mailing list