Differences between revisions 7 and 8
Revision 7 as of 2011-07-11 17:10:53
Size: 1916
Editor: giro
Comment: added headers to different sections
Revision 8 as of 2011-07-12 12:59:47
Size: 2420
Editor: 94-195-174-26
Comment: added requirements section
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:

=== Requirements ===
Barrelfish requires the following tools to compile correctly:
 * GCC 4.x
    4.4.5 and 4.5.2 are known to work. However, 4.4.5 throws compile warnings when building the current release as it does not support flags used by the Makefile, so 4.5.x is recommended.
 * GNU binutils 2.19 and 2.20 are known to work
 * GNU make
 * GHC 6.10 or 6.12.2 and Parsec 2.1
      earlier versions of GHC are unsupported.
      GHC 6.12.1 has a known bug and is unable to build our tools

The goal of this article is to guide you through compiling and running Barrelfish inside QEMU, and to write and run programs on Barrelfish itself. The instructions below assume you are using a recent version of Linux.

Requirements

Barrelfish requires the following tools to compile correctly:

  • GCC 4.x
    • 4.4.5 and 4.5.2 are known to work. However, 4.4.5 throws compile warnings when building the current release as it does not support flags used by the Makefile, so 4.5.x is recommended.
  • GNU binutils 2.19 and 2.20 are known to work
  • GNU make
  • GHC 6.10 or 6.12.2 and Parsec 2.1
    • earlier versions of GHC are unsupported. GHC 6.12.1 has a known bug and is unable to build our tools

Getting Barrelfish

First we need to get the latest version of Barrelfish from the mercurial repository. Use the following command:

hg clone http://hg.barrelfish.org

or, if you are using an HTTP proxy:

hg --config http_proxy.host=ipOfYourProxyServer:portOfYourProxyServer --config http_proxy.user=user --config http_proxy.passwd=password clone http://hg.barrelfish.org

Configuring

Once you have cloned the repository, cd into it, create a build directory, and enter it:

cd hg.barrelfish.org
mkdir build
cd build

Then create the required makefile:

../hake/hake.sh -s .. -a x86_64

or, if you wish to build the 32-bit version:

../hake/hake.sh -s .. -a x86_32
  • Note: If you get the following error:

        ../hake/Main.hs:369:25:
            Not in scope: data constructor `Opt_DeriveDataTypeable'

    Apply the following patch to hake/Main.hs: Main.hs.patch

Compiling

Now we can build Barrelfish:

make

To speed things up you can specify a number of jobs. This should be roughly the same as the number of cores, so on a 4-core machine you could use:

make -j 4

Once that has completed, you can issue the following command to run Barrelfish on QEMU:

make sim

To allocate more cores to QEMU, instead of the default 2, you can edit the symbolic_targets.mk file in the build directory. Do this by editing the QEMU_CMD line for the architecture you've chosen for Barrelfish.

BarrelfishWiki: Getting_Started (last edited 2016-12-22 21:49:03 by MoritzHoffmann)