Skip to content

embetrix/bmap-writer

Repository files navigation

bmap-writer

CI

bmap-writer is a command-line utility designed to efficiently write disk images to storage devices using block mapping (BMAP). It serves as a lightweight alternative to the Yocto BMAP tool, specifically for embedded systems. Unlike the Yocto BMAP tool, bmap-writer is C++ based does not require Python and focuses solely on writing an image.

Key Features

  • Provides a lightweight alternative specifically for embedded systems.
  • Does not require Python, making it easier to integrate into various environments.
  • Handles all compression filters that are supported by libarchive, decompressing the data on-the-fly during the writing process.
  • Ensures data integrity by verifying checksums for each block.
  • Writes only the necessary blocks, reducing the overall write time and wear on storage devices.

How It Works

  1. Create a BMAP file for your disk image using bmaptool.
  2. Use bmap-writer to write the image to your target device, specifying the BMAP file for efficient block mapping.

Requirements

  • C++ compiler
  • CMake
  • Libarchive
  • Libxml2

Build and Installation

Install Dependencies

Ubuntu

sudo apt-get update
sudo apt-get install -y libarchive-dev libxml2-dev

Build

cmake .
make

Test

ctest -V

Install

sudo make install

Usage

bmap-writer [-n] <image-file> [bmap-file] <target-device>
  • -n: Skip checksum verification
  • bmap-file: Optional. If not provided, it will be searched in the same path as the input image-file.

Yocto Integration

bmap-writer is already available in meta-openembedded.

License

This project is licensed under the terms of the GNU General Public License v3 (GPLv3). You are free to use, modify, and distribute this software under the conditions outlined in the GPLv3 license.

For more information about the GPLv3 license, refer to the LICENSE file in this repository or visit GNU's official page.

Commercial License

For organizations or individuals requiring the use of bmap-writer in proprietary applications or with different licensing terms, a commercial license is available.

The commercial license provides:

  • Freedom from the obligations imposed by the GPLv3 license.
  • Priority access to updates, integration help, and extended documentation.
  • Tailored development and deployment solutions.

To obtain a commercial license or inquire further, please contact: info@embetrix.com

Contributor License Agreement (CLA)

By submitting a pull request to this repository, you agree to the following terms:

  1. You certify that your contribution is your original work or that you have the necessary rights to submit it.
  2. You grant the project maintainers a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license to:
    • Use, modify, sublicense, and distribute your contribution under the terms of the GPLv3.
    • Use, modify, sublicense, and distribute your contribution under alternative licenses, including commercial licenses.
  3. You understand that you retain the copyright to your contribution but agree it may be relicensed under these terms.