summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/oftree'Sascha Hauer2013-02-046-66/+509
|\ | | | | | | | | Conflicts: drivers/of/base.c
| * oftree command: Add -s option to save internal oftree to fileSascha Hauer2013-01-191-2/+28
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: Add of_node commandSascha Hauer2013-01-193-0/+120
| | | | | | | | | | | | This command allows to create/delete device nodes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: Add of_property commandSascha Hauer2013-01-193-0/+290
| | | | | | | | | | | | | | | | 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>
| * oftree command: refactorSascha Hauer2013-01-192-39/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has several improvements for the oftree command: - loading a devicetree (-l) and actually probing (-p) it now is separated - the command now can dump the internal devicetree or a dtb given on the command line. - The -f option now actually frees the internal devicetree With this the usage pattern for this command is: oftree -l /env/oftree oftree -d -n /sound oftree -d /env/oftree oftree -f oftree -p oftree -l -p /env/oftree Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: remove unused barebox_fdtSascha Hauer2013-01-191-8/+1
| | | | | | | | | | | | | | | | barebox_fdt should once become the pointer to the barebox internal devicetree. Since barebox has its own internal devicetree format this was never used. remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: rename of_parse_dtb to of_unflatten_dtbSascha Hauer2013-01-111-1/+1
| | | | | | | | | | | | | | The process of unflatten the device tree is known from the kernel, so rename the function, because that's what it does. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: make of_get_fixed_tree more universally usableSascha Hauer2013-01-111-24/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the bootm code uses of_fix_tree to apply the fixups to the devicetree given on the command line. This function assumes that there is enough space for the fixups available. Also on ARM we have to make sure the tree does not cross 1Mib boundaries. This patch moves the space allocation and alignment ensurance to of_get_fixed_tree and uses it in bootm. This is the first step for making of_get_fixed_tree the single point of devicetree handling in barebox. of_get_fixed_tree now takes an argument of the input fdt. If it is given, this one is used, otherwise an internal oftree is used which will be created in subsequent patches. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2013-02-043-8/+34
|\ \
| * | commands: reset: add shutdown_barebox() before reset_cpu()Antony Pavlov2013-01-301-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some of controlled by barebox peripheral devices may be not affected by CPU reset, so we need call shutdown_barebox() to stop them. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | introduce console none supportJean-Christophe PLAGNIOL-VILLARD2013-01-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this will allow to have no console support Use full for bootstrap as we can save 6.5 KiB (barebox.bin) and 3.8 KiB (zbarebox.bin lzo) on at91sam9263 as example vs console simple As on bootstrap we have often very limited size. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bootm: move printing of file locations outside verbose modeSascha Hauer2013-01-181-8/+8
| |/ | | | | | | | | | | | | | | The location of files that are booted is a precious information, so print it by default and not only in verbose mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Michael Olbrich <m.olbrich@pengutronix.de>
* | Merge branch 'for-next/commands'Sascha Hauer2013-02-043-0/+101
|\ \
| * | commands: add let command which supports proper arithmeticJan Luebbe2013-01-093-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | move prototypes for envfs_* to envfs.hSascha Hauer2013-01-202-2/+2
| |/ |/| | | | | | | | | | | environment.h is for environment variables, not for the environment storage (envfs), so move the prototypes to envfs.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fixup! commands: add ubiformatSascha Hauer2013-01-091-0/+784
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the missing ubiformat.c file missing from: commit 5a29d4aea71336558e13eb6ad8e662781653ae56 Author: Wolfram Sang <w.sang@pengutronix.de> Date: Mon Dec 17 16:48:33 2012 +0100 commands: add ubiformat 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> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: add ubiformatWolfram Sang2012-12-192-0/+9
| | | | | | | | | | | | | | | | | | 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>
* | ubi: consolidate ubi-media.hWolfram Sang2012-12-191-1/+1
|/ | | | | | | | We have two versions in the tree. Use the newer one, and put it into the mtd directory while we are at it. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: flash: add missing newlines to error messagesWolfram Sang2012-12-141-2/+2
| | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'kconfig'Sascha Hauer2012-12-081-16/+15
|\
| * Cleanup Kconfig filesAlexander Shiyan2012-12-081-16/+15
| | | | | | | | | | | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mem-commands'Sascha Hauer2012-12-072-12/+36
|\ \
| * | commands: mw: add the '-x' option (swap bytes)Antony Pavlov2012-11-261-2/+7
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: md: add the '-x' option (swap bytes)Antony Pavlov2012-11-261-7/+17
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mem: add the swab (swap bytes) option to memory_display()Antony Pavlov2012-11-262-6/+15
| |/ | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ext4'Sascha Hauer2012-12-072-5/+6
|\ \
| * | filetype: Pass bufsizeSascha Hauer2012-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the buffer size to the file detection code. This makes sure we do not read past the buffer. This is especially useful for ext filesystem detection as the magic is at byte offset 1080. Also introduce a FILE_TYPE_SAFE_BUFSIZE define which is set to the minimum bufsize the detection code needs to detect all known filetypes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ls command: call stat() only when necessarySascha Hauer2012-12-031-4/+5
| |/ | | | | | | | | | | | | | | | | | | When calling ls in short mode we do not have to call stat() for additional informations because we do not use them. This speeds up ls on filesystems on which stat() is expensive because the barebox filesystem support always has to iterate over the directory tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | loadenv: allow more fine grained environment loadingSascha Hauer2012-11-291-6/+47
| | | | | | | | | | | | | | | | | | | | | | This implements two new options for the loadenv command: -s: removes (scrubs) old directory contents to be able to create a fresh environment from for example /dev/defaultenv -n: no overwrite. Do not overwrite existing files. This allows to keep parts of the old environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | rm: implement -rSascha Hauer2012-11-291-4/+24
|/ | | | | | To recursively remove files and directories. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* splash: init struct allocated the stack to 0Jean-Christophe PLAGNIOL-VILLARD2012-11-211-0/+4
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ymodem'Sascha Hauer2012-11-166-881/+285
|\
| * commands: remove old Y-Modem implementationRobert Jarzmik2012-11-125-898/+63
| | | | | | | | | | | | | | | | | | | | | | | | 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-123-1/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-163-0/+139
|\ \
| * | introduce spi commandJean-Christophe PLAGNIOL-VILLARD2012-11-123-0/+139
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/nand-test'Sascha Hauer2012-11-161-87/+103
|\ \
| * | nandtest: add another constraints checkAlexander Aring2012-10-231-0/+7
| | | | | | | | | | | | | | | | | | | | | Add check if writesize is a multiple of erasesize. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nandtest: use loff_t instead off_tAlexander Aring2012-10-231-29/+28
| | | | | | | | | | | | | | | | | | | | | | | | Use the same offset type like mtd interface. Replace modulo operation with IS_ALIGNED macro. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nandtest: clean up codeAlexander Aring2012-10-231-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up code: - change 'i+i' to 'i + i'. - change counter variable to unsigned int. - use spaces instead of tabs in help text. - remove __test_ofs variable. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nandtest: use get_random_bytes instead of for loopAlexander Aring2012-10-231-4/+1
| | | | | | | | | | | | | | | | | | | | | Use already builtin get_random_bytes instead of for loop. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nandtest: change flash length variable typeAlexander Aring2012-10-231-7/+6
| | | | | | | | | | | | | | | | | | | | | Change flash 'length' variable type to off_t instead of int. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nandtest: rename command argument p to iAlexander Aring2012-10-231-8/+8
| | | | | | | | | | | | | | | | | | | | | Rename command argument p for 'passes' to 'i' iteration. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nandtest: add progressbar instead of offset printAlexander Aring2012-10-231-17/+25
| | | | | | | | | | | | | | | | | | | | | Add progressbar and remove other outputs of current flash offset. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nandtest: stat ecc per page not per eraseblockAlexander Aring2012-10-231-31/+39
| | | | | | | | | | | | | | | | | | | | | Collect ecc statistics per page not per eraseblock. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2012-11-165-19/+298
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | environment variables: use linux listSascha Hauer2012-10-301-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches environment variables to use linux list. This is easier to read. An additional plus is that the environment variables no longer need an initcall, so malloc is the only requirement for them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | add 'miitool' command to view media-independent interface statusAntony Pavlov2012-10-303-0/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | commands/Kconfig: move 'ln' to the 'file commands' sectionAntony Pavlov2012-10-301-4/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | cosmetic: improve command list displayCarlo Caione2012-10-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following from the Frank Jullien's patch, here is the same cosmetic correction when the list of commands is printed (the problem was that the commands for gpio_* were too long for the %10s alignment) Signed-off-by: Carlo Caione <carlo.caione@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>