summaryrefslogtreecommitdiffstats
path: root/commands/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Add defaultenv commandSascha Hauer2014-11-061-0/+1
| | | | | | | This adds a command to explicitly restore the environment (or parts thereof) from the default environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add support for non volatile variablesSascha Hauer2014-11-061-0/+1
| | | | | | | | | | | | | | | This adds (back) support for non volatile variables. Non volatile variables are variables which are stored in the environment over reboot. They are used in the same way as the global variables, but with a 'nv' command and device. The variables are stored under /env/nv/, one variable per file. Adding a nv variable automatically adds a global variable with the same name. Changing a nv variable also changes the same global variable, but not the other way round. This allows for example to configure the username as: nv user=sha; saveenv Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: implement 'cmp' commandSascha Hauer2014-11-041-0/+1
| | | | | | | | This command compares two files. It does not show the differences, it only returns successfully if both files are identical and with an error if they differ. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of'Sascha Hauer2014-10-021-0/+1
|\
| * commands: add of_display_timingsTeresa Gámez2014-10-011-0/+1
| | | | | | | | | | | | | | | | | | 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-021-0/+1
|\ \
| * | Add a Firmware programming frameworkJuergen Beisert2014-09-091-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* / Introduce message logging supportSascha Hauer2014-09-301-0/+1
|/ | | | | | | | | | 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>
* Merge branch 'for-next/usb-gadget'Sascha Hauer2014-08-071-0/+1
|\ | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * USB: gadget: Add a multi function gadgetSascha Hauer2014-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/rtc'Sascha Hauer2014-08-071-0/+1
|\ \ | | | | | | | | | | | | | | | Conflicts: arch/mips/dts/jz4755.dtsi commands/Makefile
| * | commands: add hwclockAntony Pavlov2014-08-021-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* / Add support for metadata in barebox imagesSascha Hauer2014-08-071-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* commands: add 'lspci' commandAntony Pavlov2014-07-041-0/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drvlist: factor the driver list out of 'devinfo'Holger Schurig2014-06-021-0/+1
| | | | | | | | | The command 'devinfo' was first spitting out all devices, and then also all drivers. This patch separates them into two commands, 'devinfo' as before, and also the new command 'drvinfo' Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: add of_dump commandSascha Hauer2014-05-221-0/+1
| | | | | | | | The oftree command is overloaded. This adds a dedicated command which only dumps devicetrees to the console so that the corresponding functionality in the oftree command can be removed in the next step. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: CMD_DIGEST -> COMPILE_DIGESTHolger Schurig2014-05-141-1/+1
| | | | | | | | This config just turned on the compilation of digest.c (used by 'SHA1', 'sha256sum' etc), so name it accordingly. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: CMD_MEMORY -> COMPILE_MEMORYHolger Schurig2014-05-141-1/+1
| | | | | | | | | * CMD_MEMORY was defined both in common/Kconfig and commands/Kconfig * that symbol turned not a command on, but just the compilation of commands/mem.c, so rename it accordingly Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/regulator'Sascha Hauer2014-05-051-0/+1
|\ | | | | | | | | Conflicts: commands/Makefile
| * Add initial regulator supportSascha Hauer2014-04-291-0/+1
| | | | | | | | | | | | | | | | | | Provide minimal regulator support. Only supported operations are enabling and disabling regulators. Association of devices with their regulators is limited to devicetree only. If regulator support is disabled the API expands to static inline stubs so consumers can still use the API. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2014-05-051-0/+1
|\ \
| * | 2048: port to bareboxMarc Kleine-Budde2014-04-231-0/+1
| |/ | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / common: Allow for I/O mapped I/OMichel Stam2014-04-081-1/+1
|/ | | | | | | | Rework the current framework so that I/O mapped I/O resources are also possible. Signed-off-by: Michel Stam <michel@reverze.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add menutree commandSascha Hauer2014-03-281-0/+1
| | | | | | | | | | | | | | | | | | | Creating menus from the shell using the regular 'menu' command is rather complicated. This adds a 'menutree' command which creates a menu from a directory structure. In the directory structure each directory corresponds to a single menu entry. The directory contains the following files: title - A file containing the title of the entry as shown in the menu box - If present, the entry is a 'bool' entry. The file contains a variable name from which the current state of the bool is taken from and saved to. action - if present this file contains a shell script which is executed when when the entry is selected. If neither 'box' or 'action' are present this entry is considered a submenu containing more entries. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add readf commandSascha Hauer2014-02-141-0/+1
| | | | | | | | The readf command is useful to read the content of a file into a shell variable. It should be used for ascii content and thus stops reading at all nonprintable characters including newline. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2013-10-071-0/+1
|\ | | | | | | | | Conflicts: commands/Makefile
| * move devinfo command to its own fileSascha Hauer2013-09-271-0/+1
| | | | | | | | | | | | Just like nearly all other commands are in individual files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | defenv-2: replace boot script with commandSascha Hauer2013-09-301-0/+1
|/ | | | | | | | This replaces the 'boot' script in the defaultenv-2 with a command with the same behaviour. A command gives more flexibility for future externsions Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: add new memtest commandAlexander Aring2013-06-081-0/+1
| | | | | | | | | | | | | | | | This new memtest can test the whole unused memory. The new memtest command try to request the whole unused sdram regions on all banks and run the mem_test routine from common/memtest.c on it. The memtest command has only two parameters; -i Amount of iterations, default 1, iteration of 0 is endless. -b Set this to skip integrity check.(Do only a fast test for bus lines) If MMU support is enable, memtest try to run memtest twice. The first with cache enabled, the second with cache disabled. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* memtest: remove memtest commandAlexander Aring2013-06-051-1/+0
| | | | | | | Remove memtest command. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devices: add detect mechanismSascha Hauer2013-05-311-0/+1
| | | | | | | | | | | | | | | We often encounter the situation where slow devices should not be probed during startup since probing is slow and maybe unnecessary for unused devices. With MMC we have the 'probe' device parameter, for ata we have the same, for USB we have the 'usb' command. Overall this is not very consistent. With MMC there is the additional problem that the probe parameter is attached to the logical device when we often have the information which physical device we want to probe. This patch adds a 'detect' callback for devices and adds a command to detect devices and to list the devices which are actually detecable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add memory modify command (mm)Sascha Hauer2013-04-171-0/+1
| | | | | | | | | | | | As of now we have no way to manipulate individual bits of registers on the command line. This introduces a memory modify command which allows this. It has the syntax: mm [OPTIONS] <adr> <val> <mask> With [OPTIONS] being the usual memory command options (-b, -w, -l, -d <file>). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* memory commands: separate into one file per commandSascha Hauer2013-04-171-0/+5
| | | | | | | | | | Normally in commands we have one file per command which is named like the command itself. The memory commands are an exception to this. This patch changes this by separating the memory commands. This also has the effect that the memory commands can now be selected individually. Along the way we add some Kconfig help text for the commmands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/oftree'Sascha Hauer2013-02-041-0/+2
|\ | | | | | | | | Conflicts: drivers/of/base.c
| * commands: Add of_node commandSascha Hauer2013-01-191-0/+1
| | | | | | | | | | | | This command allows to create/delete device nodes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: Add of_property commandSascha Hauer2013-01-191-0/+1
| | | | | | | | | | | | | | | | The of_property command allows to modify/add/delete properties. Parsing user input is based on U-Boot code with some fixes added for catching invalid input. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/commands'Sascha Hauer2013-02-041-0/+1
|\ \ | |/ |/|
| * commands: add let command which supports proper arithmeticJan Luebbe2013-01-091-0/+1
| | | | | | | | | | | | | | | | This command works like the corresponding Unix shell command and is used for adding, multiplying and much more. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: add ubiformatWolfram Sang2012-12-191-0/+1
|/ | | | | | | | | Imported from mtd-utils and stripped down to needed functionality. Based on an older version (1.4.5.) since the newer do use MEMWRITE interfaces which we don't have in barebox (yet). Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ymodem'Sascha Hauer2012-11-161-2/+2
|\
| * commands: remove old Y-Modem implementationRobert Jarzmik2012-11-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | As a new implementation of Y-Modem protocol is available, switch from old implementation to the new one : - remove old xyzModem* files - remove old command loady2 - rename command loady2 to loady Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: change Y-Modem implementationRobert Jarzmik2012-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current Y-Modem implementation has some limitations: - Y-Modem/G protocol is not supported - Multiple files (aka. batch) transfers are not supported - Transfer speed over fast lines (USB console) is slow - Code is not trivial to maintain (personnal opinion) This implementation tries to address all these points by introducing loady2 command. The effects are : - transfer speed for Y-Modem over USB jumps from 2kBytes/s to 180kBytes/s - transfer speed for Y-Modem/G jumps to 200kBytes/s - multiple file transfers are possible This command was tested on a USB console and UART 9600bps serial line : - NAKs (and retransmissions) were tested for faulty serial lines - multiple file transfers were tested - Y-Modem, Y-Modem/G and X-Modem transfers were tested Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/spi'Sascha Hauer2012-11-161-0/+1
|\ \
| * | introduce spi commandJean-Christophe PLAGNIOL-VILLARD2012-11-121-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usefull to debug spi The command allow to read/write on a spi device Usage: spi [OPTION] [data to write 0xXX] write/read spi device. -b <bus_num> spi bus number (default = 0) -r <count> to read -c <cs> chip select (default = 0) -m <mode> spi mode (default = 0) -f <hz> max_speed_hz (default = 1MHz) -w <bit> bits_per_word (default = 8) -v verbose Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2012-11-161-0/+1
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | add 'miitool' command to view media-independent interface statusAntony Pavlov2012-10-301-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command is based on the 'mii-diag' and 'mii-tool' Unix utilities, but it lacks routines to manipulate MII state (e.g. reset MII, restart autonegotiation or force MII mode). This version of the 'miitool' command has no GbE support, but we can upgrade it in the future. The GbE support patch for generic 'mii-tool' is here http://ftp.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz EXAMPLE: barebox:/ miitool -vv /dev/phy0 negotiated 100baseTx-FD, link ok registers for MII PHY: 3100 782d 0013 78e2 01e1 45e1 0007 2001 0000 ffff ffff ffff ffff ffff ffff ffff 0084 4780 0000 0000 0422 0000 0000 0000 0000 0000 0080 0000 ffff 0000 0000 3660 product info: Level One LXT971A rev 2 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2012-11-161-0/+1
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/boards/guf-neso/lowlevel.c arch/arm/boards/pcm038/lowlevel.c commands/Makefile
| * | Add in-system barebox update infrastructureSascha Hauer2012-10-171-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently in-system update means to write an arbitrary file to an arbitrary device. There is no sanity check if the flashed image is of the right type or will fit onto the device. Furthermore some SoCs need a special preparation step for their images before flashing them. This adds a barebox in-system update infrastructure. Boards can register update handlers which know how to make the board bootable. The available handlers can be listed to be able to select one, different force levels give the user the chance to know it better. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / add filetype command supportSascha Hauer2012-10-301-0/+1
|/ | | | | | | | | | | | This adds support for a filetype detection command. It can be used to print a filename on the console or to set a variable with the detection result for use in shell scripts. The command also has an option to print the known filetypes so that a user knows what to match for. Based on an earlier version from Jean-Christophe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: Add clk commandsSascha Hauer2012-10-041-0/+1
| | | | | | | | | | | | | | | | | This adds some basic commands to manupulate clocks on the command line. Right now we have: - clk_set_parent - clk_set_rate - clk_enable - clk_disable - clk_dump The commands work based on the clock name, otherwise they behave like the Linux Kernel C functions. clk_dump will dump the clocktree to the console. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>