Documentation/Maemo 5 Developer Guide/Development Environment/Maemo Flasher-3.5

Contents

Maemo Flasher-3.5 Tool

The Maemo Flasher-3.5 tool is used to flash data to the Maemo device internal 256MB of NAND, which is where the bootloader, kernel, and rootfs (all of which make up the operating system) are stored. Flasher-3.5 can be used to upgrade the firmware, wipe the Maemo device and start from scratch, flash certain specific components, or change a number of hardware flags.

Maemo Flasher-3.5 Tools can be downloaded as part of Maemo Development Environment Downloads.

Release details

  • Version: 2.5.2 - Final
  • Date: October 23, 2009
  • Hardware supported: Nokia N800, N810 and N810 WiMAX with Diablo 4.1.x and N900 with Fremantle 5.x

Supported operating systems

  • Linuxes (Debian installation package available for Debian based Linuxes and tar ball for others)
  • Windows XP with SP3, Vista with SP2 and Windows 7
  • Mac OS X 10.5 Leopard and 10.6 Snow Leopard

Notice: Linux and Windows versions of Flasher-3.5 Tool support x86/32-bit host PC architectures. Mac OS X versions support x86/32-bit and PPC/32-bit architectures.

Files included to the delivery packages

flasher-3.5  
flasher binary file (flasher-3.5.exe for Windows)
libusb  
USB library (only for Windows and Mac OS X installations)
COPYING_LGPL.txt  
license text for libusb (only for Windows and Mac OS X installations)
License_Agreement.txt  
license and disclaimer text for flasher binary
Help.txt  
short command line help
Readme_Maemo_Flasher-3.5.txt 
this file

Downloads and documentation

  • Original libusb sources are available from SourceForge.net:

Installation

The Maemo Flasher-3.5 tool should be installed from the installation package provided for Debian based Linuxes, Windows and Mac OS X. For other than Debian based Linux distributions also compressed tar file is provided.

Installation of Maemo Flasher-3.5 requires administration rights in all supported operating systems.

Usage

The Maemo Flasher-3.5 Tool is a command line utility that supports N900 device with Fremantle 5.x platform releases and N800, N810 and N810 WiMAX devices with Maemo Diablo 4.1.x platform releases.

Notice that older Maemo devices (like Nokia 770) and older Maemo platform releases may require a specific Flasher Tool.

Flasher-3.5 Tool is run from a Linux, Windows or Mac host computer as command line tool, and it will send data and commands to the connected Maemo device over USB.

Flasher-3.5 Tool can be used to:

  • flash Maemo device with Diablo or Fremantle FIASCO image
  • flash Maemo device (N900 only) internal memory card with eMMC image
  • unpack FIASCO image into separate parts like kernel and rootfs images
  • flash unpacked kernel or rootfs images to the Maemo device separately
  • change Mameo device into R&D mode and back to normal mode
  • set and clear R&D flags for Maemo device when in R&D mode
  • boot Maemo device with additional kernel startup parameters
  • and for many other purposes

All command line parameters supported by Flasher-3.5 Tool together with some basic usage examples are documented in Help.txt file available as part of tool installation package. Flasher-3.5 Tool binary gives command line help if it is run without any parameter or with "--set-rd-flags" or "--clear-rd-flags" parameters.

Setting Maemo device to flashing mode

Before flashing Maemo device with FIASCO image it is recommended to set Maemo device first into flashing mode.

For Nokia N800 and N810 with Diablo image, flashing mode can be enabled by following these steps:

  1. Turn off Maemo device (and do not use charger)
  2. Attach USB cable on your Maemo device and computer
  3. Turn on Maemo device while holding down the Home (N800) or Swap (N810) hardware button


For Nokia N900 with Fremantle image, flashing mode can be enabled by following these steps:

  1. Turn off Maemo device
  2. Press and hold down key 'u'
  3. Connect USB cable between Maemo device and host PC while holding down key 'u'
  4. When USB cable gets connected it powers Maemo device and sets it to flashing mode
  5. When USB icon appears on right upper corner Maemo device is in flashing mode
  6. You can release key 'u'


You will see USB image in the upper right hand corner of the screen if you did this correctly.

Maemo device will wait for Flasher-3.5 input indefinitely when it is in flashing mode. If flashing is tried without setting Maemo device first into flashing mode image flashing may fail because Maemo device may not be able to change to the flashing mode automatically.

Make sure that device battery is fully charged before doing any sort of flashing operation because flashing will fail if batteryruns out of power during image flashing operation and device may not be able to charge empty battery after failure in flashing.

Command line options

SYNOPSIS 

Usage: flasher-3.5 [OPTIONS]

OPTIONS 
-F, --fiasco=ARG  
Location of a FIASCO image
-k, --kernel=ARG  
Location of kernel image
-n, --initfs=ARG  
Location of initfs image
-r, --rootfs=ARG  
Location of root JFFS2 image
--cmt-2nd=ARG  
Location of CMT FIASCO 2nd image
--cmt-algo=ARG  
Location of CMT FIASCO algorithm image
--cmt-mcusw=ARG  
Location of CMT FIASCO MCUSW image
--cmt-no-verify  
Disable verification of CMT programming
-x, --xloader=ARG  
Location of X-Loader image
-s, --secondary=ARG  
Location of NOLO secondary bootloader image
-2, --2nd=ARG  
Location of NOLO cold flasher ("2nd") image
-u, --unpack[=ARG]  
Unpack a FIASCO image
-f, --flash  
Load and flash all supplied images
-l, --load  
Only load all supplied images
-b, --boot[=ARG]  
Boot the kernel with optional cmdline
-R, --reboot  
Reboot the board (e.g. after flashing NOLO)
-i, --read-device-id  
Print out the device type
-S, --serial-port=ARG  
Serial port used for cold flashing or "usb"
-I, --init-port  
Only initialize the serial port
-c, --cold-flash  
"Cold flash" the device
-h, --hw-revision=ARG  
Specify product code and HW revision
--enable-rd-mode  
Enable R&D mode on the device
--disable-rd-mode  
Disable R&D mode on the device
--set-rd-flags[=ARG]  
Set R&D mode flags on the device
--clear-rd-flags[=ARG]  
Clear R&D mode flags on the device
--query-rd-mode  
Query the device R&D mode status and flags
--set-hw-revision[=ARG] 
Set HW revision override on device
--flash-only=ARG  
Flash only certain components
-U, --usb-device=ARG  
Specify USB device to use (bus:device address)
Valid --flash-only options 

nolo, kernel, initfs, rootfs

Valid --set-rd-flags and --clear-rd-flags options 

no-omap-wd, no-ext-wd, no-lifeguard-reset, serial-console, no-usb-timeout, sti-console, no-charging, force-power-key

Flasher-3.5 usage examples

  • To get list of supported command line options run:
      $ flasher-3.5
      $ flasher-3.5 --set-rd-flags
  • To enable R&D mode for Maemo device run:
      $ flasher-3.5 –-enable-rd-mode
  • To warm flash a image to the Maemo device, open a terminal on your computer, then run:
      $ flasher-3.5 -F <FIASCO image> -f -R

Replace <FIASCO image> with the firmware image you downloaded from Nokia. This will flash a FIASCO image to your Maemo device and reboot device after it’s done (at which point, you can unplug the USB). The procedure is the same for all other image flashing components (like separate kernel, rootfs and eMMC images), see the option list for details. If you wish to do other commands than image flashing, then omit the -R option as rebooting Maemo device may reset given configuration change back to normal.

  • To cold flash a image to the Maemo device , open a terminal on your computer, then run:
      $ flasher-3.5 -c -h RX-51:<hw_id> -F <FIASCO image> -f -R

The <hw_id> in the command options is a 4-digit code that can be found from the type label of the device to be flashed. Type label is on the back of the device underneath the battery.

  • To flash a kernel with separate kernel image, open a terminal on your computer, then run:
      $ flasher-3.5 -k <kernel zImage> -f -R
  • If you do not have separate images, but want to flash just a part of the whole FIASCO image you can do so by running:
      $ flasher-3.5 -F <FIASCO image> --flash-only=rootfs -R

This will flash just the rootfs from the <FIASCO image> and reboot the device.

  • If you need access to the individual parts of the FIASCO image, it can be unpacked by running:
      $ flasher-3.5 -F <FIASCO image> -u

Which will expand <FIASCO image> to your current directory.

  • To cold flash (needed usually when the bootloader has been changed) run:
      $ flasher-3.5 -c -h RX-51:<hw_id> -F <FIASCO image> -S usb

The <hw_id> in the command options is a 4-digit code that can be found from the type label of the device to be flashed. Type label is on the back of the device underneath the battery.

Tips & troubleshooting

  • If you get a "Permission denied" error then make sure you have execution rights to the flasher-3.5 binary executable.
  • You may need to have administrator rights or run command with sudo in Linux if you get errors like this: Error claiming USB interface: Operation not permitted
  • It may help to connect USB cable directly to the computer USB ports, avoiding the use of a hub. The USB ports in the back of a computer may also work better than using those in the front.
  • Flash always the FIASCO image first and after that the latest available eMMC image, if needed. eMMC image does not need to be flashed everytime when new FIASCO image is flashed. Flashing eMMC image also overwrites all data from internal memory card.
  • If warm flashing fails, try to switch off the power from the Maemo device, remove the USB cable and try again from the begining.
  • If cold flashing fails, try to warm flash the Maemo device first using same FIASCO image and after that try cold flashing again.