raspberrypi: dtc: Prevent overlays from modifying phandle properties 39/25839/4
authorPaul Barker <pbarker@konsulko.com>
Sat, 19 Dec 2020 18:51:09 +0000 (18:51 +0000)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Mon, 11 Jan 2021 17:43:06 +0000 (17:43 +0000)
commit88210ca58e31ed0a54532f35789110f8e6af7770
treed066189c74679c35d038f00ab20b96234c5f7570
parenta857b0b23a64a8cf209dc35c4773d22ab236162d
raspberrypi: dtc: Prevent overlays from modifying phandle properties

The cma-overlay fragment included in vc4-fkms-v3d-overlay ends up with
a phandle property within the __overlay__ fragment due to the references
to this fragment from the __overrides__ section. So when this overlay
fragment is applied it was modifying the phandle of the target node,
breaking other references to this node in the base dtb and breaking the
resolution of symbols within the fdt.

The failure is seen in the create-combined-dtb recipe but the best place
to fix this is in libfdt itself. When applying an overlay fragment, if
both the target node and the overlay fragment contain phandle properties
we skip modification of the target node phandle. The included patch has
been submitted upstream for review.

Bug-AGL: SPEC-3702

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Change-Id: I0661de41162fa4f8eed8421878049b9027536b41
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/25839
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Reviewed-by: Scott Murray <scott.murray@konsulko.com>
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.6.0.bbappend [new file with mode: 0644]
meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/files/0001-fdtoverlay-Prevent-overlays-from-modifying-phandle-p.patch [new file with mode: 0644]