[U-Boot] [PATCH v2 2/3] efi_loader: enumerate disk devices every time

Mark Kettenis
2019-01-11T13:03:53Z

> From: Alexander Graf <agraf@suse.de>
> Date: Fri, 11 Jan 2019 09:00:27 +0100
>
> On 11.01.19 05:51, AKASHI Takahiro wrote:
> > On Thu, Jan 10, 2019 at 05:57:11AM -0700, Simon Glass wrote:
> >> Hi,
> >>
> >>
> >> Please no. We don't want EFI hooks around the place. EFI should use
> >> DM, not the other way around.
> >
> > Right, but every efi disk is associated with a backing "u-boot"
> > block devices (even more, this is not 1-to-1 mapping but many-to-1 due to
> > partitions).
>
> In this case we may just want to create DM devices for partitions as
> well to make things more natural.

Be careful here though that this doesn't lead to device paths for
partitions that have a different "root" than the disk itself. The
OpenBSD bootloader relies on matching the initial EFI device path
components to find the entire disk from the partition it was loaded
from to find the disk from which to load the kernel.

Cheers,

Mark