public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>,
	Albert Aribaud <albert.u.boot@aribaud.net>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Glass <sjg@chromium.org>,
	Andre Przywara <andre.przywara@arm.com>,
	John Keeping <john@metanate.com>,
	Philippe Reynes <philippe.reynes@softathome.com>
Subject: [PATCH 03/13] bootstd: Allow enabling BOOTSTD_FULL without needing EXPO
Date: Sat, 28 Jan 2023 15:00:18 -0700	[thread overview]
Message-ID: <20230128220028.53575-4-sjg@chromium.org> (raw)
In-Reply-To: <20230128220028.53575-1-sjg@chromium.org>

It is sometimes useful to have one without the other, e.g. on a device
without a display, since at present the expo feature requires CONFIG_VIDEO
to be enabled.

Update the Makefile and bootflow command to support this, as well as the
EXPO dependency.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 boot/Kconfig   |  1 +
 boot/Makefile  |  4 ++--
 cmd/bootflow.c | 21 +++++++++++++--------
 3 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/boot/Kconfig b/boot/Kconfig
index fdcfbae7b2c..98e194fc2b2 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -561,6 +561,7 @@ endif # BOOTMETH_VBE
 
 config EXPO
 	bool "Support for expos - groups of scenes displaying a UI"
+	depends on VIDEO
 	default y if BOOTMETH_VBE
 	help
 	  An expo is a way of presenting and collecting information from the
diff --git a/boot/Makefile b/boot/Makefile
index f990e66f522..43baf2b89b3 100644
--- a/boot/Makefile
+++ b/boot/Makefile
@@ -30,7 +30,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o
 obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o
 ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL
 obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o
-obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o
+obj-$(CONFIG_$(SPL_TPL_)EXPO) += bootflow_menu.o
 endif
 
 obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o
@@ -48,7 +48,7 @@ ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o
 endif
 
-obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE) += expo.o scene.o scene_menu.o
+obj-$(CONFIG_$(SPL_TPL_)EXPO) += expo.o scene.o scene_menu.o
 
 obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE) += vbe.o vbe_request.o
 obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE_SIMPLE) += vbe_simple.o
diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index 692bc6d117f..3548bbb6830 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -394,15 +394,20 @@ static int do_bootflow_menu(struct cmd_tbl *cmdtp, int flag, int argc,
 	if (ret)
 		return CMD_RET_FAILURE;
 
-	ret = bootflow_menu_run(std, text_mode, &bflow);
-	if (ret) {
-		if (ret == -EAGAIN)
-			printf("Nothing chosen\n");
-		else
-			printf("Menu failed (err=%d)\n", ret);
-
-		return CMD_RET_FAILURE;
+	if (IS_ENABLED(CONFIG_EXPO)) {
+		ret = bootflow_menu_run(std, text_mode, &bflow);
+		if (ret) {
+			if (ret == -EAGAIN)
+				printf("Nothing chosen\n");
+			else
+				printf("Menu failed (err=%d)\n", ret);
+		}
+	} else {
+		printf("Menu not supported\n");
+		ret = -ENOSYS;
 	}
+	if (ret)
+		return CMD_RET_FAILURE;
 
 	printf("Selected: %s\n", bflow->os_name ? bflow->os_name : bflow->name);
 	std->cur_bootflow = bflow;
-- 
2.39.1.456.gfc5497dd1b-goog


  parent reply	other threads:[~2023-01-28 22:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28 22:00 [PATCH 00/13] bootstd: Update ARM QEMU for standard boot and environment Simon Glass
2023-01-28 22:00 ` [PATCH 01/13] log: Add a category for filesystems Simon Glass
2023-02-07 16:51   ` Tom Rini
2023-01-28 22:00 ` [PATCH 02/13] virtio: Add some debugging Simon Glass
2023-02-07 16:51   ` Tom Rini
2023-01-28 22:00 ` Simon Glass [this message]
2023-02-07 16:51   ` [PATCH 03/13] bootstd: Allow enabling BOOTSTD_FULL without needing EXPO Tom Rini
2023-01-28 22:00 ` [PATCH 04/13] bootstd: Probe the block device before use Simon Glass
2023-02-07 16:51   ` Tom Rini
2023-01-28 22:00 ` [PATCH 05/13] bootstd: Correct virtio block-device handling Simon Glass
2023-02-07 16:51   ` Tom Rini
2023-01-28 22:00 ` [PATCH 06/13] bootstd: Add some default filesystems and commands Simon Glass
2023-02-07 16:51   ` Tom Rini
2023-01-28 22:00 ` [PATCH 07/13] qemu: Update qfw command to use addresses Simon Glass
2023-02-07 16:52   ` Tom Rini
2023-01-28 22:00 ` [PATCH 08/13] qemu: Move qfw kernel setup into a common file Simon Glass
2023-02-07 16:52   ` Tom Rini
2023-01-28 22:00 ` [PATCH 09/13] qemu: Add a bootdev for qfw Simon Glass
2023-02-07 16:52   ` Tom Rini
2023-01-28 22:00 ` [PATCH 10/13] qemu: Add a bootmeth " Simon Glass
2023-02-07 16:52   ` Tom Rini
2023-01-28 22:00 ` [PATCH 11/13] arm: qemu: Switch to standard boot Simon Glass
2023-02-07 16:52   ` Tom Rini
2023-01-28 22:00 ` [PATCH 12/13] arm: qemu: Switch to a text environment Simon Glass
2023-02-07 16:52   ` Tom Rini
2023-01-28 22:00 ` [PATCH 13/13] arm: qemu: Move GUIDs to the C file Simon Glass
2023-02-07 16:52   ` Tom Rini
2023-01-30 17:19 ` [PATCH 00/13] bootstd: Update ARM QEMU for standard boot and environment Tom Rini
2023-01-31 14:16   ` 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=20230128220028.53575-4-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=albert.u.boot@aribaud.net \
    --cc=andre.przywara@arm.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=john@metanate.com \
    --cc=philippe.reynes@softathome.com \
    --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