All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Simon Glass <sjg@chromium.org>,
	Takahiro Akashi <takahiro.akashi@linaro.org>
Subject: Re: [PATCH v5 4/7] efi_loader: support boot from URI device path
Date: Fri, 29 Sep 2023 14:48:10 +0300	[thread overview]
Message-ID: <ZRa5eiRu+SHvglrp@hades> (raw)
In-Reply-To: <20230927093631.1595494-5-masahisa.kojima@linaro.org>

Hi Kojima-san,


[...]

> +
> +/**
> + * try_load_default_file() - try to load the default file
> + *
> + * Search the device having EFI_SIMPLE_FILE_SYSTEM_PROTOCOL,
> + * then try to load with the default boot file(e.g. EFI/BOOT/BOOTAA64.EFI).
> + *
> + * @dev			pointer to the UCLASS_BLK or UCLASS_PARTITION udevice
> + * @image_handle:	pointer to handle for newly installed image
> + * Return:		status code
> + */
> +static efi_status_t try_load_default_file(struct udevice *dev,
> +					  efi_handle_t *image_handle)
> +{
> +	efi_status_t ret;
> +	efi_handle_t handle;
> +	struct efi_handler *handler;
> +	struct efi_device_path *file_path;
> +	struct efi_device_path *device_path;
> +
> +	if (dev_tag_get_ptr(dev, DM_TAG_EFI, (void **)&handle)) {
> +		log_warning("DM_TAG_EFI not found\n");
> +		return EFI_INVALID_PARAMETER;
> +	}
> +
> +	ret = efi_search_protocol(handle,
> +				  &efi_simple_file_system_protocol_guid, &handler);
> +	if (ret != EFI_SUCCESS)
> +		return ret;
> +
> +	ret = EFI_CALL(bs->open_protocol(handle, &efi_guid_device_path,
> +					 (void **)&device_path, efi_root, NULL,
> +					 EFI_OPEN_PROTOCOL_GET_PROTOCOL));
> +	if (ret != EFI_SUCCESS)
> +		return ret;
> +
> +	file_path = expand_media_path(device_path);
> +	ret = EFI_CALL(efi_load_image(true, efi_root, file_path, NULL, 0,
> +				      image_handle));
> +
> +	efi_free_pool(file_path);
> +
> +	return ret;
> +}

We've discussed this on v4, but I am replying here, since you sent a v5 in
the meantime. 
What I ideally wanted to do here is 
- Add the boot option automatically once the disk gets mount (you've
already sent a patch for that)
- Since the boot option is automatically added we could instead of
  searching for BOOTAA64.EFI search for matches with a load option of
  '1234567'.
Is there some timing issue that I am missing which doesnt allow us to do
that ?
 
[...]

Cheers
/Ilias

  reply	other threads:[~2023-09-29 11:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27  9:36 [PATCH v5 0/7] Add EFI HTTP boot support Masahisa Kojima
2023-09-27  9:36 ` [PATCH v5 1/7] net: wget: prevent overwriting reserved memory Masahisa Kojima
2023-10-06 20:36   ` Ramon Fried
2023-09-27  9:36 ` [PATCH v5 2/7] net: wget: add wget with dns utility function Masahisa Kojima
2023-10-06 20:37   ` Ramon Fried
2023-09-27  9:36 ` [PATCH v5 3/7] blk: blkmap: add ramdisk creation " Masahisa Kojima
2023-10-06 11:25   ` Michal Simek
2023-10-11  8:29     ` Masahisa Kojima
2023-09-27  9:36 ` [PATCH v5 4/7] efi_loader: support boot from URI device path Masahisa Kojima
2023-09-29 11:48   ` Ilias Apalodimas [this message]
2023-09-29 12:35     ` Masahisa Kojima
2023-09-29 12:42       ` Ilias Apalodimas
2023-09-27  9:36 ` [PATCH v5 5/7] cmd: efidebug: add uri " Masahisa Kojima
2023-09-28 14:32   ` Maxim Uvarov
2023-09-29  2:20     ` Masahisa Kojima
2023-09-27  9:36 ` [PATCH v5 6/7] doc: uefi: add HTTP Boot support Masahisa Kojima
2023-09-27  9:36 ` [PATCH v5 7/7] efi_loader: create BlockIo device boot option Masahisa Kojima

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=ZRa5eiRu+SHvglrp@hades \
    --to=ilias.apalodimas@linaro.org \
    --cc=masahisa.kojima@linaro.org \
    --cc=sjg@chromium.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.