boot: Support restarting a bootm sequence from PXE
If a load-only FIT has already provided a devicetree, PXE boot may need to restart the bootm sequence, rather than starting an entirely new one, so that the devicetree is preserved and used for booting. Add support for this by adding a new field in the context and updating extlinux_boot() to receive the value as a new parameter. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -570,8 +570,13 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
|
||||
|
||||
if (IS_ENABLED(CONFIG_CMD_BOOTM) && (fmt == IMAGE_FORMAT_FIT ||
|
||||
fmt == IMAGE_FORMAT_LEGACY)) {
|
||||
int states;
|
||||
|
||||
states = ctx->restart ? BOOTM_STATE_RESTART : BOOTM_STATE_START;
|
||||
log_debug("using bootm\n");
|
||||
ret = bootm_run(&bmi);
|
||||
ret = boot_run(&bmi, "ext", states | BOOTM_STATE_FINDOS |
|
||||
BOOTM_STATE_PRE_LOAD | BOOTM_STATE_FINDOTHER |
|
||||
BOOTM_STATE_LOADOS);
|
||||
/* Try booting an AArch64 Linux kernel image */
|
||||
} else if (IS_ENABLED(CONFIG_CMD_BOOTI) && fmt == IMAGE_FORMAT_BOOTI) {
|
||||
log_debug("using booti\n");
|
||||
|
||||
Reference in New Issue
Block a user