inz.fi

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

multi-target-development-for-maemo.md (4731B)


      1 # Multi-target development for maemo
      2 
      3  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.**
      4 
      5  Here's approximately what I do:
      6 
      7 <div class="p">
      8  <pre>
      9 > sudo sh -c 'echo "deb http://scratchbox.org/debian apophis main" >> /etc/apt/sources.list' # Use this on i386 systems
     10 > sudo sh -c 'echo "deb http://www.ipi.fi/~pablo/maemo5-sdk_amd64 /" >> /etc/apt/sources.list' # Use this on amd64 systems
     11 > sudo apt-get update
     12 > sudo apt-get install scratchbox-core scratchbox-devkit-cputransp \
     13 scratchbox-devkit-debian scratchbox-devkit-doctools scratchbox-devkit-maemo3 \
     14 scratchbox-libs scratchbox-toolchain-cs2005q3.2-glibc-arm \
     15 scratchbox-toolchain-cs2005q3.2-glibc2.5-arm \
     16 scratchbox-devkit-perl
     17 > sudo apt-get install scratchbox-toolchain-cs2007q3-glibc2.5-arm7 \
     18 scratchbox-devkit-svn scratchbox-devkit-git
     19  </pre>
     20 </div>
     21 
     22  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:
     23 
     24 <div class="p">
     25  <pre>
     26 > sudo wget -O /scratchbox/packages/mistral-armel-rootstrap.tgz \
     27 http://repository.maemo.org/stable/mistral/armel/Maemo_Dev_Platform_v2.0_armel-rootstrap.tgz
     28 > sudo wget -O /scratchbox/packages/bora-armel-rootstrap.tgz \
     29 http://repository.maemo.org/stable/3.0/armel/maemo-sdk-rootstrap_3.0_armel.tgz
     30 > sudo wget -O /scratchbox/packages/chinook-armel-rootstrap.tgz \
     31 http://repository.maemo.org/stable/4.0/armel/maemo-sdk-rootstrap_4.0_armel.tgz
     32 > sudo wget -O /scratchbox/packages/fremantle-armel-rootstrap.tgz \
     33 http://repository.maemo.org/stable/5.0/armel/maemo-sdk-rootstrap_5.0_armel.tgz
     34  </pre>
     35 </div>
     36 
     37  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:
     38 
     39 <div class="p">
     40  <pre>
     41 > su - `whoami`
     42  </pre>
     43 </div>
     44 
     45  Now onto the rootstrap creation... The mistral and bora use the "glibc" -toolchain and chinook uses the "glibc2.5" -toolchain. First mistral:
     46 
     47 <div class="p">
     48  <pre>
     49 > sb-conf st mistral-armel -c cs2005q3.2-glibc-arm \
     50 -d debian-sarge:maemo3-tools:cputransp:doctools:perl:maemo3-debian \
     51 -t qemu-arm-0.8.2-sb2
     52 > sb-conf rs mistral-armel /scratchbox/packages/mistral-armel-rootstrap.tgz
     53 > sb-conf in mistral-armel -c -e -d -F
     54  </pre>
     55 </div>
     56 
     57  Bora goes pretty much the same, just replace "mistral" with "bora":
     58 
     59 <div class="p">
     60  <pre>
     61 > sb-conf st bora-armel -c cs2005q3.2-glibc-arm \
     62 -d debian-sarge:maemo3-tools:cputransp:doctools:perl:maemo3-debian \
     63 -t qemu-arm-0.8.2-sb2
     64 > sb-conf rs bora-armel /scratchbox/packages/bora-armel-rootstrap.tgz
     65 > sb-conf in bora-armel -c -e -d -F
     66  </pre>
     67 </div>
     68 
     69  Okie, now we have two rootstraps, missing only chinook, it goes like this:
     70 
     71 <div class="p">
     72  <pre>
     73 > sb-conf st chinook-armel -c cs2005q3.2-glibc2.5-arm \
     74 -d debian-sarge:maemo3-tools:cputransp:doctools:perl:maemo3-debian \
     75 -t qemu-arm-0.8.2-sb2
     76 > sb-conf rs chinook-armel /scratchbox/packages/chinook-armel-rootstrap.tgz
     77 > sb-conf in chinook-armel -c -e -d -F
     78  </pre>
     79 </div>
     80 
     81  Now trying also fremantle =)
     82 
     83 <div class="p">
     84 <pre>
     85 > sb-conf st fremantle-armel -c cs2007q3-glibc2.5-arm7 \
     86 -d debian-etch:qemu:doctools:svn:git \
     87 -t qemu-arm-sb
     88 > sb-conf rs fremantle-armel /scratchbox/packages/fremantle-armel-rootstrap.tgz
     89 > sb-conf in fremantle-armel -c -e -d -F
     90 </pre>
     91 </div>
     92 
     93  Now you should have scratchbox with 3 targets: one for IT2006, one for IT2007 and one for upcoming IT2008.
     94 
     95  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 http://repository.maemo.org gregale free non-free" to /etc/apt/sources.list momentarily and do "apt-get update; fakeroot apt-get -f install".
     96 
     97  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.
     98 
     99  **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.