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

Masahisa Kojima masahisa.kojima at linaro.org
Thu Oct 19 05:21:50 CEST 2023


Hi Heinrich,

On Wed, 18 Oct 2023 at 19:25, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 10/16/23 08:45, Masahisa Kojima wrote:
> > 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.
>
> How is the CDROM media path created?

Fedora installation media only has a ISO 9660 filesystem without
MBR/GPT partition table.
U-Boot disk driver classifies it as PART_TYPE_ISO, then EFI-subsystem
creates a CDROM media path for it.

> Why would the image not be found if the path is not shortened?

We discussed in the separate patch that we drop the patch#4(automatically
create the boot option with default application file path appended),
so this patch is also dropped.

> What is Fedora specific here?

Fedora installation media has ISO 9660 filesystem only.
Other disto such as Debian has a MBR partition table, U-Boot creates
HardDisk device path for these medias.

> What does EDK II do?

EDK II does the same for Fedora install image, CDROM media path is created.

Thanks,
Masahisa Kojima

>
> Best regards
>
> Heinrich
>
> >
> > 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);
>


More information about the U-Boot mailing list