summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* crc exit with COMMAND_ERROR_USAGEJan Weitzel2011-12-051-0/+2
| | | | | | | | | If parameter -v without a crc is used, you got a notice but the crc is calculated and exit status is 0. With wrong parameters we should quite with COMMAND_ERROR_USAGE. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'sent/assorted-fixes'Sascha Hauer2011-11-171-2/+5
|\
| * mkdir command: do not fail with -p and directory already existsSascha Hauer2011-11-091-2/+5
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mount: Fix the printing of device nameFranck Jullien2011-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mount without argument always print a "none" as device name mounted because entry->parent_device is always NULL. The problem is the mount function in fs/fs.c. parent_device is initialized to NULL and never updated. With this patch, parent_device is set with the mounted device name. Moreover, the mount function has been modified to print the device name plus device id using the dev_name function. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | initial oftree command supportSascha Hauer2011-10-193-0/+142
| | | | | | | | | | | | | | | | | | | | | | This adds basic device tree command support. So far we can parse a flat device tree (-p), which also stores the tree in memory, dump it (-d) and free (-f) the internally stored tree. The chosen node can be updated with barebox bootargs, no other device tree manipulation is implemented yet. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'master' into nextSascha Hauer2011-10-144-5/+6
|\|
| * Fix spelling of "omitted"; found by lintianLoïc Minier2011-10-142-2/+2
| | | | | | | | | | Signed-off-by: Loïc Minier <loic.minier@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Merge branch 'next'Sascha Hauer2011-10-091-78/+38
| |\
| * | login: correct a typo in command descriptionPaul Fertser2011-09-271-3/+3
| | | | | | | | | | | | | | | Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | cmd: CMD_UBI depends on UBITeresa Gámez2011-09-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ubi is deselected the ubi commands are still build and compiling fails due dependences. commands/built-in.o: In function `do_ubiattach': commands/ubi.c:75: undefined reference to `ubi_attach_mtd_dev' Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | command/digest: add sha224 supportJean-Christophe PLAGNIOL-VILLARD2011-10-122-0/+26
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | digest: factorise file digest to common/digest.cJean-Christophe PLAGNIOL-VILLARD2011-10-121-62/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rename it to digest_file_window introduce digest_file to digest a file and digest_file_by_name where we specify the algo by name Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | bootm: add -L option to specify the initrd load addressJean-Christophe PLAGNIOL-VILLARD2011-10-091-3/+17
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | get_fake_image_handle: set nb_data_entries to 1 and update the header sizeJean-Christophe PLAGNIOL-VILLARD2011-10-091-0/+2
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | bootm: ensure the uImage is mapped first to allow option to used itJean-Christophe PLAGNIOL-VILLARD2011-10-091-4/+16
| |/ |/| | | | | | | | | | | needed for multi image support Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | image: move map_image amd unmap_image to image.cJean-Christophe PLAGNIOL-VILLARD2011-09-281-114/+0
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | image: add multi image support for bootmJean-Christophe PLAGNIOL-VILLARD2011-09-281-2/+76
| | | | | | | | | | | | | | you can choose the initrd via @<num> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | image: use data base addr for image_print_contents, image_multi_count/getimgJean-Christophe PLAGNIOL-VILLARD2011-09-281-1/+1
|/ | | | | | | | as in barebox the data could be the mapped file or a allocated memory with just the data (non header) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/loads.c: fix whitespace errors & formattingAntony Pavlov2011-08-231-60/+59
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/loads.c: make do_* functions staticAntony Pavlov2011-08-231-2/+2
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/loads.c: fix compiler's warningAntony Pavlov2011-08-231-1/+1
| | | | | | | Fix 'assignment discards qualifiers from pointer target type' warning. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/loads.c: make it compile againAntony Pavlov2011-08-233-35/+28
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove LOADS_BAUD_CHANGE from broken commands/loads.cAntony Pavlov2011-08-231-108/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'master' into nextSascha Hauer2011-08-151-0/+6
|\
| * Merge branch 'next'Sascha Hauer2011-08-045-26/+79
| |\
| * | commands/led.c: check registered LEDsAntony Pavlov2011-08-031-0/+6
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | login: add timeout supportJean-Christophe PLAGNIOL-VILLARD2011-08-112-5/+25
| |/ |/| | | | | | | | | | | | | If a timeout is specified and expired the command will be executed by default boot Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'pu-time' into nextSascha Hauer2011-08-044-0/+71
|\ \
| * | Add 'time' command to measure execution time of a commandSascha Hauer2011-08-033-0/+68
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memcpy command: allow to interruptSascha Hauer2011-08-031-0/+3
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | remove unused DECLARE_GLOBAL_DATA_PTRSascha Hauer2011-08-011-2/+0
|/ / | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | add a add_mem_device functionSascha Hauer2011-07-181-24/+8
| | | | | | | | | | | | | | | | | | | | | | Add a helper function for boards to register their memory devices. This makes the board code smaller and also helps getting rid of map_base and struct memory_platform_data. And switch all of the memory to it Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | mem: replace DEVFS_RDWR by IORESOURCE_MEM_WRITEABLEJean-Christophe PLAGNIOL-VILLARD2011-07-181-1/+1
|/ | | | | | | we keep struct memory_platform_data for now on we will switch off the memories resources to struct resource Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'next'Sascha Hauer2011-07-061-2/+1
|\
| * commands/bootm.c: fix unused-but-set-variable gcc warningAntony Pavlov2011-07-041-2/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | menu: fix command management module supportJean-Christophe PLAGNIOL-VILLARD2011-07-051-1/+1
|/ | | | | | | it's part of the command and can not be compiled as an other module Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'next'Sascha Hauer2011-06-063-0/+206
|\
| * commands: add md5/sha1/sha256sum commands using the digest apiPeter Korsgaard2011-05-193-0/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface emulates the Linux commands, except that you can specify a sub area - E.G.: barebox:/ md5sum /dev/fd0 2M+1M /env/config /env/bin/boot 10+2 61c4c0180b044191d28f27545f43562f /dev/fd0 0x00200000 ... 0x00300000 908b84bcbadd2f263583a65ff31d1cad /env/config 0x00000000 ... 0x000003a7 f23bd15825cc5006cf5f9fd486d82d2d /env/bin/boot 0x0000000a ... 0x0000000c Adds around 1400 bytes (+ size of digest code) with everything enabled. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands/crc.c: fix typo in help textPeter Korsgaard2011-05-161-1/+1
|/ | | | | Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cp command: handle directories as last argumentSascha Hauer2011-04-121-1/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: make default env path configurableSascha Hauer2011-04-122-2/+2
| | | | | | | | Normally the default path to save the environment is /dev/env0. However, we can't map a file in a fat filesystem to /dev/env0. So if we want to store the environment in a file in fat we have to make it configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nand bb: add proper bb remove functionSascha Hauer2011-04-121-12/+1
| | | | | | | | The old way happily removed cdev entries which were no bb dev at all. Fix this by checking if the given device actually is a bb device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nand bb: switch to cdev operationsSascha Hauer2011-04-121-1/+1
| | | | | | | The cdev operations are available without the complete file API, so they are more suitable for internal usage. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nand: move bb handling code to drivers/mtd/nandSascha Hauer2011-04-121-248/+0
| | | | | | | It's good to seperate the code which others can use from commands. This way other users do not depend on the command being compiled in. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make command support optionalSascha Hauer2011-04-111-1/+10
| | | | | | | In a noninveractive environment we do not need commands. So make them optional. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* env: Make environment variable support optionalSascha Hauer2011-04-111-0/+2
| | | | | | | Environment variables are only useful in interactive environments. Make it optional on our way to support a noninteractive barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: seperate usb command from usb coreSascha Hauer2011-04-113-0/+50
| | | | | | | | This patch makes the USB command optional and makes usb_rescan a global function. This way we can use USB in noninteractive environments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devfs: remove unused struct filep* argument from open/closeSascha Hauer2011-04-111-2/+2
| | | | | | | the cdev layer is under the file layer, so it should not use struct filep*. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'nand-pu' into nextSascha Hauer2011-04-063-2/+13
|\
| * nand: Make write support optionalSascha Hauer2011-04-041-1/+6
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>