public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] efi_loader: add udevice to EFI device-path mapping
Date: Tue, 25 Jul 2017 18:46:46 +0200	[thread overview]
Message-ID: <f2f1bf99-06e9-d8cf-69c0-e25ecf995485@suse.de> (raw)
In-Reply-To: <CAF6AEGs9tqDu2Mkr13U_tPvtOfyXpO=yu3eCcsqfVp92uhMeyw@mail.gmail.com>



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

  reply	other threads:[~2017-07-25 16:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 18:43 [U-Boot] [PATCH 0/4] efi_loader: fix disk objects + device-paths Rob Clark
2017-07-21 18:43 ` [U-Boot] [PATCH 1/4] efi: add some more device path structures Rob Clark
2017-07-21 18:43 ` [U-Boot] [PATCH 2/4] efi_loader: add udevice to EFI device-path mapping Rob Clark
2017-07-25 13:57   ` Rob Clark
2017-07-25 16:46     ` Alexander Graf [this message]
2017-07-25 17:05       ` Heinrich Schuchardt
2017-07-21 18:43 ` [U-Boot] [PATCH 3/4] efi_loader: make disk objects for partitions Rob Clark
2017-07-23 10:25   ` [U-Boot] [U-Boot, " Heinrich Schuchardt
2017-07-23 19:48     ` Rob Clark
2017-07-21 18:43 ` [U-Boot] [PATCH 4/4] efi_loader: use efi_devpath to get correct boot device-path Rob Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2f1bf99-06e9-d8cf-69c0-e25ecf995485@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox