diff options
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/bootmeth_extlinux.c | 2 | ||||
| -rw-r--r-- | boot/bootmeth_pxe.c | 2 | ||||
| -rw-r--r-- | boot/pxe_utils.c | 14 |
3 files changed, 15 insertions, 3 deletions
diff --git a/boot/bootmeth_extlinux.c b/boot/bootmeth_extlinux.c index fbb05ef928e..26c61a65e24 100644 --- a/boot/bootmeth_extlinux.c +++ b/boot/bootmeth_extlinux.c @@ -149,7 +149,7 @@ static int extlinux_boot(struct udevice *dev, struct bootflow *bflow) info.dev = dev; info.bflow = bflow; ret = pxe_setup_ctx(&ctx, &cmdtp, extlinux_getfile, &info, true, - bflow->fname, false); + bflow->fname, false, false); if (ret) return log_msg_ret("ctx", -EINVAL); diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c index 03d2589c264..05c6bece2c1 100644 --- a/boot/bootmeth_pxe.c +++ b/boot/bootmeth_pxe.c @@ -150,7 +150,7 @@ static int extlinux_pxe_boot(struct udevice *dev, struct bootflow *bflow) info.bflow = bflow; info.cmdtp = &cmdtp; ret = pxe_setup_ctx(ctx, &cmdtp, extlinux_pxe_getfile, &info, false, - bflow->subdir, false); + bflow->subdir, false, false); if (ret) return log_msg_ret("ctx", -EINVAL); diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index a80119c9a3b..d6a4b2cb859 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -1436,6 +1436,16 @@ struct pxe_menu *parse_pxefile(struct pxe_context *ctx, unsigned long menucfg) buf = map_sysmem(menucfg, 0); r = parse_pxefile_top(ctx, buf, menucfg, cfg, 1); + + if (ctx->use_fallback) { + if (cfg->fallback_label) { + printf("Setting use of fallback\n"); + cfg->default_label = cfg->fallback_label; + } else { + printf("Selected fallback option, but not set\n"); + } + } + unmap_sysmem(buf); if (r < 0) { destroy_pxe_menu(cfg); @@ -1586,7 +1596,8 @@ void handle_pxe_menu(struct pxe_context *ctx, struct pxe_menu *cfg) int pxe_setup_ctx(struct pxe_context *ctx, struct cmd_tbl *cmdtp, pxe_getfile_func getfile, void *userdata, - bool allow_abs_path, const char *bootfile, bool use_ipv6) + bool allow_abs_path, const char *bootfile, bool use_ipv6, + bool use_fallback) { const char *last_slash; size_t path_len = 0; @@ -1597,6 +1608,7 @@ int pxe_setup_ctx(struct pxe_context *ctx, struct cmd_tbl *cmdtp, ctx->userdata = userdata; ctx->allow_abs_path = allow_abs_path; ctx->use_ipv6 = use_ipv6; + ctx->use_fallback = use_fallback; /* figure out the boot directory, if there is one */ if (bootfile && strlen(bootfile) >= MAX_TFTP_PATH_LEN) |
