flasher

(No.)
(Flags: updated link for "flash card booting")
Line 36: Line 36:
The flasher can also set a number of hardware flags that control some lower-level stuff on the tablet (watchdogs, serial console, R&D mode, etc.). These flags can be '''hazardous to the health''' of your tablet, so it's recommended that you not mess with them unless you're clear on what you're doing.
The flasher can also set a number of hardware flags that control some lower-level stuff on the tablet (watchdogs, serial console, R&D mode, etc.). These flags can be '''hazardous to the health''' of your tablet, so it's recommended that you not mess with them unless you're clear on what you're doing.
-
If you've set up [[updating the tablet firmware|flash card booting]], you can change the preferred root device by running the following with your preferred device:
+
If you've set up [[Booting from a flash card|flash card booting]], you can change the preferred root device by running the following with your preferred device:
  sudo flasher-3.0 --set-root-device ask:mmc2
  sudo flasher-3.0 --set-root-device ask:mmc2

Revision as of 23:29, 21 April 2009

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

Contents

flasher-3.0

flasher-3.0 is run from a computer, and will send data and commands to a connected tablet over USB. Download the flasher for Linux and OS X (OS X users can only use flasher-2.0, but it will work the same as flasher-3.0).

Usage

For more details on usage and flashing the whole firmware, please see updating the tablet firmware.

As a prerequisite to flashing, your tablet must first be turned off (and not on the charger), then plugged into USB on your computer and turned on while holding down the Home button. You will see a USB image in the upper right hand corner of the screen if you did this correctly, the tablet will wait for flasher input indefinitely. Make sure the tablet is charged before doing any sort of flashing operation.

Images

To flash a kernel image if you have an individual image, open a terminal on your computer, then run:

sudo flasher-3.0 -k <kernel zImage> -f -R

This will flash the kernel to your tablet and reboot the tablet after it's done (at which point, you can unplug the USB). If you wish to flash other stuff or do other commands, then simply omit the -R. The procedure is the same for all other components, see the options for details.

If you don't have individual images, but want to flash just a part of the whole FIASCO image (initfs, in this example) you can do so by running:

sudo flasher-3.0 -F <FIASCO image> --flash-only=initfs -R

This will flash just the initfs from the FIASCO image and reboot the tablet. The procedure is the same for all other components, see the options for details.

If you need access to the individual parts of the FIASCO image, it can be unpacked by running:

sudo flasher-3.0 -F <FIASCO image> -u

Which will expand it to your current directory.

Flags

The flasher can also set a number of hardware flags that control some lower-level stuff on the tablet (watchdogs, serial console, R&D mode, etc.). These flags can be hazardous to the health of your tablet, so it's recommended that you not mess with them unless you're clear on what you're doing.

If you've set up flash card booting, you can change the preferred root device by running the following with your preferred device:

sudo flasher-3.0 --set-root-device ask:mmc2

To enable R&D mode, which eliminates the power button power-on delay, satisfies gainroot's check for R&D mode (use root access if you really need root) and displays extra information during boot, run:

sudo flasher-3.0 --enable-rd-mode -R

To set certain flags (note, these flags are not dependent on R&D mode being enabled) like disabling the watchdogs, run:

sudo flasher-3.0 --set-rd-flags=no-lifeguard-reset -R

The are additional settings that can be tweaked with the flasher.

fiasco-flasher

fiasco-flasher is the bundled on-device flasher introduced in Diablo. It's typically called during SSU updates to flash the initfs and kernel via flash-and-reboot, but you can use it to flash your own kernel and initfs images (as is done to flash the rotation kernel).

Usage

To flash a kernel image, open Xterm, gain root, and run:

fiasco-flasher -k <kernel zImage> -f

To flash an initfs image, open Xterm, gain root, and run:

fiasco-flasher -i <initfs jffs2 image> -f -R

Options

flasher-3.0

Usage: flasher [OPTIONS]
Options:
 --fiasco, -F <arg>            Location of a FIASCO image
 --kernel, -k <arg>            Location of kernel image
 --initfs, -n <arg>            Location of initfs image
 --rootfs, -r <arg>            Location of root JFFS2 image
 --xloader, -x <arg>           Location of X-Loader image
 --secondary, -s <arg>         Location of NOLO secondary bootloader image
 --2nd, -2 <arg>               Location of NOLO cold flasher ("2nd") image
 --unpack, -u [arg]            Unpack a FIASCO image
 --flash, -f                   Load and flash all supplied images
 --load, -l                    Only load all supplied images
 --boot, -b [arg]              Boot the kernel with optional cmdline
 --reboot, -R                  Reboot the board (e.g. after flashing NOLO)
 --read-board-id, -i           Print out the board type
 --serial-port, -S <arg>       Serial port used for cold flashing
 --initialize-port, -I <arg>   Only initialize the serial port
 --cold-flash, -c              "Cold flash" the device
 --hw-revision, -h <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-root-device <arg>       Set the default root device
 --query-root-device           Query the default root device
 --enable-usb-host-mode        Set the device into USB host mode
 --disable-usb-host-mode       Set the device into USB peripheral mode
 --flash-only <arg>            Flash only certain components

--flash-only flag options

Valid --flash-only options:
nolo, kernel, initfs, rootfs

R&D flags

Possible R&D flags:
 no-omap-wd
 no-retu-wd
 no-lifeguard-reset
 serial-console
 no-usb-timeout

Root device flags

Valid devices are:
 flash
 mmc
 usb

fiasco-flasher

Usage: fiasco-flasher [OPTIONS]
Options:
 --verbose, -v                 Increase verbosity level
 --flash, -f                   Flash supplied images
 --reboot, -R                  Reboot the system after
 --fiasco, -F <arg>            Location of a FIASCO image
 --kernel, -k <arg>            Location of kernel image
 --initfs, -i <arg>            Location of initfs image
 --kill, -K                    Kill processes on mounted initfs before flashing
 --hw-revision, -h <arg>       Set HW revision override
 --no-action, -n               Only simulate flashing
 --flash-only <arg>            Flash only certain components

--flash-only flag options

Valid --flash-only options:
nolo, kernel, initfs, rootfs