Reply
Thread Tools Search this Thread
Posts: 38 | Thanked: 3 times | Joined on Jul 2007 @ U.S.A.
#1
This tutorial is copied from my blog at nezzen.net.

The first step to developing on the N800 is to install the Maemo (maemo.org) SDK on your computer, but before that you will need to install Scratchbox (scratchbox.org) (a cross-compilation toolkit for embedded Linux development) so that the Maemo SDK has a "fake" N800 to run on.

Enter the following commands to download and install Scratchbox 3.1 on a Debian-based Linux system (such as Ubuntu). You will need to have certain basic Unix utilities already available, as well as an Internet connection.

Code:
$ wget http://repository.maemo.org/stable/3.1/maemo-scratchbox-install_3.1.sh
$ chmod +x ./maemo-scratchbox-install_3.1.sh
$ sudo ./maemo-scratchbox-install_3.1.sh -d
After Scratchbox installs itself, we will need to set up user accounts and then restart your login shell. Replace "brian" with your username. (Note: If you are running in an X11 session, you will have to logout/login.)

Code:
$ sudo /scratchbox/sbin/sbox_adduser brian yes
$ logout
Now that Scratchbox is installed and configured, you can proceed with installing the Maemo SDK.

Code:
$ wget http://repository.maemo.org/stable/3.1/maemo-sdk-install_3.1.sh
$ chmod +x ./maemo-sdk-install_3.1.sh
$ ./maemo-sdk-install_3.1.sh
During this process you will be prompted to review and accept the licensing terms of the Nokia Maemo SDK.

For some reason, Maemo doesn't properly set up networking, so we have to manually configure our nsswitch.conf file.

Code:
$ su
Password:
# echo "hosts:          files dns" > /scratchbox/etc/nsswitch.conf
# exit
Now that networking is configured, we need to ensure that the Scratchbox enviornment has the most up-to-date packages installed.

Code:
$ /scratchbox/login

Welcome to Scratchbox, the cross-compilation toolkit!

Use 'sb-menu' to change your compilation target.
See /scratchbox/doc/ for documentation.

[sbox-SDK_X86: ~] > apt-get update
[sbox-SDK_X86: ~] > sb-conf select SDK_ARMEL
[sbox-SDK_ARMEL: ~] > apt-get update
To describe the above a little more, here is what's happening. The first command will put you into the Scratchbox environment. You are greeted with a welcome message and a command prompt starting with "sbox" and the target architecture.

The next command updates apt (the package manager) with the latest package information from the internet. You then switch into the ARMEL architecture with the third command (notice the prompt changes), and update apt there too.

Since we are going to need a simulated N800 to develop on, we have to install the Nokia-licensed packages in our Scratchbox.

Code:
[sbox-SDK_X86: ~] > fakeroot apt-get install maemo-explicit
[sbox-SDK_X86: ~] > sb-conf select SDK_ARMEL
[sbox-SDK_ARMEL: ~] > fakeroot apt-get install maemo-explicit
After the lines that invoke apt, you will need to enter y (for "Yes") to run through the installer.

The SDK you have installed right now is version 3.1. As of writing, the latest is version 3.2, which can only be obtained via an upgrade from within version 3.1. Here is how to upgrade to version 3.2 of the SDK. You should notice how similar it is to the previous steps.

Code:
$ wget http://repository.maemo.org/stable/3.2/maemo-sdk-nokia-binaries_3.2.sh
$ chmod +x ./maemo-sdk-nokia-binaries_3.2.sh
$ ./maemo-sdk-nokia-binaries_3.2.sh
$ /scratchbox/login

[sbox-SDK_X86: ~] > apt-get update
[sbox-SDK_ARMEL: ~] > PAGER=less fakeroot apt-get dist-upgrade
[sbox-SDK_X86: ~] > sb-conf select SDK_ARMEL
[sbox-SDK_ARMEL: ~] > apt-get update
[sbox-SDK_ARMEL: ~] > PAGER=less fakeroot apt-get dist-upgrade
You have reached a breathing point in this long process. The Maemo SDK should now be installed and ready to go! However, you may be wondering how you will be able to "see" what the user of an N800 is seeing. The next few steps demonstrate how to install and set up a special Xnest server on a Debian-based Linux distribution.

First you will need to install the Xephyr server with the following command. (Note: This assumes it is already in your distribution's apt repositories.)

Code:
$ sudo apt-get install xserver-xephyr
You can launch the Xephyr X-server in an N800-compatible resolution with the following command. You may add an & symbol to the end of the command to fork Xephyr into the background.

Code:
$ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac
Now I will show you how to start your "virtual" N800's Application Framework.

Code:
$ /scratchbox/login
[sbox-SDK_arch: ~] > export DISPLAY=:2
[sbox-SDK_arch: ~] > af-sb-init.sh start
Ta-da! You now have the perfect environment to begin developing application on the Nokia N800 Internet Tablet.

I hope you have enjoyed my tutorial, which is based off the the Install Notes included with the Bora release. If you find any errors in my writing, please send me an email or PM.

Last edited by brianez21; 10-28-2009 at 11:27 PM.
 

The Following User Says Thank You to brianez21 For This Useful Post:
debernardis's Avatar
Posts: 2,098 | Thanked: 1,959 times | Joined on Dec 2006 @ Sicily
#2
Thanks for your post, a simple guide was badly needed. Could you extend it to the compilation of a simple app, please? Where do I ./configure, make & make install? Thanks
 
Posts: 177 | Thanked: 4 times | Joined on Apr 2006 @ Wirral, UK
#3
I've been waiting for such a tutorial for months, nice work brianez21. I suggest you put it in the wiki so that we can all keep it up-to-date.
 
johsua's Avatar
Posts: 449 | Thanked: 18 times | Joined on Apr 2006 @ Eureka, CA
#4
Originally Posted by 9a6or View Post
I've been waiting for such a tutorial for months, nice work brianez21. I suggest you put it in the wiki so that we can all keep it up-to-date.
yes - add it to the wiki. Isn't there also a wiki at maemo.org?
 
Posts: 38 | Thanked: 3 times | Joined on Jul 2007 @ U.S.A.
#5
Thank you for all the appreciation guys!

@debernardis: I am working on a tutorial to cover the topic of compiling applications on the N800, however I am very busy right now so it may take me some time. When I am finished with it I will post it on my blog and here on the ITT forums.

@9a6or: I will put it on the ITT wiki here.

@joshua: The wiki at maemo.org is being weird. It is asking me to login to the page, but I don't see any link to sign up for it.
 
mfresh's Avatar
Posts: 91 | Thanked: 24 times | Joined on Mar 2007 @ Marlow, Bucks
#6
Just to add another appreciation:

thanks for this - great work. Can't wait for hints on how to compile!
__________________
mfresh
visit the Minty Fresh N800 blog
 
Posts: 38 | Thanked: 3 times | Joined on Jul 2007 @ U.S.A.
#7
There is plenty of information about all the aspects of the N770/N800 scattered around the Maemo website and this website's forum and wiki. It is a shame that you have to search around so much for it.
__________________
- Brian
(my blog)
 
Posts: 393 | Thanked: 112 times | Joined on Jul 2007
#8
Fantastic

Many thanks!
 

The Following User Says Thank You to yabbas For This Useful Post:
iball's Avatar
Posts: 729 | Thanked: 19 times | Joined on Mar 2007
#9
I would develop more for the N800 IF there was an easy way to get the development environment on my Mac (OS X 10.4.10).
Since there isn't - and no, VMWARE images don't count either, I don't want the overhead added - I guess I'll skip out on this one.
 
Posts: 38 | Thanked: 3 times | Joined on Jul 2007 @ U.S.A.
#10
Originally Posted by iball View Post
I would develop more for the N800 IF there was an easy way to get the development environment on my Mac (OS X 10.4.10).
Since there isn't - and no, VMWARE images don't count either, I don't want the overhead added - I guess I'll skip out on this one.
Hey, you're not the only one who wishes that! My Mac has a shiny Core 2 Duo and my Debian box is chugging away on a 1GHz single-core VIA.

According to this thread, Scratchbox is Linux only.
__________________
- Brian
(my blog)
 
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

 
Forum Jump


All times are GMT -4. The time now is 10:11 AM.