diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-08-07 13:13:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-08-07 20:34:28 +0200 |
commit | 7782c08047fc44874caf1c03c153a070f9ac557a (patch) | |
tree | 54ef13545a93221b2b4598822c3f3b830c2c82d4 /Documentation | |
parent | 038be0fbb5e983a498752b283319ba926f994a4b (diff) | |
parent | 46ff98b011c86511a8585a01fa3c4fbb774c9c54 (diff) | |
download | barebox-7782c08047fc44874caf1c03c153a070f9ac557a.tar.gz barebox-7782c08047fc44874caf1c03c153a070f9ac557a.tar.xz |
Merge branch 'for-next/usb-gadget'
Conflicts:
commands/Makefile
common/Kconfig
common/Makefile
drivers/usb/gadget/dfu.c
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/user/usb.rst | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Documentation/user/usb.rst b/Documentation/user/usb.rst index 8b700d3bbf..7cdd6ac814 100644 --- a/Documentation/user/usb.rst +++ b/Documentation/user/usb.rst @@ -88,3 +88,58 @@ the following: The ``dfu-util`` command automatically finds DFU-capable devices. If there are multiple devices found, you need to identify one with the ``-d``/``-p`` options. + +USB serial console +^^^^^^^^^^^^^^^^^^ + +barebox can provide a serial console over USB. This can be initialized with the +:ref:`command_usbserial` command. Once the host is plugged in it should show a +new serial device, on Linux for example ``/dev/ttyACM0``. + +Android Fastboot support +^^^^^^^^^^^^^^^^^^^^^^^^ + +barebox has support for the android fastboot protocol. There is no dedicated command +for initializing the fastboot protocol, instead it is integrated into the Multifunction +Composite Gadget, see :`ref:command_usbgadget` for a usage description. + +The Fastboot gadget supports the following commands: + +- fastboot flash +- fastboot getvar +- fastboot boot +- fastboot reboot + +**NOTE** ``fastboot erase`` is not yet implemented. This means flashing MTD partitions +does not yet work. + +The barebox Fastboot gadget supports the following non standard extensions: + +- ``fastboot getvar all`` + Shows a list of all variables +- ``fastboot oem getenv <varname>`` + Shows a barebox environment variable +- ``fastboot oem setenv <varname>=<value>`` + Sets a barebox environment variable +- ``fastboot oem exec <cmd>`` + executes a shell command. Note the output can't be seen on the host, but the fastboot + command returns successfully when the barebox command was successful and it fails when + the barebox command fails. + +USB Composite Multifunction Gadget +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +With the Composite Multifunction Gadget it is possible to create a USB device with +multiple functions. A useful combination is creating a Fastboot gadget and a USB serial +console. This combination can be created with: + +.. code-block:: sh + + usbgadget -A /dev/mmc2.0(root),/dev/mmc2.1(data) -a + +The ``-A`` option will create a Fastboot function providing ``/dev/mmc2.0`` as root +partition and ``/dev/mmc2.1`` as data partition. The ``-a`` option will create a +USB CDC ACM compliant serial device. + +Unlike the :ref:`command_dfu` command the ``usbgadget`` command returns immediately +after creating the gadget. The gadget can be removed with ``usbgadget -d``. |