Skip to content

feat(linux): Add the documentation for UMS command #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions configs/AM62AX/AM62AX_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ linux/Foundational_Components/U-Boot/UG-General-Info
linux/Foundational_Components/U-Boot/UG-DFU
linux/Foundational_Components/U-Boot/UG-Network
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-UART
Expand Down
1 change: 1 addition & 0 deletions configs/AM62LX/AM62LX_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ linux/Foundational_Components/U-Boot/Users-Guide
linux/Foundational_Components/U-Boot/UG-General-Info
linux/Foundational_Components/U-Boot/UG-DFU
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-UART
Expand Down
1 change: 1 addition & 0 deletions configs/AM62PX/AM62PX_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ linux/Foundational_Components/U-Boot/UG-General-Info
linux/Foundational_Components/U-Boot/UG-DFU
#linux/Foundational_Components/U-Boot/UG-Network
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-UART
Expand Down
1 change: 1 addition & 0 deletions configs/AM62X/AM62X_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ linux/Foundational_Components/U-Boot/UG-General-Info
linux/Foundational_Components/U-Boot/UG-DFU
#linux/Foundational_Components/U-Boot/UG-Network
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-UART
Expand Down
1 change: 1 addition & 0 deletions configs/J7200/J7200_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ linux/Foundational_Components/U-Boot/UG-DFU
linux/Foundational_Components/U-Boot/UG-Network
linux/Foundational_Components/U-Boot/UG-NAND
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-NOR
Expand Down
1 change: 1 addition & 0 deletions configs/J721E/J721E_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ linux/Foundational_Components/U-Boot/UG-DFU
linux/Foundational_Components/U-Boot/UG-Network
linux/Foundational_Components/U-Boot/UG-NAND
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-NOR
Expand Down
1 change: 1 addition & 0 deletions configs/J721S2/J721S2_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ linux/Foundational_Components/U-Boot/UG-DFU
linux/Foundational_Components/U-Boot/UG-Network
linux/Foundational_Components/U-Boot/UG-NAND
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-NOR
Expand Down
1 change: 1 addition & 0 deletions configs/J722S/J722S_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ linux/Foundational_Components/U-Boot/UG-DFU
linux/Foundational_Components/U-Boot/UG-Network
linux/Foundational_Components/U-Boot/UG-NAND
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-NOR
Expand Down
1 change: 1 addition & 0 deletions configs/J742S2/J742S2_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ linux/Foundational_Components/U-Boot/UG-DFU
linux/Foundational_Components/U-Boot/UG-Network
linux/Foundational_Components/U-Boot/UG-NAND
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-NOR
Expand Down
1 change: 1 addition & 0 deletions configs/J784S4/J784S4_linux_toc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ linux/Foundational_Components/U-Boot/UG-DFU
linux/Foundational_Components/U-Boot/UG-Network
linux/Foundational_Components/U-Boot/UG-NAND
linux/Foundational_Components/U-Boot/UG-Memory-K3
linux/Foundational_Components/U-Boot/UG-UMS
linux/Foundational_Components/U-Boot/UG-SPI
linux/Foundational_Components/U-Boot/UG-QSPI
linux/Foundational_Components/U-Boot/UG-NOR
Expand Down
66 changes: 66 additions & 0 deletions source/linux/Foundational_Components/U-Boot/UG-UMS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
UMS

Check warning on line 1 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'UMS') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'UMS') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 1, "column": 1}}}, "severity": "INFO"}

Check warning on line 1 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Headings] Use sentence-style capitalization in 'UMS'. Raw Output: {"message": "[RedHat.Headings] Use sentence-style capitalization in 'UMS'.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 1, "column": 1}}}, "severity": "INFO"}
###

UMS (USB Mass Storage) functionality, allows a connected USB host to

Check warning on line 4 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'UMS') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'UMS') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 4, "column": 1}}}, "severity": "INFO"}
access U-Boot block devices and enable file transfer. This is useful
for accessing storage devices such as SD or MMC from a USB host such

Check warning on line 6 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'MMC') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'MMC') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 6, "column": 46}}}, "severity": "INFO"}
as host PC.

Configuration Requirements

Check warning on line 9 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Headings] Use sentence-style capitalization in 'Configuration Requirements'. Raw Output: {"message": "[RedHat.Headings] Use sentence-style capitalization in 'Configuration Requirements'.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 9, "column": 1}}}, "severity": "INFO"}
==========================

To enable UMS support, following configuration needs to be set in

Check warning on line 12 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.PassiveVoice] 'be set' is passive voice. In general, use active voice. Consult the style guide for acceptable use of passive voice. Raw Output: {"message": "[RedHat.PassiveVoice] 'be set' is passive voice. In general, use active voice. Consult the style guide for acceptable use of passive voice.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 12, "column": 57}}}, "severity": "INFO"}

Check warning on line 12 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'UMS') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'UMS') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 12, "column": 11}}}, "severity": "INFO"}
the U-Boot config file:

.. code-block:: kconfig

CONFIG_CMD_USB_MASS_STORAGE=y

Usage
=====

To use the UMS command:

Check warning on line 22 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'UMS') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'UMS') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 22, "column": 12}}}, "severity": "INFO"}

.. code-block:: console

=> ums <dev> [<interface>] <devnum[:partnum]>

**dev**

USB gadget device number.

**interface**

Interface for accessing block device (MMC, SATA, ....), default is MMC.

Check warning on line 34 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'SATA') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'SATA') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 34, "column": 44}}}, "severity": "INFO"}

Check warning on line 34 in source/linux/Foundational_Components/U-Boot/UG-UMS.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'MMC') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'MMC') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/U-Boot/UG-UMS.rst", "range": {"start": {"line": 34, "column": 39}}}, "severity": "INFO"}

**devnum**

Device number for selected interface.

**partnum**

Partition number for selected device, default is 0. 0 to expose all
partitions.

Example usage:

.. code-block:: console

=> mmc list
mmc@fa10000: 0 (eMMC)
mmc@fa00000: 1 (SD)
=> ums 0 mmc 1
UMS: LUN 0, dev mmc 1, hwpart 0, sector 0x0, count 0x3b72400

This example exposes the SD card (mmc 1) as a USB mass storage device
to the connected host PC. The host PC can then mount and access the
storage device for file transfer. Press Ctrl+C to exit UMS command and
return to the U-boot prompt.

.. note::

The USB controller must be in peripheral mode for UMS to work. If
the controller is in host mode, then reconfigure it to
peripheral mode before using the UMS command. The USB controller can
be configured to operate in peripheral mode by changing the value of
``dr_mode`` property of USB controller node in device tree to ``peripheral``.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ User's Guide
UG-PCIeBoot
UG-NAND
UG-Memory-K3
UG-UMS
UG-Memory-OMAP
UG-SPI
UG-QSPI
Expand Down
Loading