Binman firmware packager
Binman packages firmware. Building firmware should be separate from packaging it: build all the pieces you need, using whatever projects and build systems they require, then use binman to stitch everything together into an image. It:
reads an image description from a devicetree and works out what to place where, with padding, alignment, compression and hashing;
supports hierarchical images and a large set of entry types, including FIT, coreboot’s CBFS and flash maps, the ARM Trusted Firmware FIP and many SoC-specific formats;
lets firmware find other binaries in the image, using linker symbols or the devicetree description of the image;
inspects existing images, extracting and replacing their contents and repacking where needed;
copes with missing binary blobs and fetches the external tools it needs;
fetches firmware blobs such as TF-A, building them from source where it can, and keeps them in a cache.
Binman started as part of U-Boot and still builds U-Boot’s images, but it is not tied to U-Boot. It can build coreboot images from a coreboot flash-map descriptor, and can package the firmware for TF-A, OP-TEE, Zephyr or any other project.
Installation
Install the latest release from PyPI:
pip install binary-manager
The pylibfdt dependency is built from source, so this needs swig, a C compiler and the Python development headers (on Debian and Ubuntu: apt install swig build-essential python3-dev).
The binman command is then on your path.
Quick start
Build the images described in a devicetree, taking the input files from the current directory:
binman build -d image.dts -I .
When run in a U-Boot build directory, or with one as an input directory, binman treats the devicetree as U-Boot’s own, updating it with the image layout. To package U-Boot’s binaries which have been copied elsewhere, select the u-boot project:
binman --project u-boot build -u -d u-boot.dtb -I .
List the contents of an existing image:
binman ls -i image.bin
Binman runs external tools for some entry types. To install any which are missing:
binman tool -f missing
Fetch a firmware blob, here TF-A’s BL31 for an Allwinner A64 board, building it from source:
binman blob -f arm,trusted-firmware-a --version 2.12 --arch aarch64 \
--plat sun50i_a64
See binman -H for the complete manual, or the documentation linked below.
Documentation
Full documentation is hosted on Read the Docs:
There is a short introduction, with a demo, at https://deinde.dev/binman/
Development
Run the test suite from a checkout:
pip install -r requirements.txt pip install -e .[test] binman tool -f missing binman test
The tests build some small x86 ELF programs, so they need make and a gcc which can produce 32-bit x86 code (gcc-multilib), or set CROSS_COMPILE to a suitable cross-compiler. They also need a recent mkimage from U-Boot, since the expected output tracks its development; pass --toolpath to point binman at a U-Boot tools/ build directory. binman test -T checks that the tests cover all of the code.
The dtoc and u_boot_pylib libraries are installed from PyPI, as the dtoc and u-boot-pylib packages, so no surrounding U-Boot source is required.
Metadata
Release files for binary-manager 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| binary_manager-0.2.1.tar.gz | 406.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| binary_manager-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.0 MB
Release files / binary_manager-0.2.1.tar.gz
| Download URL | binary_manager-0.2.1.tar.gz |
|---|---|
| Size | 406.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a93986bc2442aa60e01f9ae301530a9305bd5efd2f302c5f1cce7ef74055a26
|
|
BLAKE2b-256 checksum How to use checksums |
14b264e0f0afbf577f746aec88f85b5fbc7dbdda58dbd3eaab725d1dd5913fe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / binary_manager-0.2.1-py3-none-any.whl
| Download URL | binary_manager-0.2.1-py3-none-any.whl |
|---|---|
| Size | 635.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce7b0873c4593319ad355922c6b4601abe7214b8fdf6670aa03ffaf4c28851fd
|
|
BLAKE2b-256 checksum How to use checksums |
c87d540ab6995967ae28227d89725fa5298ae523ce2318b23e1a974cb77e62bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for binary-manager 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for binary_manager-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.