From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>,
Sughosh Ganu <sughosh.ganu@linaro.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Mark Kettenis <kettenis@openbsd.org>,
u-boot@lists.denx.de,
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Subject: Re: [PATCH 1/1] sandbox: add bootmethod EFI boot-manager
Date: Fri, 11 Oct 2024 16:27:40 +0200 [thread overview]
Message-ID: <875xpyhfz7.fsf@baylibre.com> (raw)
In-Reply-To: <20241008223219.105369-1-heinrich.schuchardt@canonical.com>
Hi Heinrich,
Thank you for the patch.
On mer., oct. 09, 2024 at 00:32, Heinrich Schuchardt <heinrich.schuchardt@canonical.com> wrote:
> The EFI boot-manager is the default method to boot EFI binaries.
> We should be able to use it on the Sandbox.
>
> * Enable EFI boot-manager bootmethod on the sandbox.
> * Adjust unit tests to reflect the additional boot method.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
> arch/sandbox/dts/test.dts | 4 ++++
> test/boot/bootmeth.c | 28 +++++++++++++++++-----------
> 2 files changed, 21 insertions(+), 11 deletions(-)
>
> diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
> index 8412506c17a..1248ed66089 100644
> --- a/arch/sandbox/dts/test.dts
> +++ b/arch/sandbox/dts/test.dts
> @@ -119,6 +119,10 @@
> compatible = "u-boot,distro-efi";
> };
>
> + efimgr {
> + compatible = "u-boot,efi-bootmgr";
> + };
> +
> theme {
> font-size = <30>;
> menu-inset = <3>;
> diff --git a/test/boot/bootmeth.c b/test/boot/bootmeth.c
> index 518d99c4a27..fe175ccb755 100644
> --- a/test/boot/bootmeth.c
> +++ b/test/boot/bootmeth.c
> @@ -21,11 +21,13 @@ static int bootmeth_cmd_list(struct unit_test_state *uts)
> ut_assert_nextlinen("---");
> ut_assert_nextline(" 0 0 extlinux Extlinux boot from a block device");
> ut_assert_nextline(" 1 1 efi EFI boot from an .efi file");
> - if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL))
> - ut_assert_nextline(" glob 2 firmware0 VBE simple");
> + if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL)) {
> + ut_assert_nextline(" glob 2 efimgr EFI bootmgr flow");
> + ut_assert_nextline(" glob 3 firmware0 VBE simple");
> + }
> ut_assert_nextlinen("---");
> ut_assert_nextline(IS_ENABLED(CONFIG_BOOTMETH_GLOBAL) ?
> - "(3 bootmeths)" : "(2 bootmeths)");
> + "(4 bootmeths)" : "(2 bootmeths)");
> ut_assert_console_end();
>
> return 0;
> @@ -56,11 +58,13 @@ static int bootmeth_cmd_order(struct unit_test_state *uts)
> ut_assert_nextlinen("---");
> ut_assert_nextline(" 0 0 extlinux Extlinux boot from a block device");
> ut_assert_nextline(" - 1 efi EFI boot from an .efi file");
> - if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL))
> - ut_assert_nextline(" glob 2 firmware0 VBE simple");
> + if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL)) {
> + ut_assert_nextline(" glob 2 efimgr EFI bootmgr flow");
> + ut_assert_nextline(" glob 3 firmware0 VBE simple");
> + }
> ut_assert_nextlinen("---");
> ut_assert_nextline(IS_ENABLED(CONFIG_BOOTMETH_GLOBAL) ?
> - "(3 bootmeths)" : "(2 bootmeths)");
> + "(4 bootmeths)" : "(2 bootmeths)");
> ut_assert_console_end();
>
> /* Check the -a flag with the reverse order */
> @@ -71,11 +75,13 @@ static int bootmeth_cmd_order(struct unit_test_state *uts)
> ut_assert_nextlinen("---");
> ut_assert_nextline(" 1 0 extlinux Extlinux boot from a block device");
> ut_assert_nextline(" 0 1 efi EFI boot from an .efi file");
> - if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL))
> - ut_assert_nextline(" glob 2 firmware0 VBE simple");
> + if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL)) {
> + ut_assert_nextline(" glob 2 efimgr EFI bootmgr flow");
> + ut_assert_nextline(" glob 3 firmware0 VBE simple");
> + }
> ut_assert_nextlinen("---");
> ut_assert_nextline(IS_ENABLED(CONFIG_BOOTMETH_GLOBAL) ?
> - "(3 bootmeths)" : "(2 bootmeths)");
> + "(4 bootmeths)" : "(2 bootmeths)");
> ut_assert_console_end();
>
> /* Now reset the order to empty, which should show all of them again */
> @@ -84,7 +90,7 @@ static int bootmeth_cmd_order(struct unit_test_state *uts)
> ut_assertnull(env_get("bootmeths"));
> ut_assertok(run_command("bootmeth list", 0));
> ut_assert_skip_to_line(IS_ENABLED(CONFIG_BOOTMETH_GLOBAL) ?
> - "(3 bootmeths)" : "(2 bootmeths)");
> + "(4 bootmeths)" : "(2 bootmeths)");
>
> /* Try reverse order */
> ut_assertok(run_command("bootmeth order \"efi extlinux\"", 0));
> @@ -116,7 +122,7 @@ static int bootmeth_cmd_order_glob(struct unit_test_state *uts)
> ut_assert_nextline("Order Seq Name Description");
> ut_assert_nextlinen("---");
> ut_assert_nextline(" 0 1 efi EFI boot from an .efi file");
> - ut_assert_nextline(" glob 2 firmware0 VBE simple");
> + ut_assert_nextline(" glob 3 firmware0 VBE simple");
> ut_assert_nextlinen("---");
> ut_assert_nextline("(2 bootmeths)");
> ut_assertnonnull(env_get("bootmeths"));
> --
> 2.45.2
next prev parent reply other threads:[~2024-10-11 14:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 22:32 [PATCH 1/1] sandbox: add bootmethod EFI boot-manager Heinrich Schuchardt
2024-10-09 1:58 ` Simon Glass
2024-10-11 14:27 ` Mattijs Korpershoek [this message]
2024-10-17 23:23 ` Simon Glass
2024-10-18 1:00 ` Heinrich Schuchardt
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=875xpyhfz7.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=heinrich.schuchardt@canonical.com \
--cc=ilias.apalodimas@linaro.org \
--cc=kettenis@openbsd.org \
--cc=sjg@chromium.org \
--cc=sughosh.ganu@linaro.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