]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: Move bloblist writing until the image is known
authorSimon Glass <sjg@chromium.org>
Tue, 26 Sep 2023 14:14:36 +0000 (08:14 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2023 18:38:12 +0000 (14:38 -0400)
The bloblist should not be finalised until the image is fully set up.
This allows any final handoff information to be included in the bloblist.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/spl/spl.c

index 9f605b324076ab60de181acf78fa21aecebb2eb8..0cf887fd6262d9afbbd8b02af927aa4a64490e86 100644 (file)
@@ -724,18 +724,6 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
        }
 
        spl_perform_fixups(&spl_image);
-       if (CONFIG_IS_ENABLED(HANDOFF)) {
-               ret = write_spl_handoff();
-               if (ret)
-                       printf(SPL_TPL_PROMPT
-                              "SPL hand-off write failed (err=%d)\n", ret);
-       }
-       if (CONFIG_IS_ENABLED(BLOBLIST)) {
-               ret = bloblist_finish();
-               if (ret)
-                       printf("Warning: Failed to finish bloblist (ret=%d)\n",
-                              ret);
-       }
 
        os = spl_image.os;
        if (os == IH_OS_U_BOOT) {
@@ -782,6 +770,18 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
                                       dev->name, rc);
                }
        }
+       if (CONFIG_IS_ENABLED(HANDOFF)) {
+               ret = write_spl_handoff();
+               if (ret)
+                       printf(SPL_TPL_PROMPT
+                              "SPL hand-off write failed (err=%d)\n", ret);
+       }
+       if (CONFIG_IS_ENABLED(BLOBLIST)) {
+               ret = bloblist_finish();
+               if (ret)
+                       printf("Warning: Failed to finish bloblist (ret=%d)\n",
+                              ret);
+       }
 
        spl_board_prepare_for_boot();
        jump_to_image_no_args(&spl_image);