summaryrefslogtreecommitdiff
path: root/boot/image-fdt.c
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2023-11-12 08:27:48 -0700
committerTom Rini <[email protected]>2023-12-13 18:39:05 -0500
commitf2cbe6e43e18e9b65190c53cb4b92dd6699cb38b (patch)
treebc83abefd3ad548ccd8bd2620098eca4692e4811 /boot/image-fdt.c
parent83cd8fb13cdda29e4f99a1d7c8c6ba2c7d755c12 (diff)
boot: Move adding initrd earlier in image_setup_libfdt()
This may as well happen before the general event is emitted, so move it. This will allow us to use the livetree for the event part, but the flattree for the earlier part. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'boot/image-fdt.c')
-rw-r--r--boot/image-fdt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 6cdac6a556d..173ddb6e074 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -635,6 +635,10 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob,
goto err;
}
}
+
+ if (fdt_initrd(blob, *initrd_start, *initrd_end))
+ goto err;
+
if (!of_live_active() && CONFIG_IS_ENABLED(EVENT)) {
struct event_ft_fixup fixup;
@@ -664,7 +668,6 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob,
if (lmb)
lmb_reserve(lmb, (ulong)blob, of_size);
- fdt_initrd(blob, *initrd_start, *initrd_end);
if (!ft_verify_fdt(blob))
goto err;