"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Signed-off-by: Simon Glass <sjg@chromium.org>

authored by

Simon Glass and committed by
Tom Rini
6a56d10f 060ce66b

+11 -2
+9
boot/bootmeth_efi_mgr.c
··· 99 99 plat->desc = "EFI bootmgr flow"; 100 100 plat->flags = BOOTMETHF_GLOBAL; 101 101 102 + /* 103 + * bootmgr scans all available devices which can take a while, 104 + * especially for network devices. So choose the priority so that it 105 + * comes just before the 'very slow' devices. This allows systems which 106 + * don't rely on bootmgr to boot quickly, while allowing bootmgr to run 107 + * on systems which need it. 108 + */ 109 + plat->glob_prio = BOOTDEVP_6_NET_BASE; 110 + 102 111 return 0; 103 112 } 104 113
+2 -2
test/boot/bootflow.c
··· 454 454 ut_assertok(device_probe(dev)); 455 455 sandbox_set_fake_efi_mgr_dev(dev, true); 456 456 457 - /* We should get a single 'bootmgr' method at the start */ 457 + /* We should get a single 'bootmgr' method at the end */ 458 458 bootstd_clear_glob(); 459 459 ut_assertok(run_command("bootflow scan -lH", 0)); 460 460 ut_assert_skip_to_line( 461 - " 0 efi_mgr ready (none) 0 <NULL> "); 461 + " 1 efi_mgr ready (none) 0 <NULL> "); 462 462 ut_assert_skip_to_line("No more bootdevs"); 463 463 ut_assert_skip_to_line("(2 bootflows, 2 valid)"); 464 464 ut_assert_console_end();