ReferencePlatforms/mobile-imaging-n900-images

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

http://caesar.acc.umu.se/debian-cd/5.0.4/i386/iso-cd/debian-504-i386-netinst.iso

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 2.6.33.5

mkdir linux-kernel
cd linux-kernel
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.5.tar.bz2
tar jxf linux-2.6.33.5.tar.bz2
cd linux-2.6.33.5
make menuconfig
#ENABLE THE FOLLOWING:
#  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-2.6.33.5 2.6.33.5
update-grub
reboot #to pick up new image

Verify that your kernel is now running

uname -a

should show something like

Linux n900-imaging 2.6.33.5 #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.infradead.org/mtd-utils.git 
git checkout -b working a8214921bdc7d78b75d133a37ff9f8d4ec919650
cd mtd-utils/ubi-utils
make 
cp ubinize ~
cd ../mkfs.ubifs
make
cp mkfs.ubifs ~

References