User:Jebba

Name: Jeff Moe

Email: moe@blagblagblag.org

Nick: jebba, jebbajeb, jebba900, etc...

Long Neglected Blog...

Usually I dot my laptop with READMEs in various ~/devel/ subdirs, but in this case I decided to write up some notes here. These are mostly for my own reference, but perhaps they will be of use to you.

Contents

Debrick

Too mucha programmaz

I bricked my N900 by adding the extras-testing + extras-devel repos and then installing lots of applications. I hit 100% on / (root filesystem) and on reboot the system hung at the "dots" part, ala:

  * (*) * * *

I had filled up to 100% a number of times before and rebooting the phone had cleared up space (e.g. 100% full before reboot, 96% full after reboot). This is likely because 5% or so is reserved for root. Anyway, the most recent time it didn't come back alive...

Flashing N900 with 0xFFFF

Many parts of the N900 are Free Software, but lamentably, many parts are still closed proprietary shit. Nokia's maemo_flasher program is an example of a closed application that Nokia makes for use with the N900. I understand why some parts of their suite are still closed (e.g. pre-ofono GSM stack), but why the flasher has to be closed I have no idea. Gar.

Thankfully, there is The 0pen Free Fiasco Firmware Flasher, which is designed for flashing Nokia tablets and is Free Software (GPLv3). Unfortunately, 0xFFFF doesn't work with the N900. There is some progress to support the device. You can grab the most recent code from the mercurial repository thusly:

hg clone http://hg.youterm.com/0xFFFF

I sent the author of 0xFFFF the output of my crash. Hopefully it will soon be a usable tool for flashing the N900. I built RPMs for Fedora 12 x86_64 running the latest mercurial code--the ones in the Fedora repo aren't even the lastest tarball release (0.3.9 vs. 0.4.0).

Flashing with Nokia's Proprietary maemo_flasher

I now have ONE non-free program installed on my computer  :( It's the only way I know how to debrick the phone.

See also: Updating tablet firmware on this wiki.

yum -y install glibc.i686 libusb.i686
  • Untar the files....
  • Power off phone and unplug USB.
  • Hold down "u" on N900 keyboard and plug in USB cable between computer and N900. A USB icon will appear in the upper right corner--you can let go of "u" on the keyboard at this point.
  • Run this as root:
./flasher-3.5 -F ~/devel/maemo/FLASH/RX-51_2009SE_1.2009.42-11_PR_COMBINED_MR0_ARM.bin -f -R
  • Done.

Post Debrick setup

Now that the device is debricked, I can use the thing again and "all" my data is there, but the repository setup is back to default and the applications I want are gone, amongst other things. To re-setup:


Set up ssh server & keys

  • Enable Extras repository: tap, tap, tap...
  • Install openssh client/server package
  • Install rootsh package
  • Set up keys and such for easy access (my device hostname is burger):
  • On laptop, ssh into the sucker:
ssh root@burger
  • As root on N900, ssh to localhost as a quick/dirty way to setup /root/.ssh:
ssh localhost
  • On laptop, copy over ssh key and log back in:
scp -p ~/.ssh/id_rsa.pub root@burger:.ssh/authorized_keys
ssh root@burger
  • To allow ssh access for user "user", the passwd file needs to be edited.
vi /etc/passwd
  • Change
user:!:

to

user:*:
  • Set a password for user "user" (I couldn't ssh in without doing this, but someone on IRC said it wasn't necessary):
passwd user
  • Switch user to "user" and blow out the old known_hosts (or at least edit it) to remove the now bogus "localhost" entry:
su - user
rm .ssh/known_hosts
  • Quick/dirty way to set up /home/user/.ssh:
ssh localhost
  • Then GTFO:
exit
exit
  • This should work happily
ssh user@burger

VNC

VNC allows you to view the screen of the N900 on your laptop so you can do things more easily that having to use the tiny little thing if you are working on it all day.

  • Set up the Extras-testing repository
  • Install x11vnc (I think it's in -testing).
  • Set up a password for VNC on on the N900:
x11vnc -storepasswd
  • Run this script on your laptop (my hostname is burger and my laptop's IP is 10.0.0.3):
ssh -n user@burger \
       "x11vnc \
       -usepw \
       -display :0 \
       -desktop burger \
       -allow 10.0.0.3 \
       -nolookup \
       -q \
       -bg \
       -o /home/user/vnc-log \
       "

This works fine with tigervnc on Fedora 12. Running x11vnc with "-ssl" does not work--I think the problem there may be with tigervnc as x11vnc starts with it OK. I usually do VNC in an ssh tunnel--I don't know if this would create too much of a load on the N900 or not. Will test.

Backups

Thankfully, pre-bricking, I had made a backup. There are a billion different ways to do this, but one quick way is good old rsync. This script backs up everything except the cities directory, which is huge and is full of data I don't think I care about.

#!/bin/sh

rsync \
       -avv -ult --progress --stats \
       --rsh=ssh \
       --exclude /home/user/MyDocs/cities \
       root@burger:/ \
       /home/jebba/BACKUPS/burger/

Encoding Video

I had some video which played way too slow on the N900, so I re-encoded with this pile of cruft (I grabbed this from somewhere on this wiki):

#!/bin/sh

mencoder $1 -oac mp3lame -ovc lavc \
       -lavcopts vcodec=mpeg4:mbd=1:vbitrate=300 -vf scale=352:208 \
       -ffourcc DIVX -o $1-out.avi

Run thusly:

burger-encode ralf.mov

And it will give you "ralf-out.mov.avi"...Uh, I will have the output file get a reasonable name, of course... Works for now. This does not work on the N900 at the moment because the mencoder in the mplayer package is compiled without mp3lame support. Bah.