Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 2522d45f4a4950e2dc7f4c750813111632ebf971
parent eaa218330625219b7d3711fbdb7a665b1cc35745
Author: Santtu Lakkala <>
Date:   Mon, 22 Oct 2007 10:19:56 +0000

Multi-target development for maemo

Aposts/ | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+), 0 deletions(-)

diff --git a/posts/ b/posts/ @@ -0,0 +1,99 @@ +# Multi-target development for maemo + + 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: + +<div class="p"> + <pre> +> 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 \ +scratchbox-devkit-perl +> sudo apt-get install scratchbox-toolchain-cs2007q3-glibc2.5-arm7 \ +scratchbox-devkit-svn scratchbox-devkit-git + </pre> +</div> + + 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: + +<div class="p"> + <pre> +> 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 \ + + </pre> +</div> + + 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: + +<div class="p"> + <pre> +> su - `whoami` + </pre> +</div> + + Now onto the rootstrap creation... The mistral and bora use the "glibc" -toolchain and chinook uses the "glibc2.5" -toolchain. First mistral: + +<div class="p"> + <pre> +> 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 + </pre> +</div> + + Bora goes pretty much the same, just replace "mistral" with "bora": + +<div class="p"> + <pre> +> 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 + </pre> +</div> + + Okie, now we have two rootstraps, missing only chinook, it goes like this: + +<div class="p"> + <pre> +> 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 + </pre> +</div> + + Now trying also fremantle =) + +<div class="p"> +<pre> +> 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 +</pre> +</div> + + 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. +\ No newline at end of file