tag:blogger.com,1999:blog-40067133975524391332024-02-08T10:58:49.697-08:00Andreas DalsgaardAndreas Dalsgaardhttp://www.blogger.com/profile/11221217132758477627noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-4006713397552439133.post-18373682082746934292008-07-21T10:53:00.000-07:002008-09-18T03:27:26.179-07:00Openmoko application development in 5 minutes<style type="text/css">pre {background-color: #D3D3D3;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */}
li {
padding: 0px;
}
</style>This guide will in 5 minutes, and 6 easy steps, show you how to begin development on Openmoko applications in the 2007.2 stack on Ubuntu Hardy. It will be assumed that you already have ssh access to you phone(Otherwise see <a href="http://www.openmoko.org/wiki/Getting_Started_with_your_Neo_FreeRunner">Getting Started with your Neo FreeRunner</a> on the wiki)
<ol>
<li> <span style="font-weight:bold;">Install the openmoko-toolchain deb-package</span></li><pre>wget http://smartere.dk/openmoko/openmoko-toolchain_0.20080521-ubuntu6_i386.deb
sudo dpkg -i openmoko-toolchain_0.20080521-ubuntu6_i386.deb</pre><span style="color: rgb(0, 0, 0);">While you wait for the download to complete you can jump to step 2 and checkout the openmoko-calculator2 application</span>
<li style="padding-top: 10px;"> <span style="font-weight:bold;">Checkout an application of interest</span> </li>
For the purpose of this guide an example will be given using the openmoko-calculator2 application. It is of course possible to checkout other applications. For more information about that see the "Notes:" section.<pre>mkdir -p ~/src/openmoko/ && cd ~/src/openmoko/
svn co http://svn.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-calculator2
</pre><li> <span style="font-weight:bold;">Set environment variables</span> </li>
To use the openmoko-toolchain to compile some environment variables should be set
<pre>. /usr/local/openmoko/arm/setup-env</pre><li> Compile the project </li>
To compile the project<pre>cd ~/src/openmoko/ && om-conf openmoko-calculator2
cd openmoko-calculator2
#now you could fix a bug
make
</pre><li> <span style="font-weight:bold;">Build package</span> </li><pre>cd .. && echo "Package: openmoko-calculator2
Version: 0.1.1
Description: package built by openmoko toolchain
Section: openmoko/applications
Priority: optional
Maintainer: your name <your@mail>
Architecture: armv4t
Homepage: http://www.openmoko.org/
Depends: libmokoui2-0
Source: you" > openmoko-calculator2_control
om-make-ipkg openmoko-calculator2 openmoko-calculator2_control</your@mail></pre><li> <span style="font-weight:bold;">Use scp to copy the package to the phone and install the package</span></li>
You can install the package on the phone by running the floowing command on the phone.
<pre>opkg install openmoko-calculator2_0.1.1_armv4t.ipk</pre></ol><span style="color: rgb(0, 0, 0);font-size:180%;" >Notes:</span>
<br />I have tested the following project:
<ul>
<lh><span style="color: rgb(0, 0, 0);">From http://pimlico-project.org/</span></lh>
<li>contacts</li>
<li>dates</li>
<li>tasks</li>
<lh><span style="color: rgb(0, 0, 0);">From svn.openmoko.org</span></lh>
<li>openmoko-appearance</li>
<li>gsm</li>
<li>openmoko-calculator2</li>
<li>openmoko-firststart2</li>
<li>openmoko-sample2</li>
<li>openmoko-today2</li>
<li>openmoko-worldclock2</li>
<li>openmoko-browser2</li>
</ul>
Tested but did not compile but can easily be worked around:
<ul>
<li>openmoko-messages2</li>
<pre>
cd openmoko-messages2/libhito
wget http://smartere.dk/openmoko/openmoko_messages2_missing_gdk_event_request_motions.patch
patch -p0 < openmoko_messages2_missing_gdk_event_request_motions.patch</pre>
<li>openmoko-dialer3 (could be patched with similar patch(es)) </li>
</ul>
Not very tested, but won't work out of box(patches/feedback welcome!):
<ul>
<li>openmoko-mediaplayer</li>
<li>openmoko-feedreader</li>
<li>openmoko-appmanager2</li>
</ul>
<span style="color: rgb(0, 0, 0);font-size:130%;" >Add packages to the openmoko-toolchain</span><span style="color: rgb(0, 0, 0);">:</span><br />
Adding package X:
<pre>sudo su
. /usr/local/openmoko/arm/setup-env
opkg-target install X
exit</pre>Andreas Dalsgaardhttp://www.blogger.com/profile/11221217132758477627noreply@blogger.com5