n900

Differences between revisions 1 and 18 (spanning 17 versions)
Revision 1 as of 2010-12-01 21:53:00
Size: 75
Editor: 189
Comment:
Revision 18 as of 2010-12-05 12:06:19
Size: 6053
Editor: 84-119-16-248
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Installing ubuntu on n900 = = Installing Kubuntu on n900 =
Line 5: Line 5:
 * MicroSD 8GB, at least, class 6 or better.

= Getting started =

 * Download latest kubuntu-mobile image http://cdimage.ubuntu.com/kubuntu-mobile/ports/daily-preinstalled/current/
 * Create three partitions in the sd card
   * 1. an ext3 partition using the most part of the disc
   * 2. a swap partition
   * 3. a small VFAT partition, so Maemo will not complain
 * zcat the kubuntu-mobile image to the ext3 partition
{{{
zcat maverick-preinstalled-mobile-armel+omap.img.gz > /dev/sdc1
}}}
 * fsck.ext3 the second partition
 * mount the second microsd partition where you want
 * Enter it as chroot (you'll need to install qemu-arm-static and copy it from /usr/sbin to the partition)
 * Install the kubuntu mobile integration package from http://people.ubuntu.com/~apachelogger/mobile/n900-integration/
 * Add a new user to the system and ensure the user is member of the admin and sudo groups
 * The system is now ready to do an initial boot...

== 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.
 * Get the Meego vmlinuz and raw.bz2 files
  * bunzip the raw.bz2
  * inspect it using sudo fdisk -l -u $FILENAME
   * depending on the image you should see a couple of paritions, eventually you will need to try them
  * to mount you need to specify the offset of the partition, which is calculated by multiplying the start point of the partition (as per fdisk) with 512. e.g. if it starts at 1, the offset will be 1*512=512
{{{
sudo mount -o loop,offset=512 -t auto meego-handset-armv7l-n900-1.1-mmcblk0p.raw /mnt/
}}}
  * cp /mnt/boot/* /where/you/mounted/boot/
  * cp /mnt/lib/modules/2.6.35.3-10.3-n900 /where/you/mounted/lib/modules/
  * Additionally you want to replace your usb networking init with nokia-usb-networking from meego, as theirs is actually working
 * Turn off device (and unplug USB)
 * sudo flasher-3.5 -l -k meego-handset-armv7l-n900-*-vmlinuz-*-n900 -b
 * plug in USB, device should autostart and kernel should be transfered
 * kubuntu mobile starts :)

== UBoot Boot (not complete) ==
 * Enable the maemo.org extras-devel repository in n900, see http://wiki.maemo.org/Extras-devel
 * Install the 'uboot-pr13' package with apt-get install or from 'System' section
 * Verify it's installed by restarting your N900. A penguin should show up at startup and U-boot will be mentioned, let it time out and boot into Maemo.

== After Boot ==
 * for usb control you should make sure that the interface is up on mobile (modprobe g_nokia && ifconfig usb0 192.168.2.15 up) and follow http://wiki.meego.com/ARM/N900/Tips_and_Tricks/N900_USB_Networking mind that there is instructions are silly and that you need to make sure your udev does not contain cdc_ether but cdc_eem, after that you should be able to connect to the n900 (given that your own usb0 is also up, which should be handled by nm)

=== Performance Tweaks ===
 * rm /usr/bin/nepomuk*; rm /usr/bin/akonadi*
 * Remove everything from /usr/share/autostart other than plasma-mobile
 * Switch widget style from Oxygen to Plastique
 * Switch off desktop effects
 * See packages the script below removes...

= 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).

{{{
#!/bin/bash
# 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)

{{{
#!/bin/bash
# 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 /mnt/sys /mnt/proc
sudo umount /mnt

exit 0
}}}

Installing Kubuntu on n900

Requirements:

  • Maemo5 pr1.3 installed
  • MicroSD 8GB, at least, class 6 or better.

Getting started

zcat maverick-preinstalled-mobile-armel+omap.img.gz > /dev/sdc1
  • fsck.ext3 the second partition
  • mount the second microsd partition where you want
  • Enter it as chroot (you'll need to install qemu-arm-static and copy it from /usr/sbin to the partition)
  • Install the kubuntu mobile integration package from http://people.ubuntu.com/~apachelogger/mobile/n900-integration/

  • Add a new user to the system and ensure the user is member of the admin and sudo groups
  • The system is now ready to do an initial boot...

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.

  • Get the Meego vmlinuz and raw.bz2 files
    • bunzip the raw.bz2
    • inspect it using sudo fdisk -l -u $FILENAME
      • depending on the image you should see a couple of paritions, eventually you will need to try them
    • to mount you need to specify the offset of the partition, which is calculated by multiplying the start point of the partition (as per fdisk) with 512. e.g. if it starts at 1, the offset will be 1*512=512

sudo mount -o loop,offset=512 -t auto meego-handset-armv7l-n900-1.1-mmcblk0p.raw /mnt/
  • cp /mnt/boot/* /where/you/mounted/boot/
  • cp /mnt/lib/modules/2.6.35.3-10.3-n900 /where/you/mounted/lib/modules/
  • Additionally you want to replace your usb networking init with nokia-usb-networking from meego, as theirs is actually working
  • Turn off device (and unplug USB)
  • sudo flasher-3.5 -l -k meego-handset-armv7l-n900-*-vmlinuz-*-n900 -b
  • plug in USB, device should autostart and kernel should be transfered
  • kubuntu mobile starts Smile :)

UBoot Boot (not complete)

  • Enable the maemo.org extras-devel repository in n900, see http://wiki.maemo.org/Extras-devel

  • Install the 'uboot-pr13' package with apt-get install or from 'System' section
  • Verify it's installed by restarting your N900. A penguin should show up at startup and U-boot will be mentioned, let it time out and boot into Maemo.

After Boot

  • for usb control you should make sure that the interface is up on mobile (modprobe g_nokia && ifconfig usb0 192.168.2.15 up) and follow http://wiki.meego.com/ARM/N900/Tips_and_Tricks/N900_USB_Networking mind that there is instructions are silly and that you need to make sure your udev does not contain cdc_ether but cdc_eem, after that you should be able to connect to the n900 (given that your own usb0 is also up, which should be handled by nm)

Performance Tweaks

  • rm /usr/bin/nepomuk*; rm /usr/bin/akonadi*
  • Remove everything from /usr/share/autostart other than plasma-mobile
  • Switch widget style from Oxygen to Plastique
  • Switch off desktop effects
  • See packages the script below removes...

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 /mnt/sys /mnt/proc
sudo umount /mnt

exit 0

ARM/n900 (last edited 2012-11-08 03:14:48 by xintx-ua)