1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 19:05:51 +01:00

bootstd: Support bootflows with global bootmeths

Add support for handling this concept in bootflows. Update the 'bootflow'
command to allow only the normal bootmeths to be used. This alllows
skipping EFI bootmgr and VBE, for example.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-07-30 15:52:25 -06:00
committed by Tom Rini
parent ee47d4af05
commit 2b80bc1eee
3 changed files with 69 additions and 13 deletions

View File

@@ -95,7 +95,8 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc,
struct bootflow_iter iter;
struct udevice *dev;
struct bootflow bflow;
bool all = false, boot = false, errors = false, list = false;
bool all = false, boot = false, errors = false, no_global = false;
bool list = false;
int num_valid = 0;
bool has_args;
int ret, i;
@@ -112,6 +113,7 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc,
all = strchr(argv[1], 'a');
boot = strchr(argv[1], 'b');
errors = strchr(argv[1], 'e');
no_global = strchr(argv[1], 'G');
list = strchr(argv[1], 'l');
argc--;
argv++;
@@ -137,6 +139,8 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc,
flags |= BOOTFLOWF_SHOW;
if (all)
flags |= BOOTFLOWF_ALL;
if (no_global)
flags |= BOOTFLOWF_SKIP_GLOBAL;
/*
* If we have a device, just scan for bootflows attached to that device
@@ -383,7 +387,7 @@ static int do_bootflow_boot(struct cmd_tbl *cmdtp, int flag, int argc,
#ifdef CONFIG_SYS_LONGHELP
static char bootflow_help_text[] =
#ifdef CONFIG_CMD_BOOTFLOW_FULL
"scan [-abel] [bdev] - scan for valid bootflows (-l list, -a all, -e errors, -b boot)\n"
"scan [-abeGl] [bdev] - scan for valid bootflows (-l list, -a all, -e errors, -b boot, -G no global)\n"
"bootflow list [-e] - list scanned bootflows (-e errors)\n"
"bootflow select [<num>|<name>] - select a bootflow\n"
"bootflow info [-d] - show info on current bootflow (-d dump bootflow)\n"