[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Structure of mirage-platform for Solo5
On Friday, 20.05.2016 at 09:10, Hannes Mehnert wrote: > >> The rationale behind this structure is threefold: > >> > >> 1) It has explicit contracts defining which interfaces each layer > >> provides/depends on. Further, by not providing a separate "posix" package, > >> we discourage adding more C code to support "random bits of POSIX native > >> library X might need" which encourages the use of pure-OCaml libraries in > >> Mirage. > > I always appreciate this! :) > > >> 2) I don't see a need for other OPAM packages to consume the posix and > >> openlibm interfaces separately. These exist only to support the > >> freestanding OCaml runtime. There's nothing Mirage-specific in this > >> package, it is a freestanding build of asmrun on Solo5 interfaces, hence > >> the name solo5-ocaml-runtime rather than mirage-solo5-ocaml. > >> > >> 3) I would eventually like to produce a "retargetable" freestanding OCaml > >> runtime which would be shared by the Xen, Solo5 and other future non-UNIX > >> targets. However, the first step is to get Solo5 upstreamed. > > +1 Done, see the "ocaml-freestanding" repository here: https://github.com/mato/ocaml-freestanding Once Dan merges my PRs to his Solo5 forks of mirage and mirage-platform, Mirage/Solo5 will shortly build against the restructured runtime (when Dan merges my PRs to his Solo5 forks of mirage and mirage-platform). At some point in the future (once Mirage/Solo5 has been upstreamed, still a bunch of work needed for that) the mirage-xen-minios, xen-posix and xen-ocaml packages can be replaced with ocaml-freestanding targetted against Mini-OS. > >> Thoughts? Are there any showstoppers with the proposed structure? Is there > >> a reason I've missed for the xen-ocaml / xen-posix split in > >> mirage-platform? > > The motivation was purely CPU cycle based. GMP and zarith-xen (which > takes esp. on ARM long to compile) depends on bits and pieces from > xen-posix (some headers, and the CFLAGS/LDFLAGS). It initially depended > on mirage-xen, which depends on cstruct etc., and gets recompiled pretty > often. After having for a short period some cyclic dependencies (not a > good idea), I ended up with the minimal package (mirage-xen-posix) to > get GMP&zarith compiling. Ah yes, zarith and GMP. My plan there is to have gmp-freestanding, zarith-freestanding packages. These will depend only on ocaml-freestanding (and indirectly on the solo5-kernel-XXX package) so should not get recompiled often. Out of curiosity (I have no idea what's actually involved), are there any plans to replace zariith and GMP with pure-OCaml equivalents? Martin _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |