SardineGettingStarted

  1. Good to know before you start
  2. Requirements
  3. Setup Sardine in Scratchbox
    1. Setup Scratchbox Apophis r4
    2. Create your targets
    3. Update your targets to Sardine
  4. Setup Sardine in the 770 or N800
    1. Backup your data
    2. Prepare for upgrade
    3. Setup Sardine in separate MMC partition, for dual booting
  5. Keeping Sardine up-to-date

Good to know before you start

/!\ A few things good to know about Sardine before you start:

  • Sardine is constantly being developed and gets frequent package updates. At times, changes are made that temporarily break or diminish previously working functionality, before another update restores it. To make the most of Sardine update regularly.
  • It can happen that an update breaks Sardine in a way that requires at lot of manual work to fix or resetting the roostraps and reflashing the device. Such is life on the bleeding edge.

Requirements

To use Sardine you need:

Setup Sardine in Scratchbox

First of all, you should use Scratchbox Apophis r4. /!\ Other versions of Scratchbox might work but Apophis r4 is recommended for Sardine because: * Sardine itself is built using Apophis r4. * Maemo Bora will use Apophis r4 or newer already. The release after Bora which is the current target for Sardine will use Apophis r4 or newer.

Setup Scratchbox Apophis r4

These are the debs you need:

Install instructions are here

Create your targets

i386:

Compiler:         cs2005q3.2-glibc-i386
Architecture:     i686
Sub-architecture: i686
C-library:        glibc

Devkits:          perl
CPU-transparency: none

and arm:

Compiler:         cs2005q3.2-glibc-arm
Architecture:     arm
Sub-architecture: arm
C-library:        glibc

Devkits:          cputransp perl
CPU-transparency: /scratchbox/devkits/cputransp/bin/qemu-arm-0.8.0-m2

In both cases, make sure you use the latest Maemo 2.1 Scirocco rootstraps.

Update your targets to Sardine

The procedure is identical for i386 and arm.

First get rid of the maemo repositories:

apt-get update
fakeroot apt-get remove maemo-repository
fakeroot apt-get remove maemo-extras-repository

Then edit /etc/apt/sources.list like this:

deb     http://repository.maemo.org/sardine unstable main non-free
deb-src http://repository.maemo.org/sardine unstable main non-free

And then:

apt-get update
fakeroot apt-get upgrade
fakeroot apt-get install hildon-application-framework hildon-application-framework-dev
fakeroot apt-get upgrade

When asked about whether you want to overwrite configuration files, answer yes unless you really know what you are doing.

/!\ Important: * Make sure you do a "upgrade" both before and after installing the metapackage. There are some packaging problems which are avoided this way. * In principle no packages will be held back. If they are, try upgrading them manually with apt-get install

/!\ QEMU ARM 0.8.0-m2 is not the latest but is nevertheless strongly recommended since this is the one that can currently be used to build all Sardine packages

That's it. You should now be set for Sardine application development in Scratchbox.

Setup Sardine in the 770 or N800

Setting up Sardine in the 770 requires a bit more work than in Scratchbox and there is more than can go wrong. However, the worst that can happen is that you will need to reflash your 770.

Backup your data

/!\ Before anything, make sure you backup your data. Later on, do not overwrite these backups with backups done inside Sardine. Sardine might occasionally break the device's backup functionality leading to unusable backups.

Prepare for upgrade

There are many possible setups that can work, with various degrees of difficulty and different tradeoffs. Including:

A. Sardine only running on flash, upgraded live from a working OS 2006. A. OS 2006 kept in flash. Sardine in a separate MMC partition upgraded from within a chroot in OS 2006. This allows dual booting.

Variants and combinations of these are possible too.

Currently (A) is not feasible (at least without extra measures). One likely problem is that maemo-launcher cannot be upgraded live.

Since Sardine is likely to break once in a while it is a good idea not to use it for mission critical things like reading your ebooks or to look at the online bus time tables while on the road.

Few people have two devices, so the obvious thing to do is to set up a single device to be able to boot into both the official stable OS, and also into Sardine.

The 770 and N800 can dual (and even triple and quadruple) boot out of the box. However, you need a terminal on the device or the Linux flasher to select the root device. Thus, in order to switch between operating systems, the one you are running must not be significantly broken, or you need to have a computer handy.

Therefore the recommended setup is (B) with a boot menu (See BootMenu for more information). The next section explains how.

However there are downsides. For one, ext2fs is a poor option for a filesystem in a handheld device since it will easily get corrupted on power failures and system crashes.

Setup Sardine in separate MMC partition, for dual booting

1 . First of all, make sure your device is running the latest software update to its OS. 1 . Enable R&D mode and set some flags: ./flasher-3.0 --enable-rd-mode --set-rd-flags=no-lifeguard-reset The R&D flag is necessary to avoid a neverending reboot cycle if something important (e.g.: bluetooth) fails to initialize at startup 1 . Finally, follow HowTo GetStartedWithSardine

Keeping Sardine up-to-date

In Scratchbox this should be enough:

apt-get update
fakeroot apt-get install hildon-application-framework hildon-application-framework-dev
fakeroot apt-get upgrade

In the device, most of the time this will be enough:

  • In a terminal (e.g.: osso-xterm): sudo gainroot apt-get update apt-get install hildon-application-framework apt-get upgrade

In both cases when asked about whether you want to overwrite configuration files, answer yes unless you really know what you are doing. Packages might be held back, in which case it is worth trying to upgrade them manually with apt-get install

/!\ If the apt-get upgrade results in a blank screen or a reboot it might be that you got a package that is not upgradeable on a running device. In that case:

  • Boot into the non-Sardine OS (flash)
  • insmod /mnt/initfs/lib/modules/current/ext2.ko mount /dev/mmcblk0p2 /opt/ chroot /opt/

and then try completing the upgrade there.