summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/state'Sascha Hauer2015-12-081-14/+5
|\
| * state: disable load commandEnrico Jorns2015-11-271-14/+5
| | | | | | | | | | | | | | | | | | Explicitly loading environment is not required as it will be loaded if available during device probing Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-12-082-4/+7
|\ \
| * | readline: Kconfig: fix typoWjatscheslaw Stoljarski2015-11-231-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ls: fix exitcodeSascha Hauer2015-11-171-2/+5
| |/ | | | | | | | | | | | | Once ls is called with a non-existing directory it should exit with a non-zero status. Fix that. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/i2c'Sascha Hauer2015-12-081-19/+37
|\ \
| * | i2c_probe: Make command easier to work withSascha Hauer2015-11-191-19/+37
| |/ | | | | | | | | | | | | | | Instead of insisting on multiple parameters just use sane defaults. This allows us to scan all addresses on all busses which is normally what one wants to get an overview over devices on i2c busses. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/console'Sascha Hauer2015-12-082-28/+56
|\ \
| * | loads: Use putchar rather than console_putcSascha Hauer2015-11-171-3/+3
| | | | | | | | | | | | | | | | | | | | | 'putchar' is a standard function to output a character. Use this one instead of the lower level console_putc. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | loadb: Allow to specify device to useSascha Hauer2015-11-171-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | The port we want to have the console on may not necessarily be the port we want to transfer files on. Make the port configurable with a commandline option. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | loadb: deactivate console before using it for loadbSascha Hauer2015-11-171-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Remove the console device we are about using for loadb from the console layer by deactivating it. This makes sure that no printf output disturbs the current file transfer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | loadb: Use local cdevSascha Hauer2015-11-171-17/+26
| |/ | | | | | | | | | | | | | | We already retrieve a console_device using console_get_first_active(). Use this one also to send/receive characters instead of the combined input/output of all console devices with putc/getc. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / ARM: Remove do_execute and thumb2_executeTrent Piepho2015-12-071-4/+1
|/ | | | | | | | | | | | | | | | | | | | In commit 104a6a7ccfb7928ca5dc28c8cbe0ea231ffc45ee support was added for Thumb2. It added do_execute() as a way to provide arch dependent calling veneers for use in "go" and thumb2_execute() as the thumb2 to arm veneer. But thumb2_execute() isn't necessary as gcc generates a proper calling sequence from a standard function pointer call. Thumb2 barebox is compiled with the AAPCS ABI which requires this. It also had a bug and didn't pass the arguments properly, but code execute via "go" rarely uses arguments so this wasn't very noticeable. Since thumb2 was always the only user of do_execute(), go ahead and delete that too. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-11-065-12/+97
|\
| * edit: return error when save_file failedEnrico Jorns2015-11-051-2/+3
| | | | | | | | | | | | | | | | | | When writing a file failed (e.g. due to a read-only file system), no error was reported by the 'edit' tool. To be valid (and to not confuse the poor user) at least '1' should be returned to indicate an error. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * edit: handle write() call errors in save_file()Enrico Jorns2015-11-051-3/+12
| | | | | | | | | | | | | | | | | | | | | | save_file() did ignore possible errors of its write() calls. Now the error code is used as return code for save_file(). write_full() is used instead of write() as it does not perform partial writes which would require to check for returned size, too. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * loadb: add missing brackets in helpAlexander Aring2015-10-271-2/+2
| | | | | | | | | | | | | | This patch adds missing brackets in the help text of loadb command. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of_dump: Add option to print node names onlySascha Hauer2015-10-261-2/+19
| | | | | | | | | | | | | | | | | | | | | | Devicetrees tend to become very long and it is hard to find the interesting nodes in a full tree output. This patch adds the -n option to the of_node command. With this option only the names of the nodes are printed, but not the properties. The resulting output is much shorter and the node one is interested in can be copy/pasted to a second call to of_node. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: clk_dump: use COMMAND_SUCCESS instead of 0 return codeAntony Pavlov2015-10-261-2/+2
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: add clk_get_rate commandAntony Pavlov2015-10-221-0/+55
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * memtest.c: Print iterations count if -i is 0Andrey Smirnov2015-10-151-1/+5
| | | | | | | | | | | | | | | | Even if memtest is started in endless mode it is still useful to see current iteration count. Add the code to print that. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | memtest: Make cached/uncached test configurableSascha Hauer2015-11-041-5/+21
| | | | | | | | | | | | | | | | Add options to explicitly test cached/uncached tests. Without these options still both cached and uncached is tested if remapping is supported. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | memtest: By default only test biggest regionSascha Hauer2015-11-041-27/+55
| | | | | | | | | | | | | | | | | | Often enough the biggest free region spans most free RAM, so it doesn't add much value to test the remaining free regions. This patch changes the default behaviour to only test the biggest free region and adds the -t option to test all regions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | memtest: split tests in separate functionsSascha Hauer2015-11-031-1/+8
| | | | | | | | | | | | | | | | The memtest does a bus integrity check and a moving inversions test. Split the tests into two separate functions so that the can be called separately. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | rework remap_rangeSascha Hauer2015-11-031-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remap_range is for remapping regions with different cache attributes. It is implemented for ARM and PowerPC only, the other architectures only provide stubs. Currently the new cache attributes are passed in an architecture specific way and the attributes have to be retrieved by calls to mmu_get_pte_cached_flags() and mmu_get_pte_uncached_flags(). Make this simpler by providing architecture independent flags which can be directly passed to remap_range() Also provide a MAP_ARCH_DEFAULT flag and a arch_can_remap() function. The MAP_ARCH_DEFAULT defaults to whatever caching type the architecture has as default. the arch_can_remap() function returns true if the architecture can change the cache attributes, false otherwise. This allows the memtest code to better find out what it has to do. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | memtest: move request/release regions to common/Sascha Hauer2015-10-271-105/+2
|/ | | | | | | | Normally code providing a feature should be implemented in common/ which is then called from the command code. Follow this rule and move some more of the memtest code to common/. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-10-072-6/+3
|\
| * commands: ls: use 14 digits for filesizeAntony Pavlov2015-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 10 digits are not enough for modern SATA/USB storages. E.g.: barebox> ls -l /dev/ cr-------- 500107862016 ata0 cr-------- 33554432 ata0.0 cr-------- 500073258496 ata0.1 cr-------- 32224837632 disk0 cr-------- 67108864 disk0.0 cr-------- 32156680192 disk0.1 14 digits look much better. E.g.: barebox> ls -l /dev/ cr-------- 500107862016 ata0 cr-------- 33554432 ata0.0 cr-------- 500073258496 ata0.1 cr-------- 32224837632 disk0 cr-------- 67108864 disk0.0 cr-------- 32156680192 disk0.1 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ubiformat: remove dead codeJan Remmet2015-09-291-5/+2
| | | | | | | | | | | | | | divisor isn't used. Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: Add MMC ext. CSD register toolDaniel Schultz2015-09-243-0/+2059
|/ | | | | | | This tools can read/write to the extended CSD register of MMC devices. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/restart'Sascha Hauer2015-09-011-1/+2
|\
| * restart: replace reset_cpu with registered restart handlersSascha Hauer2015-08-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the reset_cpu() function which every SoC or board must provide with registered handlers. This makes it possible to have multiple reset functions for boards which have multiple ways to reset the machine. Also boards which have no way at all to reset the machine no longer have to provide a dummy reset_cpu() function. The problem this solves is that some machines have external PMICs or similar to reset the system which have to be preferred over the internal SoC reset, because the PMIC can reset not only the SoC but also the external devices. To pick the right way to reset a machine each handler has a priority. The default priority is 100 and all currently existing restart handlers are registered with this priority. of_get_restart_priority() allows to retrieve the priority from the device tree which makes it possible for boards to give certain restart handlers a higher priority in order to use this one instead of the default one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-09-012-1/+26
|\ \
| * | commands: ubiformat: Document -y optionSascha Hauer2015-08-281-0/+1
| | | | | | | | | | | | | | | | | | This was missing in the help text. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | boot command: Allow to enable watchdogSascha Hauer2015-08-281-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | Enabling the watchdog before booting the kernel is a common usecase. Add an option to the boot command and also add a global variable for it to make it configurable easily. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/login'Sascha Hauer2015-09-013-74/+11
|\ \ \
| * | | crypto: fix selecting of digestsSascha Hauer2015-08-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SHA1 is meant as a boolean option which is true when sha1 support is available. This works because the providers (DIGEST_SHA1_GENERIC and DIGEST_SHA1_ARM) have a 'select SHA1'. However, consumers like the sha1sum command do a 'select SHA1' to enable SHA1 support. This of course does not work; selecting SHA1 will not select any of the SHA1 providers. This is broken for all digest consumers. We have to explicitly select a digest provider, that is DIGEST_*_GENERIC to enable the corresponding digest. This means now we will always have the generic digest in the binary, even when an optimized one is enabled. There is no sane way in Kconfig to "select provider for feature xy", so let's live with the overhead in the binary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | login: rework login mechanismSascha Hauer2015-08-282-68/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to have the login functionality in the /env/bin/init script. This is hard to review and it's too easy to break the login functionality with changes to this script. Move the places to ask for a password to C code where we have only a few places where we have to ask for a password. Mainly these are run_shell() and the menutree command. This patch introduces a login() function which will only return if the correct password has been entered. Following calls will return immediately without asking for a password again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/fb'Sascha Hauer2015-09-012-14/+8
|\ \ \ | |/ / |/| |
| * | gui: Use fb provided shadowfb for offscreen renderingSascha Hauer2015-08-201-5/+1
| | | | | | | | | | | | | | | | | | | | | The fb core now has builtin support for offscreen rendering, use this and drop offscreen handling in the gui code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | splash command: simplify offscreen renderingSascha Hauer2015-08-201-9/+6
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | splash command: depend on CONFIG_VIDEOSascha Hauer2015-08-201-0/+1
| |/ | | | | | | | | | | | | The splash command only makes sense with framebuffer support enabled, so add the corresponding dependency to Kconfig. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / dhrystone: Fix documentationSascha Hauer2015-08-201-2/+1
|/ | | | | | BAREBOX_CMD_HELP_TEXT may not contain a linebreak. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/spd'Sascha Hauer2015-08-063-0/+71
|\
| * commands: add spd_decode commandAlexander Smirnov2015-07-143-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spd_decode command is used for decoding and printing in human-readable format the information found in memory module SPD EEPROMs. There is the decode-dimms program from i2c-tools linux package (see http://www.lm-sensors.org/wiki/I2CTools) just for the same purpose. Though spd_decode source code is based on decode-dimms perl code there is a difference. Signed-off-by: Alexander Smirnov <alllecs@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-08-063-0/+452
|\ \
| * | commands: Add dhrystoneDaniel Schultz2015-08-063-0/+452
| |/ | | | | | | | | | | | | | | | | | | This tool will help to measure the system performance. Some SoCs haven't the possibility to route their clocks to the output pins. So you can use dhrystone to get a feedback about the clock speed. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | graphics_utils: Let fb_open allocate the screenSascha Hauer2015-07-201-14/+13
| | | | | | | | | | | | | | | | | | Allocate the screen dynamically in fb_open. This opens the way to create a fb_create_screen function which takes a struct fb_info * instead of a filename. This is suitable for the framebuffer console which already has a struct fb_info *. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | graphic_utils: Add a common namespace to functionsSascha Hauer2015-07-151-3/+3
|/ | | | | | | This adds a common namespace to the graphic functions. We use gu_ for graphic_utils. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* digest: digest doesn't return an error if the signature length is incorrectPhilippe Leduc2015-07-061-2/+3
| | | | | | | | fix: digest return no error even if the digest length is wrong fix: documentation error (-v -> -s / -V -> -S) Signed-off-by: Philippe Leduc <ledphilippe@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>