summaryrefslogtreecommitdiffstats
path: root/commands/dfu.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/usb-gadget'Sascha Hauer2014-08-071-126/+10
|\ | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * USB: gadget: DFU: register as USB functionSascha Hauer2014-07-221-6/+6
| | | | | | | | | | | | | | | | Register DFU as usb_function_instance to make it work with composite gadgets. Also use this internally for registering as DFU device (with the 'dfu' command). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add function to parse a string in dfu formatSascha Hauer2014-07-221-83/+7
| | | | | | | | | | | | | | | | | | The dfu command parses a string which contains a list of devices and flags. This format is useful for other users aswell, so add common helper functions to parse it and let the dfu command use this format. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB: gadget: specify vendor/product id with device parametersSascha Hauer2014-07-221-42/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the device parameters: usbgadget.product usbgadget.vendor usbgadget.manufacturer usbgadget.productname These variables are used to configure the USB vendor id, product id, manufacturer name and product name. Previously these were configured with arguments to the usbserial and dfu command. The parameters are device static, so it's nice to configure it somewhere in the environment instead of when calling dfu/usbserial. Also when other gadget drivers are added we do not have to duplicate the option parsing further. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Documentation: revamp dfu's help textHolger Schurig2014-07-221-6/+9
|/ | | | | | | ... so that it looks a bit nicer in the HTML generated docs. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: remove doxygen documentationSascha Hauer2014-06-261-10/+0
| | | | | | | The doxygen documentation is long outdated. Remove it. It will be replaced with sphinx based documentation later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: harmonize in-barebox documentationHolger Schurig2014-05-141-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does probably too much, but it's hard (and very cumbersome/time consuming) to break it out. What is does is this: * each command has one short description, e.g. "list MUX configuration" * made sure the short descriptions start lowercase * each command has one usage. That string contains just the options, e.g. "[-npn]". It's not part of the long help text. * that is, it doesn't say "[OPTIONS]" anymore, every usable option is listed by character in this (short) option string (the long description is in the long help text, as before) * help texts have been reworked, to make them - sometimes smaller - sometimes describe the options better - more often present themselves in a nicer format * all long help texts are now created with BUSYBOX_CMD_HELP_ macros, no more 'static const __maybe_unused char cmd_foobar_help[]' * made sure the long help texts starts uppercase * because cmdtp->name and cmdtp->opts together provide the new usage, all "Usage: foobar" texts have been removed from the long help texts * BUSYBOX_CMD_HELP_TEXT() provides the trailing newline by itself, this is nicer in the source code * BUSYBOX_CMD_HELP_OPT() provides the trailing newline by itself * made sure no line gets longer than 77 characters * delibertely renamed cmdtp->usage, so that we can get compile-time errors (e.g. in out-of-tree modules that use register_command() * the 'help' command can now always emit the usage, even without compiled long help texts * 'help -v' gives a list of commands with their short description, this is similar like the old "help" command before my patchset * 'help -a' gives out help of all commands Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: group 'help' outputHolger Schurig2014-05-141-0/+1
| | | | | | | | | | | | | | | | | | | The old output of "help" was just producing a long list, that usually scrolled of the screen (even on a X11 terminal). This list is more compact, and also sorted by groups. The old output format (plus grouping) is now available with 'help -v'. Example: Information commands: ?, devinfo, help, iomem, meminfo, version Boot commands: boot, bootm, go, loadb, loads, loadx, loady, saves, uimage ... Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-03-071-3/+8
|\ | | | | | | | | Conflicts: common/environment.c
| * USB: dfu: Use barebox product idSascha Hauer2014-02-141-3/+8
| | | | | | | | | | | | | | | | We obtained a USB Product ID from Openmoko for barebox running in DFU mode. Use it as default for the dfu command. Now we can make the USB VID/PID arguments optional. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/env'Sascha Hauer2014-03-071-3/+7
|\ \
| * | usb: dfu: Add create flagSascha Hauer2014-02-281-2/+6
| | | | | | | | | | | | | | | | | | | | | With the create flag DFU can upload to regular, previously non existing files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: dfu: Fix spelling of flag nameSascha Hauer2014-02-281-1/+1
| |/ | | | | | | | | | | DFU_FLAG_SAVE should really be named DFU_FLAG_SAFE. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / dfu command: check return valuesSascha Hauer2014-02-131-3/+6
|/ | | | | | | | Check the return value of usb_dfu_register and bail out with an error if it fails. Also return successfully if it succeeds instead of returning 1 unconditionally. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove remaining references of CONFIG_BOARDINFOSascha Hauer2013-08-161-2/+2
| | | | | | | | | | | With this all code uses barebox_get_model() and no longer a compile time generated string. Also this renames barebox_boardinfo() to barebox_get_model() since we are going to add the corresponding _set_ function and 'model' corresponds to the devicetree notion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-3/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: remove struct command pointer from commandsSascha Hauer2012-02-271-1/+1
| | | | | | This is unused in all commands and thus can be removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dfu: add description how to specify the "description" to the long helpJean-Christophe PLAGNIOL-VILLARD2012-02-141-0/+4
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* doc: add documentation for 'dfu'Robert Schwebel2010-11-011-10/+18
| | | | Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
* remove typedef cmd_tbl_t and replace it with struct commandSascha Hauer2010-02-011-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This has been done with the following script: find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \ -e 's/u2boot/barebox/g' \ -e 's/U2Boot/barebox/g' \ -e 's/U-boot V2/barebox/g' \ -e 's/u-boot v2/barebox/g' \ -e 's/U-Boot V2/barebox/g' \ -e 's/U-Boot-v2/barebox/g' \ -e 's/U_BOOT/BAREBOX/g' \ -e 's/UBOOT/BAREBOX/g' \ -e 's/uboot/barebox/g' \ -e 's/u-boot/barebox/g' \ -e 's/u_boot/barebox/g' \ -e 's/U-Boot/barebox/g' \ -e 's/U-boot/barebox/g' \ -e 's/U-BOOT/barebox/g' find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \ xargs -0 -r rename 's/u[-_]?boot/barebox/' It needs some manual fixup following in the next patch Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: remove maxargsSascha Hauer2009-10-191-1/+0
| | | | | | | No need to check for maximum argument counts. The commands are safe to be called with more arguments, so lets safe some bytes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* call getopt_reset only onceSascha Hauer2009-10-191-1/+0
| | | | | | | instead of calling getopt_reset in each command, call it only once before calling the command. Signed-off-by: Sascha Hauer <sha@pengutronix.de>
* commands: return COMMAND_ERROR_USAGESascha Hauer2009-10-191-4/+2
| | | | | | | instead of calling u_boot_cmd_usage in each command to safe space. Signed-off-by: Sascha Hauer <sha@pengutronix.de>
* Add USB device supportSascha Hauer2009-09-251-0/+184
This patch adds support for USB devices. It uses the Linux Kernel gadget API. Along with this patch comes driver support for the Freescale (arc) USB OTG Core and USB Device Firmware Update (DFU) The serial gadget support is not working at the moment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>