summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | | | Merge branch 'for-next/imx'Sascha Hauer2012-11-163-0/+92
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/boards/guf-neso/lowlevel.c arch/arm/boards/pcm038/lowlevel.c commands/Makefile
| * | | | Add in-system barebox update infrastructureSascha Hauer2012-10-173-0/+92
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently in-system update means to write an arbitrary file to an arbitrary device. There is no sanity check if the flashed image is of the right type or will fit onto the device. Furthermore some SoCs need a special preparation step for their images before flashing them. This adds a barebox in-system update infrastructure. Boards can register update handlers which know how to make the board bootable. The available handlers can be listed to be able to select one, different force levels give the user the chance to know it better. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/filetype-command'Sascha Hauer2012-11-163-0/+103
|\ \ \ \ | |_|_|/ |/| | |
| * | | add filetype command supportSascha Hauer2012-10-303-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for a filetype detection command. It can be used to print a filename on the console or to set a variable with the detection result for use in shell scripts. The command also has an option to print the known filetypes so that a user knows what to match for. Based on an earlier version from Jean-Christophe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | mount: add compatibility to old mount commandSascha Hauer2012-11-021-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the mount command used to have the syntax 'mount <dev> <type> <mountpoint>'. This was changed to the more Linux like behaviour which specifies the type with the -t <type> option. If a newer barebox is run on a device with an older environment the mount command no longer works. This patch adds compatibility to the old behaviour. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | bootm: Do not cross 1MiB sections for the devicetreeSascha Hauer2012-11-011-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM Linux only maps a single 1MiB section for the devicetree. This has a 1Mib alignment, so we are not allowed to cross such a boundary. Align the devicetree to the next power of two so that this never happens. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | bootm: Add a define for the additional devicetree sizeSascha Hauer2012-11-011-2/+9
|/ / / | | | | | | | | | | | | | | | | | | | | | The fixed devicetree may need more space than the original one. We used to use 0x8000 here. Add a define for it to have the space defined at a single place. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / wd: Provide default value for watchdog timeoutSascha Hauer2012-10-261-0/+1
|/ / | | | | | | | | | | Otherwise barebox can't be built if the user did not specify a value. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | cosmetic: extra new line in automount usage commandCarlo Caione2012-10-131-1/+1
| | | | | | | | | | Signed-off-by: Carlo Caione <carlo.caione@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: close open filesVicente2012-10-101-1/+5
|/ | | | | Signed-off-by: Vicente <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: blit the surface on demandJean-Christophe PLAGNIOL-VILLARD2012-10-041-0/+2
| | | | | | | | Do not blit the surface everytime we write an image As we want to able to render multiple image this will cause 1 blit per image; Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphic_utils: introduce common fb_open/closeJean-Christophe PLAGNIOL-VILLARD2012-10-041-41/+9
| | | | | | | To open, memmap, get the fb_info and if needed allocate the offscreen buffer Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: introduce screen and surface to factorize and simplify codeJean-Christophe PLAGNIOL-VILLARD2012-10-041-21/+21
| | | | | | | | | | Instead of passing hundreds of parameter, just pass the right structure. struct screen represent the screen with a without double buffering. struct surface represent the part of the screen we want to render. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: move gui file to include/gui and lib/guiJean-Christophe PLAGNIOL-VILLARD2012-10-042-10/+17
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/fixes'Sascha Hauer2012-10-041-1/+1
|\