Commit Graph

4 Commits

Author SHA1 Message Date
Elliot Berman
b2749287ab deviceTree.applyOverlays: Add remaining type annotations
Add remaining type annotations to apply_overlays.py.
2025-07-14 10:50:03 -07:00
Elliot Berman
b09db1f090 deviceTree.applyOverlays: Copy through other files
The source devicetree package can have overlays (dtbo) files. When
applying overlays specified with hardware.deviceTree.overlays, the dtbos
from the source are dropped. Make applyOverlays copy through all non-DTB
files. This matches the behavior when there are no
hardware.deviceTree.overlays described for the system.
2025-07-14 10:50:02 -07:00
dhdhxji
6bc2048474 deviceTree: Allow applying dtoverlays for DT with no compatible string
In some cases vendor provided .dts's do not have a `compatible` string set
[example](https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/hat_map.dts).

Trying to patch them with `apply_overlays.py` results in an exception (and
therefore build error) even when the filter didn't match this .dtb.

These changes allow patching .dtbs with no `compatible` set, assuming they
are compatible with the overlay.
2024-10-26 17:58:43 +03:00
K900
5567f3ace5 deviceTree.applyOverlays: rewrite in Python/libfdt
Pros:
- code you can actually read
- compatible strings handled properly
- no shelling out to what's essentially test tools

Cons:
- Python
2024-09-15 06:46:01 +03:00