All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: "Wolfgang Denk" <wd@denx.de>,
	u-boot-board-maintainers@lists.denx.de,
	"Rasmus Villemoes" <rasmus.villemoes@prevas.dk>,
	u-boot-custodians@lists.denx.de, "Tom Rini" <trini@konsulko.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Marek Behún" <marek.behun@nic.cz>,
	"Simon Glass" <sjg@chromium.org>
Subject: [PATCH v10 6/9] doc: Improve environment documentation
Date: Thu, 21 Oct 2021 21:08:49 -0600	[thread overview]
Message-ID: <20211022030852.1986718-5-sjg@chromium.org> (raw)
In-Reply-To: <20211022030852.1986718-1-sjg@chromium.org>

Make various updates suggested during review of the rST conversion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Suggested-by: Wolfgang Denk <wd@denx.de>
---

(no changes since v7)

Changes in v7:
- A few more tweaks

Changes in v6:
- Move all updates to a separate patch
- More updates and improvements

Changes in v5:
- Minor updates as suggested by Wolfgang

Changes in v4:
- Add new patch to move environment documentation to rST

 doc/usage/environment.rst | 36 +++++++++++++++++++++++++++---------
 doc/usage/index.rst       |  1 +
 2 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/doc/usage/environment.rst b/doc/usage/environment.rst
index 6f3066e2b65..af193739a5a 100644
--- a/doc/usage/environment.rst
+++ b/doc/usage/environment.rst
@@ -4,16 +4,20 @@ Environment Variables
 =====================
 
 U-Boot supports user configuration using Environment Variables which
-can be made persistent by saving to Flash memory.
+can be made persistent by saving to persistent storage, for example flash
+memory.
 
-Environment Variables are set using "setenv", printed using
-"printenv", and saved to Flash using "saveenv". Using "setenv"
+Environment Variables are set using "env set" (alias "setenv"), printed using
+"env print" (alias "printenv"), and saved to persistent storage using
+"env save" (alias "saveenv"). Using "env set"
 without a value can be used to delete a variable from the
-environment. As long as you don't save the environment you are
+environment. As long as you don't save the environment, you are
 working with an in-memory copy. In case the Flash area containing the
 environment is erased by accident, a default environment is provided.
 
-Some configuration options can be set using Environment Variables.
+Some configuration is controlled by Environment Variables, so that setting the
+variable can adjust the behaviour of U-Boot (e.g. autoboot delay, autoloading
+from tftp).
 
 Text-based Environment
 ----------------------
@@ -94,16 +98,24 @@ environment but work is underway to address this.
 List of environment variables
 -----------------------------
 
+Some configuration options can be set using Environment Variables. In many cases
+the value in the default environment comes from a CONFIG option - see
+`include/env_default.h`) for this.
+
 This is most-likely not complete:
 
 baudrate
-    see CONFIG_BAUDRATE
+    Current baud rate used by the serial console. The built-in value is set by
+    CONFIG_BAUDRATE (see `drivers/serial/Kconfig`)
 
 bootdelay
-    see CONFIG_BOOTDELAY
+    Current autoboot delay. The built-in value is set by CONFIG_BOOTDELAY (see
+    `common/Kconfig`)
 
 bootcmd
-    see CONFIG_BOOTCOMMAND
+    Defines a command string that is automatically executed when no character
+    is read on the console interface within a cetain boot delay after reset.
+    The built-in value is set by CONFIG_BOOTCOMMAND (see `common/Kconfig`)
 
 bootargs
     Boot arguments when booting an RTOS image
@@ -149,7 +161,7 @@ autoload
     if set to "no" (any string beginning with 'n'),
     "bootp" will just load perform a lookup of the
     configuration from the BOOTP server, but not try to
-    load any image using TFTP
+    load any image using TFTP or DHCP.
 
 autostart
     if set to "yes", an image loaded using the "bootp",
@@ -315,6 +327,8 @@ vlan
     Ethernet is encapsulated/received over 802.1q
     VLAN tagged frames.
 
+    Note: This appears not to be used in U-Boot. See `README.VLAN`.
+
 bootpretryperiod
     Period during which BOOTP/DHCP sends retries.
     Unsigned value, in milliseconds. If not set, the period will
@@ -356,6 +370,10 @@ flash or offset in NAND flash.
 boards currently use other variables for these purposes, and some
 boards use these variables for other purposes.
 
+Also note that most of these variables are just a commonly used set of variable
+names, used in some other variable definitions, but are not hard-coded anywhere
+in U-Boot code.
+
 ================= ============== ================ ==============
 Image             File Name      RAM Address      Flash Location
 ================= ============== ================ ==============
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 4314112ff34..04dea9f0f8e 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -5,6 +5,7 @@ Use U-Boot
    :maxdepth: 1
 
    dfu
+   environment
    fdt_overlays
    fit
    netconsole
-- 
2.33.0.1079.g6e70778dc9-goog


  parent reply	other threads:[~2021-10-22  3:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  3:08 [PATCH v10 0/9] env: Allow environment in text files Simon Glass
2021-10-22  3:08 ` [PATCH v10 1/9] sandbox: Drop distro_boot Simon Glass
2021-11-17  1:57   ` Tom Rini
2021-10-22  3:08 ` [PATCH v10 2/9] doc: Move environment documentation to rST Simon Glass
2021-10-22  3:08 ` [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file Simon Glass
2021-10-22  8:29   ` Wolfgang Denk
2021-10-22 14:29     ` Tom Rini
2021-10-22 23:29       ` Tony Dinh
2021-10-24 15:41       ` Wolfgang Denk
2021-11-12 18:12   ` Daniel Golle
2021-11-13 14:19     ` Simon Glass
2022-02-10 11:20   ` Patrick DELAUNAY
2022-03-12 18:14     ` Simon Glass
2021-10-22  3:08 ` [PATCH v10 4/9] sandbox: Use a text-based environment Simon Glass
2021-10-22  3:08 ` [PATCH v10 5/9] doc: Mention CONFIG_DEFAULT_ENV_FILE Simon Glass
2021-10-22  3:08 ` Simon Glass [this message]
2021-10-22  3:08 ` [PATCH v10 7/9] doc: Improve environment documentation further Simon Glass
2021-10-23  8:23   ` Heinrich Schuchardt
2022-03-12  2:24     ` Simon Glass
2021-10-22  3:08 ` [PATCH v10 8/9] sandbox: Update the test MAC/IP addresses Simon Glass
2021-10-23  8:29   ` Heinrich Schuchardt
2021-10-24 19:54     ` Simon Glass
2021-10-24 21:39       ` Tom Rini
2021-10-22  3:08 ` [PATCH v10 9/9] bootm: Tidy up use of autostart env var 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=20211022030852.1986718-5-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=marek.behun@nic.cz \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=trini@konsulko.com \
    --cc=u-boot-board-maintainers@lists.denx.de \
    --cc=u-boot-custodians@lists.denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=wd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.