efi_loader: find distro device-path for media devices

The auto-generated load options for media device do not contain a partition
node. We cannot expect the simple file protocol here.

Get the partition device-path via the loaded image protocol.

Fixes: e91b68fd6b ("efi_loader: load distro dtb in bootmgr")
Reported-by: E Shattow <lucent@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: E Shattow <lucent@gmail.com>
This commit is contained in:
Heinrich Schuchardt
2024-07-13 13:30:29 +02:00
parent 7aab2b6c1f
commit 5c1b5e6bc5
3 changed files with 22 additions and 17 deletions

View File

@@ -1195,6 +1195,6 @@ efi_status_t efi_load_option_dp_join(struct efi_device_path **dp,
int efi_get_distro_fdt_name(char *fname, int size, int seq);
void efi_load_distro_fdt(void **fdt, efi_uintn_t *fdt_size);
void efi_load_distro_fdt(efi_handle_t handle, void **fdt, efi_uintn_t *fdt_size);
#endif /* _EFI_LOADER_H */