]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
doc: cmd: add usage doc for memsize
authorFrank Wunderlich <frank-w@public-files.de>
Wed, 4 Feb 2026 18:40:44 +0000 (19:40 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 7 Feb 2026 17:51:34 +0000 (11:51 -0600)
Add documentation for memsize command.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
doc/usage/cmd/memsize.rst [new file with mode: 0644]

diff --git a/doc/usage/cmd/memsize.rst b/doc/usage/cmd/memsize.rst
new file mode 100644 (file)
index 0000000..6e99d7c
--- /dev/null
@@ -0,0 +1,43 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+.. index::
+   single: memsize (command)
+
+memsize command
+===============
+
+Synopsis
+--------
+
+::
+
+    memsize [name]
+
+Description
+-----------
+
+The memsize command shows the amount of RAM in MiB in decimal notation.
+Optionally same value can be assigned to an environment variable.
+
+Examples
+--------
+
+This first example shows printing of ram size:
+
+::
+
+  => memsize
+  8192 MiB
+
+This second example shows assign ram size to environment variable:
+
+::
+
+  => memsize memsz
+  => printenv memsz
+  memsz=8192
+
+Return value
+------------
+
+The return value is always 0 except error happens on setting environment variable.