summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* boot: remove incomplete 'title' handling in menuSascha Hauer2013-10-161-13/+2
| | | | | | | | The 'boot -m' command executes the /env/boot/* scripts in order to determine the title of a boot menu entry. This is not complete and depends on changes in the environment, so remove it for now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Implement bootloader spec support for bareboxSascha Hauer2013-10-141-23/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Bootloader Specification describes a way how kernels can be installed on devices and how they can be started by the bootloader. The bootloader spec is currently supported by (x86) gummiboot and by systemd which provides a kernel-install script. With the bootloader spec it's possible for the Operating system to install a new kernel without knowing about the bootloader and for the bootloader it's possible to discover and start Operating Systems on a media without being configured. For more details about the spec see: http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/ This patch adds barebox support for the spec. It enhances the 'boot' command so that not only boot script names can be given, but also devices containing bootloader spec entries. With this it's possible to call the 'boot' command like: 'boot sd emmc net'. It would then first look for bootloader spec entries on the (removable) sd card, then, is nothing is found, on the internal emmc and if still unsuccessful would call the 'net' bootscript. The bootloader Spec currently doesn't specify which entry should be default if multiple entries are found on a single device. Therefore barebox currently has two extensions of the spec. The $BOOT diretory can contain a file named 'default'. If present, the content of the file is treated as a filename under $BOOT/loader/entries/ which is used as default. Similarly if a file named 'once' is present, the entry is started once and the file is removed afterwards. This is useful for testing if a newly installed kernel works before making it the default. As on ARM and other Architectures a devicetree has to be specified for the kernel, the 'devicetree' property is used to specify a devicetree. Like 'kernel' and 'initrd' this also contains a pth relative to $BOOT. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mount'Sascha Hauer2013-10-071-10/+56
|\
| * mount: use standard mountpath if path is ommittedSascha Hauer2013-09-301-1/+26
| | | | | | | | | | | | | | With this a mount <devname> will mount the device to /mnt/<devname>. This directory is created automatically if it doesn't exist already. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mount: Allow to mount all available partitionsSascha Hauer2013-09-301-1/+7
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mount: implement -v option to print available filesystemsSascha Hauer2013-09-291-10/+25
| | | | | | | | | | | | | | It's useful to know which filesystems a barebox binary supports. Add a -v option to the mount command to find it out. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mount: print backingstore instead of dev_nameSascha Hauer2013-09-291-1/+1
| | | | | | | | | | | | | | When printing the devices on which a path is mounted the backingstore is the interesting thing, not dev_name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2013-10-074-5/+194
|\ \ | | | | | | | | | | | | Conflicts: commands/Makefile
| * | move devinfo command to its own fileSascha Hauer2013-09-272-0/+159
| | | | | | | | | | | | | | | | | | Just like nearly all other commands are in individual files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | command: crc: add -V option to check the crc store in a fileJean-Christophe PLAGNIOL-VILLARD2013-09-201-1/+19
| | | | | | | | | | | | | | | | | | | | | the format is %08x Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | command: ubiattach: add option to pass VID offsetJean-Christophe PLAGNIOL-VILLARD2013-09-181-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use the same option as linux -O as example due to a bug in already deployed kernel we must for the VID offset at 512 even it should be at 256 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/login'Sascha Hauer2013-10-072-6/+26
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: include/console.h
| * | | login/passwd: add default password supportJean-Christophe PLAGNIOL-VILLARD2013-09-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | even if the env is broken you will have a password Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | login: disable input console if password wrongJean-Christophe PLAGNIOL-VILLARD2013-09-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | so we guarantee that barebox is secured again user interaction Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | login: add globalvar timeout supportJean-Christophe PLAGNIOL-VILLARD2013-09-181-1/+17
| |/ / | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>