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