Additional device tree overlays to support different hardware on Radxa products
Due to the much more frequent development happening on the overlay compared to the kernel in general, we are once again splitting the overlay into a dedicated package.
However, to guarantee the overlay is compatible with the installed kernel, this package will be delivered as a source code package using dkms, instead of a prebuilt binary package.
You can build the dkms package using the below commands:
sudo apt-get update
sudo apt-get build-dep --no-install-recommends -y .
make all debYou will need this patch so this repo can be built with the kernel.
This is how overlays were distributed previously as part of the kernel package. We are still supporting this for older kernels. Newer kernels like Rockchip 6.1 kernel will use the above dkms package instead.
First, make sure you have the running kernel header, gcc, and device-tree-compiler installed.
You can then run the following command to build overlays:
make build-dtbo -j$(nproc)Please be aware this only builds a subset of overlays, and any overlays that depend on vendor headers will fail, as this command will use the current system's kernel header.
Please take a look at the CI workflow to see how to select installed vendor kernel header.
To delete built overlays, run the following command:
make cleanAs part of our CI pipeline, the built overlays are uploaded at the end. You can find all CI runs here, and the artifact is located inside each run.
Please be aware that artifacts expire over time, and they are not officially tested versions.
We mandate reference style for our overlays. Please visit the DTO Syntax page to learn more.
If your existing overlay uses target-path, then the Android documentation does not show a clear migration path. Below is an example of how to convert them:
/{
fragment@0 {
target-path = "/";
__overlay__ {
some_node: some-node {
some_prop = "okay";
...
};
};
};
}
&{/} {
some_node: some-node {
some_prop = "okay";
...
};
}
Currently, we mandate a custom metadata node in overlays. This data is parsed by rsetup to provide a human-readable description and conflict detection. Below is a sample metadata node with detailed guidelines:
/ {
metadata {
title = "Enable ENC28J60 on SPI2";
category = "misc";
compatible = "unknown";
description = "Enable Microchip ENC28J60 SPI Ethernet controller on SPI2.\nINT=40";
exclusive = "GPIO2_B3", "GPIO2_B2", "GPIO2_B1", "GPIO2_B4", "GPIO4_A7";
package = "dkms-enc28j60";
};
};
titleshould not contain the product name.
rsetupwill only show compatible overlays withcompatiblefield defined. As such, do not confuse users to second guess if an overlay is truly compatible when the product name is not explicitly mentioned.titleshould not end with a period.
categorycurrently can be one of the following:
camera, display, misc
compatibleshould not be an SoC unless it is truly compatible with every product using that SoC.
rsetupwill match the base device tree'scompatiblewith the overlay'scompatible. As long as one value from each match, the overlay is considered compatible. Since most products' device tree contains their SoC incompatible, setting SoC in overlay'scompatiblewill make it compatible with every such product.
Explicit products list should be preferred to generic SoC matching.- If an overlay is broken,
compatibleshould beunknown.
descriptionis a multi-line text to describe the function of the overlay. It can be the same astitlewith an ending period.- Newline in
descriptionshould use\n. - Hardware parameters should be listed at the end to help the user connecting their devices.
exclusiveshould refer to the device tree node and property.- For features that are muxed to a GPIO line,
exclusiveshould be the GPIO ID. - For features that use multiple GPIO lines, they should all be listed under
exclusive. - For complex overlay, list all GPIO lines used. For exaple, some devices may use GPIO for interrupt, which is also used by another overlay.
packagespecify the additional packages to be used with this overlay.- When the overlay is disabled, the specified package will NOT be removed.