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

[MirageOS-devel] Fwd: [Caml-list] Boot the OCaml system on a bare raspberry pi


  • To: mirageos-devel <mirageos-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anil Madhavapeddy <anil@xxxxxxxxxx>
  • Date: Mon, 12 Oct 2015 09:02:24 +0100
  • Delivery-date: Mon, 12 Oct 2015 08:02:49 +0000
  • List-id: Developer list for MirageOS <mirageos-devel.lists.xenproject.org>

This is also of interest to mirageos-devel!  Note the existence of a custom 
libc -- as the Rump libc/arm layer matures, we should see the need for this 
sort of glue to gradually reduce.

Success/failure reports on the tree below also welcome here if anyone has a 
chance to try it -- I only have rPi1 hardware at the moment.

Anil

> Begin forwarded message:
> 
> From: Daniel BÃnzli <daniel.buenzli@xxxxxxxxxxxx>
> Date: 10 October 2015 at 19:19:05 BST
> To: OCaml List <caml-list@xxxxxxxx>
> Subject: [Caml-list] Boot the OCaml system on a bare raspberry pi
> 
> Hello,   
> 
> I made a setup to boot a raspberry pi 2 directly into the OCaml system. The 
> focus was to use the minimal amount of assembly and C to be able to call 
> `caml_startup` and let the rest up to you â there's an example Rpi module for 
> the boring bits if you are lazy. The overall boot code is very small for now 
> but some more may be needed in the future to enable other hardware features; 
> mmu, interrupts, multicore etc. or things I overlook â all this was done with 
> a high degree of naÃvetyâ
> 
> I hope this can make it an easy and reproducible starting point for others to 
> have some bare metal programming fun in their preferred system language. This 
> is available here:  
> 
>  http://erratique.ch/software/rpi-boot-ocaml
> 
> Follow the instructions in the linked README, they should lead you to build a 
> kernel displaying the OCaml logo on the connected display and communicating 
> boring dot poetry over the serial connection.  
> 
> The setup builds a bare ARMv7 OCaml cross compiler inside an opam switch by 
> following the tracks of the opam-android project [1]. Now to scale and and 
> make it a pleasant programming experience we "only" need multiarch support in 
> opam switches and fix the package's build systems and merlin to understand 
> these environments.
> 
> The project also has a minimal libc with only what's needed to run the OCaml 
> system on a bare machine. It will be eventually forked away and distributed 
> as a separate package (n.b. it seems to currently have a few quirks with the 
> snprintf implementation I stole from somewhere else).
> 
> Best,
> 
> Daniel
> 
> P.S. Prior art: https://github.com/mrvn/ocaml-rpi
> 
> [1] https://github.com/whitequark/opam-android
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://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®.