Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: Porting OCaml to a Custom OS
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: Porting OCaml to a Custom OS
>   I am trying to port ocaml to a custom operating system made using Oskit. I
> have got *ocamlrun* and *ocamlyacc* ported to it. I compiled these on
> Linux 2.2.13 on Redhat 6.0. I forced these tools to be built by using
> 'gcc' with the -nostdinc and -nostdlib so that it only uses the libraries
> and include files I want.  

Sounds good.

>  OSkit presently resides on Linux as a set of libraries and device
> drivers. It has no filesystem .I can boot images of executables which can
> then be loaded as a kernel . 
>   In the case of ocaml, I cannot compile .ml files at this stage since
> they will not run on Linux. How do i force it to compile  .ml files ?

You'll need to cross-compile.  That is, install a regular OCaml on
your Linux development machine and use it to generate bytecode
executables.  Then, hopefully, you should be able to transfer those
bytecode executables to the OSkit memory and execute them from there
using your modified ocamlrun.

- Xavier Leroy