1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-03 17:52:07 +02:00

bootstd: Support creating a boot menu

Create an expo to handle the boot menu. For now this is quite simple, with
just a header, some menu items and a pointer to show the current one.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-01-06 08:52:40 -06:00
committed by Tom Rini
parent fe93c14b4c
commit 02d929bfb2
5 changed files with 347 additions and 2 deletions

View File

@@ -9,6 +9,9 @@
#include <linux/list.h>
struct bootstd_priv;
struct expo;
/**
* enum bootflow_state_t - states that a particular bootflow can be in
*
@@ -336,4 +339,24 @@ int bootflow_iter_uses_network(const struct bootflow_iter *iter);
*/
int bootflow_iter_uses_system(const struct bootflow_iter *iter);
/**
* bootflow_menu_new() - Create a new bootflow menu
*
* @expp: Returns the expo created
* Returns 0 on success, -ve on error
*/
int bootflow_menu_new(struct expo **expp);
/**
* bootflow_menu_run() - Create and run a menu of available bootflows
*
* @std: Bootstd information
* @text_mode: Uses a text-based menu suitable for a serial port
* @bflowp: Returns chosen bootflow (set to NULL if nothing is chosen)
* @return 0 if an option was chosen, -EAGAIN if nothing was chosen, -ve on
* error
*/
int bootflow_menu_run(struct bootstd_priv *std, bool text_mode,
struct bootflow **bflowp);
#endif