From bc06aa035d8f78a713a3d339d45f3d05ef0f0d67 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 30 Jul 2022 15:52:21 -0600 Subject: bootstd: Allow bootmeths to be marked as global The current way of handling things like EFI bootmgr is a bit odd, since that bootmeth handles selection of the bootdev itself. VBE needs to work the same way, so we should support it properly. Add a flag that indicates that the bootmeth is global, rather than being invoked on each bootdev. Provide a helper to read a bootflow from the bootmeth. Signed-off-by: Simon Glass --- cmd/bootmeth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmd/bootmeth.c') diff --git a/cmd/bootmeth.c b/cmd/bootmeth.c index c9a27fe8ac68..9fbcccdba7ef 100644 --- a/cmd/bootmeth.c +++ b/cmd/bootmeth.c @@ -69,7 +69,9 @@ static int do_bootmeth_list(struct cmd_tbl *cmdtp, int flag, int argc, } } - if (order == -1) + if (ucp->flags & BOOTMETHF_GLOBAL) + printf("%5s", "glob"); + else if (order == -1) printf("%5s", "-"); else printf("%5x", order); -- cgit v1.2.3