public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: mchitale@ventanamicro.com
To: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Sean Anderson <sean.anderson@seco.com>
Subject: Re: [PATCH v1 2/2] spl: Add support for booting from ESP
Date: Thu, 21 Sep 2023 17:03:37 +0530	[thread overview]
Message-ID: <06ea71aab661cf0535bcef98dad2aba61d1884f1.camel@ventanamicro.com> (raw)
In-Reply-To: <20230914162924.GA305624@bill-the-cat>

On Thu, 2023-09-14 at 12:29 -0400, Tom Rini wrote:
> On Thu, Sep 14, 2023 at 03:38:21PM +0530, Mayuresh Chitale wrote:
> 
> > Some platforms as described by EBBR specification may store images
> > in
> > the FIRMWARE directory of the UEFI system partition(ESP). Add
> > support
> > to boot from the EFI system partition if it is enabled for a
> > platform.
> > 
> > Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
> [snip]
> > +config SPL_ESP_BOOT
> > +	bool "Load next stage boot image from the UEFI system
> > partition"
> > +	select SPL_PARTITION_TYPE_GUID
> > +	help
> > +	  When enabled, first try to boot from the UEFI system
> > partition as
> > +	  described in the Ch.4 of the EBBR specification.
> 
> We need to select this by perhaps BOOT_DEFAULTS or BOOTMETH_DISTRO,
> whatever is supposed to signify that yes, this is going to be a
> SystemReady IR (or higher) compliant build.
I am not sure about the SystemReady compliance but I think the config
option can be enabled for those platforms which require it.
> [snip]
> >  int spl_blk_load_image(struct spl_image_info *spl_image,
> >  		       struct spl_boot_device *bootdev,
> >  		       enum uclass_id uclass_id, int devnum, int
> > partnum)
> >  {
> >  	const char *filename = CONFIG_SPL_FS_LOAD_PAYLOAD_NAME;
> > -	struct legacy_img_hdr *header;
> [snip]
> > @@ -63,24 +88,26 @@ int spl_blk_load_image(struct spl_image_info
> > *spl_image,
> >  	}
> >  
> >  	blk_show_device(uclass_id, devnum);
> > -	header = spl_get_load_buffer(-sizeof(*header),
> > sizeof(*header));
> > -
> [snip]
> 
> Is this an artifact of Sean's patch series where "header" is no
> longer
> actually used?  As-is this won't compile on top of next (which is
> where
> given Sean's feedback, the series needs to be rebased upon anyhow).
Yes, I will rebase on the latest next without Sean's series and resend
the patch.
> > +	/*
> > +	 * First try to boot from EFI System partition. In case of
> > failure,
> > +	 * fall back to the configured partition.
> > +	 */
> 
> I don't know that this is the right behavior.  If we're configured to
> boot from partition X, we boot from partition X.  If we're configured
> to
> find the ESP and use that, we find and use that.

This is to maintain compatibility and make more attempts to boot. So
the same SPL binary can load images from devices with or without the
ESP.


  reply	other threads:[~2023-09-21 11:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 10:08 [PATCH v1 0/2] SPL EBBR - EFI System Partition support Mayuresh Chitale
2023-09-14 10:08 ` [PATCH v1 1/2] part: Add a function to find ESP partition Mayuresh Chitale
2023-09-14 16:29   ` Tom Rini
2023-09-21 11:35     ` mchitale
2023-09-14 10:08 ` [PATCH v1 2/2] spl: Add support for booting from ESP Mayuresh Chitale
2023-09-14 16:29   ` Tom Rini
2023-09-21 11:33     ` mchitale [this message]
2023-09-21 15:43       ` Tom Rini
2023-09-14 14:15 ` [PATCH v1 0/2] SPL EBBR - EFI System Partition support Heinrich Schuchardt
2023-09-14 14:36   ` Sean Anderson

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=06ea71aab661cf0535bcef98dad2aba61d1884f1.camel@ventanamicro.com \
    --to=mchitale@ventanamicro.com \
    --cc=sean.anderson@seco.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox