libufdt_verify: fix bug when comparing phandles node
***
Ensure compatibility with 'overlay' nodes when comparing phandles.
***
We encountered the following issue while executing VTS tests:
ERROR: ufdt_verify_fragment():failed to verify fragment node fragment@117 to target node_a
The issue occurs during the inspection of the following node:
dtbo:
__overlay__ {
node_b {
phandle = <0x19e>; // This should translate to: __overlay__
reg = <0x2 0x8170220>;
};
};
final_dt:
node_a {
......
node_b {
phandle = <0x7ed>; // This should translate to: node_a
reg = <0x2 0x8170220>;
};
};
In fact, "overlay" is actually node_a.
Bug: 374023061
Test: run vts -m FirmwareDtboVerification
Test: mmma system/libufdt
Test: system/libufdt/tests/run_tests.sh
Change-Id: I9fb1bbd486b5371a05fc1be4e64088c4c64c1b3e
Merged-In: I9fb1bbd486b5371a05fc1be4e64088c4c64c1b3e
Signed-off-by: wangxinpeng <[email protected]>
(cherry picked from commit f54f9e4bb4bed8c9c77a41e232121661651a2a67)
1 file changed