Skip to content

modeswitch/barrelfish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##########################################################################
Copyright (c) 2009-2012, ETH Zurich.
All rights reserved.

This file is distributed under the terms in the attached LICENSE file.
If you do not find this file, copies can be found by writing to:
ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
##########################################################################

"SUPPORTED" HARDWARE

Barrelfish currently runs on:
 * x86 CPUs in either IA-32 or AMD64 mode. The following are known to work:
   * Intel Xeon: Clovertown, Gainestown, Beckton
     (X5355, E5520, X7560, L5520, L7555)
   * AMD Opteron: Santa Rosa, Barcelona, Shanghai, Istanbul, Magny Cours
     (2220, 8350, 8374, 8380, 8431, 6174)
 * Intel Single-Chip Cloud Computer (SCC), both Copper Ridge and Rocky Lake
   are known to work.

The biggest compatibility problems are likely to be in the PCI/ACPI code. We
usually discover new quirks (or missing functionality in the ACPI glue code)
on each new machine we test. The following systems are known to work:
 * Intel x5000XVN
 * Tyan n6650W and S4985
 * Supermicro H8QM3-2
 * Dell PowerEdge R610 and R905
 * Sun Fire X2270 and X4440
 * Intel/Quanta QSSC-S4R
 * Lenovo X200 and X301 laptops
 * ASUS Eee PC 1015PEM netbooks

In addition, a port to the ARM architectures is in progress. This is 
less complete than the x86 and SCC ports, and not described in this 
document, but feel free to ask for help on the mailing list.

The e1000n driver should work with most recent Intel gigabit ethernet
controllers (see the list in devices/e1000.dev). We've mostly used the
82572EI (PCI device ID 0x1082).

You should also be able to boot Barrelfish on a recent version of QEMU (0.14);
note that the e1000 device emulated by QEMU is not supported by our driver.


REQUIRED TOOLS

The following are required to build Barrelfish and its tools:
 * GCC 4.x
   * 4.4.5, and 4.5.2 are known to work
   * cross-compiling between i386 and x86_64 works
     (requires libc6-dev-i386 to build 32 bit on 64 bit machine)
   * for the ARM port, we recommend the EABI tools available from CodeSourcery:
     http://www.codesourcery.com/sgpp/lite/arm
 * GNU binutils (2.19 is known to work)
 * GNU make
 * GHC v6.10 or v6.12.2 and Parsec 2.1
   * earlier versions of GHC are unsupported
   * GHC v6.12.1 has a known bug and is unable to build our tools

Our build system may not be very portable; if in doubt, try building on a
recent Debian or Ubuntu system, as these are what we use.


BUILDING

1. Assuming you have already unpacked the sources, create a build directory:
$ mkdir build && cd build

2. Run hake.sh, giving it the path to the source directory and target architecture(s):
$ ../hake/hake.sh .. x86_64
This will configure the build directory and use GHC to compile and then run
hake, a tool used to generate the Makefile.

3. Optionally, edit the configuration parameters in hake/Config.hs and run
 'make rehake' to apply them.

4. Run make, and wait...
$ make

5. If everything worked, you should now be able to run Barrelfish inside QEMU:
$ make sim ARCH=x86_64


INSTALLING AND BOOTING

Barrelfish requires a Multiboot-compliant bootloader that is capable of loading
an ELF64 image. At the time of writing, this doesn't include the default GRUB.
Your options are either:
 * use the pre-loader "elver" that can be found in the tools directory
 * patch GRUB to support a 64-bit kernel image, using the patch found here:
   http://savannah.gnu.org/bugs/?17963

"Installing" Barrelfish currently consists of copying the ELF files for the CPU
driver and user programs to a location that the target machine can boot from,
and writing a suitable menu.lst file that instructs the bootloader (GRUB) which
programs to load and the arguments to pass them.

If you specify an appropriate INSTALL_PREFIX, 'make install' will copy the
binaries to the right place for you, eg:
$ make install INSTALL_PREFIX=/tftpboot/barrelfish

We usually boot Barrelfish via PXE/TFTP, although loading from a local disk
also works. Instructions for setting up GRUB to do this are beyond the scope of
this document. Assuming you have such a setup, here is a sample menu.lst file
for a basic diskless boot that doesn't do anything useful beyond probing the
PCI buses and starting a basic shell:

title   Barrelfish
root    (nd)
kernel /barrelfish/x86_64/sbin/elver
module /barrelfish/x86_64/sbin/cpu
module /barrelfish/x86_64/sbin/init
module /barrelfish/x86_64/sbin/mem_serv
module /barrelfish/x86_64/sbin/monitor
module /barrelfish/x86_64/sbin/ramfsd boot
module /barrelfish/x86_64/sbin/skb boot
modulenounzip /barrelfish/skb_ramfs.cpio.gz nospawn
module /barrelfish/x86_64/sbin/acpi boot
module /barrelfish/x86_64/sbin/pci boot
module /barrelfish/x86_64/sbin/spawnd boot
module /barrelfish/x86_64/sbin/serial
module /barrelfish/x86_64/sbin/fish

There are many other programs you can load (take a look around the usr tree for
examples). To start a program on a core other than the BSP core, pass 'core=N'
as its first argument.
Note: Chips is no longer supported. The SKB now also serves as a name service.

If things work, you should see output on both the VGA console and COM1.


KNOWN ISSUES

There are many. Those you're likely to encounter include:
 * The documentation is incomplete and out of date.
 * Some drivers and user programs are known not to build, and are
   not included in the default set of targets (MODULES) in the Makefile.


LIKELY FAQs

Q: How do I run a program?
A: Add it to the boot sequence by specifying the module in your menu.lst file.
   For example, to run the memtest program, add the line:
       module /PATH/x86_64/sbin/memtest
   to the end of menu.lst, where PATH is relative either to your TFTP
   server's root directory (when booting on hardware) or to your build
   directory (when using a simulator such as QEMU).
   If memtest runs, you should see it output "memtest passed successfully!".

Q: Where's the CPU driver?
A: It's in the directory named kernel :) But don't worry, it really does run
   independently on each core.

Q: Where is the source for the SPLASH2 benchmarks? It seems to be missing.
A: The license for these prevents redistribution, so we were forced to ship our
   changes as a patch. See usr/splash2/README for further instructions.

Q: Can I use a debugger?
A: Maybe. There are two options at the moment:
    * On a simulator, using whatever debug interfaces it supports.
      For QEMU, you could try the "debugsim" target.
    * On hardware, using the kernel-mode remote GDB stubs that operate on the
      primary serial port and are entered in response to a kernel trap or
      exception. However, these are not well maintained, and may not be usable
      beyond reading/writing memory locations and inspecting the stack.
   When debugging the kernel, beware that it is relocated to an address
   determined at core boot time. Look for output such as:
   "Kernel starting at address 0xffffffffc072b000".

Q: Where can I find more information, including papers and new releases?
A: http://www.barrelfish.org/

Q: Can I contribute?
A: We'd certainly like to hear from you. Please send us mail.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published