Skip to main content

Memfault Build Id injector

Project description

Memfault Build ID Tool

This package contains the mflt_build_id CLI tool.

The purpose of the tool is simplify reading or writing Build IDs in a firmware image irrespective of the compiler or build system being used in a project.

Example Usage

$ mflt_build_id --help
usage: mflt_build_id [-h] [--dump [DUMP]] [--crc CRC] [--sha1 SHA1] elf

Inspects provided ELF for a Build ID and when missing adds one if possible.

If a pre-existing Build ID is found (either a GNU Build ID or a Memfault Build ID),
no action is taken.

If no Build ID is found, this script will generate a unique ID by computing a SHA1 over the
contents that will be in the final binary. Once computed, the build ID will be "patched" into a
read-only struct defined in memfault-firmware-sdk/components/core/src/memfault_build_id.c to hold
the info.

If the --crc <symbol_holding_crc32> argument is used, instead of populating the Memfault Build ID
structure, the symbol specified will be updated with a CRC32 computed over the contents that will
be in the final binary.

If the --sha1 <symbol_holding_sha> argument is used, instead of populating the Memfault Build ID
structure, the symbol specified will be updated directly with Memfault SHA1 using the same strategy
discussed above. The only expectation in this mode is that a global symbol has been defined as follow:

const uint8_t g_your_symbol_build_id[20] = { 0x1, };

For further reading about Build Ids in general see:
  https://mflt.io//symbol-file-build-ids

positional arguments:
  elf

options:
  -h, --help     show this help message and exit
  --dump [DUMP]
  --crc CRC
  --sha1 SHA1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mflt_build_id-1.0.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mflt_build_id-1.0.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file mflt_build_id-1.0.1.tar.gz.

File metadata

  • Download URL: mflt_build_id-1.0.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.8 Linux/6.5.0-15-generic

File hashes

Hashes for mflt_build_id-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ef4c431506abb37857bad929c3843bd0c51f4b3a86ddc4b733d8a467dbbdb1ca
MD5 0713feb1d6e1865386d77b1329b0ba3a
BLAKE2b-256 51f006889795c3a8a5e5920c3330c11ad0721b5bc779dfda35d3ea038a8ea218

See more details on using hashes here.

File details

Details for the file mflt_build_id-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: mflt_build_id-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.8 Linux/6.5.0-15-generic

File hashes

Hashes for mflt_build_id-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 047d7690ea6f676007bf4016decf9ba5a6790a9a276891e4d55f625ca27a1965
MD5 deb8d34eded3b2027276e789ec9a71cf
BLAKE2b-256 3477d0eb94b149a2f14629c38952d38d765ba75388519dd946aa1c7f13303b3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page