|
| 1 | +--- |
| 2 | +orphan: true |
| 3 | +--- |
| 4 | + |
| 5 | +# Silabs OTA image tool |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +This tool can generate an OTA image in the `|OTA standard header|TLV1|...|TLVn|` |
| 10 | +format. The payload contains data in standard TLV format (not Matter TLV |
| 11 | +format). During OTA transfer, these TLV can span across multiple BDX blocks, |
| 12 | +thus the `OTAImageProcessorImpl` instance should take this into account. |
| 13 | + |
| 14 | +## Supported platforms |
| 15 | + |
| 16 | +- EFR32 - |
| 17 | + |
| 18 | +## Usage |
| 19 | + |
| 20 | +This is a wrapper over standard `ota_image_tool.py`, so the options for `create` |
| 21 | +are also available here: |
| 22 | + |
| 23 | +``` |
| 24 | +python3 ./scripts/tools/silabs/ota/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 50000 -vs "1.0" -da sha256 |
| 25 | +``` |
| 26 | + |
| 27 | +followed by \*_custom options_- and a positional argument (should be last) that |
| 28 | +specifies the output file. Please see the `create_ota_images.sh` for some |
| 29 | +reference commands. |
| 30 | + |
| 31 | +The list of **custom options**: |
| 32 | + |
| 33 | +``` |
| 34 | +# Application options |
| 35 | +--app-input-file --> Path to the application binary. |
| 36 | +--app-version --> Application version. It's part of the descriptor and |
| 37 | + can be different than the OTA image header version: -vn. |
| 38 | +--app-version-str --> Application version string. Same as above. |
| 39 | +--app-build-date --> Application build date. Same as above. |
| 40 | +
|
| 41 | +# SSBL options |
| 42 | +--bl-input-file --> Path to the SSBL binary. |
| 43 | +--bl-version --> SSBL version. |
| 44 | +--bl-version-str --> SSBL version string. |
| 45 | +--bl-build-date --> SSBL build date. |
| 46 | +
|
| 47 | +# Factory data options |
| 48 | +--factory-data --> If set, enables the generation of factory data. |
| 49 | +--cert_declaration --> Certification Declaration. |
| 50 | +--dac_cert --> DAC certificate. |
| 51 | +--dac_key --> DAC private key. |
| 52 | +--pai_cert --> PAI certificate. |
| 53 | +
|
| 54 | +# Custom TLV options |
| 55 | +--json --> Path to a JSON file following ota_payload.schema |
| 56 | +``` |
| 57 | + |
| 58 | +Please note that the options above are separated into four categories: |
| 59 | +application, bootloader, factory data and custom TLV (`--json` option). If no |
| 60 | +descriptor options are specified for app/SSBL, the script will use the default |
| 61 | +values (`50000`, `"50000-default"`, `"2023-01-01"`). The descriptor feature is |
| 62 | +optional, TLV processors having the option to register a callback for descriptor |
| 63 | +processing. |
| 64 | + |
| 65 | +## Custom payload |
| 66 | + |
| 67 | +When defining a custom processor, a user is able to also specify the custom |
| 68 | +format of the TLV by creating a JSON file based on the `ota_payload.schema`. The |
| 69 | +tool offers support for describing multiple TLV in the same JSON file. Please |
| 70 | +see the `examples/ota_max_entries_example.json` for a multi-app + SSBL example. |
| 71 | +Option `--json` must be used to specify the path to the JSON file. |
| 72 | + |
| 73 | +## Examples |
| 74 | + |
| 75 | +A set of examples can be found in `./examples`. Please run `create_ota_image.sh` |
| 76 | +to generate the examples: |
| 77 | + |
| 78 | +- Application image with default descriptor |
| 79 | +- Application image with specified descriptor |
| 80 | +- Factory data image |
| 81 | +- SSBL image |
| 82 | +- Application + SSBL + factory data image |
| 83 | +- Maximum number of entries image, using `ota_max_entries_example.json`. The |
| 84 | + examples uses 8 SSBL binaries because they have a small size and fit in |
| 85 | + external flash. |
| 86 | + |
| 87 | +The binaries from `./examples/binaries` should only be used only as an example. |
| 88 | +The user should provide their own binaries when generating the OTA image. |
0 commit comments