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

(Short description)
(Emphasize broken link)
 
(100 intermediate revisions not shown)
Line 1: Line 1:
-
= Maemo Flasher-3.5 Tool =
+
The  Maemo Flasher-3.5 tool is used to flash data to the Maemo device internal 256 MB of NAND, which is where the bootloader, kernel, and rootfs (all of which make up the operating system) are stored. For N900 it is also used to format and flash the eMMC internal storage card (32GB). Flasher-3.5 can be used to upgrade to a new firmware, wipe the Maemo device and start from scratch, flash certain specific components, or change a number of hardware flags. It also can load and start a kernel and auxiliary system to RAM, e.g for recovery purposes, see [http://wiki.meego.com/ARM/N900/Using_Rescue_Initrd]
-
Flasher-3.5 final versions can be downloaded as part of [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php Maemo Development Environment Downloads].
+
Maemo Flasher-3.5 Tools could be downloaded from the [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php Maemo Development Environment Downloads] page in the past.
-
The following documentation is copied from the Flasher 3.5 documentation included with this download.
+
== Release details ==
-
Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
* Version: 2.5.2.2 - Final
-
 
+
-
Nokia and maemo are trademarks or registered trademarks of Nokia Corporation.
+
-
Other product and company names mentioned herein may be trademarks or trade
+
-
names of their respective owners.
+
-
== Disclaimer ==
+
-
 
+
-
 
+
-
This software is work-in-progress and use of this software requires special skills and knowledge. The software and the instructions provided herein or with the software may not be complete. Improper use or installation of this software may harm the device you are installing it into, or the device you are using it with. By accepting the License Agreement deliverd together with this software you also agree to use this software at your own risk and accept that Nokia assumes no liability and does not provide any warranties, support or services related to the software.
+
-
 
+
-
== Maemo Flasher-3.5 details ==
+
-
 
+
-
* Version: 2.5.2 - Final
+
* Date: October 23, 2009
* Date: October 23, 2009
-
* Hardware supported: Nokia N800, N810 and N810 WiMAX with Diablo 4.1.x and  N900 with Fremantle 5.x
+
* Hardware supported:
 +
** Nokia [[Nokia N800|N800]], [[Nokia N810|N810]] and [[Nokia N810WME|N810 WiMAX]] with [[Open development/Maemo roadmap/Diablo|Diablo]] 4.1.x
 +
** Nokia [[Nokia N900|N900]] with [[Open development/Maemo roadmap/Fremantle|Fremantle]] 5.x
-
== Supported operating systems ==
+
=== Supported operating systems ===
-
* Linuxes (Debian installation package available for Debian based Linuxes and tar ball for others)
+
Maemo Flasher-3.5 tool supports the following 32-bit host PC operating systems:
-
* 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.
+
* Debian-based Linux (with Debian installation package)
 +
* Other Linux (with tar installation package)
 +
* Windows XP with SP3, Vista with SP2 and Windows 7 (with Windows installation package)
 +
* Mac OS X 10.5 Leopard and 10.6 Snow Leopard (with Mac OS X installation package)
 +
** Supports x86/32-bit and PPC/32-bit architectures
-
== Files included ==
+
Linux and Windows versions of Maemo Flasher-3.5 tool support x86/32-bit host PC architectures. Maemo Flasher-3.5 tool does not support any 64-bit operating systems, see the [[##Tips_.26_troubleshooting|troubleshooting]] section for more information.
-
; flasher-3.5                 : flasher binary file (flasher-3.5.exe for Windows)
+
=== Files included in the delivery packages ===
-
; 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)
+
;flasher-3.5
-
; License_Agreement.txt       : license and disclaimer text for flasher binary
+
: flasher binary file (<code>flasher-3.5.exe</code> for Windows)
-
; Help.txt                     : short command line help  
+
;libusb
-
; Readme_Maemo_Flasher-3.5.txt : this file
+
: 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
 +
: Flasher-3.5 readme file
== Downloads and documentation ==
== Downloads and documentation ==
-
* Flasher-3.5 download: http://tablets-dev.nokia.com/maemo-dev-env-downloads.php
+
Flasher-3.5 download: [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php Maemo Development Environment Downloads]
-
* Flasher-3.5 documentation: see command line help file
+
 
 +
Flasher-3.5 documentation: This document and documentation are delivered as part of installation packages (readme and help files)
-
* Sources for libusb library (LGPL v2) installed as part of Flasher-3.5 for Windows and Mac OS X:
+
Sources for libusb library (LGPL v2) installed as part of Flasher-3.5 for Windows and Mac OS X:
-
** Libusb (Mac): http://pc-connectivity.garage.maemo.org/upstream/libusb-0.1.12.tar.gz
+
* Libusb (Mac): [http://pc-connectivity.garage.maemo.org/upstream/libusb-0.1.12.tar.gz libusb-0.1.12.tar.gz]
-
** Libusb-win32 (Win): http://pc-connectivity.garage.maemo.org/upstream/libusb-win32-src-0.1.12.1.tar.gz
+
* Libusb-win32 (Win): [http://pc-connectivity.garage.maemo.org/upstream/libusb-win32-src-0.1.12.1.tar.gz libusb-win32-src-0.1.12.1.tar.gz]
   
   
-
* Original libusb sources are available from SourceForge.net:
+
Original libusb sources are available from SourceForge.net:
-
** Libusb (Mac): http://ufpr.dl.sourceforge.net/sourceforge/libusb
+
* Libusb (Mac): [http://ufpr.dl.sourceforge.net/sourceforge/libusb libusb]
-
** Libusb-win32 (Win): http://ufpr.dl.sourceforge.net/sourceforge/libusb-win32
+
* Libusb-win32 (Win): [http://ufpr.dl.sourceforge.net/sourceforge/libusb-win32 libusb-win32]
== Installation ==
== Installation ==
-
The 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.  
+
The Maemo Flasher-3.5 tool should be installed from the installation package provided for Debian-based Linux, Windows and Mac OS X. For Linux distributions other than Debian-based ones, a compressed tar file is also provided.  
Installation of Maemo Flasher-3.5 requires administration rights in all supported operating systems.
Installation of Maemo Flasher-3.5 requires administration rights in all supported operating systems.
-
== Short description ==
+
== 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.
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.
+
{{ambox|text=Older Maemo devices (like Nokia 770) and older Maemo platform releases may require a specific Flasher Tool from [http://tablets-dev.nokia.com/d3.php Maemo Flasher Tool archive].}}
-
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 is run from a Linux, Windows or Mac host computer as a command line tool, and it sends data and commands to the connected Maemo device via USB.  
-
Flasher-3.5 Tool can be used to:
+
Among other purposes, Flasher-3.5 Tool can be used to:
-
* flash Maemo device with Diablo or Fremantle FIASCO image
+
* flash a Maemo device with a Diablo or Fremantle FIASCO image
-
* flash Maemo device (N900 only) internal memory card with eMMC image
+
* flash a Maemo device (N900 only) internal memory card with an eMMC image
-
* unpack FIASCO image into separate parts like kernel and rootfs images
+
* unpack a FIASCO image into separate parts like kernel and rootfs images
* flash unpacked kernel or rootfs images to the Maemo device separately
* flash unpacked kernel or rootfs images to the Maemo device separately
-
* change Mameo device into R&D mode and back to normal mode
+
* change a Maemo device to R&D mode and back to normal mode
-
* set and clear R&D flags for Maemo device when in R&D mode
+
* set and clear R&D flags for a Maemo device when in R&D mode
-
* boot Maemo device with additional kernel startup parameters  
+
* boot a Maemo device with additional kernel startup parameters  
-
* and for many other purposes
+
* load a kernel and rootfs to the device's RAM and start it
All command line parameters supported by Flasher-3.5 Tool together with some  
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  
+
basic usage examples are documented in the Help.txt file available as part of the 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.
-
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.
+
-
Before flashing Maemo device with FIASCO image it is recommended to set Maemo
+
Flash always the FIASCO image first and after that immediately without booting device the latest available eMMC image, if needed. The eMMC image does not need to be flashed every time when a new FIASCO image is flashed. Flashing the eMMC image also overwrites all data from the internal memory card.
-
device first into flashing mode.  
+
-
For Nokia N800 and N810 with Diablo image, flashing mode can be enabled by following these steps:
+
{{ambox|text=Never flash/reflash the eMMC content after you bootup the N900 device with new FIASCO image because all the optified content that gets automatically moved from rootfs to eMMC during first device bootup will be lost.}}
-
# Turn off Maemo device (and do not use charger)
+
-
# Attach USB cable on your Maemo device and computer
+
-
# Turn on Maemo device while holding down the Home (N800) or Swap (N810) hardware button
+
 +
=== Setting Maemo device to flashing mode ===
-
For Nokia N900 with Fremantle image, flashing mode can be enabled by following these steps:
+
Before flashing a Maemo device with a FIASCO image, it is recommended to firstly set the Maemo device into flashing mode. When you attempt to flash the device, it tries to enable flashing mode on the fly, in which case setting the device to flashing mode explicitly is not required, but there have been reports that with some clients this does not work.
-
# Turn off Maemo device  
+
-
# Press and hold down key 'u'
+
-
# Connect USB cable between Maemo device and host PC while holding down key 'u'
+
-
# When USB cable gets connected it powers Maemo device and set's it to flashing mode
+
-
# When USB icon appears on right upper corner Maemo device is in flashing mode  
+
-
# You can release key 'u'
+
 +
For Nokia N800 and N810 with a Diablo image, flashing mode can be enabled by following these steps:
 +
# Switch off the Maemo device (and do not use a charger)
 +
# Attach a USB cable to the Maemo device and computer
 +
# Switch on the Maemo device while holding down the Home (N800) or Swap (N810) hardware button
-
You will see USB image in the upper right hand corner of the screen if you did this correctly.
+
For Nokia N900 with a Fremantle image, flashing mode can be enabled by following these steps:
 +
# Switch off the Maemo device completely (a Maemo device connected to a power source is never completely off for charging purposes, so you have to unplug your device)
 +
# (plug in one end of the USB cable to N900, don't plug other end yet)
 +
# Press and hold down the 'u' key
 +
# Connect a USB cable between the Maemo device and host PC while holding down the 'u' key (you may keep the USB cable plugged in to N900, it doesn't detect a cable that's not connected to PC)
 +
# When the N900 gets connected to PC, this powers the Maemo device and sets it to flashing mode
 +
# When the USB icon appears in the upper right-hand corner, the Maemo device is in flashing mode
 +
# Release the 'u' key
-
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.
+
If performed correctly, the USB image is visible in the upper right-hand corner of the screen.
-
NOTICE: 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.
+
The Maemo device waits indefinitely for Flasher-3.5 input when it is in flashing mode. If flashing is tried without first setting the Maemo device to flashing mode, image flashing may fail because the Maemo device may not be able to change to the flashing mode automatically.
 +
 
 +
{{ambox|text=Make sure that the device battery is fully charged before doing any sort of flashing operation because flashing fails if the battery runs out of power during the image flashing operation, and the device may not be able to charge an empty battery after a failure in flashing. USB icon not showing up, or vanishing after a short time and device tries to boot to linux, is a clear indication of a weak battery}}
 +
 
 +
=== 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 / UBIFS 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 a list of supported command line options, run :
 +
 
 +
$ flasher-3.5
 +
$ flasher-3.5 --set-rd-flags
 +
 
 +
If you wish to perform commands other than image flashing, then omit the -R option as rebooting the Maemo device may reset the given configuration change back to normal.
 +
 
 +
To enable R&D mode for Maemo device, run:
 +
 
 +
$ flasher-3.5 --enable-rd-mode
 +
 
 +
To warm flash an image to the Maemo device, run:
 +
 
 +
$ flasher-3.5 -F <FIASCO image> -f
 +
 
 +
Replace  <FIASCO image>  with  the  the firmware image you downloaded from Nokia. This flashes a FIASCO image to your Maemo device. The procedure is the same for all other image flashing components (for example, separate kernel, rootfs and eMMC images), see the option list for details.
 +
 
 +
To print out Maemo device product code and product HW revision, run:
 +
 
 +
$ flasher-3.5 -i
 +
 
 +
To cold flash (needed usually when the bootloader has been changed), run:
 +
 
 +
$ flasher-3.5 -c -h RX-51:<hw_id> -F <FIASCO image> -f
 +
 
 +
The code "RX-51" used in the example is the product code for the N900 device. The <hw_id> is the product HW revision, which is a 4-digit code. Both product code and HW revision can be found from the type label of the device to be flashed. The type label is on the back of the device, underneath the battery.
 +
 
 +
To flash a kernel with separate kernel image, run:
 +
 
 +
$ flasher-3.5 -k <kernel image> -f -R
 +
 
 +
To flash just a part of the whole FIASCO image (for example, only rootfs) run:
 +
 
 +
$ flasher-3.5 -F <FIASCO image> --flash-only=rootfs -f
 +
 
 +
This flashes only the rootfs from the <FIASCO image>.
 +
 
 +
To access to the individual parts of the FIASCO image, run:
 +
 
 +
$ flasher-3.5 -F <FIASCO image> -u
 +
 
 +
which expands <FIASCO image> to your current directory.
== Tips & troubleshooting ==
== 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 also need to have administrator permissions or run command with sudo in Linux.
+
* It appears that Windows 7 64 bit doesn't handle USB in the same manner, and this causes problems (http://talk.maemo.org/showpost.php?p=489976&postcount=4). Workaround by using another PC, or creating a virtual machine of the appropriate type (http://talk.maemo.org/showpost.php?p=490152&postcount=5). There is a fix that works for Windows7 (works on 64bit) here: http://talk.maemo.org/showpost.php?p=849980&postcount=20.
 +
* If you get a "Permission denied" error, then make sure you have execution rights to the Flasher-3.5 binary executable.  
 +
* You 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 the USB cable directly to the computer USB ports, avoiding the use of a hub. Using the USB ports in the back of a computer can also work better than using those in the front.
 +
* Flash always the FIASCO image first and after that immediately the latest available eMMC image, if needed. '''Never flash/reflash the eMMC content after you bootup the device.''' Reason: All the optified content that is moved from rootfs to eMMC will be lost. The eMMC image does not need to be flashed every time when a new FIASCO image is flashed. Flashing the eMMC image also overwrites all data from the internal memory card. (Notice this recommendation has changed to eMMC first, then powerdown and flash rootfs. Rationale: a system will recover from accidental boots this way. If user is confident about avoiding intermediate boot, the original sequence works as well and is more convenient)
 +
* If warm flashing fails, try to switch off the power from the Maemo device, remove the USB cable and try again from the beginning.
 +
* If cold flashing fails, try to warm flash the Maemo device first using the same FIASCO image. After that try cold flashing again. NB cold flashing is rarely ever needed and not recommended for end users. It's meant only to recover from a defect or outdated NOLO bootloader.
 +
* If Flasher-3.5 is not supported on your operating system you can try to install Maemo SDK Virtual Image from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php Maemo Development Environment Downloads] page and flash Maemo device from Virtual Image (which includes Ubuntu). This may or may not work for you depending on how well virtualization technology you use supports USB on your HW.
 +
* If you use 64-bit Linux, Flasher may work on it.
 +
:Here is the way to do it(Includes Debian based[Debian, Ubuntu, Mint etc.] distributions)
 +
:#Download the [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php flasher3.5.tar.gz]
 +
:#Extract it to a temp directory
 +
:#Open a console and CD to the directory that "flasher-3.5" resides in.
 +
:#Run "<code>chmod +x ./flasher-3.5</code>", to allow it to be excecuted.
 +
:#Run it as you normally would, and make sure its run '''as root'''. For instance, if you wanted to flash PR1.2 and the image was in the same directory as flasher-3.5, you would run: "<code>sudo ./flasher-3.5 -F ./RX-51_2009SE_10.2010.19-1.002_PR_COMBINED_002_ARM.bin -f</code>"
 +
:The reason it may work could be that you have the ia32 libs installed. These are 32-bit libraries needed by 32-bit programs. They may have been included in the default packages, or you may have to install them("<code>sudo apt-get install ia32-libs</code>" on a Debian-based system).
 +
This has been tested and found to work on Ubuntu Karmic and Lucid based systems.
-
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.
+
== Known issues ==
-
----
+
This is a list of known issues found from Flasher-3.5 final release.
-
Feedback from Flasher-3.5 Tool can be sent to integration@maemo.org
+
* Flasher-3.5 does not work with Mandriva 2010 distro because Flasher-3.5 is not able to locate the correct USB address and timeouts
 +
** workaround is to download the libusb rpm from Mandriva 2009 and use it
 +
*** mkdir /opt/libusb
 +
*** cd /opt/libusb
 +
*** rpm2cpio libusb0.1_4-0.1.12-12mdv2009.1.i586.rpm | cpio -idmv
 +
*** export LD_LIBRARY_PATH=/opt/libusb/lib
 +
*** flasher-3.5 ...
 +
* On Windows host PC if Nokia PC Suite has been installed to the environment once Windows has started also PC Suite starts running. If Nokia PC Suite is running when N900 is plugged in to the PC with USB cable and with the u key held down, Nokia PC Suite gives an error message and Flasher-3.5 does not see the device.
 +
** workaround is to exit Nokia PC Suite before plugging in N900 with USB cable and starting Flasher-3.5
 +
== N900 flasher ==
 +
 +
The same tool is located on N900 itself under name "flasher" (<code>/usr/bin/flasher</code>) and can be used for changing R&D mode, etc.
 +
SSU also is using this local flasher, to update kernels. Package name is [http://maemo.org/packages/view/flasher/ flasher].
 +
[[Category:Development]]
[[Category:Development]]

Latest revision as of 03:36, 3 February 2016

The Maemo Flasher-3.5 tool is used to flash data to the Maemo device internal 256 MB of NAND, which is where the bootloader, kernel, and rootfs (all of which make up the operating system) are stored. For N900 it is also used to format and flash the eMMC internal storage card (32GB). Flasher-3.5 can be used to upgrade to a new firmware, wipe the Maemo device and start from scratch, flash certain specific components, or change a number of hardware flags. It also can load and start a kernel and auxiliary system to RAM, e.g for recovery purposes, see [1]

Maemo Flasher-3.5 Tools could be downloaded from the Maemo Development Environment Downloads page in the past.

Contents

[edit] Release details

[edit] Supported operating systems

Maemo Flasher-3.5 tool supports the following 32-bit host PC operating systems:

  • Debian-based Linux (with Debian installation package)
  • Other Linux (with tar installation package)
  • Windows XP with SP3, Vista with SP2 and Windows 7 (with Windows installation package)
  • Mac OS X 10.5 Leopard and 10.6 Snow Leopard (with Mac OS X installation package)
    • Supports x86/32-bit and PPC/32-bit architectures

Linux and Windows versions of Maemo Flasher-3.5 tool support x86/32-bit host PC architectures. Maemo Flasher-3.5 tool does not support any 64-bit operating systems, see the troubleshooting section for more information.

[edit] Files included in 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
Flasher-3.5 readme file

[edit] Downloads and documentation

Flasher-3.5 download: Maemo Development Environment Downloads

Flasher-3.5 documentation: This document and documentation are delivered as part of installation packages (readme and help files)

Sources for libusb library (LGPL v2) installed as part of Flasher-3.5 for Windows and Mac OS X:

Original libusb sources are available from SourceForge.net:

[edit] Installation

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

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

[edit] 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.

Image:Ambox_notice.png
Older Maemo devices (like Nokia 770) and older Maemo platform releases may require a specific Flasher Tool from Maemo Flasher Tool archive.

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

Among other purposes, Flasher-3.5 Tool can be used to:

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

All command line parameters supported by Flasher-3.5 Tool together with some basic usage examples are documented in the Help.txt file available as part of the 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.

Flash always the FIASCO image first and after that immediately without booting device the latest available eMMC image, if needed. The eMMC image does not need to be flashed every time when a new FIASCO image is flashed. Flashing the eMMC image also overwrites all data from the internal memory card.

Image:Ambox_notice.png
Never flash/reflash the eMMC content after you bootup the N900 device with new FIASCO image because all the optified content that gets automatically moved from rootfs to eMMC during first device bootup will be lost.

[edit] Setting Maemo device to flashing mode

Before flashing a Maemo device with a FIASCO image, it is recommended to firstly set the Maemo device into flashing mode. When you attempt to flash the device, it tries to enable flashing mode on the fly, in which case setting the device to flashing mode explicitly is not required, but there have been reports that with some clients this does not work.

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

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

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

  1. Switch off the Maemo device completely (a Maemo device connected to a power source is never completely off for charging purposes, so you have to unplug your device)
  2. (plug in one end of the USB cable to N900, don't plug other end yet)
  3. Press and hold down the 'u' key
  4. Connect a USB cable between the Maemo device and host PC while holding down the 'u' key (you may keep the USB cable plugged in to N900, it doesn't detect a cable that's not connected to PC)
  5. When the N900 gets connected to PC, this powers the Maemo device and sets it to flashing mode
  6. When the USB icon appears in the upper right-hand corner, the Maemo device is in flashing mode
  7. Release the 'u' key

If performed correctly, the USB image is visible in the upper right-hand corner of the screen.

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

Image:Ambox_notice.png
Make sure that the device battery is fully charged before doing any sort of flashing operation because flashing fails if the battery runs out of power during the image flashing operation, and the device may not be able to charge an empty battery after a failure in flashing. USB icon not showing up, or vanishing after a short time and device tries to boot to linux, is a clear indication of a weak battery

[edit] 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 / UBIFS 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

[edit] Flasher-3.5 usage examples

To get a list of supported command line options, run :

$ flasher-3.5
$ flasher-3.5 --set-rd-flags

If you wish to perform commands other than image flashing, then omit the -R option as rebooting the Maemo device may reset the given configuration change back to normal.

To enable R&D mode for Maemo device, run:

$ flasher-3.5 --enable-rd-mode

To warm flash an image to the Maemo device, run:

$ flasher-3.5 -F <FIASCO image> -f

Replace <FIASCO image> with the the firmware image you downloaded from Nokia. This flashes a FIASCO image to your Maemo device. The procedure is the same for all other image flashing components (for example, separate kernel, rootfs and eMMC images), see the option list for details.

To print out Maemo device product code and product HW revision, run:

$ flasher-3.5 -i

To cold flash (needed usually when the bootloader has been changed), run:

$ flasher-3.5 -c -h RX-51:<hw_id> -F <FIASCO image> -f

The code "RX-51" used in the example is the product code for the N900 device. The <hw_id> is the product HW revision, which is a 4-digit code. Both product code and HW revision can be found from the type label of the device to be flashed. The type label is on the back of the device, underneath the battery.

To flash a kernel with separate kernel image, run:

$ flasher-3.5 -k <kernel image> -f -R

To flash just a part of the whole FIASCO image (for example, only rootfs) run:

$ flasher-3.5 -F <FIASCO image> --flash-only=rootfs -f

This flashes only the rootfs from the <FIASCO image>.

To access to the individual parts of the FIASCO image, run:

$ flasher-3.5 -F <FIASCO image> -u

which expands <FIASCO image> to your current directory.

[edit] Tips & troubleshooting

  • It appears that Windows 7 64 bit doesn't handle USB in the same manner, and this causes problems (http://talk.maemo.org/showpost.php?p=489976&postcount=4). Workaround by using another PC, or creating a virtual machine of the appropriate type (http://talk.maemo.org/showpost.php?p=490152&postcount=5). There is a fix that works for Windows7 (works on 64bit) here: http://talk.maemo.org/showpost.php?p=849980&postcount=20.
  • If you get a "Permission denied" error, then make sure you have execution rights to the Flasher-3.5 binary executable.
  • You 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 the USB cable directly to the computer USB ports, avoiding the use of a hub. Using the USB ports in the back of a computer can also work better than using those in the front.
  • Flash always the FIASCO image first and after that immediately the latest available eMMC image, if needed. Never flash/reflash the eMMC content after you bootup the device. Reason: All the optified content that is moved from rootfs to eMMC will be lost. The eMMC image does not need to be flashed every time when a new FIASCO image is flashed. Flashing the eMMC image also overwrites all data from the internal memory card. (Notice this recommendation has changed to eMMC first, then powerdown and flash rootfs. Rationale: a system will recover from accidental boots this way. If user is confident about avoiding intermediate boot, the original sequence works as well and is more convenient)
  • If warm flashing fails, try to switch off the power from the Maemo device, remove the USB cable and try again from the beginning.
  • If cold flashing fails, try to warm flash the Maemo device first using the same FIASCO image. After that try cold flashing again. NB cold flashing is rarely ever needed and not recommended for end users. It's meant only to recover from a defect or outdated NOLO bootloader.
  • If Flasher-3.5 is not supported on your operating system you can try to install Maemo SDK Virtual Image from Maemo Development Environment Downloads page and flash Maemo device from Virtual Image (which includes Ubuntu). This may or may not work for you depending on how well virtualization technology you use supports USB on your HW.
  • If you use 64-bit Linux, Flasher may work on it.
Here is the way to do it(Includes Debian based[Debian, Ubuntu, Mint etc.] distributions)
  1. Download the flasher3.5.tar.gz
  2. Extract it to a temp directory
  3. Open a console and CD to the directory that "flasher-3.5" resides in.
  4. Run "chmod +x ./flasher-3.5", to allow it to be excecuted.
  5. Run it as you normally would, and make sure its run as root. For instance, if you wanted to flash PR1.2 and the image was in the same directory as flasher-3.5, you would run: "sudo ./flasher-3.5 -F ./RX-51_2009SE_10.2010.19-1.002_PR_COMBINED_002_ARM.bin -f"
The reason it may work could be that you have the ia32 libs installed. These are 32-bit libraries needed by 32-bit programs. They may have been included in the default packages, or you may have to install them("sudo apt-get install ia32-libs" on a Debian-based system).

This has been tested and found to work on Ubuntu Karmic and Lucid based systems.

[edit] Known issues

This is a list of known issues found from Flasher-3.5 final release.

  • Flasher-3.5 does not work with Mandriva 2010 distro because Flasher-3.5 is not able to locate the correct USB address and timeouts
    • workaround is to download the libusb rpm from Mandriva 2009 and use it
      • mkdir /opt/libusb
      • cd /opt/libusb
      • rpm2cpio libusb0.1_4-0.1.12-12mdv2009.1.i586.rpm | cpio -idmv
      • export LD_LIBRARY_PATH=/opt/libusb/lib
      • flasher-3.5 ...
  • On Windows host PC if Nokia PC Suite has been installed to the environment once Windows has started also PC Suite starts running. If Nokia PC Suite is running when N900 is plugged in to the PC with USB cable and with the u key held down, Nokia PC Suite gives an error message and Flasher-3.5 does not see the device.
    • workaround is to exit Nokia PC Suite before plugging in N900 with USB cable and starting Flasher-3.5

[edit] N900 flasher

The same tool is located on N900 itself under name "flasher" (/usr/bin/flasher) and can be used for changing R&D mode, etc. SSU also is using this local flasher, to update kernels. Package name is flasher.