Skip to content

Commit fe038b5

Browse files
committed
dasharo-binaries-paths-convention.md: Add
Signed-off-by: Filip Gołaś <[email protected]>
1 parent 8427857 commit fe038b5

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Dasharo Binaries Paths Convention
2+
3+
Dasharo firmware binaries are available to download on [dl.3mdeb.com][dl.3mdeb.com]
4+
and [dlui.dasharo.com][dlui.dasharo.com]. These sources are being managed
5+
- manually
6+
- using semi-manual automation
7+
- fully automated CI
8+
9+
The objective of this document is to describe a standard convention of the
10+
directory tree and binary names used in Dasharo sources. It will make it easier
11+
to navigate them and find the releases one is in interested in.
12+
13+
## Directories Convention
14+
15+
The standardised path to a release directory is as follows:
16+
17+
`/<vendor>/<model>/<framework>[_payload]/<version>/`
18+
19+
where:
20+
- `<vendor>` - hardware vendor, like `novacustom`, `protectli`, `hardkernel`,
21+
`pcengines`
22+
- `<model>` - Precise device model, like `v540tu`, `vp6670`, `odroid-h4`,
23+
`apu4`
24+
- `<framework>` - firmware framework, like `coreboot`, `slimbootloader`, `heads`
25+
- `[_payload]` - optional, firmware payload, like `_uefi`, `_heads`, `_seabios`
26+
- `<version>` - Dasharo version, like `v0.9.0`, `v1.7.2-rc1`
27+
28+
Example, path to the v1.0.0 release binaries for Novacustom V540TU laptop:
29+
- `/novacustom/v540tu/coreboot_uefi/1.0.0/`
30+
31+
### Motivation
32+
33+
#### <framework>[_payload]
34+
35+
Historically, the firmware framework and payload were generally not present in
36+
the paths, which looked like `/<platform_family>/<version>/`.
37+
When the support for new frameworks and payloads appeared, new directories
38+
started to appear, like `/<platform_family>/heads/<version>/` or
39+
`/<platform_family>/slimbootloader/<version>/` which made the paths
40+
inconsistent with the older releases.
41+
42+
To fix this inconsistency issue the framework and (optional) payload will
43+
always be there, even if a platform has only support for a single
44+
framework/payload combination to reduce the ambiguity.
45+
46+
It's argueable that a firmware framework without a payload makes little sense
47+
as it won't allow the device to boot. Dasharo Naming Convention allows for
48+
such cases though, so to reduce the risk of needing to come up with hacks like
49+
`none` payload and inconsistent lengths of th path to a binary, the `[_payload]`
50+
field is a part of the same directory name as the `<framework>`.
51+
52+
#### <vendor>/<model>
53+
54+
The idea to separate the `<platform_family>` into the vendor and specific models
55+
has a couple reasons behind it:
56+
1. the number of combinations of vendor, microarchitecture and model family
57+
resulted in too many directories on a single level
58+
1. knowing just a model name it could be not that obvious which family
59+
it is supposed to belong to
60+
1. the firmware binaries for all the models from a family could be, or not be
61+
compatible with the whole family, it could also change with releases and
62+
require changing the directory structure
63+
1. it was not clear how to release the firmware for just one device from a
64+
family
65+
66+
By separating the `vendor` and `model` into independent fields all the issues
67+
above are solved. An additional bonus is that the user searching for the
68+
binaries doesn't need to know technical details like the microarchitecture
69+
of their CPU, just the name of the producer and the model of the device.
70+
71+
[dl.3mdeb.com]: https://dl.3mdeb.com
72+
[dlui.dasharo.com]: https://dlui.dasharo.com
73+
74+
## Binary Names Convention
75+
76+
To reduce the confusion and risk of mixing up binaries and allow for creating
77+
multiple variants of a single binary without inconsistencies, the name of the
78+
binary is also being standardised, and looks like:
79+
80+
`<vendor>_<model>_<framework>[_<payload>]_<version>[_extra].<extension>`
81+
82+
where:
83+
- `<vendor>` - hardware vendor, like `novacustom`, `protectli`, `hardkernel`,
84+
`pcengines`
85+
- `<model>` - Precise device model, like `v540tu`, `vp6670`, `odroid-h4`,
86+
`apu4`
87+
- `<framework>` - firmware framework, like `coreboot`, `slimbootloader`, `heads`
88+
- `[_payload]` - optional, firmware payload, like `_uefi`, `_heads`, `_seabios`
89+
- `<version>` - Dasharo version, like `v0.9.0`, `v1.7.2-rc1`
90+
- `[_extra]` - optional additional info, like `_dev_signed`, `_btg_provisioned`,
91+
`_eom`
92+
- `<extension>` - `rom` for normal binaries, `cap` for UEFI Capsules, `cab` for
93+
FWUPD cabinets etc.
94+
95+
### Motivation
96+
97+
This is especially important for the 3mdeb employees or users which flash their
98+
devices often. Every binary should contain all the information required to
99+
distinguish it from any other binary to reduce the risk of bricking the device
100+
or other mishaps during flashing.

0 commit comments

Comments
 (0)