mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-26 15:28:50 +00:00
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>
This commit is contained in:
parent
5d1637a40c
commit
be43a35bff
5 changed files with 13 additions and 7 deletions
|
@ -294,6 +294,12 @@ endif # SPL
|
||||||
|
|
||||||
endif # FIT
|
endif # FIT
|
||||||
|
|
||||||
|
config PXE_UTILS
|
||||||
|
bool
|
||||||
|
select MENU
|
||||||
|
help
|
||||||
|
Utilities for parsing PXE file formats.
|
||||||
|
|
||||||
config BOOTSTD
|
config BOOTSTD
|
||||||
bool "Standard boot support"
|
bool "Standard boot support"
|
||||||
default y
|
default y
|
||||||
|
@ -345,7 +351,7 @@ config BOOTSTD_BOOTCOMMAND
|
||||||
|
|
||||||
config BOOTMETH_DISTRO
|
config BOOTMETH_DISTRO
|
||||||
bool "Bootdev support for distro boot"
|
bool "Bootdev support for distro boot"
|
||||||
depends on CMD_PXE
|
select PXE_UTILS
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
Enables support for distro boot using bootdevs. This makes the
|
Enables support for distro boot using bootdevs. This makes the
|
||||||
|
|
|
@ -10,8 +10,7 @@ obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o
|
||||||
obj-$(CONFIG_CMD_BOOTZ) += bootm.o bootm_os.o
|
obj-$(CONFIG_CMD_BOOTZ) += bootm.o bootm_os.o
|
||||||
obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o
|
obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o
|
||||||
|
|
||||||
obj-$(CONFIG_CMD_PXE) += pxe_utils.o
|
obj-$(CONFIG_PXE_UTILS) += pxe_utils.o
|
||||||
obj-$(CONFIG_CMD_SYSBOOT) += pxe_utils.o
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -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);
|
kernel_addr_r = genimg_get_kernel_addr(kernel_addr);
|
||||||
buf = map_sysmem(kernel_addr_r, 0);
|
buf = map_sysmem(kernel_addr_r, 0);
|
||||||
/* Try bootm for legacy and FIT format image */
|
/* 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);
|
do_bootm(ctx->cmdtp, 0, bootm_argc, bootm_argv);
|
||||||
/* Try booting an AArch64 Linux kernel image */
|
/* Try booting an AArch64 Linux kernel image */
|
||||||
else if (IS_ENABLED(CONFIG_CMD_BOOTI))
|
else if (IS_ENABLED(CONFIG_CMD_BOOTI))
|
||||||
|
|
|
@ -1825,7 +1825,7 @@ config CMD_ETHSW
|
||||||
|
|
||||||
config CMD_PXE
|
config CMD_PXE
|
||||||
bool "pxe"
|
bool "pxe"
|
||||||
select MENU
|
select PXE_UTILS
|
||||||
help
|
help
|
||||||
Boot image via network using PXE protocol
|
Boot image via network using PXE protocol
|
||||||
|
|
||||||
|
@ -2007,7 +2007,7 @@ config CMD_SOUND
|
||||||
|
|
||||||
config CMD_SYSBOOT
|
config CMD_SYSBOOT
|
||||||
bool "sysboot"
|
bool "sysboot"
|
||||||
select MENU
|
select PXE_UTILS
|
||||||
help
|
help
|
||||||
Boot image via local extlinux.conf file
|
Boot image via local extlinux.conf file
|
||||||
|
|
||||||
|
|
|
@ -148,9 +148,9 @@ int cmd_get_data_size(char *arg, int default_size);
|
||||||
int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc,
|
int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[]);
|
char *const argv[]);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_CMD_BOOTM
|
|
||||||
int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc,
|
int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[]);
|
char *const argv[]);
|
||||||
|
#ifdef CONFIG_CMD_BOOTM
|
||||||
int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd);
|
int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd);
|
||||||
#else
|
#else
|
||||||
static inline int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd)
|
static inline int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd)
|
||||||
|
|
Loading…
Add table
Reference in a new issue