Skip to content

Throw warning in lopper whenever there is a phandle issue#698

Open
harishpamarthi wants to merge 1 commit intodevicetree-org:masterfrom
harishpamarthi:master
Open

Throw warning in lopper whenever there is a phandle issue#698
harishpamarthi wants to merge 1 commit intodevicetree-org:masterfrom
harishpamarthi:master

Conversation

@harishpamarthi
Copy link

Lopper now emits a warning when phandle issues are encountered during DTS compilation. This improves visibility
of phandle-related failures

Lopper now emits a warning when phandle issues are encountered
during DTS compilation. This improves visibility
of phandle-related failures

Signed-off-by: Harish Babu Pamarthi <[email protected]>
@zeddii
Copy link
Collaborator

zeddii commented Feb 26, 2026

unfortunately, we can't do this.

lopper is fundamentally designed to work with may different types of inputs, up to and including partial inputs and pre-compiled dtbs

Some of these inputs warn, and that is acceptable (and not an error), hence why there's a second try with the forced compilation. Also note, that lopper support different device tree front ends, so dtc (and libfdt) doesn't always have to be used.

There's already a -W mechanism in the command line arguments to lopper, it even has an invalid_phandle check for a similar reason. Those checks fire are tree manipulation time, not at the dtc level. So may not be catching whatever it is you are concerned about.

If you send the inputs that are throwing warnings, I can have a look and see if the lopper tree routines could possibly catch it at reading time and throw a warning when enabled.

In addition, a check on dtc's output could still be done, but it need to be conditional on the -W flag enabling the check, and the output from dtc would need to be filtered to the exact cause (as there are many warnings on a lot of different inputs).

@zeddii zeddii closed this Feb 26, 2026
@zeddii zeddii reopened this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants