13
Building The Virtual Machine Igor Stasenko RMoD Team INRIA Lille Nord-Europe Edinburgh ESUG, 2011

Building the VM

  • Upload
    esug

  • View
    1.078

  • Download
    0

Embed Size (px)

DESCRIPTION

ESUG 2011, Edinburgh

Citation preview

Page 1: Building the VM

Building The Virtual Machine

Igor Stasenko

RMoD TeamINRIA Lille Nord-Europe

Edinburgh ESUG, 2011

Page 2: Building the VM

����Outline

• Automated VM build system

• Preparing your environment for build

• Build VM

• Customizing builds

2

Page 3: Building the VM

Automated build system

Base image (Pharo) Platform sources (gitorious.org)

generator.image

CMakeVMMaker

Generated source files

Platform-specific source files

Input

LoadVMMaker.st

CMake

Built artifacts (Mac/Windows/Unix)

Tests

CMakeLists.txt

Git tracker Job

VM Builder Job

VM test runner job

Page 4: Building the VM
Page 5: Building the VM

����

Why git?

Git is distributed source management tool, while SVN is centralized one.

This means that git fits better for developing and managing open-source projects driven by community rather than single or selected team of developers.

With gitorious.org, one can easily make own branch publicly available, without need to ask for VIP’s permission.

5

Page 6: Building the VM

����

Getting VM platform sources

git clone git://gitorious.org/cogvm/blessed.git cogvm

(but do not try it right now!!)

For our exercise, download sources tarball from here:https://ci.lille.inria.fr/pharo/view/Cog/Job named: Cog Git Tracker (blessed)

cog.tar.gzvmmaker-image.zip

6

Page 7: Building the VM

����

Sources directory structure

/ <root dir>platforms/

Cross/ Mac OS/ RiscOS/ unix/ win32/

src/

build/results/

7

platform-specific source code & configuration files/tools

common code for all platforms

VMMaker generated code

directory used for cmake configuration filesbuilt VMs are stored here

Page 8: Building the VM

����

Loading VMMaker into image

• take a fresh Pharo 1.3 or Pharo 1.4 image• place it into /build subdir• evaluate a script from

codegen-scripts/LoadVMMaker.stor do it by youself:

Gofer new squeaksource: ‘MetacelloRepository’; package: ‘ConfigurationOfCog’; load.ConfigurationOfCog project lastVersion load

8

Page 9: Building the VM

����

Generating source code + makefiles

<MyConfiguration> generateWithSources

Depends what you building:

9

Page 10: Building the VM

����

Preparing build environment

MacWindowsUnix

Too much for the slide :)

Follow a guide, made by Mariano Martinez Peck:

http://code.google.com/p/cog/wiki/Guide

10

Page 11: Building the VM

����

Building VM

cd build

cmake . (on Windows: cmake -G”MSYS Makefiles . )

make

.. run ..

11

Page 12: Building the VM

����

Customizing builds: plugins

Adding custom plugins:

CogMacOSConfig new addExternalPlugins: #( FT2Plugin ); addInternalPlugins: #( UnixOSProcessPlugin ); generateSources; generate.

You could also completely replace the plugins to build, using #internalPlugins: and #externalPlugins:to supply own set of plugins for build.

12

Page 13: Building the VM

����

Creating own configuration

- as you do for anything in smalltalk: - subclass from appropriate XYZConfig class - change flags/settings - provide own default plugins - etc

MyConfig generateWithSources.

13