Configuring the Nokia #N900 Chameleon for Mer, MeeGo and Fedora
Recently, the first development version of MeeGo became available and I figured it was time to turn my Nokia N900 into a Chameleon. This blog post will recount some of my experiences. Non-geeks might want to skip the rest of this post.
First, let me point to a couple of the other blog posts about MeeGo. Digital Trends compliments the MeeGo team because “it’s transparency that’s very uncommon in mobile device development.”. Ari Jaaksi, who is heading MeeGo Devices and MeeGo operations @ Nokia blogs, “So, it is an invitation for hackers who want to participate in MeeGo development, not for end users ;-)” and a lively discussion opened up there in the comments. This ‘developer’ focus is also echoed in the Nokia Blog which warns ‘end users should stay away’, and provides a screen shot of ‘text on black and white screen’.
I’ve been programming computers for over four decades now, so I think I can call myself a developer, but I’m also enough of a developer to know my limits and I have not delved deeply into mobile development yet, so I approached my effort cautiously.
Recently, I ordered a 16 gb microSD card for my phone. My initial thought was that this would give me lots of space to play so I formatted it on the N900 to be eight different 2 gb partitions.
I used sfdisk on the N900 to repartition the device. Using the command ‘sfdisk –l’ I found that the card had 486192 ‘cylinders’. To make things easy, I decided to make eight 2 gb partitions. With that, each partition would need to be 60774 cylinders. I had read that N900 likes the first partition to be a FAT partition, so I set that aside for that purpose. Also, following notes from others, I set the second partition to be a Linux Swap partition of 2 gb. Traditionally, partition tables can only have four partitions, but one can be an ‘extended partition’, this is a partition you can split into additional partitions. So, I set my third partition to be a 2 gb linux partition, and I set the fourth partition to take up the rest of the card. Then, I created four more 2 gb linux partitions in the extended partition.
To make this easy, I set up a file with the partition information I wanted to use:
With this, I then used the mkdosfs command on the N900 to create a dos file system in the first partition. I used mkfs.ext3 to create the unix partitions. With that, I then searched for ways to tweak my phone to boot off of a flash card. The Maemo Wiki has an article, Booting from a Flash Card and Advanced Booting. Both looked a little messy and I was unsure if they would work with the N900.
There was an article in Maemo Central about booting different operating systems. This led to an article on the Mer Project about duel booting. Following this through a few links, I ended up in the Maemo Garage to try and download bootmenu. Unfortunately, I couldn’t get this downloaded, so I took another tack.
Jeff Moe has a great write on installing Fedora on the N900. Using a link from his page, I downloaded a debian package of bootmenu. I installed it, and found it worked quite nicely. First, I installed it without any of the other OSes available. When I booted my N900 with the keyboard open, it gave me the choice of booting to Maemo, or powering off. If I booted with the keyboard closed, the N900 booted the way it always has.
I had already downloaded Fedora for the N900 a while ago for testing, and had run it in chroot mode. Now, I moved it out of my user directory into its own partition on the memory card. I could still nicely chroot /media/mmc3 /bin/bash and run Fedora that way. I added a fedora.ext.item to the /etc/bootmenu.d directory and tweaked it to match how things were configured on my machine.
When I rebooted the N900, I had an option to start either Maemo or Fedora. The problem is that if I tried starting Fedora, it would start the boot process and then shutdown after about eight seconds. This is because of the watchdog issue. To get around this, Jeff recommends using flasher to disable the watchdog. I attempted this from my Windows Vista machine and received the following messages:
flasher v2.5.2 (Sep 24 2009)
Suitable USB device not found, waiting.
USB device found found at bus bus-0, device address \\.\libusb0-0001--0x0421-0x0
At this point, flasher hung, so badly that I could not even kill it from the task manager. I will probably retry this from my Vista machine a bit later, and then if that doesn’t work, install flasher on one of my Ubuntu boxes and try again there. It would be nice if there was some easier way to turn off watchdog.
It appears as if other people have the same concern. Alexey Torkhov wrote about an RPM package that he created to disable watchdog. This looked particularly promising. However, when I tried to run rpm in my chroot fedora on the N900, I received an error message: “Cannot open Package index using db3”. I tried rpm -vv --rebuilddb and rpm -vv --initdb but neither command worked.
At this point, I figured it was time to try yet another approach. I moved over and tried to install MeeGo from the MeeGo Images. Actually, like was the situation with Fedora, I had already downloaded it and was playing with it in chroot. Now, I moved it to its own partition on the card, so I could try booting it as well. I worked off of the rootfs version because I wasn’t sure about how to use the ubi version on the memory card, and I wanted to be particularly careful. The downside of this, is that the rootfs version doesn’t include Nokia’s proprietary stuff.
This time, when I tried to install Alexey’s n900 watchdog package, RPM ran nicely. However, it failed on a dependency on watchdog. I tried running yum, but that failed when it tried to retrieve repository metadata.
For my final attempt of the day, I attempted to install Mer. I gave it its own partition, ran it in chroot mode and decided to try booting it. The first time I booted it, it appeared to hang for a little bit. I tapped on the screen a few times to see if I could wake things up. Unfortunately, the first thing that it does is try to calibrate the touch screen. My random wakeup taps got interpreted as calibration, and the screen was completely messed up. I ended up taking out the battery and trying again. This time it calibrated nicely, ran through the rest of the configuration and brought me into Mer. It took a little while before I managed to get the wireless working smoothly, but soon everything was okay.
I found the onscreen keyboard really annoying and I never figured out how to use it properly with the web browser. Finally, I tried to shutdown mer. I issued the shutdown now command, and it started its shutdown process, but never seemed to complete. In the end, I popped the batter again. I rebooted, and tried to go into Mer one more time, but started getting what appears to be the same problem with the watchdog. So, I’ve gone back to running Maemo for now.
Future explorations include trying to get lxde running on Mer and perhaps eventually trying to boot Android.
However, I’ve now spent enough time playing with the cellphone, and I should try to get some other things done today. Hopefully, somewhere along the way, I’ll come across a way to deal with the watchdog and I can really start experimenting. If any of you have clues or suggestions, please let me know.