You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ff9f795
Browse filesBrowse the repository at this point in the historyBrowse files
Add an explicit source: key as an alternative to the comment after the
name: key as a way to specify the path to the source file. Like a
comment, the source: key is dropped from the manifest/contents. If both
forms are present, the source: key takes precedence.
As before, paths are resolved relative to the current directory, but
this can be overridden with -C <dir> (--directory), as with tar.
See: #223
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Copy file name to clipboardExpand all lines: otamaker/README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,10 +61,12 @@ artefact:
61
61
payloads:
62
62
- name: preinstall
63
63
type: script
64
-
- name: boot # boot.sparse
64
+
- name: boot
65
65
type: image-sparse
66
-
- name: system # system.sparse
66
+
source: boot.sparse
67
+
- name: system
67
68
type: image-sparse
69
+
source: system.sparse
68
70
- name: installdata.tgz
69
71
type: tmpfile
70
72
- name: installer
@@ -87,7 +89,7 @@ The following payload types are recognised:
87
89
*`script` - a program to execute on the remote device. As the name suggests, this is expected to be a script of some description, but it doesn't have to be.
88
90
*`tmpfile` - some other file to be copied to the device for the duration of the update. These are intended to be used by scripts, which they must appear before in the list of payloads in order to be accessible.
89
91
90
-
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.
92
+
Each payload is read from the file named by its `source` field, or from the file with the same name as the payload if there is no `source`. Paths are relative to the current directory, unless `-C <dir>` (`--directory`) gives another, as for `tar`. `source` is a build-time field: otamaker removes it from the copy of the contents in the archive. An older form, a comment immediately after (and on the same line as) the `name` field, is still accepted as the path when there is no `source`; such comments are also removed.
91
93
92
94
**Scripts**
93
95
@@ -167,12 +169,14 @@ artefact:
167
169
device_type: rpi
168
170
169
171
payloads:
170
-
- name: boot # work/image-myapp-1.0.3/boot.sparse
172
+
- name: boot
171
173
type: image-sparse
172
-
- name: system # work/image-myapp-1.0.3/system.sparse
174
+
source: work/image-myapp-1.0.3/boot.sparse
175
+
- name: system
173
176
type: image-sparse
177
+
source: work/image-myapp-1.0.3/system.sparse
174
178
```
175
-
This artefact YAML file is designed to be used from root of the rpi-image-gen repository - you could also drop the paths, keeping `boot.sparse` and `system.sparse`, and run `otamaker` from within the `work/image-myapp-1.0.3` directory (or your equivalent). Here's the output it generated:
179
+
This artefact YAML file is designed to be used from root of the rpi-image-gen repository - you could also drop the paths, keeping `boot.sparse` and `system.sparse`, and either run `otamaker` from within the `work/image-myapp-1.0.3` directory (or your equivalent) or point it there with `-C`. Here's the output it generated:
0 commit comments