public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Casanova <detlev.casanova@collabora.com>
To: u-boot@lists.denx.de
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Hai Pham <hai.pham.ud@renesas.com>,
	Tam Nguyen <tam.nguyen.xa@renesas.com>,
	Simon Glass <sjg@chromium.org>,
	Detlev Casanova <detlev.casanova@collabora.com>
Subject: [PATCH v5 4/6] sysinfo: Add documentation
Date: Mon,  2 Oct 2023 11:20:08 -0400	[thread overview]
Message-ID: <20231002152142.76516-5-detlev.casanova@collabora.com> (raw)
In-Reply-To: <20231002152142.76516-1-detlev.casanova@collabora.com>

Add documentation for the sysinfo command with examples.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 doc/usage/cmd/sysinfo.rst | 56 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 doc/usage/cmd/sysinfo.rst

diff --git a/doc/usage/cmd/sysinfo.rst b/doc/usage/cmd/sysinfo.rst
new file mode 100644
index 00000000000..1660b2aa1a6
--- /dev/null
+++ b/doc/usage/cmd/sysinfo.rst
@@ -0,0 +1,56 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+sysinfo command
+===============
+
+Synopis
+-------
+
+::
+
+    sysinfo id <varname>
+    sysinfo model <varname>
+    sysinfo revision <varname>
+
+Description
+-----------
+
+The `sysinfo` command is used to show information about the running system
+
+The `sysinfo id` command prints or sets an environment variable to the board id
+as an hex value.
+
+    varname
+        an optional environment variable to store the board id into.
+
+The `sysinfo model` command prints or sets an environment variable to the board
+model name as a string value.
+
+    varname
+        an optional environment variable to store the board model name into.
+
+The `sysinfo revision` command prints or sets an environment variable to the
+board revision in the <MAJOR>.<MINOR> format, where MINOR and MINOR are int
+values.
+
+    varname
+        an optional environment variable to store the board revision into.
+
+Examples
+--------
+
+::
+
+    => sysinfo id
+    0x0b
+    => sysinfo model
+    Renesas Starter Kit Premier board rev 2.1
+    => sysinfo revision varname
+    => env print varname
+    2.1
+
+Return value
+------------
+
+The return value $? is set to 0 (true) if the command succeeded. If an
+error occurs, the return value $? is set to 1 (false).
-- 
2.41.0


  parent reply	other threads:[~2023-10-02 15:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 15:20 [PATCH v5 0/6] Introduce the sysinfo command Detlev Casanova
2023-10-02 15:20 ` [PATCH v5 1/6] sysinfo: Add IDs for board id and revision Detlev Casanova
2023-10-02 18:56   ` Simon Glass
2023-10-16 17:37   ` Heinrich Schuchardt
2023-10-16 18:11     ` Marek Vasut
2023-10-18 17:00     ` Detlev Casanova
2023-10-02 15:20 ` [PATCH v5 2/6] cmd: Add a sysinfo command Detlev Casanova
2023-10-02 18:56   ` Simon Glass
2023-10-16 14:21     ` Detlev Casanova
2023-10-16 21:54       ` Simon Glass
2023-10-02 15:20 ` [PATCH v5 3/6] sysinfo: Add a test Detlev Casanova
2023-10-02 18:56   ` Simon Glass
2023-10-02 15:20 ` Detlev Casanova [this message]
2023-10-02 18:56   ` [PATCH v5 4/6] sysinfo: Add documentation Simon Glass
2023-10-16 18:02   ` Heinrich Schuchardt
2023-10-02 15:20 ` [PATCH v5 5/6] sysinfo: rcar3: Use int instead of char for revision Detlev Casanova
2023-10-07 21:32   ` Marek Vasut
2023-10-02 15:20 ` [PATCH v5 6/6] sysinfo: rcar3: Implement BOARD_ID and BOARD_REV_* Detlev Casanova
2023-10-07 21:35   ` Marek Vasut
2023-10-16 17:03     ` Detlev Casanova
2023-10-16 18:12       ` Marek Vasut

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=20231002152142.76516-5-detlev.casanova@collabora.com \
    --to=detlev.casanova@collabora.com \
    --cc=hai.pham.ud@renesas.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=sjg@chromium.org \
    --cc=tam.nguyen.xa@renesas.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