summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* Merge branch 'for-next/mtd'Sascha Hauer2015-07-032-4/+3
|\ | | | | | | | | Conflicts: drivers/mtd/core.c
| * commands: mount: detect the device to be mountedSascha Hauer2015-06-261-0/+2
| | | | | | | | | | | | Before mounting a device try to detect it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: detect: use device_detect_by_nameSascha Hauer2015-06-261-4/+1
| | | | | | | | | | | | | | Instead of looking up the device ourselves let device_detect_by_name do the work. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-07-0312-12/+1
|\ \ | |/ |/|
| * treewide: fix 'new blank line at EOF' formatting errorAntony Pavlov2015-07-0211-11/+0
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: digest: fix harmless warningLucas Stach2015-06-291-1/+1
| | | | | | | | | | | | | | | | | | Fixes with !CONFIG_LONGHELP: commands/digest.c:71:13: warning: 'prints_algo_help' defined but not used [-Wunused-function] Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | devinfo: fix return valueSascha Hauer2015-06-231-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devinfo on a non existing device prints: no such device: blah devinfo: Operation not permitted The second message comes because devinfo returns -1 which is -EPERM. Just return -ENODEV which will print: devinfo: No such device Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | login: fix broken login commandHubert Feurstein2015-06-181-1/+1
|/ | | | | | | | | | It was possible to login with ctrl-c or an empty password. This bug was introduced by the recent digest changes in common/password.c (e49a47fb). The function check_passwd returns now also negative error codes which were not correctly handled in do_login. Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* memtest: skip memory region smaller than one pageRenaud Barbier2015-06-161-4/+8
| | | | | | | | | If the size between memory regions is smaller than one page, the size is rounded down to 0. This results in a region request failure. This commit skips the memory region whose size is smaller than a page. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-06-091-1/+1
|\
| * ubiformat: fix argument parserAlexander Richter2015-05-201-1/+1
| | | | | | | | | | | | | | | | - remove duplicate 'y' option - add missing 'Q' option Signed-off-by: Alexander Richter <alexander.richter@atsonline.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mem64'Sascha Hauer2015-06-097-9/+36
|\ \
| * | mw command: Add 64bit supportSascha Hauer2015-05-281-1/+9
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mm command: Add 64bit supportSascha Hauer2015-05-281-4/+16
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memset command: Add 64bit supportSascha Hauer2015-05-281-1/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memcpy command: Add 64bit supportSascha Hauer2015-05-281-1/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memcmp command: Add 64bit supportSascha Hauer2015-05-281-1/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | md command: Add 64bit supportSascha Hauer2015-05-281-1/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mem commands: suppport parsing 'q' optionSascha Hauer2015-05-281-0/+3
| | | | | | | | | | | | | | | | | | Add 64bit ('q', for quad) support to mem_parse_options Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/console'Sascha Hauer2015-06-092-82/+38
|\ \ \
| * | | loadb: ignore -c optionSascha Hauer2015-06-091-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And always create the file if necessary. No need to have an extra flag for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | loadb: Use console_set_baudrateSascha Hauer2015-06-091-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | No Need to do this manually Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | loadb: use console_get_baudrateSascha Hauer2015-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | No need to fiddle with device parameters anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | loadxy: use console_set_baudrateSascha Hauer2015-06-092-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | No need to do this manually Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | loadx: ignore -c optionSascha Hauer2015-06-091-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And always create the file if necessary. No need to have an extra flag for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | loadxy: use console_get_baudrateSascha Hauer2015-06-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | No need to fiddle with device parameters anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | loadxy: Use console_get_by_nameSascha Hauer2015-06-091-24/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Use console_get_by_name rather than iterating over the console list in the loadxy code. The code in loadxy.c used to test whether a console is active before using it. This check is dropped along the way since there's no reason to not being able to use a disabled console for loadxy. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/am33xx'Sascha Hauer2015-06-093-0/+80
|\ \ \ | |/ / |/| |
| * | net: dhcp: Split dhcp funcionality & add dhcp commandWadim Egorov2015-06-053-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dhcp/bootp was bound to the command functionality. This patch splits the dhcp command. We are now able to use bootp without a shell. This patch adds also a check for environment variables and globalvar. So only when ENVIRONMENT_VARIABLES and GLOBALVAR is set, all received dhcp data will be stored. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | md: use memmap when possibleSascha Hauer2015-05-281-0/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | This adds the missing pieces for: d8a6e1c ARM/mem: handle data aborts gracefully for md When possible use memmap and directly and dereference the input pointer directly in memory_display() so that the data abort occurs where we expect it and not in the md command. With this d8a6e1c can work as expected. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands/Kconfig: fix typo in CMD_BOOTM_OFTREE helpMarc Kleine-Budde2015-05-261-1/+1
| | | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: add magicvar description for global.bootm.oftreeMarc Kleine-Budde2015-05-261-0/+1
|/ | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* timeout: factor out wait-for-key-press loop into separate fileMarc Kleine-Budde2015-04-231-49/+13
| | | | | | | | This patch factors out the wait-for-key-press loop from the shell command "timeout" into a sparate file, so that it can be used from C, too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* command: timeout: add documentation for option '-v'Marc Kleine-Budde2015-04-231-1/+2
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* command: timeout: remove unhandled '-t' optionMarc Kleine-Budde2015-04-231-1/+1
| | | | | | | | This patch removes the option '-t', as it's unhandled in the code since it was added to barebox. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* command: state: harmonize in-barebox documentationMarc Kleine-Budde2015-04-171-7/+9
| | | | | | | | | According to this patch by Holger Schurig: f1f532084a6e commands: harmonize in-barebox documentation Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2015-04-133-0/+83
|\
| * state: add framework for persistent state handlingSascha Hauer2015-03-123-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a framework to describe, access, store and restore a set of variables. A state variable set can be fully described in a devicetree node. This node could be part of the regular devicetree blob or it could be an extra devicetree solely for the state. The state variable set contains variables of different types and a place to store the variable set. For more information see: Documentation/devicetree/bindings/barebox/barebox,state.rst Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jan Luebbe <jlu@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-04-131-1/+1
|\ \
| * | commands: dmesg: fi format security warningMarc Kleine-Budde2015-04-031-1/+1
| |/ | | | | | | | | | | | | | | commands/dmesg.c: In function ‘do_dmesg’: commands/dmesg.c:71:3: warning: format not a string literal and no format arguments [-Wformat-security] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | command: hashsum: Conding style fixupAntony Pavlov2015-03-301-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>