[PATCH 3/5] pxe_utils: Allow the FDT to be missing
Simon Glass
sjg at chromium.org
Fri Dec 20 05:01:18 CET 2024
The devicetree file may not be provided, so avoid a failure in that
case.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
boot/pxe_utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 3a4caa9329a..8bebf4ec925 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -799,7 +799,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
}
unmap_sysmem(buf);
}
- if (ctx->bflow)
+ if (ctx->bflow && conf_fdt)
ctx->bflow->fdt_addr = hextoul(conf_fdt, NULL);
if (IS_ENABLED(CONFIG_BOOTSTD_FULL) && ctx->no_boot) {
@@ -819,7 +819,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
ctx->initrd_addr_str, ctx->initrd_filesize,
ctx->initrd_str);
}
- if (!ctx->kernel_addr || !ctx->conf_fdt ||
+ if (!ctx->kernel_addr || (conf_fdt && !ctx->conf_fdt) ||
(initrd_addr_str && (!ctx->initrd_addr_str ||
!ctx->initrd_filesize || !ctx->initrd_str))) {
printf("malloc fail (saving label)\n");
--
2.34.1
More information about the U-Boot
mailing list