<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://bugs.maemo.com/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Mono - Revision history</title>
		<link>http://bugs.maemo.com/index.php?title=Mono&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.5-7</generator>
		<lastBuildDate>Mon, 20 Apr 2026 01:15:21 GMT</lastBuildDate>
		<item>
			<title>dneary:&amp;#32;Initial import of Mono page</title>
			<link>http://bugs.maemo.com/index.php?title=Mono&amp;diff=1388&amp;oldid=prev</link>
			<guid>http://bugs.maemo.com/index.php?title=Mono&amp;diff=1388&amp;oldid=prev</guid>
			<description>&lt;p&gt;Initial import of Mono page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Midgard article}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the process of getting a poor-man's [https://www.mono-project.org Mono] running on 770/n800 devices (''Scirocco'' and ''Bora'' SDK releases have been tested). The process is temporary (ugly) in nature as it requires using externally-compiled tarball binaries. The proper way of doing things would be to provide nicely-decoupled mono packages - like it's done in [http://pkg-mono.alioth.debian.org/ Mono for Debian]. &lt;br /&gt;
&lt;br /&gt;
The method described below is presented '''for testing purposes only'''. The idea is to get people quickly started experimenting with mono. Even though the resulting setup is 100% working, it should be used '''only for development'''.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* Working scratchbox Apophis&lt;br /&gt;
* ''Bora'' or ''Scirocco'' SDK releases installed&lt;br /&gt;
* Some understanding of scratchbox environment&lt;br /&gt;
* Root access to the scratchbox machine&lt;br /&gt;
&lt;br /&gt;
All the tarballs mentioned here can be found at http://files.mdk.am/other/ &lt;br /&gt;
&lt;br /&gt;
== Installing mono devkit ==&lt;br /&gt;
&lt;br /&gt;
First unpack the [http://files.mdk.am/other/mono_devkit.tar.gz mono_devkit.tar.gz] in the scratchbox directory. You need to do this as root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar xzf mono_devkit.tar.gz -C /scratchbox &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thanks to this the mono virtual machine will run always on the host. We need to expose some of the system shared libraries to mono. This can be accomplished easily by copying them from ''/usr/lib'' to ''/scratchbox/host_shared/lib/''. As root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /usr/lib/libglib-2.0* /scratchbox/host_shared/lib/&lt;br /&gt;
cp /usr/lib/libgthread-2.0* /scratchbox/host_shared/lib/&lt;br /&gt;
cp /usr/lib/libgmodule-2.0* /scratchbox/host_shared/lib/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the 386 scratchbox target ==&lt;br /&gt;
&lt;br /&gt;
Login to scratchbox and create a new 386 target using ''sb-menu'' as described in the standard SDK instructions. During the devkit selection pick mono devkit additionally to other devkits. Proceed as normal.&lt;br /&gt;
&lt;br /&gt;
Select the newly created target and when inside scratchbox unpack [http://files.mdk.am/other/mono_classlib.tar.gz mono_classlib.tar.gz] and [http://files.mdk.am/other/mono_i386_gtk_sharp.tar.gz mono_i386_gtk_sharp.tar.gz] into the root directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fakeroot tar xzf mono_classlib.tar.gz -C /&lt;br /&gt;
fakeroot tar xzf mono_i386_gtk_sharp.tar.gz -C /&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you have a fully working mono environment where you can '''compile''' and '''run''' mono programs.&lt;br /&gt;
&lt;br /&gt;
== Setting up the arm scratchbox target ==&lt;br /&gt;
&lt;br /&gt;
Arm target should be created analogically. The only difference applies to the final steps - when in scratchbox, unpack [http://files.mdk.am/other/mono_arm_gtk_sharp.tar.gz mono_arm_gtk_sharp.tar.gz] instead of [http://files.mdk.am/other/mono_i386_gtk_sharp.tar.gz mono_i386_gtk_sharp.tar.gz]. The classlib file stays the same. &lt;br /&gt;
&lt;br /&gt;
In this environment you can '''compile''' mono programs. Mono-only programs can be run too, but other (ie. software that uses gtk-sharp) will fail as the 386-running mono vm will try to pinvoke into arm code. &lt;br /&gt;
&lt;br /&gt;
== Setting up mono on the device ==&lt;br /&gt;
&lt;br /&gt;
Get [http://files.mdk.am/other/mono_arm_runtime.tar.gz mono_arm_runtime.tar.gz], [http://files.mdk.am/other/mono_classlib.tar.gz mono_classlib.tar.gz] (already used) and [http://files.mdk.am/other/mono_arm_gtk_sharp.tar.gz mono_arm_gtk_sharp.tar.gz] (already used) and put the tarballs on the mmc card. &lt;br /&gt;
&lt;br /&gt;
Log into your nokia 770/n800 using terminal or ssh access. As root, unpack all the files into root dir:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar xzf /media/mmc1/mono_arm_runtime.tar.gz -C /&lt;br /&gt;
tar xzf /media/mmc1/mono_arm_gtk_sharp.tar.gz -C /&lt;br /&gt;
tar xzf /media/mmc1/mono_classlib.tar.gz -C /&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run mono/gtk-sharp programs on your nokia device.&lt;br /&gt;
&lt;br /&gt;
== Final notes ==&lt;br /&gt;
&lt;br /&gt;
* Creating the arm scratchbox target is an optional step and you'll need it only for compiling mono libraries with unmanaged code. Everything else (standard mono programs using gtk-sharp) can be compiled in 386 target and moved directly to the device.&lt;br /&gt;
* This setup should not be used for detailed performance evaluation as it has been compiled with minimal optimizations (including softfloats) to work on both devices (770 and n800). Additionally, the mono programs can't right now benefit from the maemo-launcher used for standard C programs (that significantly reduces the startup time).&lt;br /&gt;
* You might notice that mono occupies a lot of flash space on your device. This is because the bundle includes '''everything''' provided by the mono classlib, including the debugging information. Most applications require just a small subset of the whole library. Proper debian packaging should limit the average flash usage to acceptable minimum.&lt;br /&gt;
* Notice that currently gtk 2.6 is used on the devices. Gtk-sharp has been bootstrapped with 2.6 target and functionality exposed by later API's is not available. &lt;br /&gt;
* We currently don't have working hildon mono bindings which limits the GUI usage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Midgard wiki]]&lt;/div&gt;</description>
			<pubDate>Wed, 11 Jun 2008 17:51:03 GMT</pubDate>			<dc:creator>dneary</dc:creator>			<comments>http://bugs.maemo.com/Talk:Mono</comments>		</item>
	</channel>
</rss>