User:Jebba/Mer

Contents

N900 Install

Note, this is still in a *very* rough state. Currently, you can't recharge the battery while using Mer, nor even draw power when plugged in, so developing on it means you have to reboot just to recharge your battery. No phone calls are possible yet. Grabbing binaries of the proprietary crock from Nokia requires rebuilding packages and jumping through hoops. On the positive side, it boots. :)



Mer Image

The latest release as of this post is 0.17testing4.

# you need an ext3 formated MicroSD card.
mount -o noatime /dev/mmcblk1p1 /media/mmc1/

# go hence
cd /media/mmc1/

wget http://stskeeps.subnetmask.net/mer/0.17testing4/mer-armel-generic-image-v0.17testing4.tar.gz

# Untar it verbally to see the majick.
# Note this will create dirs like ./usr and ./lib etc, so you don't want stuff pre-existing in those dirs.
tar zxvf mer-armel-generic-image-v0.17testing4.tar.gz

# sync and live free!
sync

bootmenu

You need to have getbootstate version 1.0.35+0m5 or greater for this to work.

dpkg -l getbootstate

(As a side note, getbootstate is close software. Please vote for this bug and/or clamour for it to be released as free software.)

# Grab this package:
wget http://www.daimi.au.dk/~cvm/bootmenu_1.6_armel.deb

# Be root
sudo gainroot

# Install bootmenu
dpkg -i bootmenu_1.6_armel.deb

Then tappy tap tap the bootmenu install icon and answer yes.

Now you need to set up Mer in the menu for bootmenu. See also: Mer bootmenu docs.

I put everything on the first and only partition on an ext3 formatted "external" MicroSD card (the one that's right next to the camera).

# edit/create this file to create a boot menu item for Mer:
vim /etc/bootmenu.d/mer.ext.item

# Make it look justa lika thisa:

ITEM_NAME="Mer (external SD, partition 1)"
ITEM_ID="mer"
ITEM_DEVICE="${EXT_CARD}p1"
ITEM_MODULES="mbcache jbd ext3"
ITEM_FSTYPE="ext3"
ITEM_FSOPTIONS="noatime,ro"


(Note: why jbd module needed?)

Then shutoff the phone and reboot with KEYBOARD SLID OUT, so you get the bootmenu.

Disable watchdog

You have to disable the watchdog with the flasher tool or the system will just shut down on bootup:

./flasher-3.5 --set-rd-flags=no-omap-wd

./flasher-3.5 --set-rd-flags=no-ext-wd

./flasher-3.5 --enable-rd-mode

0.17testing4 fixes for N900

# root does all
sudo gainroot

# mount up the MicroSD
mount -o noatime /dev/mmcblk1p1 /media/mmc1/

# go hence
cd /media/mmc1

Missing dir needed at boot

# create a missing directory
mkdir mnt/initfs


Need modules from kernel

# copy over modules from main OS:
cp -a /lib/modules/*  /media/mmc1/lib/modules/


Fix touchscreen

I STILL DON'T HAVE THIS WORKING.

auto-startx

To get the touchscreen working you have to edit this file: /media/mmc1/etc/init.d/auto-startx. Patch it ala:

--- etc/init.d/auto-startx.orig	2009-10-20 12:39:30.000000000 -0300
+++ etc/init.d/auto-startx	2009-12-31 13:46:06.000000000 -0300
@@ -8,6 +8,7 @@
 start)
 	if [ ! -f /etc/default/autologin ] ; then
 		if [ -x /usr/sbin/first-boot-wizard.sh ] ; then
+			TSLIB_TSDEVICE=/dev/input/event3 TSLIB_CONFFILE=/etc/ts.conf ts_calibrate
 			/usr/bin/xinit /usr/sbin/first-boot-wizard.sh 2>&1 > /var/log/first-boot-wizard.log
 		else
 			echo -n "No user specified for auto login. Creating..."


Note to self: I have a copy of this in /home/user/MyDocs/Mer, so when copying back over be sure to chmod because VFAT loses perms gah:

chmod +x /media/mmc1/etc/init.d/auto-startx

remove synaptics driver

sudo gainroot

chroot /media/mmc1 /bin/bash

dpkg --remove \
xserver-xorg-input-synaptics \
xserver-xorg-input-all

Add xserver-xorg-input-tslib

sudo gainroot

apt-get update

apt-get install xserver-xorg-input-tslib

upgrade

Note sure if it's needed, but:

chroot /media/mmc1 /bin/bash
apt-get update
apt-get upgrade

This got me new updates:

hildon-input-method libclutter-0.8-0 libetpan13 libhildon-im-ui3

The first one sounds helpful.

Set root password

Might as well set one in the chroot. I had X not come up once, but couldn't log in.

sudo gainroot
chroot /media/mmc1 /bin/bash
passwd

Misc

When you are booted up into Fremantle, it wouldn't hurt to fsck your MicroSD too....

umount /dev/mmcblk1p1 && fsck.ext3 -vvv /dev/mmcblk1p1

Automated install

Ok, here's dodgy scripts to automatically do lots of the above. I set these up because in the process of doing this I corrupted the filesystem on the MicroSD card enough times that I kept having to do this. If you don't understand what these scripts are doing, don't run them. Ah, and I use sudo lots, so you probably want do add this to /etc/sudoers:

user ALL = NOPASSWD: ALL


freemoe-mer-install

#!/bin/sh

echo "this is going to format your microsd, take care!"

read ok
read ok
exit 0 # you get this, ya?
echo
 
echo "umount /dev/mmcblk1p1"
sudo umount /dev/mmcblk1p1

echo "mkfs.ext3 -j -m1 /dev/mmcblk1p1"
sudo mkfs.ext3 -j -m1 /dev/mmcblk1p1

echo "fsck -vvv /dev/mmcblk1p1"
sudo fsck -vvv /dev/mmcblk1p1

echo "mount -o noatime /dev/mmcblk1p1 /media/mmc1/"
sudo mount -o noatime /dev/mmcblk1p1 /media/mmc1/

echo "cd /media/mmc1/"
cd /media/mmc1/

echo "tar zxf /home/user/MyDocs/Mer/mer-armel-generic-image-v0.17testing4.tar.gz"
sudo tar zxf /home/user/MyDocs/Mer/mer-armel-generic-image-v0.17testing4.tar.gz

echo "mkdir mnt/initfs"
sudo mkdir mnt/initfs

echo "cp -a /lib/modules/*  /media/mmc1/lib/modules/"
sudo cp -a /lib/modules/*  /media/mmc1/lib/modules/

echo "WARNING WARNING WARNING!!!!"
echo "Copying over NON-FREE FIRMWARE"
echo "PAY PENANCE!!!!"
echo "cp -a /lib/firmare/*  /media/mmc1/lib/firmware/"
sudo cp -a /lib/firmware/*  /media/mmc1/lib/firmware/

echo "patch -p0 < /home/user/MyDocs/Mer/auto-startx-n900.patch"
sudo patch -p0 < /home/user/MyDocs/Mer/auto-startx-n900.patch

# not needed
echo "chmod +x etc/init.d/auto-startx"
sudo chmod +x etc/init.d/auto-startx

echo "cp -p /home/user/MyDocs/Mer/mer-setup-in-chroot ./"
sudo cp -p /home/user/MyDocs/Mer/mer-setup-in-chroot ./

echo "chmod +x mer-setup-in-chroot"
sudo chmod +x mer-setup-in-chroot

echo "add . to root's PATH to help with debugging"
echo "cp -p /home/user/MyDocs/Mer/root-bashrc /media/mmc1/root/.bashrc"
sudo cp -p /home/user/MyDocs/Mer/root-bashrc /media/mmc1/root/.bashrc

echo "copy over some scripts to help with debug"
echo "cp -p /home/user/MyDocs/Mer/root/* /media/mmc1/root/"
sudo cp -p /home/user/MyDocs/Mer/root/* /media/mmc1/root/

echo "WARNING: this leaves /root with less-than-optimal perms"
echo "sudo chmod -R +x /media/mmc1/root/"
sudo chmod -R +x /media/mmc1/root/

echo
echo "now run ./mer-setup-in-chroot after you enter the chroot"
echo

echo "chroot /media/mmc1 /bin/bash"
sudo chroot /media/mmc1 /bin/bash



mer-setup-in-chroot

#!/bin/sh

# run this chrooted

echo "apt-get update"
apt-get update

echo "apt-get upgrade"
apt-get upgrade

echo "apt-get remove xserver-xorg-input-synaptics xserver-xorg-input-all"
apt-get remove xserver-xorg-input-synaptics xserver-xorg-input-all

echo "apt-get install xserver-xorg-input-tslib"
apt-get install xserver-xorg-input-tslib


auto-startx-n900.patch

--- etc/init.d/auto-startx.orig	2009-10-20 12:39:30.000000000 -0300
+++ etc/init.d/auto-startx	2009-12-31 13:46:06.000000000 -0300
@@ -8,6 +8,7 @@
 start)
 	if [ ! -f /etc/default/autologin ] ; then
 		if [ -x /usr/sbin/first-boot-wizard.sh ] ; then
+			TSLIB_TSDEVICE=/dev/input/event3 TSLIB_CONFFILE=/etc/ts.conf ts_calibrate
 			/usr/bin/xinit /usr/sbin/first-boot-wizard.sh 2>&1 > /var/log/first-boot-wizard.log
 		else
 			echo -n "No user specified for auto login. Creating..."

Build Packages

Packages are built using OpenSUSE's Build Service

  • Sign up for account on OBS: jebbajeb