-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Issue with capturing phandles in a property #58501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @aisri! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
From Discord, this looks like a bug in the DT python tooling. Some nodes appear not to be getting dependency ordinals assigned. Root cause still TBD. |
The ordinals are unassigned, because the nodes in question have circular dependencies. This is a known limitation; see #57708 for more information. What you could do now is delete the |
If that is the only error, then the SCC algorithm should have detected the cycle, though, I think. |
Good point. So, there does appear to be a bug, because cycles can be detected but ignored. What I've observed today is that a cycle in edtlib's dependency graph can be ignored by the SCC algorithm if it contains DT leaf nodes. In that case, none of those leaves are recognized as roots by this function: zephyr/scripts/dts/python-devicetree/src/devicetree/grutils.py Lines 41 to 44 in 518bbc1
By construction, the only nodes which can become roots are DT leaf nodes: zephyr/scripts/dts/python-devicetree/src/devicetree/edtlib.py Lines 2052 to 2055 in 518bbc1
If there is no root connected to the cycle, then it is never traversed by the algorithm, hence it is never reported and its constituent nodes are left with unassigned ordinals. It seems like there needs to be a leaf which is connected to the cycle, but not part of it, in order for it to be caught:
Result:
|
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
NOTE
please use uploaded patch for replicating the issue:
0001-issue-with-capturing-phandles-in-a-parent-s-property.patch
Describe the bug
build fails when capturing phandles of nodes.
in the below device node definition, capturing phandles of d1, d2 and d3 in
devs
failsPlatform independent fails in c-preprocessing expansion
To Reproduce
Apply the patch above
and run the following command:
Expected behavior
Build succeeds
Impact
Found a workaround.
Logs and console output
error:
Environment (please complete the following information):
commit b97a4a52a8e957dc41b7a7c2bf67a877b35f96b3 (origin/main, origin/HEAD)
0001-issue-with-capturing-phandles-in-a-parent-s-property.patch
The text was updated successfully, but these errors were encountered: