mandag den 21. juli 2008

Openmoko application development in 5 minutes

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 Getting Started with your Neo FreeRunner on the wiki)
  1. Install the openmoko-toolchain deb-package
  2. wget
    sudo dpkg -i openmoko-toolchain_0.20080521-ubuntu6_i386.deb
    While you wait for the download to complete you can jump to step 2 and checkout the openmoko-calculator2 application
  3. Checkout an application of interest
  4. 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.
    mkdir -p ~/src/openmoko/ && cd ~/src/openmoko/
    svn co
  5. Set environment variables
  6. To use the openmoko-toolchain to compile some environment variables should be set
    . /usr/local/openmoko/arm/setup-env
  7. Compile the project
  8. To compile the project
    cd ~/src/openmoko/ && om-conf openmoko-calculator2
    cd openmoko-calculator2
    #now you could fix a bug
  9. Build package
  10. cd .. && echo "Package: openmoko-calculator2
    Version: 0.1.1
    Description: package built by openmoko toolchain
    Section: openmoko/applications
    Priority: optional
    Maintainer: your name 
    Architecture: armv4t
    Depends: libmokoui2-0
    Source: you" > openmoko-calculator2_control
    om-make-ipkg openmoko-calculator2 openmoko-calculator2_control
  11. Use scp to copy the package to the phone and install the package
  12. You can install the package on the phone by running the floowing command on the phone.
    opkg install openmoko-calculator2_0.1.1_armv4t.ipk
I have tested the following project:
  • contacts
  • dates
  • tasks
  • From
  • openmoko-appearance
  • gsm
  • openmoko-calculator2
  • openmoko-firststart2
  • openmoko-sample2
  • openmoko-today2
  • openmoko-worldclock2
  • openmoko-browser2
Tested but did not compile but can easily be worked around:
  • openmoko-messages2
  • cd openmoko-messages2/libhito
    patch -p0 < openmoko_messages2_missing_gdk_event_request_motions.patch
  • openmoko-dialer3 (could be patched with similar patch(es))
Not very tested, but won't work out of box(patches/feedback welcome!):
  • openmoko-mediaplayer
  • openmoko-feedreader
  • openmoko-appmanager2
Add packages to the openmoko-toolchain:
Adding package X:
sudo  su
. /usr/local/openmoko/arm/setup-env
opkg-target install X

5 kommentarer:

Mike sagde ...

just to say that I you can also install it on Debian (lenny) if you previously install libmokoui2 and libmokoui2-dev from hardy repository.

Stéphane Loeuillet sagde ...

Thanks for the tips.

Anyway, there is no need for the patch as long as you update your toolkit :

sudo opkg-target update
sudo opkg-target upgrade

Then, there should be no need of patching the apps/libs.

Oh, you'll also need this :
-arch neo1973 31
-src oe-neo1973
+arch om-gta01 31
+src oe-om-gta01

Anonym sagde ...

I am getting this error.

libtool: link: cannot find the library `/usr/lib/' or unhandled argument `/usr/lib/'

How can fix this?

rzr sagde ...

can you provide link to .dsc and diff.gz I'd like to rebuild it for amd64

Also you may use /opt/ vs /usr/local


patrick sagde ...

Thank you for this tips.... web development