Multi-target development for maemo

October 22, 2007 on 1:19 pm | In maemo | 12 Comments

Despite the fact that the maemo sdk "installer script" is the "preferred" way of installing scratchbox and the roostraps, I have never used it. I prefer to have my dpkg aware of the scratchbox. What I do instead, is grab the scratchbox packages with apt and download the rootstraps manually. These instructions are for debian/ubuntu -- on other distros/platforms you're on your own, sorry.

Here's approximately what I do:

> sudo sh -c 'echo "deb apophis main" >> /etc/apt/sources.list' # Use this on i386 systems
> sudo sh -c 'echo "deb /" >> /etc/apt/sources.list' # Use this on amd64 systems
> sudo apt-get update
> sudo apt-get install scratchbox-core scratchbox-devkit-cputransp \
scratchbox-devkit-debian scratchbox-devkit-doctools scratchbox-devkit-maemo3 \
scratchbox-libs scratchbox-toolchain-cs2005q3.2-glibc-arm \
scratchbox-toolchain-cs2005q3.2-glibc2.5-arm \
> sudo apt-get install scratchbox-toolchain-cs2007q3-glibc2.5-arm7 \
scratchbox-devkit-svn scratchbox-devkit-git

This takes a while to download and install, when it asks for users to add to scratchbox, just choose your user (and whomever might want to do scratchbox development on the box). Onwards:

> sudo wget -O /scratchbox/packages/mistral-armel-rootstrap.tgz \
> sudo wget -O /scratchbox/packages/bora-armel-rootstrap.tgz \
> sudo wget -O /scratchbox/packages/chinook-armel-rootstrap.tgz \
> sudo wget -O /scratchbox/packages/fremantle-armel-rootstrap.tgz \

These take a while too, depending obviously on the thickness of your webtubes. Now all left to do is to create scratchbox targets. Bear in mind, that you might need to re-logon to gain the sbox group, or you may also do:

> su - `whoami`

Now onto the rootstrap creation... The mistral and bora use the "glibc" -toolchain and chinook uses the "glibc2.5" -toolchain. First mistral:

> sb-conf st mistral-armel -c cs2005q3.2-glibc-arm \
-d debian-sarge:maemo3-tools:cputransp:doctools:perl:maemo3-debian \
-t qemu-arm-0.8.2-sb2
> sb-conf rs mistral-armel /scratchbox/packages/mistral-armel-rootstrap.tgz
> sb-conf in mistral-armel -c -e -d -F

Bora goes pretty much the same, just replace "mistral" with "bora":

> sb-conf st bora-armel -c cs2005q3.2-glibc-arm \
-d debian-sarge:maemo3-tools:cputransp:doctools:perl:maemo3-debian \
-t qemu-arm-0.8.2-sb2
> sb-conf rs bora-armel /scratchbox/packages/bora-armel-rootstrap.tgz
> sb-conf in bora-armel -c -e -d -F

Okie, now we have two rootstraps, missing only chinook, it goes like this:

> sb-conf st chinook-armel -c cs2005q3.2-glibc2.5-arm \
-d debian-sarge:maemo3-tools:cputransp:doctools:perl:maemo3-debian \
-t qemu-arm-0.8.2-sb2
> sb-conf rs chinook-armel /scratchbox/packages/chinook-armel-rootstrap.tgz
> sb-conf in chinook-armel -c -e -d -F

Now trying also fremantle =)

> sb-conf st fremantle-armel -c cs2007q3-glibc2.5-arm7 \
-d debian-etch:qemu:doctools:svn:git \
-t qemu-arm-sb
> sb-conf rs fremantle-armel /scratchbox/packages/fremantle-armel-rootstrap.tgz
> sb-conf in fremantle-armel -c -e -d -F

Now you should have scratchbox with 3 targets: one for IT2006, one for IT2007 and one for upcoming IT2008.

Additional notes: the "bora" rootstrap is broken, it requires you to either install the "virtual packages" or install the real packages. I prefer the latter and add "deb gregale free non-free" to /etc/apt/sources.list momentarily and do "apt-get update; fakeroot apt-get -f install".

Now that you have three separate targets for different versions, you can jump from one target to another by doing sb-conf se <version>-armel. These instructions can easily be applied for i386 too, if you need to test your applications: just replace every occurrence of arm or armel with i386, drop the "cputransp" from devkits and omit the "-t qemu-arm-0.8.2-sb2" option.

Update: updated the chinook download url to the 4.0 final instead of the beta. Another: Thanks to Marius for pointing out that the perl devkit needs to be installed before it can be used.

Leetle hildon-1/chinook migration things

October 21, 2007 on 12:55 pm | In maemo | 1 Comment

Most of "my" applications are now chinook ready, at least in the svn. However, I prefer to keep them compatible with mistral and bora, so I need to do little quirks. Let's investigate osso-xterm's modifications for example.

What was previously known as hildon-libs, is now hildon-1, so we need to tell about this. Before the change, I had:

PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.12.0)

Now, as we need to also check for hildon-1, and due to the fact that we need to know it in source as the include paths have changed, it goes like this:

PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9, \
                  AC_DEFINE(HILDON, 1, [Version of hildon libraries]), \
                  [AC_DEFINE(HILDON, 0, [Version of hildon libraries]) \
                  PKG_CHECK_MODULES(HILDON_LIBS, hildon-libs >= 0.12.0)])

In code, I do the following:

# include <config.h>
#if HILDON == 1
# include <hildon/hildon-window.h>
# include <hildon-widgets/hildon-window.h>

There are also some real changes, but with this I get to compile stuff and get warnings/errors for the other stuff that has changed. Those I've, again, separated with #if HILDON == 1.

For projects that don't use autotools, I use this kind of stuff:

mh_shot_tool_CFLAGS += $(shell if pkg-config hildon-1 --exists; then \
         pkg-config hildon-1 --cflags; echo -DHILDON=1; \
         elif pkg-config hildon-libs --exists; then \
         pkg-config hildon-libs --cflags; echo -DHILDON=0; \
         else pkg-config gtk+-2.0 --cflags; fi)

Edit: thanks to Loïc for pointing out, the AC_SUBSTs aren't actually needed, PKG_CHECK_MODULES already does that. You may omit them and it will still work.

mh-shot-tool and timed capture

October 16, 2007 on 10:13 pm | In maemo, maemo-hackers | 1 Comment

A blog post suggested that mh-shot-tool should have the ability to snap timed screenshots. Trying not to let the audience down, I added a "re-grab with <n> second delay" functionality. Just refresh the catalogues and check for updates. Install file available as usual.

Now you can do things like this:

New php package for maemo

October 16, 2007 on 8:55 pm | In maemo, maemo-hackers | 15 Comments

Piotras requested a php package with phpize and php-config, so I decided to change the packaging and add a -dev package. After a couple of tries I also added -pear and -cli package. I also upgraded to newest upstream (5.2.4) and the fastcgi-binary had changed name, so I needed to upgrade the packages once more. If you happened to hit this gap, upgrade the packages to get it working.

Had some spare time, so I upgraded the nginx package to newest upstream (0.5.32) too. Both packages available as .install files: nginx and php5.

maemo-hackers maintenance

July 23, 2007 on 11:10 am | In maemo-hackers | No Comments

The maemo-hackers website had been untouched for too long, so I decided to break it. First I upgraded trac to 0.10.4. This seemed to break the svn repeatedly, but quick googling suggested to change to fsfs-backend, and indeed, no more breakages.

Then I got and crazy idea, maybe akismet could be used to check tickets/comments for spam, like in wordpress. Seemed it wasn't so crazy after all, SpamFilter did just this (and more). Now I'm waiting for it to catch it's first spam!

Also, the few "lucky" ones with accounts, password changing is now possible from the "My account" -page.

Screenshooting made easy-ish

June 21, 2007 on 4:58 pm | In maemo, maemo-hackers | 3 Comments

I wanted to create a flickr uploading option for maemo-blog's future. After some struggling with flickr's API, I got image uploading work. For testing, I created a little application that takes a screenshot and uploads it onyo flickr. The result is mh-shot-tool, available for 770 and N800. As usual, .install is available.

osso-xterm with 256 color support

May 15, 2007 on 2:24 pm | In maemo-hackers, osso-xterm | 4 Comments

Got a ticket asking for 256 color support for vte. Well, the ticket is now closed fixed and the latest vte in repository supports this feature. No new osso-xterm release yet to pull in the lib, but with red-pill or apt-get you can get some more colours for yourself.

osso-xterm and 256 colors

Mobile Linux lecture

April 26, 2007 on 7:38 pm | In maemo | No Comments

Today in Tampere University of Technology on Mobile Programming course, Miko Nieminen held a lecture on embedded Linux and maemo played quite big role on it. I considered the lecture to be quite nice crash course, it's not too deep but makes some points on legal aspects too, which are rarely discussed. You can check the lecture slides, released under Creative Commons. The lecture will also be available as video, but it's in Finnish only.

osso-statusbar-cpu for bora

April 24, 2007 on 1:01 pm | In maemo-hackers, osso-statusbar-cpu | 5 Comments

Finally had the energy to do this, thanks to Luke for requesting it; osso-statusbar-cpu for bora (0.6.0) has now hit repository. Go install it!

To enable the plugin, go to "Navigation" plugin in control panel, tap on "Status bar" and check the box for "Graph plugin".

osso-xterm and .profile

April 11, 2007 on 1:45 pm | In maemo-hackers | 4 Comments

Thank's to Marius Gedminas' patch, osso-xterm now spawns login shells and $HOME/.profile is read. This has been quite a popular request, and now it should work.

In other news, I'm taking a risk and re-enabling maemo-hackers ticket commenting; if it still generates lots of spam, I might re-disable it...

« Previous PageNext Page »

Powered by WordPress.
Entries and comments feeds. Valid XHTML and CSS. ^Top^