summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* env: erase/protect in envfs_saveSascha Hauer2014-04-281-45/+1
| | | | | | So that the envfs_save is more useful outside of the saveenv command Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: loady: fix Y-Modem/G option name in help messageAntony Pavlov2014-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | Actually loady command uses '-g' option for Y-Modem/G mode selection; see loady() function: while ((opt = getopt(argc, argv, "b:t:g")) > 0) { switch (opt) { ... case 'g': is_ymodemg = 1; break; By mistake help message show '-y' option for Y-Modem/G mode selection. This patch fixes the problem. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: uimage: remove redundant error messageLucas Stach2014-04-231-5/+2
| | | | | | | | | uimage_verify already prints an error message if the CRC is wrong. Romove the never reached redundant message in the caller. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix signedness mixups in printf format specifiersLucas Stach2014-04-232-2/+2
| | | | | | | | | This most likely doesn't fix any real bugs, but it's the right thing to do and reduces the noise level with static checkers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* loadenv: ignore -ENOENT when removing /envSascha Hauer2014-04-091-1/+1
| | | | | | | With the -s option loadenv first removes /env. Ignore it when this directory does not exist. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2014-04-043-10/+11
|\
| * ubi: Fix for creating ubi volumes with 64bit sizeDmitry Lavnikevich2014-03-121-2/+2
| | | | | | | | | | | | | | | | | | Since MTD is already supports >= 4GB device sizes it is better to allow ubi valumes also be created of larger sizes. Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Grigory Milev <g.milev@sam-solutions.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: Support for 4GB partitionsDmitry Lavnikevich2014-03-121-2/+2
| | | | | | | | | | | | | | | | | | This patch implements correct way of creating partitions on mtd devices with size >= 4GB. Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Grigory Milev <g.milev@sam-solutions.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: Update internal API to support 64-bit device sizeDmitry Lavnikevich2014-03-122-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MTD internal API presently uses 32-bit values to represent device size. This patch updates them to 64-bits but leaves the external API unchanged. In general, changing from 32-bit to 64-bit values cause little or no changes to the majority of the code with the following exceptions: - printk message formats; - division and modulus of 64-bit values (mtd_div_by_wb, mtd_div_by_eb may be used in some of such cases). Was tested on phyFLEX i.MX6. Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Grigory Milev <g.milev@sam-solutions.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/menutree'Sascha Hauer2014-04-043-0/+69
|\ \
| * | add menutree commandSascha Hauer2014-03-283-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating menus from the shell using the regular 'menu' command is rather complicated. This adds a 'menutree' command which creates a menu from a directory structure. In the directory structure each directory corresponds to a single menu entry. The directory contains the following files: title - A file containing the title of the entry as shown in the menu box - If present, the entry is a 'bool' entry. The file contains a variable name from which the current state of the bool is taken from and saved to. action - if present this file contains a shell script which is executed when when the entry is selected. If neither 'box' or 'action' are present this entry is considered a submenu containing more entries. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/boot'Sascha Hauer2014-04-041-36/+85
|\ \ \ | |/ / |/| |
| * | blspec: honor default/once entries againSascha Hauer2014-03-241-5/+32
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | boot command: only create boot entries from scriptsSascha Hauer2014-03-191-0/+5
| | | | | | | | | | | | | | | | | | When given a directory ignore all files that are not shell scripts. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | boot command: honour global.boot.default also for -l and -mSascha Hauer2014-03-191-31/+48
| |/ | | | | | | | | | | | | | | The boot command is expected to work on bootsources from the commandline if given, on global.boot.default otherwise. Fix this behaviour for the -m and -l options also. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / led: trigger: Add missing LED_TRIGGER_DEFAULT_ON stringSascha Hauer2014-03-211-0/+1
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ppc'Sascha Hauer2014-03-071-5/+5
|\
| * memtest: exclude page starting at address 0.Renaud Barbier2014-03-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | memtest fails when a reserved sdram region is at the bank start at address 0. This patch supports the exclusion of memory region at the bank start. Tested on P2020RDB and DA923RC, qemuarm versatilepb. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/nfs'Sascha Hauer2014-03-076-12/+17
|\ \ | | | | | | | | | | | | Conflicts: defaultenv/defaultenv-2-base/bin/ifup
| * | run_command: remove unused flag parameterSascha Hauer2014-03-074-4/+4
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mount: support filesystem options passed via -oUwe Kleine-König2014-02-102-8/+13
| |/ | | | | | | | | | | | | | | | | | | | | Similar to mount(8) the barebox command mount now supports passing a string to the file system driver via -o. This is used in the next commit to let the user specify port numbers for nfs mounts. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2014-03-076-5/+80
|\ \ | | | | | | | | | | | | Conflicts: common/environment.c
| * | boot command: Remove redundant assignmentAlexander Shiyan2014-02-171-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add readf commandSascha Hauer2014-02-143-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | The readf command is useful to read the content of a file into a shell variable. It should be used for ascii content and thus stops reading at all nonprintable characters including newline. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: dfu: Use barebox product idSascha Hauer2014-02-141-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | We obtained a USB Product ID from Openmoko for barebox running in DFU mode. Use it as default for the dfu command. Now we can make the USB VID/PID arguments optional. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: edit: properly propagate error codeLucas Stach2014-02-101-1/+1
| |/ | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/gpio-keys'Sascha Hauer2014-03-071-9/+9
|\ \
| * | input: Add BB_ prefix to KEY_ definesSascha Hauer2014-02-171-9/+9
| |/ | | | | | | | | | | | | Our KEY_ defines conflict with the standard Linux KEY_ defines, so add a BB_ prefix to them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/env'Sascha Hauer2014-03-072-10/+37
|\ \
| * | usb: dfu: Add create flagSascha Hauer2014-02-281-2/+6
| | | | | | | | | | | | | | | | | | | | | With the create flag DFU can upload to regular, previously non existing files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: dfu: Fix spelling of flag nameSascha Hauer2014-02-281-1/+1
| | | | | | | | | | | | | | | | | | DFU_FLAG_SAVE should really be named DFU_FLAG_SAFE. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | defaultenv: Allow multiple defaultenvironment overlaysSascha Hauer2014-02-281-7/+30
| |/ | | | | | | | | | | | | | | | | | | We can compile barebox for multiple boards at once, but currently they all share a single default environment. This patch adds a defaultenv_append() which boards can call to customize the default environment during runtime. Each board now generate default environment snippets using bbenv-y and add them during runtime with defaultenv_append() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / dfu command: check return valuesSascha Hauer2014-02-131-3/+6
|/ | | | | | | | Check the return value of usb_dfu_register and bail out with an error if it fails. Also return successfully if it succeeds instead of returning 1 unconditionally. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: Use accessor functions for default environment pathSascha Hauer2014-01-272-2/+2
| | | | | | | | | default_environment_path only exists when CONFIG_ENV_HANDLING is enabled. Boards would have to #ifdef this if they wanted to use default_environment_path. Use accessor functions instead which can be ifdeffed on a single place. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-01-071-1/+2
|\
| * oftree command: Allow free stored dtb before loadJan Weitzel2014-01-061-1/+2
| | | | | | | | | | | | | | | | Don't return after freeing stored devicetree if also loading ist wanted. Allow "oftree -f -l my.dtb" Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | miitool: drop internal table of known MII, use phy drivers insteadAntony Pavlov2014-01-061-25/+5
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | miitool: add initial GbE supportAntony Pavlov2014-01-061-16/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GbE support based on the patch for generic 'mii-tool', see http://ftp.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz We need to note Jean-Christophe PLAGNIOL-VILLARD for his initial GbE support patch: http://lists.infradead.org/pipermail/barebox/2013-February/012634.html Generic 'mii-tool' GbE support patch has some disadvantages: 1. 1000baseT-HD is prefered to 1000baseT-FD; 2. show GbE-features for 10/100 only phys (e.g. Level One LXT971). This patch fixes this disadvantages. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | miitool: change behaviour closer to linux' mii-toolAntony Pavlov2014-01-061-41/+47
| | | | | | | | | | | | | | miitool without arguments will try to show status for all phys. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | miitool: Add option to scan mii busesSascha Hauer2013-12-111-2/+10
|/ | | | | | | | | With the -s option all mii buses can be scanned for devices so that they are available without doing network operations. Also, now *all* phy devices on a mii bus can be examined, not only the one attached to an ethernet device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2013-12-065-62/+9
|\ | | | | | | | | Conflicts: scripts/Makefile
| * scripts: bareboxcrc32 as host and target userspacetoolMichael Grzeschik2013-12-041-59/+4
| | | | | | | | | | | | | | | | This patch adds the crc32 command to be build as host and optionally as target tool. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: nandtest: Fix signed/unsigned arguments for printfAlexander Shiyan2013-11-111-2/+2
| | | | | | | | | | | | | | "%d" in format string requires a signed integer. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * treewide: Add missing includesSascha Hauer2013-11-083-1/+3
| | | | | | | | | | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: of_node fix descripionJan Weitzel2013-11-271-1/+1
| | | | | | | | | | | | | | Remove copy and paste error Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | blspec: Fix another crash with menu disabledUwe Kleine-König2013-11-111-1/+3
|/ | | | | | | | | boot -l crashes with CONFIG_MENU disabled because blspec_alloc returns with blspec->menu being NULL in this case. So guard the usage of blspec->menu accordingly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot command: Add timeout support for menuSascha Hauer2013-11-051-1/+11
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot command: make more flexibleSascha Hauer2013-11-051-127/+194
| | | | | | | | | | | | | | | | | | With this we can do 'boot <name>' where name is one of: - a filename under /env/boot/ - a full path to a boot script - a device name - a partition name under /dev/ - a full path to a directory which - contains boot scripts, or - contains a loader/entries/ directory containing bootspec entries Multiple names can be given, they are tried in order. So any mixture between bootspec entries and bootscripts can be given. bootspec entries can now also be given as a path to a directory containing bootspec entries. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot: Print boot entries in the order they areSascha Hauer2013-11-051-14/+4
| | | | | | | Instead of first printing the traditional entries and the bootloader spec entries afterwards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: rename _hwdevice functions to _devicenameSascha Hauer2013-11-051-1/+1
| | | | | | | Since it's not necessarily the hardware device this seems to be a more appropriate name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>