summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | bootm: Align oftreeSteffen Trumtrar2012-04-181-6/+10
| | | | | | | | | | | | | | | | | | | | Arm needs 64-Bit alignment of the oftree as mentioned in the documentation Documentation/arm/Booting. Other architectures may need a bigger alignment so align to 4K. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: Fix check for ret-valueSteffen Trumtrar2012-04-181-4/+3
|/ | | | | | | | The intention of this code was to check the return value of fdt_open_into. Fix this. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'master' into nextSascha Hauer2012-04-171-1/+0
|\
| * addpart: remove duplicate line in help textSascha Hauer2012-04-141-1/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | automount: optionally make directorySascha Hauer2012-04-151-2/+11
| | | | | | | | | | | | Add an option to create the mount path to make using this command easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | automount: fix argument parsingSascha Hauer2012-04-151-2/+2
| | | | | | | | | | | | With getopt we have to use argv[optind] instead of hardcoded argv[0] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: be more informative with oftreesSascha Hauer2012-04-141-4/+6
| | | | | | | | | | | | | | | | - print error message when the specified oftree cannot be opened - move verbose info to top of function so that the information is printed before something else fails. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | arm: add Android boot image supportJean-Christophe PLAGNIOL-VILLARD2012-04-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Android Image contains 3 components and params - kernel - initrd - second stage (optional) - tags addr - bootargs In fast boot the initrd is mandatory, in barebox we are less restrictive use the initrd only if present add to env params: aimage_noverwrite_bootargs Disable overwrite of the bootargs with the one present in aimage aimage_noverwrite_tags Disable overwrite of the tags addr with the one present in aimage Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Remove EXPERIMENTAL flag from loady.Uwe Hermann2012-04-101-2/+1
|/ | | | | | | | | | | | | From bd6c5c884337ae2d4ef41d85d59c2d5ec525f8a5 Mon Sep 17 00:00:00 2001 From: Uwe Hermann <uwe@hermann-uwe.de> Date: Fri, 6 Apr 2012 17:30:01 +0200 The loady command seems to work just fine (tested on an S3C2440 target). Also, mark it as TRISTATE like loadb and loads. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* partition command: optionally do not automatically prepend the device nameSascha Hauer2012-03-181-8/+25
| | | | | | | | | | | | | | | | | | | | | We used to automatically prepend the device name before the partition name. So when we added a partition named 'barebox' to a device named 'nor0' the partition was named 'nor0.barebox'. The Kernel can mount its rootfs based on the mtd name, for example with root=mtd:root. If for example we have multiple mtd devices (nor and nand) 'root' is a bad name for the partition, it should better be 'nor0.root' This patch adds an additional commandline switch to addpart to optionally skip the automatic device name adding. This makes it possible to define our mtd partitions like this: nor_parts="512k(nor0.barebox)ro,128k(nor0.bareboxenv),2M(nor0.kernel),-(nor0.root)" This way the barebox partition names stay the same, but we can now pass the exact name to the kernel (root=mtd:nor0.root). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb command: by default scan only once for USB devicesSascha Hauer2012-03-181-4/+22
| | | | | | | | | | We normally do not expect USB devices to be hotplugged. Instead of rescanning each time the usb command is called, scan only once. This makes the usb command safe for being called multiple times without making already registered USB devices reinitialized. To really scan multiple times a '-f' option is introduced. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add automount supportSascha Hauer2012-03-183-0/+77
| | | | | | | | | | | | | | This patch adds an automount command which makes it possible to execute a script when a certain directory is first accessed. It's the commands responsibility to make this directory available (bringing devices up and mounting it). This results in automount support which makes sure that from the shell every file can be accessed without having to care for device bringup. Bringing up devices may be expensive (USB, dhcp). The automount support makes it easy for the environment to bringup devices when they are actually needed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: drop struct mtab_entrySascha Hauer2012-03-171-5/+5
| | | | | | | | | | every struct fs_device_d contains a struct mtab_entry, so they have a 1:1 relationship. Instead of having to use container_of to get from a struct mtab_entry to a struct fs_device_d we can better embed the members of struct mtab_entry into struct fs_device_d directly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'work/thumb2' into nextSascha Hauer2012-03-061-1/+5
|\