Improve packaging of Device Tree Patches and Overlays
Activity

Tony McKahan January 3, 2022 at 8:44 PM
I think packaging the overlays as plain text in a folder instead of as patches is the straightest possible path. Copy them from the overlay source folder into the kernel tree location and let it compile.

Matthijs Kooijman January 3, 2022 at 11:27 AM
I’d like to voice my support for this. I’m a fairly new Armbian user (but long-time developer) and have recently tried to figure out the devicetrees for a board (to find out which UARTS were enabled and mapped to which pins), but it took quite some effort to figure out where they lived, and once I found them, grepping through patches wasn’t particularly easy either…
So from a user perspective, just having a flat directory with full devicetree files as they are used would be a lot easier. However, I can imagine that the current patch-based structure does have some advantages for devicetrees that are already included in the upstream kernel and require only small changes. Storing a patch file probably makes it easier to upgrade the kernel version and/or port changes between kernel versions.
But maybe this can also be done with some tooling that just generates the patch file from the full file when needed or something like that? Alternatively, I can also imagine that, rather than modifying the devicetree files themselves, using a new devicetree file for a board that includes the original devicetree and makes some changes through that mechanism (similar to how a board file typically includes a file for the processor). I’m not entirely sure if this is actually possible without restructuring the board dts file as a dtsi file, though.
Lane Jennison July 18, 2021 at 3:35 PM
I'm glad to help... i just lack the vision... we can work on a branch..... together

Tony McKahan July 18, 2021 at 3:31 PM
My shell scripting is weak, but since no one else seems to [edited] care [end edit] about this mess I'll make an attempt. Be prepared for blood. 😆
Lane Jennison July 18, 2021 at 3:24 PMEdited
Im not! I take you so seriously that i created this epic 4 months ago
Armbian provides a lot of extra device tree improvements for support. Currently they’re added to the build system via patches, which is very difficult to follow.
We need a new approach that makes our device tree files and overlays more visible within the Armbian-build framework.. as well as make it easier for us to upstream our faces to SoC maintainer kernel trees.
Obviously lots to figure out here.