mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
bootstd: Add a command to read all files for a bootflow
Some bootflows (such as EFI and ChromiumOS) delay reading the kernel until it is needed to boot. This saves time when scanning and avoids needing to allocate memory for something that may never be used. To permit reading of these files, add a new 'bootflow read' command. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
cbb607d2d9
commit
c279224ea6
7 changed files with 197 additions and 6 deletions
|
@ -445,6 +445,22 @@ void bootflow_remove(struct bootflow *bflow)
|
|||
free(bflow);
|
||||
}
|
||||
|
||||
#if CONFIG_IS_ENABLED(BOOTSTD_FULL)
|
||||
int bootflow_read_all(struct bootflow *bflow)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (bflow->state != BOOTFLOWST_READY)
|
||||
return log_msg_ret("rd", -EPROTO);
|
||||
|
||||
ret = bootmeth_read_all(bflow->method, bflow);
|
||||
if (ret)
|
||||
return log_msg_ret("rd2", ret);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* BOOTSTD_FULL */
|
||||
|
||||
int bootflow_boot(struct bootflow *bflow)
|
||||
{
|
||||
int ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue