fdt: Don't overwrite bloblist devicetree

When the devicetree comes from a bloblist, it is currently overwritten
by the appended one, if present. It should be preserved.

Adjust the logic to support this.

Fixes: 70fe238594 ("fdt: Allow the devicetree to come from a bloblist")

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2024-08-07 16:47:22 -06:00
committed by Tom Rini
parent 615d84b6ce
commit 9767c668a5

View File

@@ -1685,6 +1685,7 @@ int fdtdec_setup(void)
gd->fdt_src = FDTSRC_BLOBLIST;
log_debug("Devicetree is in bloblist at %p\n",
gd->fdt_blob);
ret = 0;
} else {
log_debug("No FDT found in bloblist\n");
ret = -ENOENT;