HowTo GetStartedWithSardine

  1. Installing dual-boot initfs
  2. Copying existing (IT2006) root filesystem
  3. Upgrading to Sardine

Requirements:

  • rsync or GNU (not BusyBox) tar
  • xterm
  • root access
  • at least 5 MB of free space on your root partition. More can't hurt.
  • Realistically, a 512MB memory card.

Installing dual-boot initfs

While this is the fastest way to get started, it is also the most dangerous. Ensure that your device is fully charged, or better yet plugged in to the wall charger, at all times. Failure should not brick your device, but will almost certainly require an initfs reflash and possibly a full reflash.

Using a remote connection to reflash is relatively dangerous --- if possible, use xterm instead.

  1. Download initfs_flasher.tgz from here.
  2. Get a root command prompt via xterm or ssh. (The flashing script will attempt to use the sudo gainroot method if you are not root.)
  3. Extract initfs_flasher.tgz.
  4. You are about to reflash part of your memory.
    No data should be lost.
    Ensure your device is fully charged before continuing!
  5. Execute initfs_flash inside initfs_flasher directory.
  6. When prompted, answer yes to create a backup. If any part of this backup fails, do not continue!
  7. When prompted, answer yes to create a modified initfs image.
  8. When prompted, answer yes.

You now have a brand new initfs! As prompted when booting, hold down the menu key to switch your boot device from internal flash to mmc1 or mmc2 (which is where you'll be installing Sardine) or a USB hard drive.

Copying existing (IT2006) root filesystem

This procedure is easiest when the MMC contains no data. Otherwise, use a tool such as GPartEd to shrink the existing FAT32 partition.

Assuming a blank MMC, delete any existing partitions. You will want to have one FAT32 partition, which will be usable by both your internal flash system and your new MMC filesystem. Only one swap file will be necessary. The second partition must be ext2, and will need to be at least 256MB in order to hold Sardine and a comfortable amount of extra space for applications.

It is possible to do the partitioning and formatting on the 770 using cfdisk (difficult to find) and e2fsprogs (available in the maemo2.0 repository) but it is much easier to do it with a card reader.

  1. Gain root.

    sudo gainroot
    
  2. Add the ext2 module and mount the new partition.

    Nokia770-26:~# insmod /mnt/initfs/lib/modules/current/ext2.ko
    Nokia770-26:~# mount /dev/mmcblk0p2 /opt/
    
  3. Remount the flash rootfs in order to show otherwise hidden entries

    Nokia770-26:~# mount -t jffs2 /dev/mtdblock4 /floppy -o rw,rpsize=1024,rpuid=0,rpuid=30000
    
  4. MAKING VERY SURE TO NOT GET FLOPPY AND OPT BACKWARDS

    rsync the internal flash rootfs to the new partition.

    Nokia770-26:~# rsync -avH --delete /floppy/ /opt/
    

    Beware that there is an issue with opera fonts caused by the copy made by rsync - details here or here. If you want to make extra sure your copy on MMC card does not have this issue (recommended) then use GNU tar (not the BusyBox version) in place of rsync.

    Get the GNU tar binary either from Scratchbox ARM target (/bin/tar) or by apt-get on the device in download only mode (apt-get -d install tar). After ignoring any warnings, the tar deb package should be stored in /var/cache/apt/archives and you can extract it using dpkg -x.

    Then you can make the clone by

    /path/to/gnu/tar cf - -C /floppy . | /path/to/gnu/tar xvf - -C /opt
    
  5. Finishing up.

    Nokia770-26:~# umount /opt
    Nokia770-26:~# umount /floppy
    

You should now be able to boot IT2006 from the memory card.

Upgrading to Sardine

As you might know, upgrading a running application framework results in a hard, unrecoverable crash that requires a reflash.

Therefore, we're not going to upgrade a running framework.

Make sure that you booted from internal flash (NOT MMC) for these steps

  1. Gain root.

    sudo gainroot
    
  2. Mount the MMC filesystem.

    Nokia770-26:~# insmod /mnt/initfs/lib/modules/current/ext2.ko
    Nokia770-26:~# mount /dev/mmcblk0p2 /opt/
    
  3. Connect to the internet.

  4. Change your root context.

    Nokia770-26:~# chroot /opt/
    Nokia770-26:~# mkdir /tmp/.run
    

    This will change your / to correspond to /opt, allowing you to run apt-get on a system without a running application framework!

  5. Edit /etc/apt/sources.list like this:

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

    Make sure to remove any maemo 2.0 or 2.1 distro. Sardine is self-contained.

  6. The moment you've been waiting for....

    Nokia770-26:~# apt-get update
    Nokia770-26:~# apt-get install hildon-application-framework
    Nokia770-26:~# apt-get upgrade
    

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

    Some packages will be held back. Upgrade them manually with apt-get install.

    Important

    • Make sure you install the metapackage before doing the apt-get upgrade, not after. There are some packaging problems which are avoided this way.
    • That's apt-get upgrade, not apt-get dist-upgrade.

      apt-get upgrade will refrain from installing new packages which results in lots of upgrades being held back. However apt-get dist-upgrade would remove lots of packages rendering your 770 useless.

  7. Reboot and enjoy Sardine.


'_Hi, maybe you'll find this link useful: it's more or less the same explained here in the first part of the article, but somehow simplified. http://maemo.org/maemowiki/HowTo_EASILY_Boot_From_MMC_card _'
Tagged
dual-boot
initfs,
Sardine,