ReferencePlatforms/Test/Maemo: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''NOTE: THIS DOCUMENT IS ONLY VALID FOR OUR N810 DEVICES'''
For information on the N900 please see [[ReferencePlatforms/Test/N900-PR1.2]]
=prep for image=
=prep for image=
Obtain
Obtain
Line 41: Line 45:
  user ALL=(ALL) NOPASSWD: ALL
  user ALL=(ALL) NOPASSWD: ALL
  #dropbear and dropbear-client packages are broken
  #dropbear and dropbear-client packages are broken
  apt-get install bzip2 wget gnutar dropbear-server openssh-client libpcre3 libssl0.9.7 e2fsprogs openntpd
  apt-get install bzip2 wget gnutar dropbear-server openssh-client libpcre3 unzip zip libssl0.9.7 e2fsprogs openntpd
  rm /bin/tar
  rm /bin/tar
  mv /bin/gtar /bin/tar
  mv /bin/gtar /bin/tar
Line 157: Line 161:


'''MAKE SURE YOU HAVE THE CORRECT DEVICE NODE FILE i.e. /dev/sdb'''
'''MAKE SURE YOU HAVE THE CORRECT DEVICE NODE FILE i.e. /dev/sdb'''
For this you will need to have an SD card that has an ext3 filesystem.
For this you will need to have an SD card that has an ext3 filesystem. On imaging computer with SD card inserted
  dd if=/dev/zero of=/dev/sd? bs=512 count=1
  dd if=/dev/zero of=/dev/sd? bs=512 count=1
  sudo parted --script /dev/sd? mktable msdos
  sudo parted --script /dev/sd? mktable msdos
Line 165: Line 169:
  mkfs.ext3 /dev/sd? -L scratch
  mkfs.ext3 /dev/sd? -L scratch


You will also need to copy the rsync binary onto your N810
You will also need to copy the rsync binary onto your N810.  This is done on imaging computer
  scp $ROOT/usr/local/bin/rsync root@<dev>
  scp $ROOT/usr/local/bin/rsync root@<dev>


Now remount your device's root filesystem
Now remount your device's root filesystem.  Boot the N810 with the prepared SD card in the slot.
  sudo gainroot
  sudo gainroot
  mount -t jffs2 /dev/mtdblock4 /opt
  mount -t jffs2 /dev/mtdblock4 /opt
  mount /dev/mmcblk1p1 /floppy
  mount /dev/mmcblk1p1 /floppy
rsync -av /opt/. /floppy/.
umount /floppy


'''N810's don't like when you use rsync > 2 for this part. use rsync 2.6.9!'''
Now put the sd card back in the computer. I would suggest making a backup of your image at this point.  
 
I would suggest making a backup of your image at this point.  
  mkdir ~/base-n810
  mkdir ~/base-n810
  sudo rsync2 -av /media/root-fs/. ~/base-n810/.
  sudo rsync2 -av /media/root-fs/. ~/base-n810/.
Line 184: Line 188:


boot device and verify that your device is booted from mmc
boot device and verify that your device is booted from mmc
  mount | grep "/dev/mmcblk0p1 on /" #should print a line
  mount | grep "/dev/mmcblk0p1 on /"
should print a line


==Populate Filesystem==
==Install compiled applications==
on the imaging computer with the N810 running from the SD card
  sudo rsync2 -av $ROOT/. root@<devip>:/.
  sudo rsync2 -av $ROOT/. root@<devip>:/.


Line 230: Line 236:
  EOF
  EOF


install reboot-user
==Install mozilla scripts==
cd /bin
On n810 run:
  wget http://hg.mozilla.org/build/tools/raw-file/1078c5659590/buildfarm/mobile/n900-imaging/rootfs/root-skel/bin/reboot-user
  hg clone http://hg.mozilla.org/build/tools
  chmod +x reboot-user
rsync -a tools/buildfarm/mobile/n810-imaging/rootfs/. /.
 
  rm -rf tools
==Buildbot startup==
There will be an /etc/init.d/mozilla and /etc/mozconf script checked into build/tools repository.  Copy those files to the right place and run
  update-rc.d mozilla defaults
  update-rc.d mozilla defaults


Line 247: Line 251:
and on device, fix permissions
and on device, fix permissions
  chown -R root:root /tools
  chown -R root:root /tools
=take image=
Insert SD card into card reader and run
cd n810-imaging/
sudo ./moz-get-image.sh /dev/sd? moz-n810-v999 #replace ? and 999 as appropriate
=image card
this is only for doing a test image.  this is not the general purpose flashing doc
sudo ./moz-image.sh moz-n810-v999 /dev/sd? maemo-n810-???
Confirmed users
1,377

edits