]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
boot: correct the default sequence of boot methods
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 3 Apr 2024 18:34:15 +0000 (20:34 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 8 Apr 2024 11:03:40 +0000 (13:03 +0200)
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>
boot/bootmeth_efi.c
boot/bootmeth_efi_mgr.c
boot/bootmeth_pxe.c
test/boot/bootflow.c

index c4eb331d69e6f54d029fcc0657017331fff43330..a46b6c9c805d645e03ce92750b4bf2f103f533e0 100644 (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,
index ed29d7ef02104fef176d45e5ae90f66f6fc8cd01..b7d429f2c3dae608c4f9fabba11394e7de579bfe 100644 (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,
index 8d489a11aa404eade250b6231a86e84357c7faad..70f693aa239b13889199267a1d7ba10d8199d783 100644 (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,
index 4845b7121c845535caef2e83957ef8a9e71652f5..e60e9309fa91e050a8bbd8b2cd32f33d005dfcdb 100644 (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);