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