U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Simon Glass <sjg@chromium.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>,
	Andre Przywara <andre.przywara@arm.com>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Tom Rini <trini@konsulko.com>,
	AKASHI Takahiro <akashi.tkhro@gmail.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Mark Kettenis <kettenis@openbsd.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v5 4/8] RFC: Revert "bootstd: Make efi_mgr bootmeth work for non-sandbox setups"
Date: Sun, 5 Jan 2025 03:50:10 +0100	[thread overview]
Message-ID: <517d087e-4ac5-4fd5-a37f-d4d3aaa534bd@gmx.de> (raw)
In-Reply-To: <20241113150938.1534931-5-sjg@chromium.org>

On 11/13/24 16:09, Simon Glass wrote:
> This is another option to fix sunxi booting with bootstd, which may be
> better since it will work for all boards. We can then figure out how to
> automatically and deterministicaly decide when bootmgr should be used.
>
> This reverts commit f2bfa0cb17948aa4a0fa20fdf9014296b9c4d9c7.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> If this patch is applied, we don't need to drop bootmgr for sunxi
>
> (no changes since v1)
>
>   boot/bootmeth_efi_mgr.c | 18 +-----------------
>   1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/boot/bootmeth_efi_mgr.c b/boot/bootmeth_efi_mgr.c
> index 23ae1e610ac..095fa74fc60 100644
> --- a/boot/bootmeth_efi_mgr.c
> +++ b/boot/bootmeth_efi_mgr.c
> @@ -14,8 +14,6 @@
>   #include <command.h>
>   #include <dm.h>
>   #include <efi_loader.h>
> -#include <efi_variable.h>
> -#include <malloc.h>
>
>   /**
>    * struct efi_mgr_priv - private info for the efi-mgr driver
> @@ -48,27 +46,13 @@ static int efi_mgr_check(struct udevice *dev, struct bootflow_iter *iter)
>   static int efi_mgr_read_bootflow(struct udevice *dev, struct bootflow *bflow)
>   {
>   	struct efi_mgr_priv *priv = dev_get_priv(dev);
> -	efi_status_t ret;
> -	efi_uintn_t size;
> -	u16 *bootorder;
>
>   	if (priv->fake_dev) {
>   		bflow->state = BOOTFLOWST_READY;
>   		return 0;
>   	}
>
> -	ret = efi_init_obj_list();
> -	if (ret)
> -		return log_msg_ret("init", ret);
> -
> -	/* Enable this method if the "BootOrder" UEFI exists. */
> -	bootorder = efi_get_var(u"BootOrder", &efi_global_variable_guid,
> -				&size);
> -	if (bootorder) {
> -		free(bootorder);
> -		bflow->state = BOOTFLOWST_READY;
> -		return 0;
> -	}
> +	/* To be implemented */

The EFI boot manager can boot based on:

* variable BootOrder
* variable BootNext
* an existing file EFI/BOOT/BOOT<arch>.EFI

It obsoletes bootsmeth_efi.

>
>   	return -EINVAL;

We must always run the EFI boot manager if it is enabled. So -EINVAL is
wrong here.

Best regards

Heinrich

  parent reply	other threads:[~2025-01-05  2:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-13 15:09 [PATCH v5 0/8] bootstd: sunxi: Migrate to standard boot Simon Glass
2024-11-13 15:09 ` [PATCH v5 1/8] bootstd: Avoid depending on BLK Simon Glass
2024-11-13 17:47   ` Tom Rini
2024-11-14  3:53     ` Simon Glass
2024-11-14 14:22       ` Tom Rini
2024-11-15 14:27         ` Simon Glass
2024-11-15 14:37           ` Tom Rini
2024-11-13 15:09 ` [PATCH v5 2/8] sunxi: Add a bootmeth for FEL Simon Glass
2024-11-13 15:09 ` [PATCH v5 3/8] efi_loader: bootstd: Drop bootmgr for sunxi Simon Glass
2024-11-13 17:50   ` Tom Rini
2024-11-15 14:21     ` Simon Glass
2024-11-23  2:08       ` Andre Przywara
2024-11-23  4:06         ` Heinrich Schuchardt
2024-11-23 13:07           ` Andre Przywara
2024-11-23 16:56             ` Ilias Apalodimas
2024-11-16  7:37   ` Heinrich Schuchardt
2024-11-13 15:09 ` [PATCH v5 4/8] RFC: Revert "bootstd: Make efi_mgr bootmeth work for non-sandbox setups" Simon Glass
2024-11-13 17:52   ` Tom Rini
2025-01-05  2:50   ` Heinrich Schuchardt [this message]
2025-01-09 15:01     ` Simon Glass
2025-01-09 15:04       ` Tom Rini
2025-01-09 15:11         ` Simon Glass
2025-01-09 15:22           ` Tom Rini
2025-01-10 13:41             ` Simon Glass
2025-01-10 17:05               ` Tom Rini
2025-01-15 13:22                 ` Simon Glass
2025-01-15 14:33                   ` Tom Rini
2024-11-13 15:09 ` [PATCH v5 5/8] sunxi: Move to bootstd Simon Glass
2024-11-13 15:09 ` [PATCH v5 6/8] sunxi: Drop old distro boot variables Simon Glass
2024-11-13 15:09 ` [PATCH v5 7/8] env: Provide a work-around for unquoting fdtfile Simon Glass
2024-11-13 17:53   ` Tom Rini
2025-03-10 22:26   ` Tom Rini
2024-11-13 15:09 ` [PATCH v5 8/8] sunxi: Move to text environment Simon Glass

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=517d087e-4ac5-4fd5-a37f-d4d3aaa534bd@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=akashi.tkhro@gmail.com \
    --cc=andre.przywara@arm.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jagan@amarulasolutions.com \
    --cc=kettenis@openbsd.org \
    --cc=quentin.schulz@cherry.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --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