[PATCH v7 6/9] efi_loader: add CDROM short-form device path

Masahisa Kojima masahisa.kojima at linaro.org
Mon Oct 16 08:45:23 CEST 2023


UEFI specification does not mandate to support the short-form
of the CDROM media device path.
Fedora installation ISO image is identified as CDROM media
device path, supporting short-form CDROM media device path is
required to automatically add the boot option having default
file of Fedora installation image.

Signed-off-by: Masahisa Kojima <masahisa.kojima at linaro.org>
---
 lib/efi_loader/efi_device_path.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index ed7214f3a3..ac673ab117 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -110,7 +110,8 @@ struct efi_device_path *efi_dp_shorten(struct efi_device_path *dp)
 	while (dp) {
 		if (EFI_DP_TYPE(dp, MESSAGING_DEVICE, MSG_USB_WWI) ||
 		    EFI_DP_TYPE(dp, MEDIA_DEVICE, HARD_DRIVE_PATH) ||
-		    EFI_DP_TYPE(dp, MEDIA_DEVICE, FILE_PATH))
+		    EFI_DP_TYPE(dp, MEDIA_DEVICE, FILE_PATH) ||
+		    EFI_DP_TYPE(dp, MEDIA_DEVICE, CDROM_PATH))
 			return dp;
 
 		dp = efi_dp_next(dp);
-- 
2.34.1



More information about the U-Boot mailing list