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:
Simon Glass
2023-08-10 19:33:18 -06:00
parent cbb607d2d9
commit c279224ea6
7 changed files with 197 additions and 6 deletions

View File

@@ -352,6 +352,17 @@ void bootflow_free(struct bootflow *bflow);
*/
int bootflow_boot(struct bootflow *bflow);
/**
* bootflow_read_all() - Read all bootflow files
*
* Some bootmeths delay reading of large files until booting is requested. This
* causes those files to be read.
*
* @bflow: Bootflow to read
* Return: result of trying to read
*/
int bootflow_read_all(struct bootflow *bflow);
/**
* bootflow_run_boot() - Try to boot a bootflow
*