ums.rst 1.2 KB

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