Public bug reported:

In an attempt to debug a (unrelated!) FDT/kernel issue, I was fdtdump-
ing my device tree. The values in dumped phandle's seemed wrong, and
upon closer inspection, it turned out a bug in util.c, which was fixed
in commit 883238dc508e721db694277c5273a4c3e9a7132f. This bug seems only
to affect fdtdump and not fdtget.

To reproduce / see for yourself:

1) download (for instance) my DTB (attached)
2) fdtdump it, search for "serial@01c28400" (node /soc/serial@01c28400)
3) watch the line saying "clocks = <0x00000002 0x000001a2>;" (or something 
similar)
4) fdtget /tmp/test.dtb /soc/serial@01c28400 clocks
5) see it say "2 63"

To test if 3 or 5 outputs the actual values in the FDT, I verified the
value on my SoC having booted this exact DTB:

 jorik@oxygen:~$  hexdump 
/sys/firmware/devicetree/base/soc/serial@01c28400/clocks
 0000000 0000 0200 0000 3f00
 0000008

Which translates to "2 63".

I've backported 883238dc508e721db694277c5273a4c3e9a7132f to xenial's
device-tree-compiler (see my PPA, jorik-kippendief/dtc, but it contains
a different unrelated patch as well), and it applies without trouble and
fixes this issue.

I would suggest to adopt 883238dc508e721db694277c5273a4c3e9a7132f into
the package, or better, update to 1.4.1.

** Affects: device-tree-compiler (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "Compiled device tree to verify my bug claim"
   https://bugs.launchpad.net/bugs/1617186/+attachment/4728187/+files/test.dtb

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1617186

Title:
  fdtdump outputs wrong values

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/device-tree-compiler/+bug/1617186/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to