diff options
| author | Martyn Welch <[email protected]> | 2024-10-09 14:15:39 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-10-15 10:24:27 -0600 |
| commit | 8ba82a91b3aa615fb6148ecfa2af4e91a28659ae (patch) | |
| tree | f30cd93609a5ca7daf7b22fde45f26bed5464bba /cmd | |
| parent | d2faad3ff31f0fab0cf280c05ee333992f7a7d27 (diff) | |
boot: Add logic to enable booting from fallback option
The "fallback" extlinux config option allows us to set an alternative
default boot option for when it has been detected that the default is
failing. Implement the logic required to boot from this option when
desired.
Signed-off-by: Martyn Welch <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/pxe.c | 4 | ||||
| -rw-r--r-- | cmd/sysboot.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/pxe.c b/cmd/pxe.c index ae02c28c075..982e2b1e7ea 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -138,7 +138,7 @@ int pxe_get(ulong pxefile_addr_r, char **bootdirp, ulong *sizep, bool use_ipv6) int i; if (pxe_setup_ctx(&ctx, cmdtp, do_get_tftp, NULL, false, - env_get("bootfile"), use_ipv6)) + env_get("bootfile"), use_ipv6, false)) return -ENOMEM; if (IS_ENABLED(CONFIG_BOOTP_PXE_DHCP_OPTION) && @@ -288,7 +288,7 @@ do_pxe_boot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } if (pxe_setup_ctx(&ctx, cmdtp, do_get_tftp, NULL, false, - env_get("bootfile"), use_ipv6)) { + env_get("bootfile"), use_ipv6, false)) { printf("Out of memory\n"); return CMD_RET_FAILURE; } diff --git a/cmd/sysboot.c b/cmd/sysboot.c index 0ea08fd7b53..8a060780cab 100644 --- a/cmd/sysboot.c +++ b/cmd/sysboot.c @@ -105,7 +105,7 @@ static int do_sysboot(struct cmd_tbl *cmdtp, int flag, int argc, } if (pxe_setup_ctx(&ctx, cmdtp, sysboot_read_file, &info, true, - filename, false)) { + filename, false, false)) { printf("Out of memory\n"); return CMD_RET_FAILURE; } |
