Reflashing my N900

So, time passed and my once shiny and new n900 now is filled up with crap I needed to try out over time and I finally decided to reflash it…

And I decided to document the process as I do not use the backup function to its full extend as I will do not want to get e.g. all apps reinstalled after reflashing.

Instructions to myself 🙂

Items to backup using backup tool

  • adressbook
  • bookmarks

Files to backup manually

  • home
    • .gnupg
    • .scummvm
    • .ssh
    • MyDocs/.documents/Safe
    • bin/*
  • etc
    • openvpn

List of packages I want to reinstall

  • command line applications
    • irssi
    • aircrack_ng
    • preenv
    • imagemagick
    • john
    • kismet
    • openvpn
    • openntp
    • nmap
    • tor
    • unrar
    • advanced power
    • bluetooth-dun
  • Applications
    • Alarmed
    • BatteryGraph
    • Fahrplan
    • FCamera
    • Eggtimer
    • Converter
    • Frontview
    • gPodder
    • KMPlayer
    • Kroll
    • Mappero
    • Opera
    • Panorama
    • Presence VNC
    • SPPBrainEvolution
    • Swappolube
    • Wizard Mounter
    • Cleven
    • FM Boost
    • Grsync
    • gTranslate
    • h-e-n
    • Marble
    • Mobile Hotspot
    • OpenWatch
    • Optimize N900
    • QCPUFreq
    • QuickPanorama
    • ScummVM
    • Slysics
    • Tracker Cfg
    • FM Radio
    • Vice
    • wgames
    • koffice
    • transition control
    • tracker-cfg
  • Applets
    • 3g/2g selection applet
    • wifi switcher
    • rotation lock
    • tablet mode
    • advanced power monitor
    • openvpn applet
    • openssh applet
    • sleeper
    • tor applet

Things to do after reflash

http://shootspeak.com/2010/12/05/nokia-n900-performance-tweaks/

  • remove unnecessary packages
  • add sdk,  extras-testing and extras-devel repos
http://www.nokiadistrict.com/repositories-extras-extras-devel-and-extras-testing-for-nokia-n900/
  • install dbus-script
http://wiki.maemo.org/DbusScripts
    • dbus settings for saving power by karam
    • extend with speed settings for kernel
http://talk.maemo.org/showthread.php?t=69973
    • extend with powersave settings for kernel
  • tweak ohmd settings
  • create startup script to make changes permanent
http://wiki.maemo.org/Startup_script
  • test different io scheduler
  • install mlocker
http://talk.maemo.org/showthread.php?p=916529#post916529
    • make x lock in ram
  • install speedpatch (cgroups) / batterypatch (dbus)
http://talk.maemo.org/showthread.php?p=1012180#post1012180
  • install fAircrack
http://www.meegoexperts.com/2011/01/faircrack-graphical-user-interface-aircrack-maemon900/
  • setup alarmd
    • disable im accounts from 22:00 to 09:00
    • disable bt and wlan from 00:00 to 08:00
  • setup quickmount shares
  • create bt a2dp connection shortcuts
  • install uboot bootloader
  • install android to mmc
  • install meego to mmc

Process

How to run the scripts / setup

Once untaring the tar ball cd into its top level directory, all further instructions assume this to be the working directory.

Edit this file:

config/file_config

Set BASEDIR to point to the extracted directory.

Now edit

config/net_config

Set N900 to the hostname / ip address of the n900.

Finally copy the files from your latest N900 backup created with its backup tool to backup/nokia_backup and other own backups to backup/my_backup.

Flash n900

There is not much to be done, details on this process are on the maemo wiki:

http://wiki.maemo.org/Updating_the_tablet_firmware

Partition 32GB sdcard

Create several partitions for additional operating systems and format them as ext3

  • 20GB ext3 free
  • 768MB swap
  • 5GB reserved for android
  • 5GB reserved for meego

Initial installation of n900

These are the first steps done on the n900 after the reflash

  • install available security update using application manager
  • install package sudser using application manager
  • install essential packages from command line
sudo apt-get install busybox-power openssh bzip2 wget pwsafe
  • restore ~/.ssh for passwordless login and unlock user
./bin/00_copy_sshkey.sh

Now the system is accessible from remote and one can comfortably do the next steps using a laptop.

System setup

Repartition the internal memory to have a bigger /home partition

The current partiton layout reduces the MyDocs partition so that /home has 5GB instead of only 2GB. To other sizes please edit the file config/partition-table. Make sure all partitions are aligned to 32 KB and sizes are multiples of 32 KB. The sectors are 512 bytes, so the block counts must multiplied by 2. For example, 2GB= 4194304 blocks. Each partition should start at start+size of the previous partition. The first partition must start at 64. Make sure to keep the swap partition (the number may be changed).

Step 1: Backup /home to memorycard and patch bootup script to mount backup as /home

./bin/01_repartition_n900mmc.sh

Now reboot the N900

./bin/00_reboot_n900.sh

Step 2: With /home being mounted from the backup we can repartition the internal mmc and format its partitions.

./bin/02_repartition_n900mmc.sh

Again, reboot the N900.

./bin/00_reboot_n900.sh

Step 3: restore backup of /home to internal memory and restore bootup files to their original

./bin/03_repartition_n900mmc.sh

Again, reboot the N900 a last time to mount /home from internal memory again.

./bin/00_reboot_n900.sh

Automount ext3 formatted mmc

By default the n900 won’t recognize and mount a ext3 formatted sd card. To enable this some files need to be patched.

./bin/04_enable_mmc_ext3.sh

Enable swap on mmc

The initial partition layout for the sd card contained a swap partition. By enabling it, maemo will use swap on the internal partition as well on the sd card.

./bin/05_enable_mmc_swap.sh

Set system time and date from network

install package openntp

./bin/06_install_openntp.sh

Restore backup

To restore only selected data, the content of the backup gets extracted and copied manually onto the n900.

Extract the content of the Nokia backup files

Nokia backup files have to be in $BASEDIR/backup.

./bin/10_extract_backup.sh

Restore files from the extracted backup

This script will restore selected data from the backup files created by the N900 backup tool.

./bin/20_restore_nokia_backup.sh

Here the detailed commands for manually restoring the settings:

Restore the calendar data.

scp -r $WD/Root/home/user/.calendar/calendardb.backup user@$N900:/home/user/.calendar/calendardb

Restore the address book.

scp -r $WD/Root/home/user/.osso-abook-backup/* user@$N900:~user/.osso-abook/

Restore bookmarks.

 scp -r $WD/Root/home/user/.bookmarks user@$N900:/home/user/

Restore mail accounts.

scp -r $WD/Root/var/lib/gconf/apps/modest/server_accounts/ root@$N900:/var/lib/gconf/apps/modest/ scp -r $WD/Root/var/lib/gconf/apps/modest/accounts root@$N900:/var/lib/gconf/apps/modest/

Restore IM accounts (this will restore accounts without passwords).

scp -r $WD/Root/tmp/.rtcom-accounts user@$N900:~user/

Restore bluetooth setup.

scp -r $WD/Root/var/lib/bluetooth root@$N900:/var/lib/

Restore openvpn.

scp -r $WD/Root/etc/openvpn root@$N900:/etc/

Restore files not in the Nokia backup.

This script will restore selected data from the backup files created by yourself.

./bin/21_restore_my_backup.sh

Here the detailed commands for manually restoring the settings:

Restore pwsafe.

scp -r $MYBACKUP/Safe user@$N900:/home/user/MyDocs/.documents

Restore gnupg

scp -r $MYBACKUP/.gnupg/ user@$N900:/home/user/

Restore ~/bin

scp -r $MYBACKUP/bin user@$N900:/home/user/

System Tuning

Setup kernel power and fixed wlan modules

Install kernel + osso-wlan-modules with fix for scanning when getting out of access point reach.

./bin/30_install_kernel_power.sh

Enable smartreflex and xlv profile

Copy a profile based on xlv with smartreflex enabled to n900

./bin/31_enable_smartreflex

Install CSSU upgrade

Follow instructions given at

http://wiki.maemo.org/Community_SSU

Install swappolube

Install package swappolube. Setup is done with the gui on n900.

./bin/32_install_swappolube.sh

Disable autoupdater

By default maemo checks regulary for package updates. As tcosts quite some battery, switch the check interval to 365 days.

./bin/33_disable_autoupdater.sh

Enable HWsync in hildon-desktop.ini

This will enable HW acceleration support for the desktop animations and thus make them appear smoother – at least that is the theory.

./bin/34_enable_HWsync.sh

Free up root space

For this I modified the moveroot.sh script from here so it can move and restore and also asks for confirmation before actually moving files.

./bin/35_moveroot.sh

Install 720p support

Using some libraries from the n950 root filesystem one can enable the n900 to do 720p video playback. However only some videos can be played and over clocking the n900 is required as well. The script assumes the n950 libraries to be a tar ball named lib_dsp_n950.tgz that contains the whole path to the libraries (/lib/dsp) placed under $BASEDIR/data/720p.

./bin/37_enable_720p.sh

Install wl1251 injection enabled driver

This updated driver has features like packet injection enabled. It is compiled for the power46 kernel but runs fine with power49 as well, so for now the precompiled module is in use. The module will reside in /home/opt/compat-wireless and two scripts in /usr/sbin can be used to load or unload the new modules: /usr/sbin/load_injection.sh and /usr/sbin/unload_injection.sh.

./bin/38_add_injection_driver.sh

Install nokia maps update to show directions

The shipped nokia maps application is pretty useless until the modified index.html from Blaizzen gets installed.

./bin/41_add_nokia_map_features.sh

Install flash10

There seem to exist several flashplayer 10 libs for n900, I got one from TI for testing and found another one in some forum. For copyright reasons it is not possible to share those, so the script expects them in $BASEDIR/data/flash being called either libflashplayer.so_dynamically or libflashplayer.so_statically. Also a script gets copied to the n900 called /usr/sbin/switch_flash_version.sh that can be used to select one of the available flash versions.

./bin/42_add_flash10.sh

Install browser speedup patch


		
Advertisements
Reflashing my N900

become a pirate!

As I am a member of the pirate party Germany and we recently had some  success in the Berlin elections I thought I also get a bit more active again and actually try to do something about changing the world to the better. So, for starters I created some design examples on how to attract politically interested people to become a member as well and start influencing the politics of the future. So – long story short – I went to

http://www.wordle.net/
and fed it with the most relevant topics of the pirate party Germany and hit the ‘create’ button. Here are the results:

become a pirate!