boot: correct the default sequence of boot methods

The default sequence of boot methods is determined by alphabetical sorting
during linkage.

* efi_mgr must run before efi to be UEFI compliant
* pxe should run as last resort

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Heinrich Schuchardt 2024-04-03 20:34:15 +02:00
parent 6b0f194648
commit 08c51a715a
4 changed files with 4 additions and 4 deletions

View File

@ -489,7 +489,7 @@ static const struct udevice_id distro_efi_bootmeth_ids[] = {
{ }
};
U_BOOT_DRIVER(bootmeth_efi) = {
U_BOOT_DRIVER(bootmeth_4efi) = {
.name = "bootmeth_efi",
.id = UCLASS_BOOTMETH,
.of_match = distro_efi_bootmeth_ids,

View File

@ -114,7 +114,7 @@ static const struct udevice_id efi_mgr_bootmeth_ids[] = {
{ }
};
U_BOOT_DRIVER(bootmeth_efi_mgr) = {
U_BOOT_DRIVER(bootmeth_3efi_mgr) = {
.name = "bootmeth_efi_mgr",
.id = UCLASS_BOOTMETH,
.of_match = efi_mgr_bootmeth_ids,

View File

@ -184,7 +184,7 @@ static const struct udevice_id extlinux_bootmeth_pxe_ids[] = {
{ }
};
U_BOOT_DRIVER(bootmeth_pxe) = {
U_BOOT_DRIVER(bootmeth_zpxe) = {
.name = "bootmeth_pxe",
.id = UCLASS_BOOTMETH,
.of_match = extlinux_bootmeth_pxe_ids,

View File

@ -377,7 +377,7 @@ static int bootflow_system(struct unit_test_state *uts)
if (!IS_ENABLED(CONFIG_EFI_BOOTMGR))
return -EAGAIN;
ut_assertok(uclass_first_device_err(UCLASS_BOOTSTD, &bootstd));
ut_assertok(device_bind(bootstd, DM_DRIVER_GET(bootmeth_efi_mgr),
ut_assertok(device_bind(bootstd, DM_DRIVER_GET(bootmeth_3efi_mgr),
"efi_mgr", 0, ofnode_null(), &dev));
ut_assertok(device_probe(dev));
sandbox_set_fake_efi_mgr_dev(dev, true);