Skip to content

Writing an image to Removable Media

Overview

We cover how to apply a previously prepared image to a Removable Media such as: SD, MicroSD, USB stick, etc.

Bmap-tools

Bmap-tools is a Python project that is used to flash image files to block devices using the block map, thus speeding up the process when image has lots of empty space. To install the bmap-tools package, you should be able to use the package manager for your linux distro.

For Ubuntu / Debian, you can type:

sudo apt-get install bmap-tools

Alternatively, you can clone the bmap-tools repository from Github. The repository includes a bmaptool symlink in the root that is executable.

git clone https://github.com/01org/bmap-tools

Note

Bmap-tools Requires => Python 2.7

File examples

Next, we will download the proper files for the board. In this example:

  • boundary-eval-image-nitrogen6x_pyro_1.1.wic.gz
  • boundary-eval-image-nitrogen6x_pyro_1.1.wic.bmap

Final image file name can vary, but will follow the format:

<image-name>-<board>_<yocto-release-codename>_<update-version>

Note

You can find a list of pre-built images in the Image Files section.

Write the image to a device

Next, write the image to the storage media. In this example, the local Linux system has assigned the MicroSD card to /dev/sdX. Substitute X with the assigned device.

If you run as a sudo enabled user (default in Ubuntu) use:

sudo bmaptool copy <path-to>/boundary-eval-image-nitrogen6x_pyro_1.1.wic.gz /dev/sdX
or, if you run as root, use:
bmaptool copy <path-to>/boundary-eval-image-nitrogen6x_pyro_1.1.wic.gz /dev/sdX

Note

If you downloaded from git rather than installing the package you'll need to specify the full path to the bmaptool command, for example /home/user/bmap-tools/bmaptool copy <image>.

In case bmaptool cannot be used for some reason, the image can be written as a regular raw image, it will just take more time.

If you run as a sudo enabled user (default in Ubuntu) use:

zcat <path-to>/boundary-eval-image-nitrogen6x_pyro_1.1.wic.gz | sudo tee /dev/sdX >/dev/null
or, if you run as root, use:
zcat <path-to>/boundary-eval-image-nitrogen6x_pyro_1.1.wic.gz >/dev/sdX

Note

You can find what device has been assigned to your local Linux system using the dmesg utility.

Warning

Careful! Take your time and ensure that you're writing the image file to the correct device. If you make a mistake, you could end up writing to the wrong device.