Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA152C433EF for ; Fri, 22 Oct 2021 03:09:57 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 529E4614C8 for ; Fri, 22 Oct 2021 03:09:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 529E4614C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BE6A383575; Fri, 22 Oct 2021 05:09:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="X+p1LY4Q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0625A83569; Fri, 22 Oct 2021 05:09:51 +0200 (CEST) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0B9A98356D for ; Fri, 22 Oct 2021 05:09:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id l16-20020a9d6a90000000b0054e7ab56f27so2788170otq.12 for ; Thu, 21 Oct 2021 20:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sgD1CLATRYgPHbVPLmfbKdg2wkp+HwkT9qaQGSLxgoU=; b=X+p1LY4QxAuWDG/AE0Ne4R9xPlHShp2l75KMXN5eXzmbzfgvKxvVXXFwUoWvV2Gt+L ulcfxC5t27iDpqK/0EF2zFnM0bZqFm96p610Ni4w/UtNB/oiw9MNgOivL8mcyeW0FiDc XDhlpl0DoKv364qYgSvfpIUGwhTtxJ2TJA9zc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sgD1CLATRYgPHbVPLmfbKdg2wkp+HwkT9qaQGSLxgoU=; b=caarJbzRN+2A5pahQs+UE6lfm6nqP4y2GkOIaEDdt75jhGalhTeU1xXTyqVAna6BSz 4yPRd5VleVOKTc68tdtQCYHgwb71r3dGtmCpNA1mwSDtA8jZ9JBoknWe3CfLA3enN31M 1irTFqO4EYOLJCwHMROaw/jz3jRFHT8tde+TZfZc+U5QLbNpVsSXzzuY1AsNWRfha39B 4yTNR18aaSPH01wsL6IaranozIY/jX4NMPDy6y7OXt6E6GdHmnASoSPk4gxDoXG+IFbH 9t63Cl570qI5B0zQ0+I3/rXzNoZSbmnW/yFsD4cuB2rFYbTT5FUp6gLFsByqMyQ1daNf p+dQ== X-Gm-Message-State: AOAM533uWVyTacxjVtiPMak8bslsK2+UMUGjx4A56PYApuyR1oOt7upO 7RSo/3ciFS8PRle3a2noh29c77dMIfh25Q== X-Google-Smtp-Source: ABdhPJwRGoaMM7LvgKVP+uICZaFHQwPdAHJP7vZmEXNdeDjR5jGzw23B+Md0OCDSQTMMKS8xvDkDRw== X-Received: by 2002:a05:6830:1c2e:: with SMTP id f14mr8073164ote.202.1634872164356; Thu, 21 Oct 2021 20:09:24 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id az14sm1483350oib.51.2021.10.21.20.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 20:09:24 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Wolfgang Denk , u-boot-board-maintainers@lists.denx.de, Rasmus Villemoes , u-boot-custodians@lists.denx.de, Tom Rini , Heinrich Schuchardt , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Simon Glass Subject: [PATCH v10 6/9] doc: Improve environment documentation Date: Thu, 21 Oct 2021 21:08:49 -0600 Message-Id: <20211022030852.1986718-5-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog In-Reply-To: <20211022030852.1986718-1-sjg@chromium.org> References: <20211022030852.1986718-1-sjg@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Make various updates suggested during review of the rST conversion. Signed-off-by: Simon Glass Reviewed-by: Marek BehĂșn Suggested-by: Wolfgang Denk --- (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