]> git.baikalelectronics.ru Git - uboot.git/commitdiff
doc: man-page for the printenv command
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 19 Jun 2022 11:59:22 +0000 (13:59 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 19 Jun 2022 13:53:09 +0000 (15:53 +0200)
Privide a man-page for the printenv command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
doc/usage/cmd/printenv.rst [new file with mode: 0644]
doc/usage/index.rst

diff --git a/doc/usage/cmd/printenv.rst b/doc/usage/cmd/printenv.rst
new file mode 100644 (file)
index 0000000..9cb20f6
--- /dev/null
@@ -0,0 +1,90 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+printenv command
+================
+
+Synopsis
+--------
+
+::
+
+    printenv [-a] [name ...]
+    printenv -e [-guid guid][-n] [name]
+
+Description
+-----------
+
+The printenv command is used to print environment or UEFI variables.
+
+\-a
+    Print environment variables starting with a period ('.').
+
+\-e
+    Print UEFI variables. Without -e environment variables are printed.
+
+\-guid *guid*
+    Specify vendor GUID *guid*. If none is specified, all UEFI variables with
+    the specified name are printed irrespective of their vendor GUID.
+
+\-n
+    don't show hexadecimal dump of value
+
+name
+    Variable name. If no name is provided, all variables are printed.
+    Multiple environment variable names may be specified.
+
+Examples
+--------
+
+The following examples demonstrates the effect of the *-a* flag when displaying
+environment variables:
+
+::
+
+    => setenv .foo bar
+    => printenv
+    arch=sandbox
+    baudrate=115200
+    board=sandbox
+    ...
+    stdout=serial,vidconsole
+
+    Environment size: 644/8188 bytes
+    => printenv -a
+    .foo=bar
+    arch=sandbox
+    baudrate=115200
+    board=sandbox
+    ...
+    stdout=serial,vidconsole
+
+    Environment size: 653/8188 bytes
+    =>
+
+The next example shows the effect of the *-n* flag when displaying an UEFI
+variable and how to specify a vendor GUID:
+
+::
+
+    => printenv -e -guid 8be4df61-93ca-11d2-aa0d-00e098032b8c PlatformLangCodes
+    PlatformLangCodes:
+        8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID)
+        BS|RT|RO, DataSize = 0x6
+        00000000: 65 6e 2d 55 53 00                                en-US.
+    => printenv -e -n PlatformLangCodes
+    PlatformLangCodes:
+        8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID)
+        BS|RT|RO, DataSize = 0x6
+    =>
+
+Configuration
+=============
+
+UEFI variables are only supported if CONFIG_CMD_NVEDIT_EFI=y. The value of UEFI
+variables can only be displayed if CONFIG_HEXDUMP=y.
+
+Return value
+------------
+
+The return value $? is 1 (false) if a specified variable is not found.
+Otherwise $? is set to 0 (true).
index 1c03b9b33be423cd6d19cb34ddf092059d591c61..770418434ad98448a088bdb9244d014b8868af5a 100644 (file)
@@ -49,6 +49,7 @@ Shell commands
    cmd/md
    cmd/mmc
    cmd/pinmux
+   cmd/printenv
    cmd/pstore
    cmd/qfw
    cmd/reset