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

[MirageOS-devel] Mirage/ARM plans

Here are the things I think need to happen to get Mirage working on ARM:

- Update Mini-OS to support both x86 and ARM (done but not yet merged).
 -Sort out Mini-OS's recursive symlinks (causes trouble for ocamlbuild
and opam).
- Update "kernel" in mirage-platform to the lastest version of Mini-OS
(adding ARM support).
- Update "dietlibc" to the latest version (adding ARM support), or
switch to a different libc.
- Create "xencaml" component for the Mini-OS OCaml stubs (keeping them
separate from Mini-OS).
- Sort out the "include" directory. Not clear where these files came from.
  Might be good to separate out headers from Mini-OS vs headers from libc, etc.
- Update "include/xen" with the latest Xen headers (adding ARM support).
- Change the build system to use the upstream Makefiles rather than
ocamlbuild, for ease of merging in future.
- Get ARM support for "libm".
- Test the above changes on x86 (is there a test suite?).
- Test on ARM.
- Improve stack handling in Mini-OS (at a minimum, start with a bigger
fixed-size stack).
  Then enable stack growing, or at least detect stack overflows.

libc options:

We need to change to a new libc as dietlibc is GPL.

I'm not sure how far mirage-platform's dietlibc has diverged from the
upstream version. If it's only a little, it might be eaiser to update
to dietlibc 0.33, get everything working with that and then switch to
a new libc. But if it's heavily patched, it might be better to start
with a fresh libc right away.

Options include:

- FreeBSD's libkern (is there some documentation for this?).

- Bionic (BSD) - http://en.wikipedia.org/wiki/Bionic_%28software%29
  Used in Android; so probably good ARM support.

- newlib (scary mix of licenses) - https://sourceware.org/newlib/
  Not clear from web-site what advantages it provides or what its goals are.

- uClibC (LGPL) - http://www.uclibc.org/
  Designed for very small systems (e.g. without an MMU).
  Anil mentioned that LGPL may worry the lawyers, though LGPL sounds
like a good option to me.

- musl (MIT) - http://www.musl-libc.org/intro.html
  Seems to have a focus on correctness and robustness.

- eCos (modified GPL; LGPL-like)
  Aims to be highly configurable for custom builds.

These are GPL, so not useful:

- dietlibc (GPL) - aims for small code size
- Linux klibc (mostly BSD, but some GPL) - for Linux initrd

The musl project has a comparison table for some features of musl,
uClibc, dietlibc and glibc:


Let me know if you have other suggestions or can rule out any of the above.

Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

MirageOS-devel mailing list



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