1 ##########################################################################
2 Copyright (c) 2009-2012, ETH Zurich.
5 This file is distributed under the terms in the attached LICENSE file.
6 If you do not find this file, copies can be found by writing to:
7 ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
8 ##########################################################################
13 Barrelfish currently runs on:
14 * x86 CPUs in either IA-32 or AMD64 mode. The following are known to work:
15 * Intel Xeon: Clovertown, Gainestown, Beckton
16 (X5355, E5520, X7560, L5520, L7555)
17 * AMD Opteron: Santa Rosa, Barcelona, Shanghai, Istanbul, Magny Cours
18 (2220, 8350, 8374, 8380, 8431, 6174)
19 * Intel Single-Chip Cloud Computer (SCC), both Copper Ridge and Rocky Lake
22 The biggest compatibility problems are likely to be in the PCI/ACPI code. We
23 usually discover new quirks (or missing functionality in the ACPI glue code)
24 on each new machine we test. The following systems are known to work:
26 * Tyan n6650W and S4985
28 * Dell PowerEdge R610 and R905
29 * Sun Fire X2270 and X4440
30 * Intel/Quanta QSSC-S4R
31 * Lenovo X200 and X301 laptops
32 * ASUS Eee PC 1015PEM netbooks
34 In addition, a port to the ARM architectures is in progress. This is
35 less complete than the x86 and SCC ports, and not described in this
36 document, but feel free to ask for help on the mailing list.
38 The e1000n driver should work with most recent Intel gigabit ethernet
39 controllers (see the list in devices/e1000.dev). We've mostly used the
40 82572EI (PCI device ID 0x1082).
42 You should also be able to boot Barrelfish on a recent version of QEMU (0.14);
43 note that the e1000 device emulated by QEMU is not supported by our driver.
48 The following are required to build Barrelfish and its tools:
50 * 4.4.5, and 4.5.2 are known to work
51 * cross-compiling between i386 and x86_64 works
52 (requires libc6-dev-i386 to build 32 bit on 64 bit machine)
53 * for the ARM port, we recommend the EABI tools available from CodeSourcery:
54 http://www.codesourcery.com/sgpp/lite/arm
55 * GNU binutils (2.19 is known to work)
57 * GHC v7.4 and Parsec 3.1
58 * older versions of the tree supported v6.10 or v6.12.2 with Parsec 2.1
59 * GHC v6.12.1 has a known bug and is unable to build our tools
60 * earlier versions of GHC are unsupported
62 Our build system may not be very portable; if in doubt, try building on a
63 recent Debian or Ubuntu system, as these are what we use.
68 1. Assuming you have already unpacked the sources, create a build directory:
69 $ mkdir build && cd build
71 2. Run hake.sh, giving it the path to the source directory and target architecture(s):
72 $ ../hake/hake.sh .. x86_64
73 This will configure the build directory and use GHC to compile and then run
74 hake, a tool used to generate the Makefile.
76 3. Optionally, edit the configuration parameters in hake/Config.hs and run
77 'make rehake' to apply them.
79 4. Run make, and wait...
82 5. If everything worked, you should now be able to run Barrelfish inside QEMU:
83 $ make sim ARCH=x86_64
86 INSTALLING AND BOOTING
88 Barrelfish requires a Multiboot-compliant bootloader that is capable of loading
89 an ELF64 image. At the time of writing, this doesn't include the default GRUB.
90 Your options are either:
91 * use the pre-loader "elver" that can be found in the tools directory
92 * patch GRUB to support a 64-bit kernel image, using the patch found here:
93 http://savannah.gnu.org/bugs/?17963
95 "Installing" Barrelfish currently consists of copying the ELF files for the CPU
96 driver and user programs to a location that the target machine can boot from,
97 and writing a suitable menu.lst file that instructs the bootloader (GRUB) which
98 programs to load and the arguments to pass them.
100 If you specify an appropriate INSTALL_PREFIX, 'make install' will copy the
101 binaries to the right place for you, eg:
102 $ make install INSTALL_PREFIX=/tftpboot/barrelfish
104 We usually boot Barrelfish via PXE/TFTP, although loading from a local disk
105 also works. Instructions for setting up GRUB to do this are beyond the scope of
106 this document. Assuming you have such a setup, here is a sample menu.lst file
107 for a basic diskless boot that doesn't do anything useful beyond probing the
108 PCI buses and starting a basic shell:
112 kernel /barrelfish/x86_64/sbin/elver
113 module /barrelfish/x86_64/sbin/cpu
114 module /barrelfish/x86_64/sbin/init
115 module /barrelfish/x86_64/sbin/mem_serv
116 module /barrelfish/x86_64/sbin/monitor
117 module /barrelfish/x86_64/sbin/ramfsd boot
118 module /barrelfish/x86_64/sbin/skb boot
119 modulenounzip /barrelfish/skb_ramfs.cpio.gz nospawn
120 module /barrelfish/x86_64/sbin/acpi boot
121 module /barrelfish/x86_64/sbin/pci boot
122 module /barrelfish/x86_64/sbin/spawnd boot
123 module /barrelfish/x86_64/sbin/serial
124 module /barrelfish/x86_64/sbin/fish
126 There are many other programs you can load (take a look around the usr tree for
127 examples). To start a program on a core other than the BSP core, pass 'core=N'
128 as its first argument.
129 Note: Chips is no longer supported. The SKB now also serves as a name service.
131 If things work, you should see output on both the VGA console and COM1.
136 There are many. Those you're likely to encounter include:
137 * The documentation is incomplete and out of date.
138 * Some drivers and user programs are known not to build, and are
139 not included in the default set of targets (MODULES) in the Makefile.
144 Q: How do I run a program?
145 A: Add it to the boot sequence by specifying the module in your menu.lst file.
146 For example, to run the memtest program, add the line:
147 module /PATH/x86_64/sbin/memtest
148 to the end of menu.lst, where PATH is relative either to your TFTP
149 server's root directory (when booting on hardware) or to your build
150 directory (when using a simulator such as QEMU).
151 If memtest runs, you should see it output "memtest passed successfully!".
153 Q: Where's the CPU driver?
154 A: It's in the directory named kernel :) But don't worry, it really does run
155 independently on each core.
157 Q: Where is the source for the SPLASH2 benchmarks? It seems to be missing.
158 A: The license for these prevents redistribution, so we were forced to ship our
159 changes as a patch. See usr/splash2/README for further instructions.
161 Q: Can I use a debugger?
162 A: Maybe. There are two options at the moment:
163 * On a simulator, using whatever debug interfaces it supports.
164 For QEMU, you could try the "debugsim" target.
165 * On hardware, using the kernel-mode remote GDB stubs that operate on the
166 primary serial port and are entered in response to a kernel trap or
167 exception. However, these are not well maintained, and may not be usable
168 beyond reading/writing memory locations and inspecting the stack.
169 When debugging the kernel, beware that it is relocated to an address
170 determined at core boot time. Look for output such as:
171 "Kernel starting at address 0xffffffffc072b000".
173 Q: Where can I find more information, including papers and new releases?
174 A: http://www.barrelfish.org/
177 A: We'd certainly like to hear from you. Please send us mail.