Thursday, September 17, 2009

Race to do nothing!

In the early days there was prelink as part of maemo. It disappeared in the n810 distribution ranges. I noticed that there is no armel deb in debian for prelink, but there were murmurs of folks hacking it to work. Push finally came to shove, and as I like C++ many of my apps on maemo have quite a few symbols that need to be resolved before the app can run.

The long story short, prelink_0.0.20090311 is up at my repo. Use at your own risk, if your device breaks you get to keep both pieces etc etc.

Initial benchmarking: for an app that uses a few libraries, is C++, and has quite a few symbols that the dynamic linker has to attend to. For a complete run before it was 5.2 seconds on a warm start, with prelink of the binary it is 2.5 seconds. Considering that in that 2.5 the app itself has to completely run, there was a huge amount of time spent, err wasted, in the dynamic linker.

Of course, if I can get hidden symbols to work too then that 2.5 might drop back to 1.5-2 seconds. But for hidden symbols you have to either wrap things in pragmas or declare each function and class as exposed or not, so for a large library its quite intrusive. But the prelink is a huge gain for no code changes, so far at least. YMMV.

It's a touch ironic that Nokia recommends using prelink for embedded devices. But that is for qtopia... maybe for the next distro prelink will reappear in the default installation.

Saturday, September 5, 2009

geotagged image files and libferris

Tip of the day, if you have a geotagged image file such as those produced using Location Tracker on Symbian phones, then you can use libferris to start Google Earth showing you that image on a map. Just run
with the image(s) you want to see. Its a fairly quick way to show the movements of the day on a map. I should also add timeline support there I guess, so you can retrace a trip in the order it occurred using just waypoint image files.

This also works with any type of file that is location tagged with libferris. If you have a digital long/lat then you can view it on a map (TM).

Tuesday, September 1, 2009

n810 and gphoto

After noticing that gphoto is not packaged for maemo I did a bit of digging, seeing sad news from those who tried getting it going. But I thought I'd try with 2.4.6 to see if things are better now.

For those who want to tinker, see my packages. The library came across OK but gphoto itself uses a newer debhelper, so I just plucked the binary itself into the repo. If you want to use this with libferris, then expand the additional libraries into /usr/local/lib/ferris/plugins/context on the device.

I found that once USB mode was set to host, I could see the camera with gphoto but as reported in the past, there were frequent crashes. This is really unfortunate as all the blocks where in place for the command I was chasing:

# ferriscp -av \
gphoto://Canon.../DCIM/102CANON/IMG_2442.JPG \

Most of the time using gphoto locks everything and about 5-10 seconds later the device restarts. I might have to hunt for a newer kernel for diablo... or wait until I have gphoto support on an n9 (nn?), a P+S wifi camera, and a decent data plan...