[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MirageOS-devel] build workflow



Dear list,

for quite some time the workflow for mirage was:
mirage configure -t <platform> --no-opam --no-ocaml-check -v
make

where the first command did:
- generate a main.ml
- call out to opam to install dependent packages
- generate a Makefile which did the compilation + linking bits (a bit
complicated due to virtio/xen/ukvm targets)


The initial problem I wanted to solve is that a MirageOS unikernel
cannot specify which API version (of mirage-types) it requires.  This is
- due to expected API changes - a bit troublesome for future updates.

Now, you're able to specify packages: [ package "mirage-types"
~min:"3.0.0" ] as part of calling foreign.

The workflow changed slightly:
mirage configure -t <platform> -v
make depend
make

Where mirage configure doesn't do more than generating a main.ml and a
basic Makefile, make depend uses opam to install dependencies, and make
build compiles and links (by using mirage build).  Especially you can
use the toolchain without any make dependency.  Furthermore, this opens
the door for having multiple targets at once without too much trouble.
And mirage configure does not depend on mirage-xen/solo5 being installed.

The rabbit hole was deep, and included substantial changes to both
functoria and mirage:
- Functoria: Remove Cmd and Log module (we have Bos and Logs!)
- Functoria: Re-add a build step
- Functoria: Generate a custom opam file for each unikernel
- Functoria: Use Logs.cli for log verbosity and style
- Mirage: Adapt to the changes (use Bos, Logs; adapt packages)
- Mirage: separate compile and link step, each calling directly out to
ocamlfind/ld

It does not yet work completely (clean seems to be broken), but please
provide feedback on https://github.com/mirage/functoria/pull/84 and
https://github.com/mirage/mirage/pull/703 (thx for feedback on earlier
proposals).  Diff stats are: functoria +471 −836, mirage +602 −638.


thanks for reading until here,

hannes

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.