[PATCH 1/1] doc: describe loady command

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Jan 22 19:20:37 CET 2021


Create a man-page for the loady command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 doc/usage/index.rst |  1 +
 doc/usage/loady.rst | 67 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 doc/usage/loady.rst

diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 317db3b449..1304b59aad 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -20,6 +20,7 @@ Shell commands
    echo
    exit
    for
+   loady
    mbr
    pstore
    sbi
diff --git a/doc/usage/loady.rst b/doc/usage/loady.rst
new file mode 100644
index 0000000000..2819cc72ae
--- /dev/null
+++ b/doc/usage/loady.rst
@@ -0,0 +1,67 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+loady command
+=============
+
+Synopsis
+--------
+
+::
+
+    loady [addr [baud]]
+
+Description
+-----------
+
+The loady command is used to transfer a file to the device via the serial line
+using the YMODEM protocol.
+
+The number of transferred bytes is saved in environment variable filesize.
+
+addr
+    load address, defaults to environment variable loadaddr or if loadaddr is
+    not set to configuration variable CONFIG_SYS_LOAD_ADDR
+
+baud
+    baud rate for the ymodem transmission. After the transmission the baud
+    rate is reset to the original value.
+
+Example
+-------
+
+In the example below the terminal emulation program picocom was used to
+transfer a file to the device.
+
+After entering the loady command the key sequence <CTRL-A><CTRL-S> is used to
+let picocom prompt for the file name. Picocom invokes the program sz for the
+file transfer.
+
+::
+
+    => loady 80064000 115200
+    ## Ready for binary (ymodem) download to 0x80064000 at 115200 bps...
+    C
+    *** file: BOOTRISCV64.EFI
+    $ sz -b -vv BOOTRISCV64.EFI
+    Sending: BOOTRISCV64.EFI
+    Bytes Sent: 398976   BPS:7883
+    Sending:
+    Ymodem sectors/kbytes sent:   0/ 0k
+    Transfer complete
+
+    *** exit status: 0 ***
+    /1(CAN) packets, 4 retries
+    ## Total Size      = 0x0006165f = 398943 Bytes
+    => echo ${filesize}
+    6165f
+    =>
+
+Configuration
+-------------
+
+The command is only available if CONFIG_CMD_LOADB=y.
+
+Return value
+------------
+
+The return value $? is always 0 (true).
--
2.29.2



More information about the U-Boot mailing list