Maemo SDK+ Installation Instructions for Debian GNU/Linux
Release Information
Project: maemo SDK+ Version: FINAL Baseline: None. This SDK is baseline neutral. Date: 2009-11-02
This document explains how to install and set up the maemo SDK+ development environment on your Debian GNU/Linux computer. This document is intended for maemo application developers.
This document covers the following steps:
1. Understand 2. Install the maemo SDK+ build environment 3. Set up the maemo build tools 4. Set up the maemo development targets 5. Test maemo SDK+
1. UNDERSTAND
The maemo SDK+ build environment is designed for Scratchbox 2, which is installed separately from earlier Scratchbox versions. Also the target files and configurations are stored elsewhere. Therefore maemo SDK+ can coexist without conflicts with an existing maemo SDK environment, such as Scratchbox 1.0.8 Apophis with maemo 4.1 Diablo.
IMPORTANT: You do not need to remove or change your existing Scratchbox and Maemo SDK environments.
This FINAL version of Maemo SDK+ has been tested on several Ubuntu and Debian distributions running on 32bit i386 architecture. This document explains how to set up Maemo SDK+ on Debian.
2. INSTALL THE MAEMO SDK+ BUILD ENVIRONMENT
The installation process requires network access. If your network access requires proxy settings, set them up first.
To install maemo SDK+, add the maemo SDK repository by adding a line in the /etc/apt/sources.list file on your Debian host as follows (log in as root to edit apt repositories):
For Debian Lenny:
deb http://maemo-sdk.garage.maemo.org/download/host debian-lenny free
For Debian Squeeze (testing):
deb http://maemo-sdk.garage.maemo.org/download/host debian-squeeze free
Next, run the following command using sudo to update the available packages list:
[Host:root] $ apt-get update
Now install the packages by running the following command using sudo:
[Host:root] $ apt-get install maemo-sdk ...
This installs the following packages:
- maemo-sdk 1.0.19 * metapackage with core utilities - maemo-sdk-libs 0.9.40 * selected precompiled libsb2 libraries - maemo-libtool 1.5.26-2 * libtool source which is compiled with target setup - sbrsh 7.6maemo1 * run binaries on target device with automated mounting - sb2-qemu-arm 0.10.0-maemo10 * Qemu ARM CPU emulator (with some patches) - scratchbox2 2.0-lta115 * cross compilation environment
3. SET UP THE MAEMO BUILD TOOLS
3.1 Build tools Distribution
It is recommended that all maemo software be compiled using Debian/Etch tool
set. Maemo SDK+ provides a command, sudo maemo-sdk install tools
, to
set up these Debian/Etch tools under /opt/maemo/dists
directory.
They do not interfere with current or future tools on your host. Having an
isolated set of tools ensures that the tool set is uniform regardless of
the host environment.
Note that this command takes some time to complete. To speed up the
download, you can add a --mirror url
option between
maemo-sdk
and install
to access a nearby Debian mirror
site. The list of Debian mirrors is available at
here.
sudo maemo-sdk install tools lenny-2009-1
3.2 Cross-compiler installation
To use rootstraps, install the arm-2007q3 and i386-2007q3 toolchains with the following commands:
sudo maemo-sdk install toolchain arm-2007q3 sudo maemo-sdk install toolchain i386-2007q3
Again, note that the cross-compiler is a large package and it might take some time to download.
4. SET UP THE MAEMO DEVELOPMENT TARGETS
A rootstrap provides header files and libraries that match one or more maemo-based product software images. These are required to build software that is compatible with a specific maemo device, such as Nokia N900, Nokia N800 or Nokia N810. Development targets are user specific.
Maemo SDK+ provides the build environment and the tools to set up the relevant maemo development targets.
Use the rootstrap and development target that correspond to the operating system on your target Internet Tablet device. Currently the following development targets are available:
- fremantle5.0minimal_armel * maemo 5.0 Fremantle armel SDK for Maemo 5 - fremantle5.0minimal_i386 * maemo 5.0 Fremantle i386 SDK for Maemo 5 - diablo4.1.2_armel * maemo 4.1.2 Diablo armel SDK for OS2008 - diablo4.1.2_i386 * maemo 4.1.2 Diablo i386 SDK for OS2008 - scirocco22_armel * maemo 2.2 Scirocco armel SDK for OS2006 - mistral20_armel * maemo 2.0 'mistral' armel SDK for OS2006
When started, the maemo-sdk
tool does not download
the latest rootstrap index file from the server. To download the latest
up-to-date rootstrap index file, use the command maemo-sdk reload catalogue
.
Maemo SDK+, which in itself does not contain any rootstraps, uses the same rootstraps as the maemo Scirocco, maemo Bora and maemo Chinook releases.
4.1 Installing the latest maemo 4.1.2 Diablo rootstrap
To develop for the current version, maemo 4.1.2 Diablo (SDK for OS2008), install the Diablo environment with armel CPU emulation. Run the following command to set up the maemo environment for the current user:
[Host] $ maemo-sdk install rootstrap diablo4.1.2_armel
This downloads the rootstrap, sets up the development target and extracts the rootstrap. The development target root is placed in the following directory:
~/.maemo-sdk/rootstraps/armel/diablo4.1.2_armel
You can now start development for maemo 4.1.2 Diablo.
4.2 Installing the latest maemo 4.0 Chinook rootstrap
To develop for an earlier maemo 4.0 Chinook, install the chinook environment with armel CPU emulation. Run the following command to set up the maemo environment for the current user:
[Host] $ maemo-sdk install rootstrap chinook40_armel
4.3 Installing binary-only packages
The maemo-sdk
tool can install the Nokia binary-only
packages as well. Run the following command as user to set up the binary
packages for diablo4.1.2_armel rootstrap:
[Host] $ maemo-sdk install binaries diablo4.1.2_armel
5. TEST MAEMO SDK+
After installing the SDK, you can try a small test compilation
with the maemopad
source package. This example uses
maemo 4.1.2 Diablo rootstraps.
Make sure that you have installed the Diablo armel rootstrap
and are using diablo4.1.2_armel
as the default target.
Next, go to your usual linux home directory and run the following commands:
[Host] $ mkdir -p ~/src/mytest [Host] $ cd ~/src/mytest [Host] $ sb2 -eR apt-get update [Host] $ sb2 apt-get source maemopad [Host] $ cd maemopad-2.4 [Host] $ export SBOX_REDIRECT_FORCE=/usr/bin/perl [Host] $ sb2 dpkg-buildpackage -rfakeroot -d -b .... # compilation and package building should start normally now. # if configure fails please check that you have installed the right tools to your host
The maemopad .deb binary package should now be in the parent directory:
[Host] $ ls -lt .. total 412 -rw-r--r-- 1 you you 512 2008-12-18 14:13 maemopad_2.4_armel.changes -rw-r--r-- 1 you you 18318 2008-12-18 14:13 maemopad_2.4_armel.deb drwxr-xr-x 6 you you 4096 2008-12-18 14:13 maemopad-2.4 -rw-r--r-- 1 you you 476 2008-11-29 18:14 maemopad_2.4.dsc -rw-r--r-- 1 you you 383834 2008-11-29 18:14 maemopad_2.4.tar.gz
To try the newly compiled maemopad in the Internet Tablet, copy
the maemopad_2.4_armel.deb
file to the device and install
it with the Application Manager.
To install the package into the diablo4.1.2 rootstrap, go to the parent
directory (note that sb2 ../maemopad_2.4_armel.deb
does not work)
and type the following command:
[Host] $ sb2 -eR dpkg -i maemopad_2.4_armel.deb
To play with the maemo SDK+ runtime emulation, start it with the following command:
[Host] $ maemo-sdk start gui
When the startup procedure is complete, you can launch the maemopad application on your emulated runtime.
To stop the maemo UI runtime inside the Xephyr window, use the following command:
[Host] $ maemo-sdk stop gui
After installing maemo SDK+, also read the maemo SDK+ User Guide.
Happy Hacking !