Monday, March 17, 2008


Ok, I promised several blog entries about GARMONO. However, for the last couple of weeks I've been busy fixing some issues with the WinForms DataGrid, which I will talk about in another entry. Today, let us talk about GARMONO and how it can help us automatically create Mono packages for Maemo.

One of the problems I ran into when I created the first set of Mono packages for Maemo was that it was a hard task with lots of procedures. A few weeks ago, during hack week, we decide to automate the process using GARMONO (when I say "we" I mean, Torello Querci, Jae Stutzman, and myself) and it has proven to be a very good idea. For those of you that may not understand what GARMONO is, think of it as a build-script that works within scratchbox to automate some of the more tedious tasks that would have to be done by hand or with other scripts. GARMONO provides a single "make" command that takes care of downloading mono src and creating deb files, etc. However GARMONO alone will not produce maemo packages, this is where Scratchbox comes in.

Maemo uses Scratchbox for cross-compilation. Scratchbox provides a build environment with all of the maemo provided dependencies so that developers can produce Maemo binaries. We need to use Scratchbox to create the platform (ARM) specific things that the mono runtime requires. Scratchbox uses QEMU for ARM emulation, the problem is that some ARM syscalls (242, 264, 299) are not yet implemented in QEMU. These missing syscalls can cause problems in MCS, making it impossible to compile assemblies for ARM. The solution is to create a Scratchbox devkit. It provides a set of tools that can be executed on the host instead of target device and thus reduces the time needed to build packages.

Instead of providing the instructions on how to build the devkit in this blog, I will just point you to the wiki entry that we created on the Mono Wiki:

Please know that in order for you to execute these instructions you must first to have Scratchbox and Maemo SDK installed, instructions can be found here.

Again, I would like to credit Jae Stutzman and Torello Querci for their support of the work in GARMONO and Maemo.

No comments: