The input file is organised into four high-level elements:
*`manifest-version` (a positive integer), the version of the manifest specification
*`manifest-sequence-number` (a positive integer), the anti-rollback counter of the manifest
*`components`, a list of components that are described by the manifest
Each component is a JSON map that may contain the following elements. Some elements are required for the target to be able to install the component.
Required elements:
*`install-id` (a Component ID), the identifier of the location to install the described component.
*`install-digest` (a SUIT Digest), the digest of the component after installation.
*`install-size` (a positive integer), the size of the component after installation.
*`vendor-id` (a RFC 4122 UUID), the UUID for the component vendor. This must match the UUID that the manifest processor expects for the specified `install-id`. The suit-tool expects at least one component to have a `vendor-id`
*`class-id` (a RFC 4122 UUID), the UUID for the component. This must match the UUID that the manifest processor expects for the specified `install-id`. The `suit-tool` expects at least one component with a `vendor-id` to also have a `class-id`
*`file` (a string), the path to a payload file. The `install-digest` and `install-size` will be calculated from this file.
Some elements are not required by the tool, but are necessary in order to accomplish one or more use-cases.
Optional elements:
*`bootable` (a boolean, default: `false`), when set to true, the `suit-tool` will generate commands to execute the component, either from `install-id` or from `load-id` (see below)
*`uri` (a text string), the location at which to find the payload. This element is required in order to generate the `payload-fetch` and `install` sections.
*`loadable` (a boolean, default: `false`), when set to true, the `suit-tool` loads this component in the `load` section.
*`compression-info` (a choice of string values), indicates how a payload is compressed. When specified, payload is decompressed before installation. The `install-size` must match the decompressed size of the payload and the install-digest must match the decompressed payload. N.B. The suit-tool does not perform compression. Supported values are:
*`gzip`
*`bzip2`
*`deflate`
*`lz4`
*`lzma`
*`download-digest` (a SUIT Digest), a digest of the component after download. Only required if `compression-info` is present and `decompress-on-load` is `false`.
*`decompress-on-load` (a boolean, default: `false`), when set to true, payload is not decompressed during installation. Instead, the payload is decompressed during loading. This element has no effect if `loadable` is `false`.
*`load-digest` (a SUIT Digest), a digest of the component after loading. Only required if `decompress-on-load` is `true`.
*`install-on-download` (boolean, default: true), If true, payload is written to `install-id` during download, otherwise, payload is written to `download-id`.
*`download-id` (a component id), the location where a downloaded payload should be stored before installation--only used when `install-on-download` is `false`.
## Component ID
The `suit-tool` expects component IDs to be a JSON list of strings. The `suit-tool` converts the strings to bytes by:
1. Attempting to convert from hex
2. Attempting to convert from base64
3. Encoding the string to UTF-8
For example,
*`["00"]` will encode to `814100` (`[h'00']`)
*`["0"]` will encode to `814130` (`[h'30']`)
*`["MTIzNA=="]` will encode to `814431323334` (`[h'31323334']`)
*`["example"]` will encode to `81476578616D706C65` (`[h'6578616d706c65']`)
N.B. Be careful that certain strings can appear to be hex or base64 and will be treated as such. Any characters outside the set `[0-9a-fA-F]` ensure that the string is not treated as hex. Any characters outside the set `[0-9A-Za-z+/]` or a number of characters not divisible by 4 will ensure that the string is not treated as base64.
## SUIT Digest
The format of a digest is a JSON map:
```JSON
{
"algorithm-id" : "sha256",
"digest-bytes" : "base64-or-hex"
}
```
The `algorithm-id` must be one of:
*`sha224`
*`sha256`
*`sha384`
*`sha512`
The `digest-bytes` is a string of either hex- or base64-encoded bytes. The same decoding rules as those in Component ID are applied.