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
This provides rough step-by-step instructions on developing
an overlay and using the imager. It also provides some basic
information about different file types and their purpose.
Signed-off-by: Nicklas Frahm <nicklas.frahm@gmail.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
Copy file name to clipboardExpand all lines: website/content/v1.8/advanced/overlays.md
+68Lines changed: 68 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -43,3 +43,71 @@ An Overlay is a container image with the [specific folder structure](https://git
43
43
Overlays can be built and managed using any tool that produces container images, e.g. `docker build`.
44
44
45
45
Sidero Labs maintains a [repository of overlays](https://github.com/siderolabs/overlays).
46
+
47
+
### Developing An Overlay
48
+
49
+
Let's assume that you would like to contribute an overlay for a specific board, e.g. by contributing to the [`sbc-rockchip` repository](https://github.com/siderolabs/sbc-rockchip).
50
+
Clone the repositry and insepct the existing overlays to understand the structure.
51
+
52
+
Usually an overlay consist of a few key components:
53
+
54
+
- `firmware`: contains the firmware files required for the board
55
+
- `bootloader`: contains the bootloader, e.g. `u-boot` for the board
56
+
- `dtb`: contains the device tree blobs for the board
57
+
- `installer`: contains the installer that will be used to install this overlay on the node
58
+
- `profile`: contains information
59
+
60
+
1. For the new overlay, create any needed folders and `pkg.yaml` files.
61
+
2. If your board introduces a new chipset that is not supported yet, make sure to add the firmware build for it.
62
+
3. Add the necessary `u-boot` and `dtb` build steps to the `pkg.yaml` files.
63
+
4. Proceed to add an installer, which is a small go binary that will be used to install the overlay on the node.
64
+
Here you need to add the go `src/` as well as the `pkg.yaml` file.
65
+
5. Lastly, add the profile information in the `profiles` folder.
66
+
67
+
You are now ready to attempt building the overlay.
68
+
It's recommend to push the build to a container registry to test the overlay with the Talos installer.
69
+
70
+
The default settings are:
71
+
72
+
- `REGISTRY`is set to `ghcr.io`
73
+
- `USERNAME`is set to the `siderolabs` (or value of environment variable `USERNAME` if it is set)
74
+
75
+
```bash
76
+
make sbc-rockchip PUSH=true
77
+
```
78
+
79
+
If using a custom registry, the `REGISTRY` and `USERNAME` variables can be set:
80
+
81
+
```bash
82
+
make sbc-rockchip PUSH=true REGISTRY=<registry> USERNAME=<username>
83
+
```
84
+
85
+
After building the overlay, take note of the pushed image tag, e.g. `664638a`, because you will need it for the next step.
86
+
You can now build a flashable image using the command below.
`--overlay-option`can be used to pass additional options to the overlay installer if they are implemented by the overlay.
104
+
An example can be seen in the [sbc-raspberrypi](https://github.com/siderolabs/sbc-raspberrypi/) overlay repository.
105
+
It supports passing multiple options by repeating the flag or can be read from a yaml document by passing `--overlay-option=@<path to file>`.
106
+
107
+
> **Note:** In some cases you need to build a custom imager.
108
+
> In this case, refer to [this guide on how to build a custom images]({{< relref "./building-images" >}}) using an imager.
109
+
110
+
#### Troubleshooting
111
+
112
+
> **IMPORTANT:** If this does not succeed, have a look at the documentation of the external dependecies you are pulling in and make sure that the `pkg.yaml` files are correctly configured.
113
+
> In some cases it may be required to update the dependencies to an appropriate version via the `Pkgfile`.
0 commit comments