Install Debian on the N900

Prepare SD Card

In the following I assume, that you have partitioned your SD card, so that it contains two partitions:

Once the partitioning is done you can mount the rootfs partition to /mnt-rootfs.


You can run the following command on your PC to download and extract an armhf base system on the SD card. It will not "configure" the packages (since it can't execute the arm binaries).

export PACKAGES="ifupdown,openssh-server,udev,procps,netbase,vim"
export PACKAGES="$PACKAGES,module-init-tools,wget,openssh-client"
export PACKAGES="$PACKAGES,watchdog,whiptail,alsa-base,apt-utils"
export PACKAGES="$PACKAGES,locales,dbus,psmisc,htop"
export PACKAGES="$PACKAGES,tmux,ofono,alsa-utils,mdbus2,rsyslog"
export PACKAGES="$PACKAGES,console-setup,aptitude,u-boot-tools"
export PACKAGES="$PACKAGES,net-tools,wireless-tools,rfkill,wpasupplicant"
export PACKAGES="$PACKAGES,iputils-ping,isc-dhcp-client"
export PACKAGES="$PACKAGES,linux-image-3.16-4-armmp"
debootstrap --arch=armhf --foreign --verbose --variant minbase --include=$PACKAGES sid /mnt-rootfs

Cross-Architecture chroot

For actually configuring the rootfs one can either boot the rootfs on an armhf system (e.g. the n900) or use qemu (which will be done here for simplicity):

sudo apt-get install qemu-user-static
cp /usr/bin/qemu-arm-static /mnt-rootfs/usr/bin
chroot /mnt-rootfs /bin/bash

Finish Bootstrapping

/debootstrap/debootstrap --second-stage

Setup Hostname

echo "HOSTNAME" > /etc/hostname

Setup root password


Keyboard Setup

Make sure, that /etc/default/keyboard contains the following


Disable persistent network device udev rule

Currently the wl1251 driver generates a random MAC address during system boot, so this rule increments the wlan device number for each boot.

echo "#" > /etc/udev/rules.d/75-persistent-net-generator.rules

Prepare modem support

This driver is needed to get a working modem:

echo nokia-modem >> /etc/modules
echo "options nokia-modem pm=1" >> /etc/modprobe.d/nokia-modem.conf

Apart from that ofono from Debian testing searches for the modem in /dev/cmt, so we will setup a symlink by adding this to /etc/rc.local:

ln -s /sys/bus/hsi/devices-modem /dev/cmt

Load display drivers in initramfs

Loading the display drivers in initramfs ensures, that boot problems can be seen on the display as early as possible.

echo "spi_omap2_mcspi" >> /etc/initramfs-tools/modules
echo "omapdss" >> /etc/initramfs-tools/modules
echo "panel_sony_acx565akm" >> /etc/initramfs-tools/modules
echo "omapdrm" >> /etc/initramfs-tools/modules

update-initramfs -k 3.16.0-4-armmp -u

Setup apt sources

echo "deb testing main" > /etc/apt/sources.list
apt-get update


apt-get install xserver-xorg xserver-xorg-video-omap xserver-xorg-input-evdev xinit
apt-get install xinput-calibrator x11-utils xterm xinput
apt-get install e17
apt-get install terminology mpv midori

Wifi Firmware

echo "deb testing non-free" >> /etc/apt/sources.list
apt-get install firmware-ti-connectivity