Movial
STEricsson

Riff

From Igloo Community
Jump to: navigation, search

Contents

RIFF - Raw Image File Flasher

riff is small command line tool used to flash snowball boards. Tool support flashing, dumping and erasing the board.

Basic usage of riff:

  1. Power off your device.
  2. Start riff (see below)
  3. Riff will now be waiting for a new device.
  4. Connect your board using the OTG USB port(next to power supply port) to your PC.
  5. Riff will detect the board and start the execution.
  6. When execution is finalized riff will exit.


Build

Sources for riff components are available from the gitweb and for the configpack you find the package from the download area.

loader_communication

This is the trickiest component to build, as it has external dependencies.

You will need to have Java runtime installed.

You will also need Xalan-Java, an XSLT processsor. On Ubuntu, this can be installed with:

$ sudo apt-get install libxalan2-java

You can also download Xalan-Java from http://www.apache.org/dyn/closer.cgi/xml/xalan-j (version 2.7.1) and unpack it to the lcmodule/tools directory:

$ cd lcmodule/tools
$ unzip xalan-j_2_7_1-bin.zip
$ cd ../../

Now you should be able to build the libraries by running

$ make config XALAN=/usr/share/java/xalan2.jar
$ make

If you installed Xalan-Java by hand, you don't need the XALAN argument.

The libraries will by default be placed at out/out_linux/, from where you can copy them to your desired install location.

riff-configpack-binaries

riff-configpack packages can be downloaded from here.

riff-configpack does not strictly need to be installed, as it's just binaries and a configuration file. You can simply copy the files to the desired location. The default configuration file expects the binaries to be at /usr/share/riff/snowball though, so that needs to be changed if you decide on another install location. Also, the default config search path for riff includes /usr/share/riff/config so a link from snowball/config to there allows you to omit the -c parameter for riff.

riff

riff needs a header from the loader_communication module, but unfortunately it doesn't have an install rule for it so currently the easiest work-around is to simply copy loader_communication/source/LCDriver.h to riff/LCDriver.h. Then simply

$ make
$ make install

will install to /usr/share/riff.

On Ubuntu, the libloadercomm-dev package contains the required header as expected, so if you install that there is no need to copy the header around.

Install package

Prebuild Ubuntu debian packages are available in the Snowball Tools PPA. Please read the setup instructions there to add the PPA to your system.

After adding the PPA, you can install riff with a package manager or from the command line with:

$ sudo apt-get update
$ sudo apt-get install riff

Configuration

Configuration files are a set of binary files downloaded to ram during flash. The binary files could differ between different versions of the snowball boards.

riff will look for configuration file to use in the following order:

  1. Config file provided on command line (using the -c option) at runtime.
  2. Config file in user's home directory ($HOME/.riff/config)
  3. /usr/share/riff


TIP:

 To change default config file create a symlink to your config file in $HOME/.riff/config

 Example:
 $ ln -s /usr/share/riff/snowball_new_board/config $HOME/.riff/config

Flash image

Flash image using default config

$ sudo riff -f <path_to_image>

Flash image using custom config

$ sudo riff -c <path_to_config_file> -f <path_to_image>

You also have the possibility to specify flash start address with -a option (default=0)

Erase flash

Erase entire flash

$ sudo riff -m erase

Dump flash

Dump content of eMMC to host.

$ sudo riff -m dump -a <start_address> -l <length_of_the_dump_in_hex> -d <path_on_host>

Available commands

Usage: riff [OPTION]...[FILE]...

 Available command line arguments are:

   -h, --help				Display this help message.
   -m, --mode ACTION			Select the mode.
 					ACTION is `flash`, `erase` or `dump`
   -c, --config PATH			Give path to configuration file.
   -f, --flashimage IMAGEPATH		Give path to flashimage.
   -a, --address FLASHADDR		Give a start address in hex.
   -l, --length HEXLENGTH		Length of the dump [Byte] in hex.
   -d, --dumppath DUMPPATH		File path on PC where to store dump.
   -v, --verbose			Shows more detailed information.
       --version			Shows version information.
Personal tools