Fun with our Openmoko phones

At this point this article is very much a series of brief scratchpad notes, which I'll try to flesh out once I have things working. Note also that despite being less than a day old, it's been superseded as I decided to upgrade to 2008.08, the new stable version of which was today released.

Comment of convention: to make it clear which system a file is created on, throughout this article I'll use scp-style semantics: risby:/etc/foo is a file on my desktop machine (whose hostname is risby), and om:/etc/foo is a file on the Openmoko phone.

Version $Id: openmoko.html,v 1.1 2008/08/29 14:25:20 madhatta Exp $ .

Fast links to the various sections:

Utter basics

Unpacked, charged, turned on all as advertised in http://wiki.openmoko.org/wiki/Getting_Started_with_your_Neo_FreeRunner. Set the clock and updated the mobo clock, also as described.

Networking didn't work under Fedora 9 until I plugged it into the motherboard's USB, rather than my (unpowered) hub, at which point usb0 sprang into existence (thanks, HAL). Made quick and dirty risby:/etc/sysconfig/network-scripts/ifcfg-usb0 as openmoko comes out of box configured to have usb interface as 192.168.0.202, with .200 as default route and nameserver, then could bring usb0 quickly up and down with NetworkManager.

The openmoko's networking parameters are determined in om:/etc/network/interfaces, which says:

DEVICE=usb0
BOOTPROTO=none
IPADDR=192.168.0.200
NETMASK=255.255.255.0
ONBOOT=no
These values could probably be changed. I temporarily hacked the nameserver to be 192.168.3.1 (my local server) by editing om:/etc/resolv.conf directly. I also used the hostname command to temporarily change the hostname from om-gta02 to tom-gta02 as we have two phones, and I wanted to tell mine apart from my wife's. This seems to be set in om:/etc/hostname and I will change it permanently if the temporary change seems to have no ill effects.

Promptly changed the root password on the openmoko (with passwd). This seems to have had no ill effects, and it is definitely something you should do. The device has a highly-recognisable ssh banner (SSH-2.0-dropbear_0.49) so scanning for one of these on a network would be trivial - and if you haven't changed the root password from the default, you might be helping make the coolest mobile zombie botnet in existence!

Can now ssh to phone as root, and have connectivity to the internet (as per MASQUERADE instructions at http://wiki.openmoko.org/wiki/USB_Networking#Simple_Manual_Linux_Configuration. Proof of name resolution and connectivity:

root@tom-gta02:/etc# ping -c 2 www.teaparty.net
PING www.teaparty.net (193.219.118.100): 56 data bytes
64 bytes from 193.219.118.100: seq=0 ttl=54 time=15.488 ms
64 bytes from 193.219.118.100: seq=1 ttl=54 time=15.432 ms

--- www.teaparty.net ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 15.432/15.460/15.488 ms

XXX need note here about changing Today screen to get minimalist clock display XXX

Installing software

The phone as shipped is pretty much a bare-bones kind of thing. Now I have networking working, I can install software. Here's openmoko's own web browser installing, following instructions here. I won't show the command output for any other installs, but I thought it might be instructive (particularly for non-debian users, like me) to see the commands running to completion just once:
root@tom-gta02:/etc# opkg install openmoko-browser2
Installing openmoko-browser2 (0.0.1+svnr4603-r2.02) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/openmoko-browser2_0.0.1+svnr4603-r2.02_armv4t.ipk
100% |========================================================================|
Installing libwebkit-1.0-1 (0.1+svnr35533-r35533-r5) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libwebkit-1.0-1_0.1+svnr35533-r35533-r5_armv4t.ipk
100% |========================================================================|
Installing libxt6 (1:1.0.5-r1) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libxt6_1.0.5-r1_armv4t.ipk
100% |========================================================================|
Upgrading libglib-2.0-0 on root from 2.16.1-r4 to 2.16.4-r0...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libglib-2.0-0_2.16.4-r0_armv4t.ipk
100% |========================================================================|
Installing gtk+ (2.12.11-r3) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/gtk+_2.12.11-r3_armv4t.ipk
100% |========================================================================|
Installing libxcomposite1 (1:0.4.0-r0) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libxcomposite1_0.4.0-r0_armv4t.ipk
100% |========================================================================|
Installing libxdamage1 (1:1.1.1-r1) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libxdamage1_1.1.1-r1_armv4t.ipk
100% |========================================================================|
Upgrading libcairo2 on root from 1.4.10-r0 to 1.6.4-r1...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libcairo2_1.6.4-r1_armv4t.ipk
100% |========================================================================|
Upgrading libfreetype6 on root from 2.3.5-r2 to 2.3.6-r0...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libfreetype6_2.3.6-r0_armv4t.ipk
100% |========================================================================|
Installing libpixman-1-0 (0.11.4-r0) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libpixman-1-0_0.11.4-r0_armv4t.ipk
100% |========================================================================|
Upgrading libcurl4 on root from 7.18.0-r0 to 7.18.2-r0...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libcurl4_7.18.2-r0_armv4t.ipk
100% |========================================================================|
Installing libicui18n36 (3.6-r3) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libicui18n36_3.6-r3_armv4t.ipk
100% |========================================================================|
Installing libicuuc36 (3.6-r3) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libicuuc36_3.6-r3_armv4t.ipk
100% |========================================================================|
Installing libicudata36 (3.6-r3) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libicudata36_3.6-r3_armv4t.ipk
100% |========================================================================|
Installing libsqlite3-0 (3.5.6-r1) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libsqlite3-0_3.5.6-r1_armv4t.ipk
100% |========================================================================|
Installing libxslt (1.1.22-r1) to root...
Downloading http://buildhost.openmoko.org/daily-feed/armv4t/libxslt_1.1.22-r1_armv4t.ipk
100% |========================================================================|
Configuring gtk+
Configuring libcairo2
Configuring libcurl4
Configuring libfreetype6
Configuring libglib-2.0-0
Configuring libicudata36
Configuring libicui18n36
Configuring libicuuc36
Configuring libpixman-1-0
Configuring libsqlite3-0
Configuring libwebkit-1.0-1
Configuring libxcomposite1
Configuring libxdamage1
Configuring libxslt
Configuring libxt6
Configuring openmoko-browser2
root@tom-gta02:/etc# 

Trying to get a full alpha keyboard, I followed the instructions at http://wiki.openmoko.org/wiki/Switching_Keyboards, but got an error:

root@tom-gta02:/var/volatile/tmp# opkg install matchbox-keyboard-inputmethod*.ipk
Installing matchbox-keyboard-inputmethod (0.0+svnr1910-r10) to root...
Nothing to be done
Collected errors:
Multiple packages (matchbox-keyboard-inputmethod and matchbox-keyboard-inputmethod) providing same name marked HOLD or PREFER.  Using latest.
Package matchbox-keyboard-inputmethod md5sum mismatch. Either the opkg or the package index are corrupt. Try 'opkg update'.
Turns out that I was using a new enough release that I didn't have to manually download the packages and could follow instructions for "ScaredyCat release" (who knew!). So now I have a proper keyboard. I also followed the instructions to ad a little keyboard popper-up in the top RH corner of the screen, so that I can use all the screen real estate when I don't want to be entering text.

I didn't like the openmoko browser I installed above, so i did an opkg remove openmoko-browser2 and installed minimo according to the instructions on the same page. It is a pretty tidy browser; to open a URL, press the "@" logo and change the URL shown to the one you want.

Using the memory card

I was starting to fill up root, so I followed http://wiki.openmoko.org/wiki/Package_management to install non-essential packages (eg minimo) on the card instead. However, the instructions were written for ipkg, which has since been superseded, so everything in and after the section titled "Installing Packages on the Card" doesn't work.

I found in this list posting that opkg is basically a sawn-off version of ipkg, and that ipkg-link doesn't work with it. But they say it should be easy enough to hack ipgk-link to use opkg data files; on the offchance that I could hack it, I did the following:

opkg install ipkg-utils
opkg install -d card /tmp/minimo_0.02+cvs20070626-r0_armv4t.ipk
I then made a few changes to ipgk-link, specifically, changed all references to "ipkg" to "opkg". Shockingly, this works, as you can see below:
root@tom-gta02:/usr/bin# ipkg-link mount /media/card/packages 
*** Command: mount
*** Command: add
*** Locating package
*** Found package on /media/card/packages
*** Adding minimo
*** Done.

*** Done.
root@tom-gta02:/usr/bin# ls -al minimo 
lrwxrwxrwx    1 root     root           35 Aug 27 10:54 minimo -> /media/card/packages/usr/bin/minimo
root@tom-gta02:/usr/bin# 
My hacked copy of ipkg-link can be found here, in case you don't want to risk changing your own.

Back to Technotes index
Back to main page