From: Alexander Graf Date: Tue, 25 Jul 2017 18:46:46 +0200 Subject: [U-Boot] [PATCH 2/4] efi_loader: add udevice to EFI device-path mapping In-Reply-To: References: <20170721184339.3042-1-robdclark@gmail.com> <20170721184339.3042-3-robdclark@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 25.07.17 15:57, Rob Clark wrote: > So the static bootefi_device_obj is making things slightly awkward for > efi_load_image() from a file-path. And really it should just go away, > and instead we should plug in the appropriate diskobj (or netobj) to > the loaded_image_obj at boot time. Also we should nuke > bootefi_device_path. And since we need to construct a new > loaded_image_obj in efi_load_image(), probably split out a helper to > fill that out properly and plug in the correct boot device-path, etc, > etc, so we don't have too many different places constructing the same > sort of object and forgetting to install some protocols in one place > or another. > > And since there are a lot of places we need to map to device-path and > back, I'm starting to thing the sane way to do all this without > breaking legacy (!CONFIG_DM) is to introduce a efi_device_path.c and > efi_device_path_legacy.c. Move all the hacky stuff of current > devicepath construction into efi_device_path_legacy.c. Add some > device-path parsing/matching stuff to efi_device_path_util.c (which > probably just be efi_device_path_to_text.c renamed and then spiffed > out with some more device-path helpers), which would be shared in > common in legacy and CONFIG_DM cases. > > Sound semi-reasonable? I'm not sure if this intersects too badly with Sounds reasonable to me :). > other stuff Heinrich is working on? I don't know - I'll let him comment. > > (Also, small logistical question.. anyone know how to do > "obj-$(!CONFIG_DM) += efi_boot_device_legacy.o"?) I would do ifeq ($(CONFIG_DM),y) obj-y += efi_boot_device_dm.o else obj-y += efi_boot_device_nodm.o endif Alex