The log messages you're seeing relate to Device Tree overlay handling on a Linux system, likely during dynamic overlay application.
Let's break down the messages:
[ 13.939587] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /serial@ff4a0000/status
- This warning indicates that an overlay modifies the
status property of the node serial@ff4a0000.
- If the overlay is later removed, some memory allocated for this change will not be freed, resulting in a memory leak.
- Usually this message can be harmless but points out internal resource management issues of overlay application/removal. In practice, overlays aren't often removed dynamically, so this might not be a practical problem.
[ 2374.335667] OF: resolver: no symbols in root of device tree.
[ 2374.335705] OF: resolver: overlay phandle fixup failed: -22
[ 2374.335722] dtbocfg_overlay_item_create: Failed to apply overlay (ret_val=-22)
- The resolver tries to fix up symbols (phandles, references) in the overlay.
- "no symbols in root of device tree" means that there are no fixup symbols defined at the root in the device tree blob (DTB) or overlay.
- The
overlay phandle fixup failed: -22 means a -EINVAL (Invalid argument) error when trying to do phandle fixups.
- Overlay application fails with error code -22.
What causes this?
- Device Tree overlays often contain phandle references or symbols which must match nodes in the base device tree.
- If the base DT or overlay DTS/DTBO is missing required symbols or references, the fixup step fails.
- This can happen if:
- Your overlay references nodes/symbols not present in the base device tree.
- The overlay was compiled with incorrect or missing symbols.
- You're applying overlay to a device tree that doesn't support overlays or has incomplete symbol definitions.
- Overlay is incompatible with the running kernel's overlay infrastructure or DTB format.
How to troubleshoot / fix
-
Check overlay source:
- Inspect the
.dts or .dtsi file used to build the overlay.
- Look for
__symbols__ node or any phandle references. Make sure all phandles are correct and exist in the base DT.
- Verify that the device tree node
/serial@ff4a0000 actually exists in the base DT.
-
Check base device tree:
- Ensure your base DT (the main device tree loaded by the system) contains the nodes/symbols your overlay depends on.
- Use
dtc compiler or dtc -I fs /proc/device-tree to dump the active device tree and inspect.
-
Compile overlay properly:
-
Compatibility:
- Make sure your kernel supports overlay application method you're using.
- Some systems require overlays to be loaded early or specified via bootloader instead of runtime.
-
Test basic overlay:
- Try applying a minimal overlay that just changes simple property to test your overlay load infrastructure.
-
Kernel logs and debug:
- Enable debug logs for OF/overlay subsystem in kernel if possible (
CONFIG_DEBUG_DEVICETREE).
- Observe detailed logs to identify symbol issues.
Summary
Your overlay is failing to be applied because phandle fixups in the overlay don't match symbols in the base device tree. Fix your overlay source and ensure base DT compliance to resolve the -22 error.
If you want, you can provide your overlay source and base DT source or the dtb dump (dtc -I fs /proc/device-tree > base.dts) for more detailed help.