N900 image

TODO

<persia> It's the pile of scripts that hook into kernel postinst and put the kernel somewhere useful to boot.
<persia> Interesting bits are ./flash-kernel and ./debian/flash-kernel-installer.postinst

Installing Kubuntu on n900

Requirements:

Getting started

zcat maverick-preinstalled-mobile-armel+omap.img.gz > /dev/sdc1

UBoot

New uImage

apt-get install uboot-mkimage
mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Ubuntu" -d ./vmlinuz-* ./uImage

Flasher Boot

This method is based on the Meego instructions from http://meego.com/devices/handset/installing-meego-nokia-n900 and starts the Meego kernel.

sudo mount -o loop,offset=512 -t auto meego-handset-armv7l-n900-1.1-mmcblk0p.raw /mnt/

After Boot

auto usb0
iface usb0 inet static
       address 192.168.2.16
       netmask 255.255.255.0
       gateway 192.168.2.14
      up route del default
      up route add default gw  192.168.2.14

Performance Tweaks

debconf-set-selections <<EOF
man-db man-db/auto-update boolean false
EOF

btrfs

Meego uses btrfs, and since we are using a SD card it makes sense that you convert your ext3 to btrfs.

Our kernel

Scripts

Setup

For your convenience here is a script. Note that you need to change the 2 first consts to match your mount path and your git checkout path. The script will copy the most essential bits into your chroot, install ssh, shoot some pointless packages in the head, set rendering to raster, deactivate some fat autostart apps and leave you with creating a user named user (i.e. you just need to set the pw).

# Copyright © 2010 Harald Sitter <apachelogger@ubuntu.com>

MPATH="/media/disk-2"
GITPATH="/home/me/src/git/meego/"

export LANG=C

cp $GITPATH/n900_udev-rules-nokia-n900/*rules $MPATH/etc/udev/rules.d/
cp $GITPATH/n900_nokia-n900-configs/nokia-n900-input-rules.conf $MPATH/etc/X11/xorg.conf
# comment line?
cp $GITPATH/n900_nokia-n900-configs/*.init $MPATH/etc/init.d/
# should be different path...
mkdir -p $MPATH/lib/kbd/keymaps/arm/qwerty
cp $GITPATH/n900_nokia-n900-configs/nokia-n900-keys.map $MPATH/lib/kbd/keymaps/arm/qwerty/
echo 'setxkbmap -rules evdev -model nokiarx51 -option grp:ctrl_shift_toggle -layout us -variant ",qwerty"' > $MPATH/etc/rc.local
echo 'exit 0' >> $MPATH/etc/rc.local

apt-get install qemu-arm-static
cp /usr/bin/qemu-arm-static $MPATH/usr/bin/qemu-arm-static
mount -o remount,dev $MPATH
for f in n900-alsamixer-settings.init nokia-n900-cmt-gpio.init nokia-n900-keys.init; do
  chroot $MPATH update-rc.d $f defaults 50 50
done

chroot $MPATH echo "nameserver 8.8.8.8" >> /etc/resolv.config
chroot $MPATH apt-get update
chroot $MPATH apt-get install openssh-server

chroot $MPATH apt-get purge libcups2 printer-applet jockey-kde apparmor plymouth-x11 ubiquity oem-config
# kdm -> nodm

chroot $MPATH echo "QT_GRAPHICSSYSTEM=raster" >> /etc/environment

mkdir -p $MPATH/usr/share/autostart-bak
for f in ; do
  mv $MPATH/usr/share/autostart/$f $MPATH/usr/share/autostart-bak/
done

chmod -x $MPATH/usr/bin/akonadi*
chmod -x $MPATH/usr/bin/*akonadi
chmod -x $MPATH/usr/bin/nepo*
chmod -x $MPATH/usr/bin/virtuoso*

chroot $MPATH adduser user 

CHROOT

This script mounts your mobile install with dev, proc and sys mounted (necessary to upgrade via chroot). Just call it with the partition device as argument (e.g. ./script.sh /dev/sdc1)

# Copyright © 2010 Harald Sitter <apachelogger@ubuntu.com>

if [[ "$@" == "" ]]; then
  echo "please define partition id as arg"
  exit 1
fi

sudo mount $@ /mnt 
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /dev/pts /mnt/dev/pts # necessary for do-release-upgrade
sudo mount -o bind /sys /mnt/sys
sudo mount -t proc /proc /mnt/proc
sudo chroot /mnt
sudo umount /mnt/dev/pts /mnt/dev /mnt/sys /mnt/proc
sudo umount /mnt

exit 0

Testing

GLES

Install packages from https://wiki.ubuntu.com/ARM/OMAP/Graphics then you can try the demo binaries as described on the same page. Note that Qt and probably also KDELibs and Plasma Mobile need rebuilding for GLES support.

Fixes

/var/lib/dkms/powervr-omap3/3.01.00.07/build/services4/3rdparty/bufferclass_ti/bc_cat.c:491:5: error: implicit declaration of function 'omap_rev_lt_3_0'

GSM

Should be working with ofono, see http://wiki.maemo.org/User:Jebba/Ofono and http://wiki.maemo.org/User:Jebba/Fedora

As root:

SMS:

Call is defunct (no audio) though generally the call itself is deployed:

Known Problems

See also: https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes#Known_issues

Hardware support

See also: http://wiki.maemo.org/Category:N900_Hardware
http://wiki.maemo.org/N900_Software_Kernel_Modules

Component/Feature

Status

Last check date

Bug link

Workaround/Notes

Kernel module

CPU

OK

2011-11-08

CPU Overclocking

Unknown

GPU

Unknown

Display

OK

2011-11-08

Touch Screen

OK

2011-11-08

Keyboard

OK 1

2011-11-08

Needs N900 keymap

Volume buttons

OK

2011-11-08

They are basically F7/F8

Wifi

OK 1

2011-11-08

Needs wl1251 firmware

Bluetooth

OK 1

2011-11-13

Needs firmware

hci_h4p

Battery management

Semi

2011-11-08

Check:
http://mer-project.blogspot.com/2010/01/enabling-rtc-clock-battery-charging-and.html
http://talk.maemo.org/showpost.php?p=1124480&postcount=182 (Only for wall charger!)

bq27x00_battery

USB/Charging

Unknown

USB/Network

OK 1

2011-08-29

USB/Storage

Unknown

USB/OTG

Unknown

Clock

OK 1

2012-03-07

echo "hwclock -u -s" >> /etc/rc.local

twl_rtc

Power Button

OK 1

2011-11-08

Needs acpid installed

Lock Switch

-

2011-11-08

Generates button/screenlock SCRNLCK 00000080 event

Speakers

OK

2011-11-10

Microphone

OK

2011-11-10

Headphone Jack

OK

2012-06-21

/sys/class/gpio/gpio177/value

Phone/Voice

Unknown

Needs re-check with ofono 1.0

Phone/SMS

Unknown

Needs re-check with ofono 1.0

Phone/GPRS

Unknown

Needs re-check with ofono 1.0

Phone/USSD

Unknown

Needs re-check with ofono 1.0

Phone/3G

Unknown

Needs re-check with ofono 1.0

Accelerometer

OK

2012-06-20

http://talk.maemo.org/showpost.php?p=1224829

Ambient Light Sensor

OK

2012-06-20

http://talk.maemo.org/showpost.php?p=1224829

Keyboard slide sensor

-

2011-11-08

Check /sys/devices/platform/gpio-keys/

Keyboard backlight

-

2011-11-13

Proximity sensor

Unknown

5Mpx Camera

Unknown

Front Camera

Unknown

Camera Button

Semi

2011-11-15

Full press recognized as Webcam in 12.04
11.10: dmesg: keyboard: can't emulate rawmode for keycode 212

Camera Lid

-

2011-11-13

Camera Flash LEDs

Unknown

eMMC

OK

2011-11-08

OneNAND root (256Mb)

OK

2012-11-08

http://www.linux-mtd.infradead.org/faq/ubifs.html#L_enable_ubifs

FM Receiver

Unknown

FM Transmitter

Unknown

GPS

Unknown

Information LED

Unknown

dmesg: lp5523 2-0032: LP5523 Programmable led chip found

lp5523

Infrared port

Unknown

Vibrator

Unknown

Video out

Unknown

Watchdog

Unknown

Check http://mer-project.blogspot.com/2010/01/enabling-rtc-clock-battery-charging-and.html
dmesg: twl4030_wdt: Failed to register misc device ... probe ... failed with error -16

twl4030_wdt?

DSP

Unknown

Check http://wiki.meego.com/ARM/N900/Tips_and_Tricks/DSP and http://dismantle-it.blogspot.com/2011/12/install-arch-linux-on-nokia-n900.html

  1. Needs workaround (1 2 3 4 5 6)

Software

Description

Last confirmed

Bug link

Workaround

No acpid installed by default

2011-11-08

# apt-get install acpid

No N900-specific keymap by default

2011-11-08

Copy from Meego

No wl1251 firmware by default

2011-11-08

Copy from Meego

No software to work with Phone functions

2011-11-08

TODO: Check empathy with telepathy-ring and ofono 1.0

Only basic power-saving

2011-11-08

$ xset dpms force off
to switch off the screen

No acpi support

2011-11-08

ARM/n900 (last edited 2012-11-08 03:14:48 by ip-602f)