Move this check before the FDT fixups so that we can use a livetree after this point.
Signed-off-by: Simon Glass <s...@chromium.org> --- boot/image-fdt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/boot/image-fdt.c b/boot/image-fdt.c index 3e889be9f2b6..c2b6c5338385 100644 --- a/boot/image-fdt.c +++ b/boot/image-fdt.c @@ -668,6 +668,10 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, if (fdt_initrd(blob, *initrd_start, *initrd_end)) goto err; + if (!ft_verify_fdt(blob)) + goto err; + + /* after here we are using a livetree */ if (!of_live_active() && CONFIG_IS_ENABLED(EVENT)) { struct event_ft_fixup fixup; @@ -696,9 +700,6 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, if (lmb) lmb_reserve(lmb, map_to_sysmem(blob), of_size); - if (!ft_verify_fdt(blob)) - goto err; - #if defined(CONFIG_ARCH_KEYSTONE) if (IS_ENABLED(CONFIG_OF_BOARD_SETUP)) ft_board_setup_ex(blob, gd->bd); -- 2.42.0.869.gea05f2083d-goog