summaryrefslogtreecommitdiffstats
path: root/Documentation/user/usb.rst
Commit message (Collapse)AuthorAgeFilesLines
* usbgadget: add support for USB mass storage gadgetAhmad Fatoum2021-06-251-0/+5
| | | | | | | | | | | | | | | | | | | This driver is based on the f_mass_storage drivers in Linux v5.11 and U-Boot v2021.01. Unlike the U-Boot version, it runs asynchronously without blocking the bootloader from doing other tasks, like exporting other USB gadgets at the same time or enabling shell access. With pollers and workqueues, enabling this would need a large rework of the code to be completely callback based, whenever the original Linux code sleeps waiting for events. With the new bthread support, we can actually sleep and handover control to other bthreads until there is actual work to do. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210622082617.18011-9-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fastboot: rename usbgadget.fastboot_* variables to fastboot.*Daniel Glöckner2020-08-191-2/+2
| | | | | | | | | | | | | There is nothing USB-specific in the defined usbgadget.fastboot_* variables. Rename them to be usable also for the UDP fastboot transport. The usbgadget.fastboot_function variable is used to define the files and devices accessible with the erase and flash commands. Since "function" is a term from the USB specification and the Fastboot specification uses the term "partition", we rename that variable to "fastboot.partitions". Signed-off-by: Daniel Glöckner <dg@emlix.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* docs: use #!/usr/bin/env bash shebang instead of #!/bin/bashFlorian Klink2019-12-061-1/+1
| | | | | | | | | | Some distributions might not have bash in /bin, but in $PATH. Using #!/usr/bin/env bash solves this, and is consistent with how the perl and python shebangs look like in the tree. Signed-off-by: Florian Klink <flokli@flokli.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usbgadget: autostart: add DFU supportLadislav Michl2018-10-291-0/+2
| | | | | | | | | | | Use global variable dfu_function to autostart DFU. As similar code is used to start multifunction gadget using command, move common code to common/usbgadget.c and consolidate it. It turned out that '-s' option of usbgadget command does nothing, so remove its help text and make it function as '-a'. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: USB gadget: document usbgadget.fastboot_bbu variableLadislav Michl2018-10-291-0/+2
| | | | | Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: gadget: fastboot: Add sparse image supportSascha Hauer2018-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse images are needed for fastboot to flash images that do not fit into memory. Android fastboot is kind of a dumb protocol. It first sends you a big image and afterwards it tells you where to put this image. This of course limits fastboot to files smaller than the available memory. To bypass this issue fastboot has so called Sparse image support. This is a new image format that can contain holes in the data so a big image can be written in multiple steps with holes in other areas each step. Implementing this for UBI images is kind of tricky since ubiformat normally expects to get a single image. Preparations to ubiformat a device in multiple parts have been done in previous patches. It is however, only for the first part possible to detect if it is a UBI image. The other parts are just binary data and we cannot know if we have to pass this data raw to the flash or use ubiformat. For this reason this patch makes the 'u' flag in the partition description mandatory for proper UBI image flashing on MTD devices. fastboot passes a max_download_size variable to the host. This variable contains the image size fastboot can take in one go. We have to choose a good compromise here. On one hand we do not want to risk that we actually do not have enough memory to hold the transferred image, on the other hand we want images like bootloaders not as sparse images, but in one go instead to make atomic exchange of the bootloader possible. Right now we have chosen 8MiB which should be big enough for all bootloaders. The value is configurable via global.usbgadget.fastboot_max_download_size. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: USB gadget: Add section for partition descriptionSascha Hauer2018-01-111-10/+38
| | | | | | | 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: usbgadget: provide autostart notesOleksij Rempel2017-05-081-0/+21
| | | | | | | | The usbgadget autostart functionality is already added. It's time to reflect it in the documentation. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: usb: fix sphinx warningAntony Pavlov2016-09-091-1/+3
| | | | | | | | | | The patch fixes this sphinx warnings: barebox/Documentation/user/usb.rst:61: WARNING: Could not lex literal_block as "c". Highlighting skipped. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2016-03-111-2/+51
|\
| * Documentation: fastboot: fastboot erase is implementedSascha Hauer2016-02-231-3/+0
| | | | | | | | | | | | | | fastboot erase was implemented from the start, remove note stating that it's not implemented. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Documentation: Update USB fastboot sectionMarkus Pargmann2016-02-231-0/+52
| | | | | | | | | | | | | | | | Add some documentation about fastboot 'flash' command and some useful example how to use it to boot an initrd. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Documentation: usb: fix otg mode parameter descriptionPhilipp Zabel2016-02-171-1/+1
|/ | | | | | | Replace ``device`` otg.mode option with the correct ``peripheral``. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: fix typoJuergen Borleis2015-06-161-1/+1
| | | | | | | This change enables Sphinx to resolve the reference. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* doc: usb: add missing new line in codeblockLucas Stach2014-12-091-0/+1
| | | | | | | | Fixes an error during doc generation that leads to the code block being missing in the resulting docs. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: USB: Add description for OTG deviceSascha Hauer2014-09-261-0/+21
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: Add documentation for Fastboot and Composite Multifunction GadgetSascha Hauer2014-07-241-0/+48
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: Add documentation for USB serial consoleSascha Hauer2014-07-241-0/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: usb chapter of user manualRobert P. J. Day2014-07-041-16/+41
| | | | | | | | A number of minor fixes, and including the help output from the "dfu-util" command for the benefit of the reader. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: Add new sphinxs docsSascha Hauer2014-06-261-0/+65
This is a rewrite of the Documentation in reStructuredText format using Sphinx as build system, see http://sphinx-doc.org/. The documentation is built into static html pages with 'make docs'. The pages can be found under Documentation/html after building. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>