From c627cfc14c08a803f5aa9e39d841dcf990d8d034 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 30 Jul 2022 15:52:27 -0600 Subject: bootstd: Allow scanning for global bootmeths separately Typically we want to find and use global bootmeths first, since they have the best idea of how the system should boot. We then use normal bootmeths as a fallback. Add the logic for this, putting global bootmeths at the end of the ordering. We can then easily scan the global bootmeths first, then drop them from the list for subsequent bootdev-centric scans. This changes the ordering of global bootmeths, so update the bootflow_system() accordingly. Drop the comment from bootmeth_setup_iter_order() since this is an exported function and it should be in the header file. Signed-off-by: Simon Glass --- test/boot/bootflow.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/boot') diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index 22eef40c0e3..07b0517718e 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -343,8 +343,9 @@ static int bootflow_system(struct unit_test_state *uts) bootstd_clear_glob(); console_record_reset_enable(); ut_assertok(run_command("bootflow scan -l", 0)); - ut_assert_skip_to_line(" 1 bootmgr ready bootstd 0 "); - ut_assert_nextline("No more bootdevs"); + ut_assert_skip_to_line( + " 0 bootmgr ready (none) 0 "); + ut_assert_skip_to_line("No more bootdevs"); ut_assert_skip_to_line("(2 bootflows, 2 valid)"); ut_assert_console_end(); -- cgit v1.3.1