diff options
author | 2025-01-16 14:49:40 +0530 | |
---|---|---|
committer | 2025-09-14 20:56:33 -0400 | |
commit | 5a2289d227124e32202522dfba96f7404fae7973 (patch) | |
tree | fd290a896e0c2e1635cbc49302b521fdf5451e3f /checks.c | |
parent | 8ff23c051120560bb717fbcea38235b4512035c8 (diff) |
libfdt: overlay_merge: Fix incorrect reference to nodes
local_fixups node could have incorrect references to nodes
when merging two overlay blobs. Consider this example:
ol1.dtbo:
/fragment@0 {
__overlay__ {
soc: soc {
}
tlmm: tlmm {
}
}
}
ol2.dtbo:
/fragment@0 {
target = "&soc";
__overlay__ {
abc: abc {
prop1 = <&tlmm>;
}
}
}
/fragment@1 {
target = "&soc";
__overlay__ {
def: def {
prop0 = <&abc>;
}
}
}
__fixups__ {
tlmm = "/fragment@0/__overlay__/abc:prop1:0";
}
__local_fixups__ {
fragment@1 {
__overlay__ {
def {
prop0 = <0x0>;
}
}
}
}
Merging ol2.dtbo with ol1.dtbo currently results in:
__local_fixups__ {
fragment@1 {
__overlay__ {
abc {
prop1 = <0x0>; // WRONG1
}
}
}
fragment@2 {
__overlay__ {
def {
prop0 = <0x0>; // WRONG2
}
}
}
}
WRONG1: prop1 should be listed under
/__local_fixups__/fragment@0/__overlay__/soc/abc
WRONG2: prop0 should be listed under
/__local_fixups__/fragment@0/__overlay__/soc/def
Change-Id: If7aae9b285d0e6f78bb8ad4e9fbade2fc1e503be
Signed-off-by: Srivatsa Vaddagiri <quic_svaddagi@quicinc.com>
Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
Diffstat (limited to 'checks.c')
0 files changed, 0 insertions, 0 deletions