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
Release history Release notifications | RSS feed
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.2.tar.gz
(7.2 kB
view details)
Built Distribution
File details
Details for the file mflt_build_id-1.0.2.tar.gz
.
File metadata
- Download URL: mflt_build_id-1.0.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.13 Linux/6.5.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec70e09f0312392aa3b7e1709439dd88acf46290b3abc370a231a6b6524c4f1a |
|
MD5 | df440272e9f74c0f2bf676d3f77a5a0f |
|
BLAKE2b-256 | 7e42d0dac3ca5008afc88f486dabdbf9581789138a0b05bce84a7e23b8d124ee |
File details
Details for the file mflt_build_id-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: mflt_build_id-1.0.2-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.13 Linux/6.5.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02f5c15a9e75a1d7e3b7099f001852153ad28924116058b2419553ace5c7edf1 |
|
MD5 | 00a9d910fb58da321528f85ad4a7993e |
|
BLAKE2b-256 | 30c9571c93d77c6a9ed739c788dbb0c582e6ee8632073ddf87d6bb0c35fb3c3d |