Compile Mirage
This page describes how to use Mirage to build a xen kernel.
Before you begin
You need:
- a 64-bit Linux host (any modern distro should work)
- basic C compiler and tools (e.g. 'build-essential' on Debian)
- an OCaml compiler (any version)
Next you need to install OCaml and the OPAM package manager. Check out the OPAM Quick Install guide.
Building the build environment
First initialise opam
opam init
Next, make sure you have OCaml 4.00.1 as your active compiler. If your compiler is out of date, just run opam switch to have it locally install the right version for you.
$ ocaml -version
If the version is not 4.00.1 then run
$ opam switch 4.00.1 $ eval `opam config env`
At this point consider adding the 'eval' line to your shell's startup.
Finally, install the mirage-xen libraries and the build helper tool (Mirari)
$ opam install mirage-xen mirari
Building example kernels
There are a number of example kernels in the mirage-skeleton repository. You can build them as follows:
$ git clone git://github.com/mirage/mirage-skeleton $ cd mirage-skeleton $ make
|
|
|
|
Important Note: Most documentation is on mirage.io