summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2021-06-04 18:51:47 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-06-09 00:13:54 +0200
commit6a1d65e59f43ffcaf19fc75fd272bc4cc6dbe85d (patch)
tree1e49316d7f0672c7f6e12f2feb0c23105d546b8e
parent6b8d9c92fc5bebc190a3926be8bd1937ea459b0b (diff)
downloadu-boot-6a1d65e59f43ffcaf19fc75fd272bc4cc6dbe85d.tar.gz
u-boot-6a1d65e59f43ffcaf19fc75fd272bc4cc6dbe85d.tar.xz
u-boot-6a1d65e59f43ffcaf19fc75fd272bc4cc6dbe85d.zip
doc: usage: man-page for ums command
Provide a man-page for the ums command - USB Mass Storage. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r--doc/usage/index.rst1
-rw-r--r--doc/usage/ums.rst57
2 files changed, 58 insertions, 0 deletions
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index e5717b7141..843b4371f1 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -44,3 +44,4 @@ Shell commands
scp03
size
true
+ ums
diff --git a/doc/usage/ums.rst b/doc/usage/ums.rst
new file mode 100644
index 0000000000..3cde5fa1f2
--- /dev/null
+++ b/doc/usage/ums.rst
@@ -0,0 +1,57 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+ums command
+===========
+
+Synopsis
+--------
+
+::
+
+ ums <dev> [<interface>] <devnum[:partnum]>
+
+Description
+-----------
+
+Use the USB Mass Storage class (also known as UMS) to make accessible an U-Boot
+block device (fully or with :ref:`U-Boot's partition syntax <partitions>`)
+to a USB host and to enable file transfers. U-Boot, the USB device, acts as a
+simple external hard drive plugged on the host USB port.
+
+This command "ums" stays in the USB's treatment loop until user enters Ctrl-C.
+
+dev
+ USB gadget device number
+
+interface
+ interface for accessing the block device (mmc, sata, scsi, usb, ....)
+ defaults is "mmc"
+
+devnum
+ device number for selected interface
+
+partnum
+ partition number or 0 to expose all partitions, defaults to 0
+
+Example
+-------
+
+::
+
+ => ums 0 mmc 0
+ => ums 0 usb 1:2
+
+Configuration
+-------------
+
+The ums command is only available if CONFIG_CMD_USB_MASS_STORAGE=y
+and depends on CONFIG_USB_USB_GADGET and CONFIG_BLK.
+
+Return value
+------------
+
+The return value $? is set to 0 (true) when the USB stack was successfully
+started and interrupted, with Ctrl-C or after USB cable issue (detection
+timeout or cable removal).
+
+If an error occurs, the return value $? is set to 1 (false).