summaryrefslogtreecommitdiff
path: root/boot/pxe_utils.c
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2022-07-28 11:19:15 +0100
committerSimon Glass <sjg@chromium.org>2022-08-10 13:42:56 -0600
commitbe43a35bff17550fa707795a06eaed6114eb1742 (patch)
tree8ebd680644e7351e8bca6c78618109926aef3533 /boot/pxe_utils.c
parent5d1637a40cd1c30f62ebee6e1e1611d5f5613003 (diff)
downloadu-boot-be43a35bff17550fa707795a06eaed6114eb1742.tar.gz
u-boot-be43a35bff17550fa707795a06eaed6114eb1742.tar.bz2
u-boot-be43a35bff17550fa707795a06eaed6114eb1742.zip
boot: allow bootmeth-distro without CONFIG_NET
Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/pxe_utils.c')
-rw-r--r--boot/pxe_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index defbe465e4..a364fa8bb5 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -736,7 +736,8 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
kernel_addr_r = genimg_get_kernel_addr(kernel_addr);
buf = map_sysmem(kernel_addr_r, 0);
/* Try bootm for legacy and FIT format image */
- if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID)
+ if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID &&
+ IS_ENABLED(CONFIG_CMD_BOOTM))
do_bootm(ctx->cmdtp, 0, bootm_argc, bootm_argv);
/* Try booting an AArch64 Linux kernel image */
else if (IS_ENABLED(CONFIG_CMD_BOOTI))