To develop native applications using C/C++ and GTK+ for Maemo, we need to install the Maemo 5 SDK and the development environment which include scratchbox, which is used for cross-compilation. The host environment here is Ubuntu 12.04 LTS 64bit. Scratchbox now supports 64bit platform.

1. First we need to install scratchbox. For that add the scratchbox apt source url

deb http://scratchbox.org/debian/ hathor main

to /etc/apt/sources.list. We can use vim to do it or the following command.

sudo add-apt-repository "deb http://scratchbox.org/debian/ hathor main"

The above command will add deb-src link as well, which can be removed.

2. Update package list

sudo apt-get update

3. Install scratchbox and dependencies

sudo apt-get install scratchbox-core scratchbox-devkit-apt-https scratchbox-devkit-autotools-legacy scratchbox-devkit-debian-squeeze scratchbox-devkit-doctools scratchbox-devkit-git scratchbox-devkit-perl scratchbox-devkit-python-legacy scratchbox-devkit-qemu scratchbox-devkit-svn scratchbox-libs scratchbox-toolchain-cs2007q3-glibc2.5-arm7 scratchbox-toolchain-cs2007q3-glibc2.5-i486 scratchbox-toolchain-host-gcc

If dependency errors were encountered during installation, run the below command to auto resolve them

sudo apt-get install -f

4. Once scratchbox installation completes successfully, add the user to scratchbox.

sudo /scratchbox/sbin/sbox_adduser your-username

Logout and login. Now we will have a working scratchbox environment. We can test it by logging into scratchbox.

5. Download SDK setup script:

wget http://repository.maemo.org/stable/5.0/maemo-sdk-install_5.0.sh

6. Since Hathor is based on Debian Squeeze, modify the install script to replace etch with squeeze.

sed -i -e 's/etch/squeeze/g' maemo-sdk-install_5.0.sh

7. Make the script executable and run it (as a normal user, outside scratchbox env).

chmod +x maemo-sdk-install_5.0.sh
./maemo-sdk-install_5.0.sh

8. In Package Selection screen, choose Runtime Environment + All Dev and Dbg packages option. In Selection Summary screen we will get:

Installed Component: maemo-sdk-debug
x86 target name: FREMANTLE_X86
Armel target name: FREMANTLE_ARMEL
Overwrite existing targets: no
Proxy Server:
Alternative sources.list:

9. The SDK installation is not complete yet. After the successful completion of the above steps, we need to install Nokia-closed binaries for the target platform. To install Nokia binaries, we need to accept the EULA at the Nokia website.

10. Once we accept the EULA, we will get a token code and a source url with the token code to access the closed components of the SDK. The website says to not distribute or share the token code we get, and it is for personal use only.

The url will be of the format

deb http://repository.maemo.org/ fremantle/the-token-code-here nokia-binaries

11. Login to scratchbox.

/scratchbox/login

12. Select target platform and install the closed binaries. First we will select ARM and then x86.

sb-conf select FREMANTLE_ARMEL

13. Add the source url obtained in step 10 to /etc/apt/sources.list in the scratchbox armel environment.

vim /etc/apt/sources.list  # and add the source url to the nokia binaries

14. Update the packages list.

apt-get update

15. Install the Nokia binaries.

fakeroot apt-get install nokia-binaries nokia-apps

16. Once the above installation completes, choose change the target env to x86 and install the binaries of the x86 platform as well.

sb-conf select FREMANTLE_X86

To install the binaries, repeat the above steps from 13 to 15. After installation logout of the scratchbox env.

logout

With this the Maemo 5 SDK installation is complete and ready for development.