ReferencePlatforms/mobile-imaging-linux
Contents
Install OS
I installed Debian 5 stable. The ethernet driver in debian package does not work for the intel gb card. I used a usb nic that is compatible out of the box.
I ran through the default options, setting timezone as appropriate. I selected Guided Partitioning -> Use Entire Disk -> All File in One Partition. When asked which software I wished to install, I selected only 'Standard system utilites'
The following assumes a user account called 'maemo'
At present, we think this computer can only be used for flashing N810s. We may or may not have to create a Fedora 12 version of this
Setup OS
su - apt-get update apt-get upgrade apt-get install sudo build-essential python2.5 python2.5-dev linux-headers-`uname -r` openssh-server parted openssl git-core uuid-dev apt-get build-dep mtd-utils visudo #add the line %sudo ALL=(ALL) NOPASSWD: ALL gpasswd -a maemo sudo
To get the built in ethernet to work, I downloaded the newest e1000e driver
wget http://downloadmirror.intel.com/15817/eng/e1000e-1.1.19.tar.gz tar zxf e1000e-1.1.19.tar.gz cd e1000e-1.1.19/src make su -c 'make install' reboot
The version of mercurial in debian 5 is ancient. We need to install it from source
wget http://mercurial.selenic.com/release/mercurial-1.5.2.tar.gz tar zxf mercurial-1.5.2.tar.gz cd mercurial-1.5.2 python setup.py build sudo python setup.py install
I would prefer the onboard chip to be eth0 and forget the usb ethernet adapter. I opened /etc/udev/rules.d/70-persistent-net.rules and deleted the line for the USB device and changed the PCI device to be NAME="eth1"
Configure the network card (reference). I used
cat >> /etc/network/interfaces << E auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp
Disable console logging:
- create /etc/init.d/disable-console-errors.sh
#! /bin/sh ### BEGIN INIT INFO # Provides: sudo # Required-Start: $local_fs $remote_fs # Required-Stop: # Default-Start: S # Default-Stop: ### END INIT INFO case "$1" in start) echo '2^V^I2^V^I1^V^I2' > /proc/sys/kernel/printk ;; stop|reload|restart|force-reload) ;; *) echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0
- ^V^I is a tab
chmod a+x /etc/init.d/disable-console-errors.sh update-rc.d disable-console-errors.sh defaults 99 /etc/init.d/disable-console-errors.sh start
Setup Mozilla Environment
hg clone http://hg.mozilla.org/build/tools ln -s tools/buildfarm/mobile/n810-imaging ln -s tools/buildfarm/mobile/n900-imaging cd n810-imaging mkdir empty echo 'USE AN SD CARD' > empty/INFO mkfs.jffs2 -r empty -o empty.jffs2 -e 128 rm -rf empty wget http://samba.anu.edu.au/ftp/rsync/src/rsync-2.6.9.tar.gz tar zxf rsync-2.6.9.tar.gz cd rsync-2.6.9 ./configure --disable-debug --prefix=/home/maemo make -j4 make install sudo cp ~/bin/rsync /usr/bin/rsync2 #obtain appropriate nokia flasher and RX-44 stock image #you only need one of the flasher* programs, the one for your system. #the static one is useful if you have libraries missing openssl sha1 RX-44_DIABLO_5.2008.43-7_PR_COMBINED_MR0_ARM.bin flasher-3.0* flasher-2.0.macosx #SHA1(RX-44_DIABLO_5.2008.43-7_PR_COMBINED_MR0_ARM.bin)= 5464ae20a17afdbd59633f3d36a2e63281fcd106 #SHA1(flasher-3.0)= e4e3b0b791dca7bc91c710fc3702f4d72f904e7a #SHA1(flasher-3.0-static)= d28b5597649a3ae40579d50f651c5d73afee19f9 #SHA1(flasher-3.0.amd64)= c56f71b69acd8ed0c19757451e14ba4a59645c5f #SHA1(flasher-2.0.macosx)= 484bb141dad18ea68f7618c4f07f549311caf9b5
IMPORTANT Newer kernels do not work properly when flashing the N810 firmware (flasher-3.0*). It is very important that you do not upgrade the kernel on the imaging machine.
If the machine complains about
request_module: runaway loop modprobe binfmt-464c
Then there is a Maemo SD card inserted into the computer. Remove all sd cards and readers and reboot
Setup mtd utils
git clone git://git.infradead.org/mtd-utils.git cd mtd-utils/ubi-tools make cp ubinize ~/n900-imaging cd ../mkfs.ubifs make cp mkfs.ubifs ~/n900-imaging
Set up Fremantle only Scratchbox
Download the scratchbox and sdk setup scripts:
http://repository.maemo.org/stable/5.0/maemo-scratchbox-install_5.0.sh http://repository.maemo.org/stable/5.0/maemo-sdk-install_5.0.sh
Then run:
su - # become root mkdir /scratchbox SBDIR=/scratchbox echo 0 | sudo tee /proc/sys/vm/vdso_enabled #MUST BE RUN on each boot or # be made permanent by echoing 'vm.vdso_enabled = 0' # to /etc/sysctl.conf and running sysctl -p as root echo 0 | sudo tee /selinux/enforce sh /home/maemo/scratchbox/maemo-scratchbox-install_5.0.sh -s $SBDIR -u maemo sudo gpasswd -a $USER sbox maemo-sdk-install_5.0.sh -s $SBDIR #Accept License #Select Option 4, Runtime+Dev+Dbg #Select Continue $SBDIR/login sb-conf select FREMANTLE_ARMEL exit sudo ${SBDIR}/sbin/sbox_ctl start #SB can be launched by ${SBDIR}/login
Install required packages
fakeroot apt-get install python python-dev autoconf2.13 libidl-dev libpcre3-dev
fedora 12 image creator for n900s
Install fedora 12 then run:
su -c 'yum groupinstall "Development Tools"' su -c 'yum install uuid-devel lzo-devel mercurial' hg clone http://hg.mozilla.org/build/tools ln -s tools/buildfarm/mobile/n900-imaging git clone git://git.infradead.org/mtd-utils.git su - cd /home/jhford/ cd mtd-utils/ubi-tools make cp ubinize ~/n900-imaging cd ../mkfs.ubifs make cp mkfs.ubifs ~/n900-imaging