From MozillaWiki
Jump to: navigation, search

N900 Imaging Computer

This is a special machine used to generate N900 filesystem images based on the official stock Nokia filesystem images. We compile a custom kernel on Debian because Fedora 12's nandsim is broken and debian stable is missing ubifs.

I have created the machine in this document and posted it to my people account. This is a VMWare Fusion VM Bundle that has not had the vmware tools installed.

Install OS

Download the Debian 5.0 i386 Netinstall disk

This document assumes you want to wipe the entire disk to install Debian. Boot from it and run through the installer, using the defaults except:

  • Hostname: n900-imaging
  • Timezone: Pacific
  • Deselect the 'Desktop Environment' option

Configure OS

su -
aptitude install build-essential openssh-server openssh-client rsync zlib1g-dev liblzo2-dev uuid-dev libncurses5-dev git-core mercurial
aptitude build-dep linux-2.6

Build Linux Kernel

We are going to use Linux

mkdir linux-kernel
cd linux-kernel
tar jxf linux-
cd linux-
make menuconfig
#  DeviceDrivers->MTD->NAND Device Support->Support for Nand Flash Sim.
#  FileSystems -> Misc. -> UBIFS File System Support
make -j4
make modules -j4
make modules_install
make install
cd /boot
mkinitramfs -o initrd.img-
reboot #to pick up new image

Verify that your kernel is now running

uname -a

should show something like

Linux n900-imaging #1 SMP Sat Jun 5 11:08:11 PDT 2010 i686 GNU/Linux

Building mtd-util tools

We use the mtd-utils package for creating our custom ubi images.

cd ~
git clone git:// 
git checkout -b working a8214921bdc7d78b75d133a37ff9f8d4ec919650
cd mtd-utils/ubi-utils
cp ubinize ~
cd ../mkfs.ubifs
cp mkfs.ubifs ~