From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 3/7] Documentation: USB gadget: Add section for partition description
Date: Thu, 11 Jan 2018 08:50:08 +0100 [thread overview]
Message-ID: <20180111075012.9050-4-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20180111075012.9050-1-s.hauer@pengutronix.de>
Partition descriptions are used with both fastboot and DFU, so add
a separate section describing them and remove it from the DFU section.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Documentation/user/usb.rst | 48 ++++++++++++++++++++++++++++++++++++----------
1 file changed, 38 insertions(+), 10 deletions(-)
diff --git a/Documentation/user/usb.rst b/Documentation/user/usb.rst
index ec219cfbe4..3844e7941a 100644
--- a/Documentation/user/usb.rst
+++ b/Documentation/user/usb.rst
@@ -35,6 +35,42 @@ command, they show up as ``/dev/diskx`` and can be used like any other device.
USB device support
------------------
+barebox supports several different USB gadget drivers:
+
+- Device Firmware Upgrade (DFU)
+- Android Fastboot
+- serial gadget
+
+The recommended way to use USB gadget is with the :ref:`command_usbgadget` command.
+While there are individual commands for :ref:`command_dfu` and :ref:`command_usbserial`,
+the :ref:`command_usbgadget` commands supports registering composite gadgets.
+
+Partition description
+^^^^^^^^^^^^^^^^^^^^^
+
+The USB gadget commands for Android Fastboot and DFU take a partition description
+which describes which barebox partitions are exported via USB. The partition
+description is referred to as ``<desc>`` in the command help texts. It has
+the general form ``partition(name)flags,partition(name)flags,...``.
+
+The **partition** field is the partition as accessible in barebox. This can be a
+path in ``/dev/``, but could also be a regular file.
+
+The **name** field is the name under which the partition shall be exported. This
+is the name under which the partition can be found with the host tool.
+
+Several **flags** are supported, each denoted by a single character:
+
+* ``s`` Safe mode. The file is downloaded completely before it is written (DFU specific)
+* ``r`` Readback. The partition is allowed to be read back (DFU specific)
+* ``c`` The file shall be created if it doesn't exist. Needed when a regular file is exported.
+
+Example:
+
+.. code-block:: sh
+
+ /dev/nand0.barebox.bb(barebox)sr,/kernel(kernel)rc
+
DFU
^^^
@@ -43,16 +79,8 @@ Implementers Forum. It provides a vendor-independent way to update the firmware
devices. The current specification is version 1.1 and can be downloaded here:
http://www.usb.org/developers/devclass_docs/DFU_1.1.pdf
-On the barebox side, the update is handled with the :ref:`command_dfu` command.
-It is passed a list of partitions to provide to the host. The partition list
-has the form ``<file>(<name>)<flags>``. ``file`` is the path to the device or
-regular file which shall be updated. ``name`` is the name under which the partition
-shall be provided to the host. For the possible ``flags`` see
-:ref:`command_dfu`. A typical ``dfu`` command could look like this:
-
-.. code-block:: sh
-
- dfu "/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r"
+On the barebox side, the update is handled with the :ref:`command_usbgadget` or the
+:ref:`command_dfu` command.
On the host side, the tool `dfu-util <http://dfu-util.gnumonks.org/>`_ can be used
to update the partitions. It is available for most distributions and typically
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-01-11 7:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 7:50 fastboot sparse support Sascha Hauer
2018-01-11 7:50 ` [PATCH 1/7] fs: implement ftruncate Sascha Hauer
2018-01-11 7:50 ` [PATCH 2/7] ubiformat: Add ubiformat write function Sascha Hauer
2018-01-11 7:50 ` Sascha Hauer [this message]
2018-01-11 7:50 ` [PATCH 4/7] filetype: Add fastboot sparse format detection Sascha Hauer
2018-01-11 7:50 ` [PATCH 5/7] Add support for fastboot sparse images Sascha Hauer
2018-01-11 7:50 ` [PATCH 6/7] file_list: Add ubi flag Sascha Hauer
2018-01-11 7:50 ` [PATCH 7/7] usb: gadget: fastboot: Add sparse image support Sascha Hauer
2018-01-12 8:03 ` [PATCH] " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180111075012.9050-4-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox