From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id EE41D7F9A8 for ; Tue, 1 Jul 2014 08:30:18 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=pra; client-ip=89.16.177.154; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=mailfrom; client-ip=89.16.177.154; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@dark.recoil.org) identity=helo; client-ip=89.16.177.154; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="postmaster@dark.recoil.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoMGAMtUslNZELGahGdsb2JhbABag1+tBpk8AYEfDwEBAQoWQ4QDAQEEAXQFBQsLGC5XBhMJiCUDCQzBOCKGEBeMfYIKB4MtgRYFikKMCIQXl0Q6 X-IPAS-Result: AoMGAMtUslNZELGahGdsb2JhbABag1+tBpk8AYEfDwEBAQoWQ4QDAQEEAXQFBQsLGC5XBhMJiCUDCQzBOCKGEBeMfYIKB4MtgRYFikKMCIQXl0Q6 X-IronPort-AV: E=Sophos;i="5.01,580,1400018400"; d="scan'208";a="69672354" Received: from recoil.dh.bytemark.co.uk (HELO dark.recoil.org) ([89.16.177.154]) by mail3-smtp-sop.national.inria.fr with SMTP; 01 Jul 2014 08:30:15 +0200 Received: (qmail 23364 invoked by uid 634); 1 Jul 2014 06:30:14 -0000 X-Spam-Level: * X-Spam-Check-By: dark.recoil.org Received: from athedsl-4465920.home.otenet.gr (HELO [10.100.22.69]) (94.71.100.240) (smtp-auth username remote@recoil.org, mechanism cram-md5) by dark.recoil.org (qpsmtpd/0.84) with ESMTPA; Tue, 01 Jul 2014 07:30:13 +0100 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) From: Anil Madhavapeddy In-Reply-To: <20140630140228.GB23123@frosties> Date: Tue, 1 Jul 2014 09:29:57 +0300 Cc: caml-list@inria.fr Content-Transfer-Encoding: 7bit Message-Id: <019F55C6-1953-47A8-9E43-742DE0072BE9@recoil.org> References: <03b201cf14ab$155f1630$401d4290$@ffconsultancy.com> <20140119104527.GC2012@siouxsie> <1390147118.92654.YahooMailNeo@web121701.mail.ne1.yahoo.com> <20140119160530.GA10935@notk.org> <20140630140228.GB23123@frosties> To: Goswin von Brederlow X-Mailer: Apple Mail (2.1878.2) X-Virus-Checked: Checked by ClamAV on dark.recoil.org Subject: Re: [Caml-list] OCaml on the Arduino (or similar) On 30 Jun 2014, at 17:02, Goswin von Brederlow wrote: > On Sun, Jan 19, 2014 at 05:05:30PM +0100, Adrien Nader wrote: >> On Sun, Jan 19, 2014, Dario Teixeira wrote: >>> Hi, >>> >>>> Arch-Arm-Linux (e.g. for Raspberry Pi) also has OCaml-packages. >>> >>>> >>>> Regarding Arduino I don't know it. >>>> Possibly the hardware is too weak for running Linux? >>> >>> Depends on which Arduino you are talking about. The Uno >>> and most other common variants are based on a fairly puny >>> (by today's standards) Atmel 8-bit processor. But there >>> are other more powerful Arduino boards (like the Due) >>> based on ARM Cortex-M processors. There are ports of Linux >>> to some Cortex-M variants, but I don't know if these happen >>> to be the same as those used in the Arduino Due... >>> >>> But anyway, if you need something powerful enough to run Linux, >>> you might also consider other boards like the Raspberry Pi or >>> the BeagleBone Black. The latter in particular is a pretty >>> powerful device and has tons of GPIO pins. >>> >> >> You could run something like Mirage too. ;-) >> >> http://www.openmirage.org/ >> >> -- >> Adrien Nader > > Mirage though requires hardware virtualization, which means a quite > recent and powerfull arm board. The Raspberry Pi is way to old for > that (Note: the cpu is way older than what other boards have). To be more precise, the Mirage/Xen/ARM backend requires hardware virtualization in order to provide the bootloader and device libraries. The majority of other libraries should just work once these are supplied. There's an effort underway to complete a FreeBSD kernel module backend, which would output a kthread-based module. This would run on the rPi, since you could strip down the FreeBSD kernel to pretty much just have the bootloader, virtual memory manager, and the required devices drivers. > > I've written an exokernel that lets me run ocaml barebone on the > Raspberry Pi: > > https://github.com/mrvn/ocaml-rpi > > It's at a proof-of-concept stage. You can run simple code with output > on the serial console. The graphics gets initialized too but there is > no ocaml interface for it yet though. I've run into a problem that the > GC will crash after a while that I got stuck on. > > The exokernel might be a good starting point for other boards (where > mirage doesn't run) too. You don't need much to get the ocaml runtime > running on some board. Or indeed, just use this as a base as well! The reason we selected kFreeBSD is to make bootstrap of the device drivers easier, and gradually rewrite them. -anil