boot: Run the EFI bootmgr just before network devices

At present the EFI bootmgr scans all devices in the system before
deciding which one to boot. Ideally it would use the bootstd iterator
for this, but in the meantime, give it a lower priority, so it runs
just before the network devices.

Note that if there are no hunted network devices hunted, then it will
run at the end, after all bootdevs are exhausted. In other words, it
will always run.

Series-changes: 2
- Update commit message to indicate the bootmeth will always run
- Document how the priority was chosen

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-09-27 12:48:27 -06:00
parent 6e4f842505
commit 9f00a0e3f3
2 changed files with 11 additions and 2 deletions

View File

@@ -495,11 +495,11 @@ static int bootflow_system(struct unit_test_state *uts)
ut_assertok(device_probe(dev));
sandbox_set_fake_efi_mgr_dev(dev, true);
/* We should get a single 'bootmgr' method at the start */
/* We should get a single 'bootmgr' method at the end */
bootstd_clear_glob();
ut_assertok(run_command("bootflow scan -lH", 0));
ut_assert_skip_to_line(
" 0 efi_mgr ready (none) 0 <NULL> ");
" 1 efi_mgr ready (none) 0 <NULL> ");
ut_assert_skip_to_line("No more bootdevs");
ut_assert_skip_to_line("(2 bootflows, 2 valid)");
ut_assert_console_end();