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

Re: [MirageOS-devel] Mirage/ARM plans

On 14 May 2014 09:52, Hannes Mehnert <hannes@xxxxxxxxxxx> wrote:
> On 05/14/2014 10:31, Thomas Leonard wrote:
>> Personally, I'd be happy to remove functions like
>> Pervasives.open_in (which would probably make the capabilities
>> people happy too). But I can imagine it might mean some OCaml
>> libraries wouldn't compile without modifications, even if that part
>> of them wasn't needed (e.g. an XML library that offers the option
>> of loading from a file).
> I'd approach this by not modifying the API of OCamls standard library,
> but removing the primitives and runtime, and inserting stubs which
> raise an NotImplemented exception in the OCaml standard library.
>> If compiled with HAVE_LIBC, Mini-OS currently provides a minimal
>> filesystem API that lets you open anything under /var/log (writes
>> then go to the console), /dev/mem, /dev/ptmx and some things under
>> /var/lib/xen.
> But who uses this? There is also code to reseed the RNG in the OCaml
> runtime, which currently tries to open /dev/urandom -- I don't think
> that is very useful and the way to go on Xen.

I don't know who uses the libc stuff in Mini-OS. I did some tests,
compiling my latest Mini-OS without any libc support (not even the
stuff I mentioned above) and no other libc. These are the extra
functions I had to define to get mirage-skeleton/console to work:

- getenv (it wants to check OCAMLRUNPARAM and CAMLRUNPARAM)
- calloc

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®.