Skip to content

Commit 8184c05

Browse files
committed
otamaker: Document the pre_checksum property
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
1 parent ebc4a56 commit 8184c05

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎otamaker/README.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ artefact:
5959
device_type: rpi5
6060
6161
payloads:
62+
- name: preinstall
63+
type: script
64+
pre_checksum: yes
6265
- name: boot # boot.sparse
6366
type: image-sparse
6467
- name: system # system.sparse
@@ -69,7 +72,7 @@ artefact:
6972
type: script
7073
```
7174

72-
Any fields and payload types which aren't recognised are ignored. However, an error is returned if an update doesn't either write to at least one filesystem or include a script.
75+
Any fields which aren't recognised are ignored. However, an error is returned if an update doesn't either write to at least one filesystem or include a script.
7376

7477
N.B. Although the contents file is structured as a YAML document, only a simple subset of the YAML standard is recognised. It is recommended that you stick to the structure above - anything clever is likely to fail.
7578

@@ -87,6 +90,8 @@ The following payload types are recognised:
8790

8891
Comments immediately after (and on the same line as) the `name` field are interpreted by otamaker as a path to the source file. These comments are removed when the final archive is created.
8992

93+
The `pre_checksum` boolean field controls when the payload is processed: if `yes`, the payload is written or executed as the artefact is being downloaded, and if `no` the processing is deferred until the end of the download when the checksum/hash of the artefact has been verified. Using pre-checksum payloads saves time and temporary storage, important for large image payloads, but they do bypass the integrity check, so are best used for pre-install checks and A/B slot updates where rollback is easy. Note that the default value for `pre_checksum` is `yes` for image payloads, and `no` otherwise.
94+
9095
**Scripts**
9196

9297
It is expected that executable payloads will be written in one of the many scripting languages - Bourne shell, Perl, Python 3, etc. - because they are largely independent of the device architecture, but it could be any program that can be run on the target device. For interpreted languages this requires that the interpreter and any associated library modules are already installed on the target. It is also necessary to use a standard "shebang" (`#!/path/to/...`) header, so the target knows how to run it. Either way, executable payloads are referred to as scripts from now on.

0 commit comments

Comments
 (0)