summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* commands: firmwareload: add CMD_GROUPSteffen Trumtrar2014-10-101-0/+1
| | | | | | | | To be able to build the documentation the CMD_GROUP macro needs to be defined. Without this the firmwareload command breaks "make docs". Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: select FILE_LIST for usbgadgetRobert Schwebel2014-10-061-0/+1
| | | | | | | | | | Otherwhise we get this error message: commands/built-in.o: In function `do_usbgadget': barebox-2014.10.0/commands/usbgadget.c:77: undefined reference to `file_list_parse' Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of'Sascha Hauer2014-10-023-0/+180
|\
| * commands: add of_display_timingsTeresa Gámez2014-10-013-0/+180
| | | | | | | | | | | | | | | | | | A lot of boards use display-timings nodes to define the timings of one or more displays. This command makes it possible to list and select displays which are defined in a device tree. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/firmware'Sascha Hauer2014-10-023-0/+76
|\ \
| * | Add a Firmware programming frameworkJuergen Beisert2014-09-093-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This framework handles a list of registered Firmware programming handlers to unify a firmware programming interface by hiding the details how to program a specific Firmware in its handler. This is created with FPGAs in mind but should be usable for other devices aswell. A user has two possibilities to load a firmware. A device file is create under /dev/ which can be used to copy a firmware to. Additionally a firmwareload command is introduced which can list the registered firmware handlers and also to upload a firmware. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/dmesg'Sascha Hauer2014-10-023-0/+108
|\ \ \ | |_|/ |/| |
| * | Introduce message logging supportSascha Hauer2014-09-303-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a buffer for log messages and a 'dmesg' command to print the messages. The log buffer is implemented as log objects rather than a string buffer. This makes it easy to implement limiting the messages, cleaning the buffer and timestamping the messages. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | commands: usb: drop help for force rescan optionWjatscheslaw Stoljarski2014-09-301-2/+1
|/ / | | | | | | | | Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / commands: of_dump: Fix return valueTeresa Gámez2014-09-121-2/+2
|/ | | | | | | | In an error case the return value is set nicely but 0 is always beeing returned. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: of_dump switch to get fixed devictreeJan Weitzel2014-09-011-2/+29
| | | | | | | | Add a switch to get the devicetree processed by the registered fixups. This is also whats the kernel gets. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ubi: add setting devnum to ubiattachMichael Grzeschik2014-09-011-3/+8
| | | | | | | | Sometimes we need to have a defined devicenumber for the ubi partitions. This patch adds the option to ubiattach. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb-host'Sascha Hauer2014-08-071-6/+102
|\ | | | | | | | | Conflicts: drivers/usb/core/Makefile
| * USB: host: drop force rescanSascha Hauer2014-07-181-6/+3
| | | | | | | | | | | | | | | | We can now detect changes in the USB device hierarchy properly, so the 'force' option to the usb command is no longer necessary. We just scan the busses each time the usb command is called. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: usb: add tree view capabilityAntony Pavlov2014-07-181-3/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds U-Boot 'usb tree' command functionality to barebox. Here is an example output: 1 ID 0000:0000 | u-boot EHCI Host Controller | +-2 ID 05e3:0606 | USB2.0 Hub | +-3 ID 10c4:ea60 | Silicon Labs CP2102 USB to UART Bridge Contr P-00-00669 | +-4 ID 05e3:0606 | | USB2.0 Hub | | | +-5 ID 05e3:0608 | | | USB2.0 Hub | | | | | +-6 ID 0d8c:000c | | C-Media USB Headphone Set | | | +-7 ID 0d8c:000c | C-Media USB Headphone Set | +-8 ID 0846:1040 NETGEAR NETGEAR FA120 Adapter The tree view is enabled with 'usb -t' Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb-gadget'Sascha Hauer2014-08-075-167/+130
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * | USB: gadget: Add a multi function gadgetSascha Hauer2014-07-243-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the Kernel multi function this gadget driver is used for creating a USB device with multiple functions. This is created and removed with the newly created 'usbgadget' command. Based on the options it creates combinations of DFU, fastboot and serial USB functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | 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-222-67/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: gadget: Update to 3.15Sascha Hauer2014-07-221-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the USB Gadget stack to Linux-3.15. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Conflicts: drivers/usb/core/Makefile
| * | Merge branch 'for-next/usb' into for-next/usb-gadgetSascha Hauer2014-07-221-1/+1
| |\|
* | | Merge branch 'for-next/usb'Sascha Hauer2014-08-071-1/+1
|\ \ \ | | |/ | |/|
| * | USB: Kconfig: introduce USB_HOST symbolSascha Hauer2014-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This renames USB to USB_HOST since this is what the symbol really means. Introduce a USB symbol which is selected by both USB_GADGET and USB_HOST. This gives us a symbol to let common USB code depend on. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/rtc'Sascha Hauer2014-08-073-0/+170
|\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: arch/mips/dts/jz4755.dtsi commands/Makefile
| * | | commands: add hwclockAntony Pavlov2014-08-023-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hwclock command allows to query or set the hardware clock (RTC). Barebox' 'hwclock' command uses busybox' 'date' compatible time format ccyymmddHHMM[.SS]: # /bin/busybox date -s 201407292005.41 ; /bin/date Tue Jul 29 20:05:41 MSK 2014 Tue Jul 29 20:05:41 MSK 2014 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Merge branch 'for-next/i2c' into HEADSascha Hauer2014-08-021-7/+11
| |\ \ \ | | |_|/ | |/| |
* | | | Merge branch 'for-next/metadata'Sascha Hauer2014-08-0716-0/+83
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/dts/Makefile common/Makefile lib/Makefile
| * | | | Add support for metadata in barebox imagesSascha Hauer2014-08-073-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's often useful to get some information about a barebox image before starting or flashing it. This patch introduces barebox Image MetaData (IMD). When enabled a barebox image will contain a list of tags containing the desired information. We have tags for: - the barebox release (2014.07.0-00160-g035de50-dirty) - the build timestamp (#741 Mon Jul 28 15:08:54 CEST 2014) - the board model the image is intended for - the device tree toplevel compatible property Also there is an additional generic key-value store which stores parameters for which no dedicated tag exists. In this patch it is used for the memory size an image supports. Since there is no fixed offset in a barebox image which can be used for storing the information, the metadata is stored somewhere in the image and found by iterating over the image. This works for most image types, but obviously not for SoC images which are encoded or encrypted in some way. There is a 'imd' tool compiled from the same sources for barebox, for the compile host and for the target, so the metadata information is available whereever needed. For device tree boards the model and of_compatible tags are automatically generated. Example output of the imd tool for a Phytec phyFLEX image: build: #889 Wed Jul 30 16:08:54 CEST 2014 release: 2014.07.0-00167-g6b2070d-dirty parameter: memsize=1024 of_compatible: phytec,imx6x-pbab01 phytec,imx6dl-pfla02 fsl,imx6dl model: Phytec phyFLEX-i.MX6 Duallite Carrier-Board Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | move file helper functions to separate fileSascha Hauer2014-08-0713-0/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have our file helper functions in several places. Move them all to lib/libfile.c. With this we no longer have file helpers in fs/fs.c which contains the core fs functions and no functions in lib/libbb.c which are not from busybox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/led'Sascha Hauer2014-08-071-2/+3
|\ \ \ \
| * | | | commands: trigger: check trigger disable return code tooAntony Pavlov2014-07-311-2/+3
| |/ / / | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/i2c'Sascha Hauer2014-08-071-7/+11
|\ \ \ \ | | |/ / | |/| |
| * | | commands: i2c: add message if write is not successfulSilvio Fricke2014-07-141-1/+5
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | commands: i2c: simplify i2c wide access logicSilvio Fricke2014-07-141-4/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | commands: i2c: verbose option doesn't need argumentSilvio Fricke2014-07-141-2/+2
| | |/ | |/| | | | | | | | | | Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/env'Sascha Hauer2014-08-071-10/+23
|\ \ \
| * | | commands: saveenv: Fix comment about directories in help textSascha Hauer2014-08-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | envfs indeed handles directories, at least since 2007: | commit 913691eccd13c1509470eb8b059aa0beecc6d8d8 | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Tue Sep 25 12:58:52 2007 +0200 | | add directory handling for environment Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | saveenv: provide a zeroed/empty/ignore environmentJuergen Borleis2014-08-011-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an external environment storage should be used in very rare and special cases, the intentional behaviour should be to ignore the external environment and always fall back to the built-in environment. By storing an empty "to be ignored" environment into the external environment a confusing error message about invalid CRC sums will go away and still the built-in environment is used. With this new option we can force the intentional behaviour. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | envfs: change API to be able to forward special flags into the envfs superblockJuergen Borleis2014-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to mark an stored envfs image with special features (intentional ignore for example), we now can feed forward these flags. By forwarding a '0' for the flags nothing changes because the envfs superblock was already allocated with xzalloc. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | saveenv: make clear how to use the command's parametersJuergen Borleis2014-08-011-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | Both parameters can be omitted and DIRECTORY can be omitted, but the DIRECTORY parameter requires the ENVFS parameter as well. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/efi'Sascha Hauer2014-08-072-2/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore Makefile drivers/serial/Makefile
| * | | serial: Add EFI stdio driverSascha Hauer2014-07-161-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a driver which uses the EFI stdin/stdout interfaces to implement a barebox console. Keyboard input should be fairly complete, but not all vt100 needed by barebox work properly. The clear-to-eol escape is missing causing garbled output in the editor. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | oftree command: Use size_t for sizeSascha Hauer2014-07-111-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | read_file takes a size_t argument as size, so use this type for the size variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/doc'Sascha Hauer2014-08-074-10/+13
|\ \ \ | |_|/ |/| | | | | | | | Conflicts: Makefile
| * | trivial: Correct word spelling, s/miscelleanous/miscellaneousEzequiel Garcia2014-08-041-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> 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: lowercase help short textsHolger Schurig2014-07-221-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Documentation: remove "all all" in help's help text.Holger Schurig2014-07-221-1/+1
| |/ | | | | | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / tftp: more helpful help textPavel Machek2014-07-221-1/+2
|/ | | | | | | | It took me a while to figure out syntax of tftp command, document that server address is taken from environment. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>