Present Perfect


Picture Gallery
Present Perfect

N900, GooSync and SyncEvolution

Filed under: maemo — Thomas @ 11:20 pm

11:20 pm

Zaheer pointed me to a temporary solution for my calendar sync problem while he (hopefully) keeps working on his more final solution which would allow full multiple-calendar synchronization.

I have a previous GooSync account that I used happily with my E51. GooSync supports SyncML, so it can be used with SyncEvolution on the device, which was recently ported.

I’ve put full instructions on my wiki if you’re in the same boat as me. Let me know if it works for you! And thanks again Zaheer for pointing the way.

Better living through technology

Filed under: couchdb,Hacking,maemo,Python — Thomas @ 2:30 pm

2:30 pm

Sweet. After a bunch of hacking, packaging, tweaking, and cheating, I was able to do the following:

  • add stuff to my shopping list on my desktop, with the command-line client
  • without doing anything manual to sync my phone, take it with me to the store
  • at the store, do ‘gtd search @shop’ (from a terminal, currently) to get the list of things to shop for, including my recent additions
  • come back with my stuff from the store, and mark those items as done on my desktop
  • do the same search again on my phone, and see those two items gone

Now of course, this needs some improvement, like a dedicated app to view my things on the phone, plus a way to mark them as done. Also, my code needs optimizing, because out of 2500 things in the couchdb database it takes a good 10 seconds to list these ten. But it’s such an awesome glimpse of my future.

Now one has to wonder if the balance of doing all of this technology stuff to implement something as simple as an indestructible shopping list is worth it in the end… But as technologists I’m sure we all know that feeling, and delude ourselves into thinking this is sensible.

Building erlang for the N900

Filed under: maemo — Thomas @ 10:21 pm

10:21 pm

So, it’s been a long weekend and I’ll have to recap the essentials sometime later.

I got my new phone – the n900 – on Friday from Zaheer. I wrote down first impressions but they’ll have to wait for now.
I spent most of Thursday night setting up scratchbox a few times and preparing to understand how to Build Stuff.

I was hoping I would be able to build on the source for previous packages but the original site that hosts those packages has been down for two months now. And not down in the usual way – it just leaves the connection attempt hanging! I mailed the guy, but got no reply. So, no other choice than to try it myself.

Over the course of the weekend, I managed to repackage .debs from Debian for erlang, spidermonkey and couchdb to work in the x86 scratchbox. I won’t bore you with the details on how much I suffered trying to learn debian packaging enough to build a working xulrunner. In the end, I managed to figure out that there was a very lightweight ‘spidermonkey’ source tree that builds just the js I need for couchdb (after reading the CouchDB MacOSX build instructions) and I packaged that up from scratch, which was definitely easier.

At some point during the weekend, I managed to run couchdb completely in the x86 scratchbox, so from that point I thought I was home free. Just rebuild the packages in the ARMEL scratchbox and off I go.

Boy was I ever wrong.

No, really.

I basically spent all of today trying to figure out why the build of erlang would hang as soon as it invoked the just-built erlang erlc compiler. Five processes down it seems stuck in a select(0, NULL, NULL, NULL) call, which afaict would have no hope of waking up. It was preceeded by an error about qemu not handling syscall 242. (it took me a while to figure out that this is the syscall for setting scheduler affinity, so probably not that necessary ?)

I got heaps of suggestions from various people, and thought of some things on my own too:

  • implement syscall 242 for qemu. Not my idea of a good time just yet.
  • patch out use of 242. Doable.
  • Set up sbrsh and use cpu transparency. There were no uptodate instructions for fremantle, it took me a good hour to figure out that these instructions are very misleading since those pages do not preserve the formatting, which is essential for the .sbrsh configuration file, besides also having extranuous spacing. And even when that worked to the point I was able to transparently execute hello-world-gtk, it would still hang on running simply quilt when doing the package build.
  • Since Erlang compiles to bytecode, I thought I could just copy .beam and .hrl files from my x86 tree into my armel tree each time the compiler hung on a compile. I actually did this for a good 90 minutes, until I gave up, because it was too tedious. I might try it again, but automated.
  • It should be possible to create a devkit with just the x86 erlang compiler, then convince the armel scratchbox target to use that compiler to generate all the erlang bytecode, instead of the just-built in-source compiler. Need to investigate further.
  • Upload the package to extras-devel, and have it built there. Good idea, but I’m waiting to be approved for now. Also, I don’t know if extras-devel will use qemu – it might fail the same way. And I’m not a fan of a build that can only be reproduced in an external service…
  • Building it on the phone directly. Apparently this was a working approach with previous devices. I added the sdk repo to the phone, and it proposed to remove some essential umbrella package before installing some dev packages. I didn’t want to brick my phone just yet.
  • Someone suggested to install scratchbox on the phone. An intriguing thought, but sadly it took only 5 minutes of work to see E: Currently Scratcbox can only run in 32 bit i386 architecture.

I have now settled on a mutation of some of these ideas, and we’ll see how that goes. I basically created /opt/chroot, copied essentials off the phone’s root into that dir, and chrooted into it. In there, I added the sdk repo, and am now installing the tools to be able to build the packages as if I was doing it directly on the phone – but nicely protected inside a chroot.

I hope there are going to be some packages at the end of this tunnel. And to think some people actually enjoy this lowlevel device hacking!

« Previous Page