summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | command: digest/hashsum: set key at command levelJean-Christophe PLAGNIOL-VILLARD2015-03-273-22/+21
| | | | | | | | | | | | | | and only set the key when specified Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | crypto: digest: speficied when a digest need a key to be usedJean-Christophe PLAGNIOL-VILLARD2015-03-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | such as for hmac(xxx) you must provide a key This will allow to enforce the correct parameter at digest command <digest>sum is not impacted Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | command: add generic digest commandJean-Christophe PLAGNIOL-VILLARD2015-03-205-62/+234
| | | | | | | | | | | | | | That can be used for digest calculation and verify Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | command: rename digest.c to hashsum.cJean-Christophe PLAGNIOL-VILLARD2015-03-193-8/+8
| | | | | | | | | | | | | | as I'll add a new generic command named digest Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | crypto: digest: digest_file_window/digest_file/digest_file_by_name drop key ↵Jean-Christophe PLAGNIOL-VILLARD2015-03-191-2/+8
| | | | | | | | | | | | | | | | | | params expect the key to be set before calling Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | command: add hmac sum supportfor md5, sha1, sha224, sha256, sha384, sha512Jean-Christophe PLAGNIOL-VILLARD2015-03-131-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pass the key via -h param barebox@barebox sandbox:/ sha256sum -h test /dev/fd0 c297473e9bb221c5dc51d47ad75c76095f1bdc4ca9dff1d5931c2e22bf11a0de /dev/fd0 0x00000000 ... 0xffffffffffffffff use the same idea as openssl command $ openssl dgst -sha256 -hmac "test" TODO HMAC-SHA256(TODO)= c297473e9bb221c5dc51d47ad75c76095f1bdc4ca9dff1d5931c2e22bf11a0de Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | command: add sha384sum and sha512sum supportJean-Christophe PLAGNIOL-VILLARD2015-03-122-0/+66
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | digest: make it multi-instanceJean-Christophe PLAGNIOL-VILLARD2015-03-121-1/+2
| | | | | | | | | | | | | | | | | | | | Now you need to call digest_alloc and when you finish to use it digest_free. We need this for upcomming aes encryption support and secure boot as we will need multiple instance of the same digest. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>