Hi, On Mon, Nov 4, 2013 at 8:38 PM, Goswin von Brederlow wrote: ... > 1) doing some kind of output (print_string or Printf.printf) uses > floating point stuff. I didn't have the FPU enabled yet so that threw > and undefined exception. Not sure if the float is used somewhere in > the IO layer or if that triggers something in the GC that uses floats. > Might not even be IO related at all but caused by allocating a heap > value. The simple tests that succeeded before all only used stack. > FWIW the port of mirage to kFreeBSD (where the ocaml program runs as a kernel module) hit a similar issue with floats. The workaround was to replace the floats with a fixed-point implementation: https://lists.cam.ac.uk/pipermail/cl-mirage/2012-August/msg00012.html https://lists.cam.ac.uk/pipermail/cl-mirage/2013-September/msg00013.html > 2) malloc() needs to return 8 byte aligned blocks or storing 64bit > values fails. Doing output initializes the stdout channel, which calls > lseek64 and stores the resultint int64_t. > > > So now I have ocaml running barebone on my RaspberryPi in a verry > minimal way. > Nice! > ToDo: > - LED module (turn on/off the OK LED) > - Framebuffer / Graphics modules > - Timer module > - implement free() > - Threads > - USB module > + keyboard > + mouse > + ethernet > - tcp/ip stack > I'm not sure how difficult USB will be, but once packets start flowing over the network interface you should be able to use the mirage TCP/IP stack. > - audio > - GPIO module > > If anyone is interested I can upload what I have so far to github. But > beware it is verry much a WIP. > I'd be interested in checking it out! :-) Cheers, Dave