ReferencePlatforms/Imaging/Nokia N810: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=ReImaging an n810 - A Two Step Process=
==Step 1: Reset Hardware==
If you would like to know more about how the process was developed you can read more [https://wiki.mozilla.org/ReferencePlatforms/Imaging/Nokia_N810_Background here]
'''NOTE: You should be in the RF Shielded room with the door *CLOSED* to ensure machines connect to correct network'''
==Step 1: Prepare device==
*Remove all batteries and leave them out
*Remove all SD cards, separate cards+adapters into two bowls
*Log in as maemo/maemo
*Start a terminal window
*run:
su - #password will be on front of machine
cd /flashing-hg/production-sd/
===for n810 in dead_pile:===
./moz-prep.sh
...
Suitable USB device not found, waiting
*plug in USB in n810 (USB logo is facing up)
*replace battery and casing
*plug in Charger
*verify that small USB logo is displayed in top right corner of n810
*on terminal display, wait for "The device root device is now 'mmc'"
*unplug USB and power
*watch device display debug info and then power itself off


For each session:
*Ensure USB A end of Nokia MicroUSB cable is in computer
*Remove batteries and backplates from all devices to be imaged
<pre>
cd ~/n810-imaging
sudo ./moz-prep.sh
#Follow onscreen prompts
#once all devices are prepped press CTRL+C to quit moz-prep.sh
</pre>


==Step 2: Clone SD card==
==Step 2: Image multiple cards==
*verify no MicroSD cards are in USB hub's card readers
<pre>
*plug USB cable and power cable into USB hub
#Detach all MicroSD card readers from computer
*insert MicroSD Cards into card readers
#Insert MicroSD cards to be imaged into MicroSD card readers
*Verify that you are in '/flashing-hg/production-sd/' as root
#Plug in MicroSD card readers with MicroSD cards into computer
**if not run:
#then run
$ su - #password will be on front of machine
cd ~/n810-imaging
# cd /flashing-hg/production-sd/
sudo ./bulk-image.sh
# ./bulk-image.sh  
#This will take approx 5-7 minutes per card; computer will beep when all cards are imaged.
Please specify devices from this list
# JHFORD will paste sample output here
/dev/sde1
#Remove all MicroSD card readers
/dev/sdh1
#Remove MicroSD cards from MicroSD card readers
/dev/sdd1
#Final output will tell you how many cards were successful,
/dev/sdf1
#this for your information and is not critical to the imaging process
/dev/sdg1
</pre>
/dev/sdc1
BULK IMAGING COMPLETED
# ./bulk-image.sh e h d f g c
'''NEVER CHOOSE a or /dev/sda'''
'''wait approx 6-14minutes'''
...
All done on /dev/sde
All done on /dev/sdh
All done on /dev/sdd
All done on /dev/sdg
All done on /dev/sdc
All done on /dev/sdf
BULK IMAGING COMPLETED


*remove sd cards
==Step 3: Verify card and power on device==
*unplug usb hub power and usb cable (they get hot)
<pre>
* put card into holder, and holder into n810
#Run and follow on screen instructions
* switch on n810, wait for it to obtain wireless IP address
cd ~/n810-imaging
* on imaging machine terminal, do
sudo ./bulk-verify.sh
[root@maemo-flashing production-sd]# ssh root@maemo-n810-15
</pre>
The authenticity of host 'maemo-n810-15 (10.250.48.106)' can't be established.
RSA key fingerprint is 3b:d5:43:79:6f:c0:af:6a:e3:44:55:17:79:85:59:54.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'maemo-n810-15,10.250.48.106' (RSA) to the list of known hosts.
root@maemo-n810-15's password:
BusyBox v1.6.1 (2008-09-18 09:43:17 EEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
maemo-n810-ref:~# pwd
/root
maemo-n810-ref:~# echo maemo-n810-15 > /etc/hostname
maemo-n810-ref:~# cat /etc/hostname
maemo-n810-15
# verify there is no file called /builds/standalone.txt
maemo-n810-ref:~# rm /builds/standalone.txt
rm: cannot remove '/builds/standalone.txt': No such file or directory
'''reboot, and important to use "exit" to avoid hanging terminal on imaging machine'''
maemo-n810-ref:~# reboot; exit


==If something goes wrong==
==Step 4: Boot device==
*unplug usb hub from usb cable and power
*This step assumes that the MicroSD card has been inserted into the correct device
*reboot computer
*Press the power button on the top of the device '''then''' plug the charger into the device (NOTE: order is important).
*start from scratch
*Verify the device comes turns on successfully with the blue geometry-themed desktop.
*Verify that the grey Wifi logo in top right of screen turns to solid white
** may take 5 minutes


=Changing buildbot masters=
==Troubleshooting Tips==
IGNORE BELOW HERE UNLESS YOU ARE *REALLY* CURIOUS


It's a good idea to let the device run for a while on staging to make sure it is green a majority of the time (compare with production runs).
===N810 Imaging===
We use N810s to do on-device testing of our maemo4 builds of our mobile browser.  In order to deal with maintaining 80 of these devices we have developed an imaging solution.  Our initial attempt was to create a custom firmware image but file corruption became an issue.  We eventually figured out how to boot these devices from MiniSD cards.  We have special tools for creating and maintaining the filesystems on these cards.


If you want to move it from staging-mobile-master:9010 to production-mobile-master:9010, do the following:
===Resetting hardware===
The purpose of this step is to zero out the root mtd device as well as reflashing the linux kernel and bootloader.  We want to make sure that any possible corruption in these critical subsystems is repaired


  [root@maemo-flashing production-sd]# ssh root@maemo-n810-XX
===Potential issues===
maemo-n810-ref:~# cd /builds/buildbot
If you see
  # change the buildmaster_host and port to production-mobile-master:9010
  ERROR! Lost USB Connection while flashing RX-44_DIABLO_5.2008.43-7_PR_COMBINED_MR0_ARM.bin.  Dead battery?
  maemo-n810-ref:~# vi host.py
this is a sign that moz-prep encountered an error. This is a sign that for some reason, the nokia flashing program lost connection to the device.  This is often caused by trying to flash with a dead battery. We mitigate this by flashing with the charger connectedThis has also been caused by issues with the linux kernel on the imaging host.  If you encounter this error on multiple devices using different batteries reboot the imaging machine. If you still have issues, someone has broken the imaging machine.
  maemo-n810-ref:~# cat host.py
   
  buildmaster_host = 'production-mobile-master.mv.mozilla.com'
port=9010

Latest revision as of 21:39, 20 May 2010

Step 1: Reset Hardware

NOTE: You should be in the RF Shielded room with the door *CLOSED* to ensure machines connect to correct network

For each session:

  • Ensure USB A end of Nokia MicroUSB cable is in computer
  • Remove batteries and backplates from all devices to be imaged
cd ~/n810-imaging
sudo ./moz-prep.sh 
#Follow onscreen prompts
#once all devices are prepped press CTRL+C to quit moz-prep.sh

Step 2: Image multiple cards

#Detach all MicroSD card readers from computer 
#Insert MicroSD cards to be imaged into MicroSD card readers
#Plug in MicroSD card readers with MicroSD cards into computer
#then run
cd ~/n810-imaging
sudo ./bulk-image.sh
#This will take approx 5-7 minutes per card; computer will beep when all cards are imaged.
# JHFORD will paste sample output here
#Remove all MicroSD card readers
#Remove MicroSD cards from MicroSD card readers
#Final output will tell you how many cards were successful, 
#this for your information and is not critical to the imaging process

Step 3: Verify card and power on device

#Run and follow on screen instructions
cd ~/n810-imaging
sudo ./bulk-verify.sh

Step 4: Boot device

  • This step assumes that the MicroSD card has been inserted into the correct device
  • Press the power button on the top of the device then plug the charger into the device (NOTE: order is important).
  • Verify the device comes turns on successfully with the blue geometry-themed desktop.
  • Verify that the grey Wifi logo in top right of screen turns to solid white
    • may take 5 minutes

Troubleshooting Tips

IGNORE BELOW HERE UNLESS YOU ARE *REALLY* CURIOUS

N810 Imaging

We use N810s to do on-device testing of our maemo4 builds of our mobile browser. In order to deal with maintaining 80 of these devices we have developed an imaging solution. Our initial attempt was to create a custom firmware image but file corruption became an issue. We eventually figured out how to boot these devices from MiniSD cards. We have special tools for creating and maintaining the filesystems on these cards.

Resetting hardware

The purpose of this step is to zero out the root mtd device as well as reflashing the linux kernel and bootloader. We want to make sure that any possible corruption in these critical subsystems is repaired

Potential issues

If you see

ERROR! Lost USB Connection while flashing RX-44_DIABLO_5.2008.43-7_PR_COMBINED_MR0_ARM.bin.  Dead battery?

this is a sign that moz-prep encountered an error. This is a sign that for some reason, the nokia flashing program lost connection to the device. This is often caused by trying to flash with a dead battery. We mitigate this by flashing with the charger connected. This has also been caused by issues with the linux kernel on the imaging host. If you encounter this error on multiple devices using different batteries reboot the imaging machine. If you still have issues, someone has broken the imaging machine.