Developing for Nokia 770 on Ubuntu
Friday June 03rd 2005, 9:42 pm Category: Nokia 770 development

In maemo-developers Karoliina Salminen provided an excellent overview of developing for Nokia 770 on Ubuntu.


I am too using Ubuntu (Breezy) and I have installed the Scratchbox packages using the debian source from scratchbox.org. Works fine.

I would like to recommend everyone starting installing maemo by going to www.scratchbox.org, picking version 1.0 or later (I am using 1.0.1), reading the installation instructions from there and put the debian sources to /etc/apt/sources.list . Then just start Synaptic, select the scratchbox packages (you can search with keyword scratchbox). Do not install the uclibc packages, just the glibc toolchains. I have the following packages installed:

  1. scratchbox-core 1.0.1
  2. scratchbox-devkit-debian 1.0.1
  3. scratchbox-devkit-doctools 1.0.1
  4. scratchbox-libs 1.0.1
  5. scratchbox-toolchain-arm-gcc3.3-glibc2.3 1.0.1
  6. scratchbox-toolchain-i686-gcc3.3-glibc2.3 1.0.1

After installing these packages with e.g. apt-get install or by clicking them in Synaptic, starting scratchbox is done by going to directory /scratchbox and executing the login script found in that directory, in other words:

cd /scratchbox
./login

However, prior to that, you need to add your user to the scratchbox users. That is done with command

scratchbox/sbin/sbox_adduser username

Please find more documentation from the http://www.scratchbox.org.

Then you can do a target. Apparently when you are not having the device (yet) unlike we have here, you need to create a i386/i686 target. sb-menu command starts the scratchbox configuration program. You can also create a arm target and use qemu in that. However, you can not propably run the whole maemo platform with the qemu, but all arm compilation etc. works fine and you can run some gtk programs without the maemo framework through the qemu propably without problems as long as you have built-in libosso etc. dependencies.

After doing all this, you can untar the rootstrap inside the scratchbox.

The user configuration issue I had and Asko propably mentioned below was that sometimes you had to copy from your /etc/passwd file your user’s line to the /etc/passwd file inside the scratchbox, to enable e.g. ssh and scp to work inside the scratchbox.

It might be useful to create a symbolic link from your home directory to /scratchbox/users/username/home/username to avoid typing long things when copying stuff etc. Also when using a text editor with graphical UI that is being run outside the scratchbox (e.g. GEdit, Kate, KDevelop, XEmacs etc.), this can make life easier when you can go directly through your home directory to the scratchbox home directory, at least that is what I have used to do unless I edit something little quickly inside the scratchbox.

There is some not so useful stuff regarding maemo-platform found in the Scratchbox documentation as it is for the devices that were available prior the 770 was announced. However, just pick the applying parts (e.g. do not download the rootstrap from scratchbox.org since that is not what you want, you want the maemo rootstrap instead etc.).


No Comments so far

RSS feed for comments on this post. TrackBack URI