summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* fs: fix standard zero, full devicesSascha Hauer2012-07-041-3/+3
| | | | | | | | | | | | | | | | The standard devices are currently broken since they have the size ~0. As now files use loff_t as file size which is a signed type the read implementation gets confused and now returns -1. The current implementation also has the (somewhat theorical) problem that we do not have real streaming devices, so /dev/zero went out of zeroes after reading 4GB (or now LLONG_MAX). This patch introduces a new cdev flag DEVFS_IS_CHARACTER_DEV and a new file size flag FILE_SIZE_STREAM which makes it possible to create real stream devices instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/resource-size'Sascha Hauer2012-07-023-7/+4
|\ | | | | | | | | | | Conflicts: drivers/base/resource.c fs/fs.c
| * resource: store 'end' instead of 'size' in struct resourceSascha Hauer2012-07-013-7/+4
| | | | | | | | | | | | | | | | | | | | Storing the size instead of the resource end in struct resource was a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously leads to problems. 'end' on the other hand will never exceed UINT[32|64]_MAX. Also this way we can express a iomem region covering the whole address space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/poweroff'Sascha Hauer2012-07-023-0/+47
|\ \
| * | add 'poweroff' commandAntony Pavlov2012-06-303-0/+47
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/devnull'Sascha Hauer2012-07-023-29/+107
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: commands/mem.c
| * | | Added "/dev/full" and "/dev/null" devicesAlexander Shiyan2012-06-301-0/+55
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Move /dev/zero to separate unitAlexander Shiyan2012-06-303-29/+52
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to present "/dev/zero" always in system and not depending of mem-command. Standard files allow to test other memory devices, not only "mem", such as NOR, NAND, MCI-devices e.t.c. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/watchdog'Sascha Hauer2012-07-023-0/+88
|\ \ \
| * | | Add a simple watchdog frameworkJuergen Beisert2012-06-293-0/+88
| |/ / | | | | | | | | | | | | | | | | | | | | | This patch adds a simple wd command which can setup, trigger and stop a watchdog on the platform. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2012-07-026-31/+47
|\ \ \
| * | | remove dead rarpboot commandSascha Hauer2012-06-301-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | This code is unused, remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | commands: add msleep commandSteffen Trumtrar2012-06-303-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a command to sleep for n milliseconds. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | common: fix typo cammand_var_completeSteffen Trumtrar2012-06-302-2/+2
| |/ / | | | | | | | | | | | | | | | | | | Change function name to command_var_complete in all calls and its declaration. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/basename-dirname'Sascha Hauer2012-07-024-0/+110
|\ \ \
| * | | Add dirname commandSascha Hauer2012-06-303-0/+55
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Add basename commandSascha Hauer2012-06-303-0/+55
| |/ / | | | | | | | | | | | | | | | | | | The basename command allows to set an environment variable with the basename of a path. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/64bit'Sascha Hauer2012-07-025-32/+31
|\ \ \ | |_|/ |/| |
| * | memory commands: Make 64bit capableSascha Hauer2012-06-301-20/+19
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | make st_size in struct stat 64 bitSascha Hauer2012-06-301-1/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | make memory display 64bit capableSascha Hauer2012-06-301-2/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | make parse_area_spec arguments loff_tSascha Hauer2012-06-304-8/+8
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | use loff_t for file offsetsSascha Hauer2012-06-301-1/+1
| |/ | | | | | | | | | | | | This is a first step for 64bit file support: Make the file sizes/offsets 64bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / commands: uncompress: fix descriptionAlexander Shiyan2012-06-301-2/+2
|/ | | | | | | | Command "uncompress" can handle not only with LZO-format, so we just changed description for command. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/sandbox-fixes'Sascha Hauer2012-06-251-1/+2
|\
| * print out resource_size_t correctlySascha Hauer2012-06-251-1/+2
| | | | | | | | | | | | | | resource_size_t can be 32bit or 64bit depending on the architecture. Add a define for it to be able to printf a resource_size_t correctly Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | x86 linux16 command: Add missing includeSascha Hauer2012-06-251-0/+1
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Add default images variablesSascha Hauer2012-05-182-14/+53
| | | | | | | | | | It turns out useful to be able to configure bootm before its usage. This allows us to overwrite bootm settings on an individual base. This patch adds global variables to configure the kernel image, the initrd image and the devicetree image. These values will be used unless overwritten explicitely with command line switches. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lseek: return -1 instead of -errnoSascha Hauer2012-05-182-3/+3
| | | | | | | | | | The patch making errno a positive value has another bug: lseek was switched to return -errno instead of -1. This does not work since we can lseek we can address the whole 4G address space, have of which has a negative offset when interpreted as a signed integer. Let lseek return -1 on failure again instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'master' into nextSascha Hauer2012-05-162-4/+4
|\
| * echo: Fix helpSascha Hauer2012-05-141-3/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * i2c: Fix barebox crash when 'count' is not set for i2c_read commandAlexander Shiyan2012-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | Running i2c_read without the 'count' setting causes an error and reboots. barebox@Phytec phyCORE-i.MX27:/ i2c_read -b 1 -a 0x4a -r 0x00 ERROR: out of memory no stack data available Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | edit: Add a status lineSascha Hauer2012-05-161-3/+14
| | | | | | | | | | | | | | When invoked from a skript it's useful to know which file is edited. Also Add information how to exit the editor to the status line. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | booting: more flexible Linux bootargs generationSascha Hauer2012-05-142-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use the environment variable 'bootargs' to get the Linux bootargs. This patch allows for a more flexible bootargs generation using global variables. With it the Linux bootargs are concatenated from multiple variables. This allows to replace parts of the bootargs string without having to reconstruct it completely. With this bootargs can be constructed like: global linux.bootargs.base="console=ttyS0,115200" global linux.bootargs.ip="ip=dhcp" global linux.mtdparts="physmap-flash.0:512K(nor0.barebox),-(root)" This will then automatically be combined into a kernel bootargs string during boot. If the 'linux.bootargs.' variables are all empty the old standard 'bootargs' way will be used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | add 'global' commandSascha Hauer2012-05-143-0/+70
| | | | | | | | | | | | | | | | | | | | | | This implements global shell variable support. This is done by registering a new device named 'global', so global variables are just plain device parameters. Global variables are useful for storing the global state in the environment. Currently we do this by sourcing scripts instead of executing them which is quite limiting. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | timeout: allow to set a variable with the key pressedSascha Hauer2012-05-141-2/+14
| | | | | | | | | | | | Useful if we want to know which key caused the timeout. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Make errno a positive valueSascha Hauer2012-05-144-13/+11
| | | | | | | | | | | | | | | | | | Normally errno contains a positive error value. A certain unnamed developer mixed this up while implementing U-Boot-v2. Also, normally errno is never set to zero by any library function. This patch fixes this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Removed duplicate definition for DEVFS_PARTITION_xxxAlexander Shiyan2012-05-131-1/+1
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | i2c: Added switch for allowing usage 16bit register addressesAlexander Shiyan2012-05-131-9/+17
|/ | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge tag 'complete_update_support' of git://git.jcrosoft.org/barebox into nextSascha Hauer2012-05-0117-0/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | improve complete support The following patch serie improve the complete support by adding a complete framework to allow commands complete support. The add also car complete support for eval and setting and executable file support This also include an update of the stringlist API to support asprintf API
| * complete: add delpart complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+2
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * complete: add go and sleep supportJean-Christophe PLAGNIOL-VILLARD2012-04-302-0/+4
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * complete: add eth interface complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+2
| | | | | | | | | | | | use it on ethact Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * complete: add empty complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-3012-0/+24
| | | | | | | | | | | | | | | | | | | | for cpuinfo, clear, dhcp, false, login, lsmod, meminfo, passwd, pwd, reginfo, reset, true, usb, version for mach-imx and mach-mxs: dump_clocks for u_serial: mycdev Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * complete: add help complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+2
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | bootm: fix initrd handlingSascha Hauer2012-05-011-14/+10
| | | | | | | | | | | | | | | | bootm_initrd tests for data->initrd, but this never becomes true because the settingof data->initrd is inside a if(bootm_initrd()). Fix this. Also, do not support the initrd options when initrd is disabled. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | edit: Add proper screen size handlingSascha Hauer2012-04-301-30/+20
|/ | | | | | | | | | We used to have a quite slow algorithm to detect the screen size which was unused for long time. This patch changes this to first set the cursor to x=999, y=999 and the read back the actual cursor position. Since I am not confident that this works on all terminals this is only used when edit is called as 'sedit'. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* menu: fix non command management supportJean-Christophe PLAGNIOL-VILLARD2012-04-231-8/+9
| | | | | | the auto select is always available Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'binfmt' of git://git.jcrosoft.org/barebox into nextSascha Hauer2012-04-181-0/+12
|\
| * bootm: add uimage binfmt supportJean-Christophe PLAGNIOL-VILLARD2012-04-181-0/+12
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>