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>,
	Philippe Reynes <philippe.reynes@softathome.com>
Subject: [PATCH 06/13] bootstd: Add some default filesystems and commands
Date: Sat, 28 Jan 2023 15:00:21 -0700	[thread overview]
Message-ID: <20230128220028.53575-7-sjg@chromium.org> (raw)
In-Reply-To: <20230128220028.53575-1-sjg@chromium.org>

We need to support a basic set of filesystems for booting to work in most
cases. Add these in via a new option, letting the board disable them
individually (for space reasons) if desired.

This enables the filesystem commands as well as the actual functionality,
even though bootstd is quite happy to use ext4 without the ext4 command.
Further work would be needed to disintangle this and reduce code size.

Add several other options as well, providing sensible defaults.

We cannot enable this by default, since it expands the size of many
boards quite a lot.

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

 boot/Kconfig                 | 27 +++++++++++++++++++++++++++
 configs/tools-only_defconfig |  1 +
 doc/develop/bootstd.rst      |  4 ++++
 3 files changed, 32 insertions(+)

diff --git a/boot/Kconfig b/boot/Kconfig
index 98e194fc2b2..5f491625c82 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -406,6 +406,33 @@ config VPL_BOOTSTD
 
 if BOOTSTD
 
+config BOOTSTD_DEFAULTS
+	bool "Select some common defaults for standard boot"
+	depends on BOOTSTD
+	imply USE_BOOTCOMMAND
+	# Bring in some defaults which are generally needed. Boards can drop
+	# these as needed to save code space. Bootstd does not generally require
+	# the commands themselves to be enabled, but this is how some of the
+	# functionality is controlled at present
+	imply CMD_EXT2
+	imply CMD_EXT4
+	imply CMD_FAT
+	imply CMD_FS_GENERIC
+	imply CMD_PART
+	imply CMD_DHCP if NET
+	imply CMD_MII if NET
+	imply CMD_PING if NET
+	imply CMD_PXE if NET
+	imply USB_STORAGE
+	imply SUPPORT_RAW_INITRD
+	imply ENV_VARS_UBOOT_CONFIG
+	imply EFI_PARTITION
+	imply ISO_PARTITION
+	help
+	  These are not required but are commonly needed to support a good
+	  selection of booting methods. Enable this to improve the capability
+	  of U-Boot to boot various images.
+
 config BOOTSTD_BOOTCOMMAND
 	bool "Use bootstd to boot"
 	default y if !DISTRO_DEFAULTS
diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
index 23e1f0e9dba..88a94ddd6b0 100644
--- a/configs/tools-only_defconfig
+++ b/configs/tools-only_defconfig
@@ -12,6 +12,7 @@ CONFIG_FIT_SIGNATURE=y
 # CONFIG_BOOTMETH_VBE is not set
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="run distro_bootcmd"
+# CONFIG_AVB_VERIFY is not set
 # CONFIG_CMD_BOOTD is not set
 # CONFIG_CMD_BOOTM is not set
 # CONFIG_CMD_ELF is not set
diff --git a/doc/develop/bootstd.rst b/doc/develop/bootstd.rst
index 281aabf74b2..dabe987c0dc 100644
--- a/doc/develop/bootstd.rst
+++ b/doc/develop/bootstd.rst
@@ -396,6 +396,10 @@ To enable all feature sof standard boot, use `CONFIG_BOOTSTD_FULL`. This
 includes the full set of commands, more error messages when things go wrong and
 bootmeth ordering with the bootmeths environment variable.
 
+You should probably also enable `CONFIG_BOOTSTD_DEFAULTS`, which provides
+several filesystem and network features (if `CONFIG_NET` is enabled) so that
+a good selection of boot options is available.
+
 
 Available bootmeth drivers
 --------------------------
-- 
2.39.1.456.gfc5497dd1b-goog


  parent reply	other threads:[~2023-01-28 22:01 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 ` [PATCH 03/13] bootstd: Allow enabling BOOTSTD_FULL without needing EXPO Simon Glass
2023-02-07 16:51   ` 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 ` Simon Glass [this message]
2023-02-07 16:51   ` [PATCH 06/13] bootstd: Add some default filesystems and commands 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-7-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=albert.u.boot@aribaud.net \
    --cc=andre.przywara@arm.com \
    --cc=ilias.apalodimas@linaro.org \
    --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