Skip to content

Commit 68dd1d9

Browse files
committed
ddi-spec: document which suffix, mime type and sector sizes to use for DDIs
1 parent 8e3ff25 commit 68dd1d9

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

specs/discoverable_disk_image.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,21 @@ into one. They are designed to be composable and stackable, and provide securit
1717
The images use the GPT partition table verbatim, so it will not be redefined here. Each partition contains
1818
a standard Linux filesystem (e.g.: `erofs`), so again this will not be redefined here.
1919
The [DPS](discoverable_partitions_specification.md) defines the GUIDs to use and the format of the
20-
dm-verity signature partition's JSON content.
20+
`dm-verity` signature partition's JSON content.
21+
22+
It is recommended to use a sector size of 512 bytes or 4096 for DDIs. Software operating with DDIs should
23+
automatically derive the sector size used for a DDI by looking for the `EFI PART` magic string at offsets 512
24+
or 4096, as per GPT specification.
25+
26+
## Naming
27+
28+
DDIs should use `.raw` as file suffix. A secondary suffix may be used to clarify the specific usage class of
29+
a DDI. For now the two secondary suffixes `.sysext.raw` and `.confext.raw` are defined (for system extension
30+
DDIs and configuration extension DDIs, see [Extension
31+
Images](https://uapi-group.org/specifications/specs/extension_image) for details).
32+
33+
The MIME type for DDIs is `application/vnd.efi.img`, [as per
34+
IANA](https://www.iana.org/assignments/media-types/application/vnd.efi.img).
2135

2236
## Image Version
2337
If the DDI is versioned, the version format described in the

specs/extension_image.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ to identify them.
3838
Extension Images should be additive, and not override content present in the base image or other DDIs,
3939
but this will not be enforced.
4040

41+
## File Suffix
42+
Since extensions images are DDIs, they should carry the `.raw` suffix. In order to make discerning system
43+
extensions and configuration extensions easy it is recommended to use the `.sysext.raw` suffix for system
44+
extensions, and `.confext.raw` for configuration extensions.
45+
4146
## Identification
4247
An Extension Image must contain a `extension-release.<IMAGE>` file, where `<IMAGE>` must either match the
4348
name of the sysext minus the suffix, or alternatively `extension-release.<IMAGE>` must be tagged with a

0 commit comments

Comments
 (0)