maemo SDK+ Installation Instructions
Release Information
Project: maemo SDK+ Version: ALPHA-2 Baseline: None. This SDK is baseline neutral. Date: 2008-04-07
This document explains how to install and set up the maemo SDK+ development environment on your computer. This document is targeted for maemo application developers.
This document covers the following steps:
1. Understand 2. Install maemo SDK+ build environment 3. Setup maemo development targets 4. Test maemo SDK+
1. UNDERSTAND
The maemo SDK+ build environment is designed to use scratchbox version 2. This is installed separately from earlier versions of scratchbox. Also targets' files and configurations are stored elsewhere. Therefore the maemo SDK+ can coexist with an existing maemo SDK environment, such as scratchbox 1.0.8 'apophis' with maemo 4.0 'chinook', and these environments will not conflict.
IMPORTANT: There is no need to change or remove your existing scratchbox and maemo SDK environments.
The maemo SDK+ in itself does not contain any rootstraps. The same rootstraps are used than in maemo 'scirocco', maemo 'bora' and maemo 'chinook' releases.
This ALPHA-2 version of Maemo SDK+ has been tested on Ubuntu Gutsy running on 32bit i386 architecture. It is recommended to use Ubunty Gutsy Server but maemo SDK+ should work also with Debian unstable and testing. Packages are also provided for Ubuntu Hardy but since Hardy is not yet officially released (by early April 2008) they are considered experimental.
2. INSTALL MAEMO SDK+ BUILD ENVIRONMENT
First, set up the following entry to your /etc/apt/sources.list file on your Debian host. This will add the maemo-sdk host build tools repository:
deb deb http://maemo-sdk.garage.maemo.org/download/host ubuntu-gutsy free
To install for Ubuntu Hardy, please, use the following URL:
deb http://maemo-sdk.garage.maemo.org/download/host ubuntu-hardy free
In addition, please, check that you have uncommented the two lines that provide links to the gutsy universe and multiverse repositories. That is, you have to remove the #-character at the beginning of the lines that end up with the words `gutsy universe' or `gutsy multiverse' in your /etc/apt/source.list file.
Next, run the command 'apt-get update' as root to update available packages list:
[Host] $ sudo apt-get update
Now install the packages by running 'apt-get install maemo-sdk' as root. This will install the requisite packages:
[Host] $ sudo apt-get install maemo-sdk ...
The following packages will be installed:
- maemo-sdk * metapackage with core utilities - maemo-libtool * libtool source which is compiled with target setup - sbrsh * run binaries on target device with automated mounting - sb2-qemu-arm * Qemu ARM CPU emulator 0.8.2 (with some patches) - scratchbox2 * cross compilation environment - arm-gcc-gnu-linux-armel * GCC armel cross-compiler 4.2.1 (with some patches) * GCC armel cross-compiler 3.4.4 (optional)
3. SETUP MAEMO BUILD TOOLS DISTRIBUTION
Maemo SDK+ let's you to specify the exact set of build tools to be used. If you want to use host tools for building, i.g. whatever tools you have installed into your workstation, you can use maemo-rootstrap tool with --host-tools option. With this option maemo SDK+ will use autogen, automake, docbook, bison, flex, etc. from your host distribution during cross-compilations. By default you should, however, use the prefered build tool distribution which is installed using maemo-tools tool. For example, to install etch build tool distribution you just type:
sudo maemo-tools -r etch -m http://ftp.debian.org/debian
4. SETUP MAEMO DEVELOPMENT TARGETS
A rootstrap provides header files and libraries that match one or many maemo based product software images. These are required to build software that is compatible with a specific maemo based device, such as Nokia N800 or Nokia N810. Development targets are user specific.
The maemo SDK+ provides just the build environment and the tools to setup 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:
- chinook40_armel * maemo 4.0 'chinook' SDK for OS2008 - bora31_armel * maemo 3.1 'bora' SDK for OS2007 - bora30_armel * maemo 3.0 'bora' SDK for OS2007 - scirocco22_armel * maemo 2.2 'scirocco' SDK for OS2006 - mistral20_armel * maemo 2.0 'mistral' SDK for OS2006
When started the maemo-roostrap tool will first download an rootstrap index from the server and then will use that index to figure out the real location of the rootstrap. After the location is known the download will be done using wget.
The maemo SDK+ itself does not contain any rootstraps. The same rootstraps are used than in releases maemo 'scirocco', maemo 'bora' and maemo 'chinook'.
4.1 Installing the latest maemo 4.0 'chinook' rootstrap
To develop for the current maemo 4.0 'chinook' (SDK for OS2008) you will need to install chinook environment with armel CPU emulation. Run the following command to setup maemo environment for the current user:
[Host] $ maemo-rootstrap --host-tools install chinook40_armel
This will download the rootstrap, setup the development target and extract the rootstrap. The development target root will be located under the following directory:
~/.maemo-sdk/rootstraps/armel/chinook40_armel
With the --host-tools option we specified that the host tools will be used in compilations. If you want to use etch distribution which is prefered, please, install etch host tool distribution first (see chapter 3) and then run the command without the --host-tools option.
You can now start development for maemo 4.0 'chinook'.
4.2 Installing the latest maemo 3.1 'bora' rootstrap
To develop for an earlier maemo 3.1 'bora' (SDK for OS2007) you will need to install bora environment with armel CPU emulation. Run the following command to setup maemo environment for the current user:
[Host] $ maemo-rootstrap --host-tools install bora31_armel
Again, with the --host-tools option we specified that the host tools will be used in compilations. If you want to use etch distribution which is prefered, please, install etch host tool distribution first (see chapter 3) and then run the command without the --host-tools option.
4.3 Installing all rootstraps
You may install all the available targets with the following command:
[Host] $ maemo-rootstrap --host-tools install all
4.4 Using the menu interface in maemo-rootstrap
The maemo-rootstap manager can be used without arguments as well which gives you a menu based interface. Run the following command as user to setup development target:
[Host] $ maemo-rootstrap
Select any development target listed in the menu to install it. Once you have installed the rootstraps that correspond to the operating system on your target Tablet device you are ready to start using the newly installed maemo SDK+.
Please, read the maemo SDK User Guide for more details.
5. TEST MAEMO-SDK+
After you have installed the SDK you can try a small test compilation with maemopad. In this example we are using maemo 4.0 'chinook' rootstraps.
Make sure that you have installed the Chinook armel rootstrap and using chinook40_armel as the default target. After that go to your normal linux home directory and run the following commands:
[Host] $ mkdir -p ~/src/mytest [Host] $ cd ~/src/mytest [Host] $ sb2 apt-get update [Host] $ sb2 apt-get source maemopad [Host] $ cd maemopad-2.1 [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
You should now have the maemopad .deb binary package in parent directory:
[Host] $ ls -lt .. total 412 -rw-r--r-- 1 you you 512 2007-12-18 14:13 maemopad_2.1_armel.changes -rw-r--r-- 1 you you 18318 2007-12-18 14:13 maemopad_2.1_armel.deb drwxr-xr-x 6 you you 4096 2007-12-18 14:13 maemopad-2.1 -rw-r--r-- 1 you you 476 2007-11-29 18:14 maemopad_2.1.dsc -rw-r--r-- 1 you you 383834 2007-11-29 18:14 maemopad_2.1.tar.gz
You can now try the newly compiled maemopad in the Internet Tablet. Just
copy the maemopad_2.1_armel.deb
file to the device and install it
using the Application Manager.
After installing the maemo SDK+ please also read the maemo SDK+ User Guide.
Happy Hacking !