Skip to content

lindig/xen-ocaml-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

OCaml Xen Tools outside Xen

This is an experiment to explore building the OCaml tools that are part of Xen independently using jbuilder/dune and Opam. Goals are:

  • make this code more accessible for OCaml developers
  • gain access to the Opam ecosystem for this code base
  • simplify development
  • provide two Opam packages: xen.opam for library bindings and xenstored.opam for the xenstore daemon.

The master branch is derived from Xen 4.11.0.

Building

The code assumes that Xen is installed such that header files and libraries are available. This code currently builds on a Debian system with these packages installed:

  • libxen-dev
  • libsystemd-dev
  • m4
  • opam (the OCaml package manager)
  • dune (the OCaml build tool - it can be installed from Opam)

To actually build the code, run:

$ opam install dune
$ make

If you are an OCaml developer, you most likely have Opam already installed and configured.

Changes and Compromises

Some small changes were required:

  • The original code used *.inc files for C header files and this suffix is not recognised by dune so it was changed to *.h.

  • For xenstored, stub C code has been moved into a library and directory of its own. Again, this was required to meet dune restrictions.

  • The build depends on auto-generated code that is derived from header files and an interface definition that is only present in the Xen source tree. These files have been pre-generated. See tools/import.sh for this step.

Todo

  • Define depext for more distributions in Opam files
  • Use more distros in Travis matrix
  • Create branches for more recent releases

About

The OCaml code from the Xen hypervisor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published