bootctl: Provide an extra poll between select and booting

Selecting an OS may cause the UI to change, so give it a chance to show
those changes before booting.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-18 15:20:26 -07:00
parent 4eaef8aa12
commit 9bdd221a14
2 changed files with 18 additions and 2 deletions

View File

@@ -242,8 +242,22 @@ static int logic_poll(struct udevice *dev)
struct osinfo *os;
os = alist_getw(&priv->osinfo, seq, struct osinfo);
if (!os)
return log_msg_ret("gos", -ENOENT);
priv->ready_to_boot = false;
priv->selected_seq = seq;
}
if (priv->ready_to_boot) {
struct osinfo *os;
seq = priv->selected_seq;
os = alist_getw(&priv->osinfo, seq, struct osinfo);
if (!os)
return log_msg_ret("gbo", -ENOENT);
log_info("Selected %d: %s\n", seq, os->bflow.os_name);
priv->ready_to_boot = false;
/*
* try to read the images first; some methods don't support
* this