aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt2023-05-16 07:46:53 +0200
committerHeinrich Schuchardt2023-06-02 10:59:15 +0200
commita2c0e3595a3e7a85a306c28b0d9097029dd54182 (patch)
tree3b3b3daedf269d5b620ed4f3079ccd5d0c229068
parente48f29d7cab7ed80a36836ad684312b21e798882 (diff)
doc: loadx man-page
Provide a man-page for the loadx command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r--doc/usage/cmd/loadx.rst77
-rw-r--r--doc/usage/index.rst1
2 files changed, 78 insertions, 0 deletions
diff --git a/doc/usage/cmd/loadx.rst b/doc/usage/cmd/loadx.rst
new file mode 100644
index 00000000000..facca9b969d
--- /dev/null
+++ b/doc/usage/cmd/loadx.rst
@@ -0,0 +1,77 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+loadx command
+=============
+
+Synopsis
+--------
+
+::
+
+ loadx [addr [baud]]
+
+Description
+-----------
+
+The loadx command is used to transfer a file to the device via the serial line
+using the XMODEM 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.
+
+.. code-block::
+
+ picocom --send-cmd 'sx -b vv' --baud 115200 /dev/ttyUSB0
+
+After entering the loadx command the key sequence <CTRL-A><CTRL-S> is used to
+let picocom prompt for the file name. Picocom invokes the program sx for the
+file transfer.
+
+::
+
+ => loadx 60800000 115200
+ ## Ready for binary (xmodem) download to 0x60800000 at 115200 bps...
+ C
+ *** file: helloworld.efi
+ $ sx -b vv helloworld.efi
+ sx: cannot open vv: No such file or directory
+ Sending helloworld.efi, 24 blocks: Give your local XMODEM receive command now.
+ Xmodem sectors/kbytes sent: 0/ 0kRetry 0: NAK on sector
+ Bytes Sent: 3072 BPS:1147
+
+ Transfer incomplete
+
+ *** exit status: 1 ***
+ ## Total Size = 0x00000c00 = 3072 Bytes
+ ## Start Addr = 0x60800000
+ =>
+
+The transfer can be cancelled by pressing 3 times <CTRL+C> after two seconds
+of inactivity on terminal.
+
+Configuration
+-------------
+
+The command is only available if CONFIG_CMD_LOADB=y.
+
+Initial timeout in seconds while waiting for transfer is configured by
+config option CMD_LOADXY_TIMEOUT or by env variable $loadxy_timeout.
+Setting it to 0 means infinite timeout.
+
+Return value
+------------
+
+The return value $? is 0 (true) on success, 1 (false) otherwise.
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index f348848fc7e..84ef8a9a427 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -65,6 +65,7 @@ Shell commands
cmd/load
cmd/loadb
cmd/loadm
+ cmd/loadx
cmd/loady
cmd/mbr
cmd/md