khorben's Place

hackable:1 builds and provides a package repository for Maemo

Blog post by khorben on 20/03/2011 23:18:47
I had been thinking about testing the DeforaOS graphical applications [1] on my N900 [2] for a while, but remained concentrated on the Openmoko Freerunner [3] and hackable:1 [4] until it was satisfying enough. With the upcoming dse2 [5] release being in a good shape [6], I decided to have a short look anyway.

My first reaction was very much like when I checked Maemo [7] back in 2008:
  • you need me to install scratchbox, which only supports i386? [8]
  • the documentation links to external sites (Debian packaging) but doesn't explain how to actually build a package? [9]
  • you prevent me from navigating the repositories freely? [10]
But this time, with the lessons learned while re-implementing strap:1 and cross-compiling Debian packages, I figured I could do it another way: with hackable:1 itself. Here is how.

First, I determined how to populate the cross-compilation environment with the proper binaries. I added trunk/build/strap1/hostname/, containing:

ENVIRONMENT=GNOME #it's empty at the moment

This also required handling Nokia-N900-phone as a valid profile, in trunk/build/strap1/profile/Nokia-N900-phone:

#this device is a phone
. "strap1/profiles/include/phone.include"
#add bluetooth support
. "strap1/profiles/include/bluetooth.include"

(and so on for the rest of the hardware capabilities)

Once this added, this simple command was enough to populate the environment:
# ./ DESTDIR=/usr/arm-linux-gnueabi install

There I was. It was even faster than with a regular Debian target, since there are way less packages available to parse. But did I miss installing the development packages? Totally. Yet it doesn't matter:
# ./ DESTDIR=/usr/arm-linux-gnueabi \
PACKAGES="libssl-dev libgtk2.0-dev" install

And seconds later, I had these two installed as necessary, along with their dependencies of course. Sweet, but we're not done yet. Let's build actual packages:

$ cd trunk/packages
$ ./ DEBIAN_ARCH=armel DEBIAN_VERSION=maemo libsystem
$ ./ DEBIAN_ARCH=armel DEBIAN_VERSION=maemo libdesktop
$ ./ DEBIAN_ARCH=armel DEBIAN_VERSION=maemo editor

Unfortunately, even with the correct binaries and packages definitions installed in the cross-compilation environment, dh_shlibdeps failed to grab the right dependencies. Disabling it during cross-compilation was enough to do the trick (commenting it out in debian/rules from the diff file).

Time to add this new repository into the N900 [11], through "Application manager"->"Catalogs"->"New" [12]:
Catalog name: hackable:1
Web address:
Distribution: wip-maemo
Components: main

Open a terminal, gain root privileges:
# apt-get update
# apt-get install libsystem0 libdesktop0 editor
$ editor

And it works. I repeat: sweet.