Patrick Delaunay | 6a1d65e | 2021-06-04 18:51:47 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | ums command |
| 4 | =========== |
| 5 | |
| 6 | Synopsis |
| 7 | -------- |
| 8 | |
| 9 | :: |
| 10 | |
| 11 | ums <dev> [<interface>] <devnum[:partnum]> |
| 12 | |
| 13 | Description |
| 14 | ----------- |
| 15 | |
| 16 | Use the USB Mass Storage class (also known as UMS) to make accessible an U-Boot |
| 17 | block device (fully or with :ref:`U-Boot's partition syntax <partitions>`) |
| 18 | to a USB host and to enable file transfers. U-Boot, the USB device, acts as a |
| 19 | simple external hard drive plugged on the host USB port. |
| 20 | |
| 21 | This command "ums" stays in the USB's treatment loop until user enters Ctrl-C. |
| 22 | |
| 23 | dev |
| 24 | USB gadget device number |
| 25 | |
| 26 | interface |
| 27 | interface for accessing the block device (mmc, sata, scsi, usb, ....) |
| 28 | defaults is "mmc" |
| 29 | |
| 30 | devnum |
| 31 | device number for selected interface |
| 32 | |
| 33 | partnum |
| 34 | partition number or 0 to expose all partitions, defaults to 0 |
| 35 | |
| 36 | Example |
| 37 | ------- |
| 38 | |
| 39 | :: |
| 40 | |
| 41 | => ums 0 mmc 0 |
| 42 | => ums 0 usb 1:2 |
| 43 | |
| 44 | Configuration |
| 45 | ------------- |
| 46 | |
| 47 | The ums command is only available if CONFIG_CMD_USB_MASS_STORAGE=y |
| 48 | and depends on CONFIG_USB_USB_GADGET and CONFIG_BLK. |
| 49 | |
| 50 | Return value |
| 51 | ------------ |
| 52 | |
| 53 | The return value $? is set to 0 (true) when the USB stack was successfully |
| 54 | started and interrupted, with Ctrl-C or after USB cable issue (detection |
| 55 | timeout or cable removal). |
| 56 | |
| 57 | If an error occurs, the return value $? is set to 1 (false). |