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 http://smartere.dk/openmoko/openmoko-toolchain_0.20080521-ubuntu6_i386.deb
    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 http://svn.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-calculator2
    
  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
    make
    
  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
    Homepage: http://www.openmoko.org/
    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
Notes:
I have tested the following project:
    From http://pimlico-project.org/
  • contacts
  • dates
  • tasks
  • From svn.openmoko.org
  • 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
    wget http://smartere.dk/openmoko/openmoko_messages2_missing_gdk_event_request_motions.patch
    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
exit

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 :
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/etc/opkg.conf
-arch neo1973 31
-src oe-neo1973 http://buildhost.openmoko.org/daily-feed/om-gta01
+arch om-gta01 31
+src oe-om-gta01 http://buildhost.openmoko.org/daily-feed/om-gta01

Anonym sagde ...

I am getting this error.

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

How can fix this?

rzr sagde ...

Hi,
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

Regards
--
http://rzr.online.fr/q/openmoko

patrick sagde ...

Thank you for this tips.... web development