]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fdt: Move ft_verify_fdt() before the final fixups
authorSimon Glass <sjg@chromium.org>
Sun, 12 Nov 2023 15:27:50 +0000 (08:27 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 13 Dec 2023 23:39:05 +0000 (18:39 -0500)
Move this check before the FDT fixups so that we can use a livetree
after this point.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/image-fdt.c

index 3e007d2b898615346cf8fdd1893a8cf6487b9a8e..2b166c0ff94949c9a931e94a69b6fec33e721e4d 100644 (file)
@@ -639,6 +639,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;
 
@@ -667,9 +671,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);