summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/state'Sascha Hauer2017-09-081-2/+4
|\
| * state command: extend help part IIJuergen Borleis2017-09-061-1/+2
| | | | | | | | | | | | | | | | | | Since commit 0c7436753c73e71ee512e5ed8029e7ccceedcd89 the 'state' command supports authentification and a related parameter. Honor this in the help text. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state command: extend help part IJuergen Borleis2017-09-061-2/+3
| | | | | | | | | | | | | | | | | | | | The loading parameter and its help text was removed in commit 446f3d07dd59f1b15b83a31fa88fba919ce4f47d and the loading parameter was re-added in commit 3a5ddf3d0db006e9256c8e256e7dc7b4a3f89a14 but the help was forgotten. Re-add the help as well. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | loadxy: add missing ) to help textUwe Kleine-König2017-08-151-2/+2
|/ | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* Merge branch 'for-next/mmc'Lucas Stach2017-07-311-1196/+1608
|\
| * mmc_extcsd command: reworkSascha Hauer2017-07-061-1185/+1598
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a rework of the mmc_extcsd command: - Always print registers. Previously we never printed registers that were already present in an older version of the spec - Put register names, access type and width into an array indexed by the register number - Print multibyte registers only once with the resulting value, and not bytewise. There's still more to cleanup, like for example we want to write multibyte registers once with the complete value, not bytewise. Anyway, this is a start. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * mmc_extcsd command: Fix multiline printsSascha Hauer2017-07-061-15/+14
| | | | | | | | | | | | | | | | The multiline prints lack the indention at the beginning of the second line. Add these. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | readlink: Improve -f handlingIan Abbott2017-07-061-7/+12
|/ | | | | | | | | | | | | | | | | For `readlink -f FILE VARIABLE`, set VARIABLE to the absolute, canonical file name of FILE by following symbolic links. All but the final component of FILE must exist. Prior to commit a602bebcf7e4 ("fs: Implement links to directories") the above worked in the limited case where FILE was an absolute path, the final component was a symbolic link, and all preceding components were directories. If FILE was a relative path with the final component being a symbolic link, and all preceding paths being directories, the command sort of worked, but produced a relative path as the result. Both of these cases were broken by the above commit. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2017-06-146-11/+14
|\
| * commands: mount: mention file loop mounts in the help textPhilipp Zabel2017-06-061-0/+1
| | | | | | | | | | Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: mount: combine dev and devstr, which are the samePhilipp Zabel2017-06-011-7/+5
| | | | | | | | | | | | | | | | Unify the device path used by the default mount and mount with specified mount point paths. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * true: make true_aliases[] constIan Abbott2017-05-191-1/+1
| | | | | | | | | | | | | | | | Although the elements of `true_aliases[]` are of type `const char *`, the elements themselves are not const-qualified. Make them `const`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * test: make test_aliases[] constIan Abbott2017-05-191-1/+1
| | | | | | | | | | | | | | | | Although the elements of `test_aliases[]` are of type `const char *`, the elements themselves are not const-qualified. Make them `const`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * help: make help_aliases[] constIan Abbott2017-05-191-1/+1
| | | | | | | | | | | | | | | | Although the elements of `help_aliases[]` are of type `const char *`, the elements themselves are not const-qualified. Make them `const`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * edit: make edit_aliases[] constIan Abbott2017-05-191-1/+1
| | | | | | | | | | | | | | | | Although the elements of `edit_aliases[]` are of type `const char *`, the elements themselves are not const-qualified. Make them `const`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: add ':' as alias for 'true'Ian Abbott2017-05-171-0/+3
| | | | | | | | | | | | | | | | | | | | ':' is the null command, sometimes used in shell scripts (especially after 'then'), but it is not yet supported by barebox. It is supposed to do nothing, successfully, just like the 'true' command, so add it as an alias. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: usbgadget: update fastboot help textOleksij Rempel2017-05-081-1/+2
| | | | | | | | | | | | | | | | | | cmd_usbgadget can use now the fallback to global.usbgadget.fastboot_function. Update help text to reflect this behavior. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ls: Fix showing links to directoriesSascha Hauer2017-05-111-10/+16
| | | | | | | | | | | | | | | | | | With links to directories we have to do some adjustments in the printout. In ls_one we have to use lstat() because we want to show informations about the file or link. When determing if it's a file or directory that we show we have to use stat() instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: Implement links to directoriesSascha Hauer2017-05-111-1/+1
|/ | | | | | | | | | | | So far links can only point to files. Implement links to directories. With this all kinds of links are supported: - relative links - absolute links - links including ".." - link loops (are detected, return -EMLINK) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/parameter-types'Sascha Hauer2017-05-051-1/+2
|\
| * parameter: Give device parameters typesSascha Hauer2017-04-101-1/+2
| | | | | | | | | | | | | | | | This adds a variable type enum and adds this to the device parameters. This information gives the user a hint which values a parameter expects and also helps to organize the parameters better internally. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-05-051-0/+1
|\ \
| * | commands: add spd_decode to the 'hardware manipulation' groupAntony Pavlov2017-04-281-0/+1
| |/ | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: basename: Use posix_basename()Sascha Hauer2017-04-191-1/+1
| | | | | | | | | | | | | | The Linux shell basename command uses the POSIX basename version, so the same for barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | cp: Use posix_basename() on source argumentSascha Hauer2017-04-191-1/+2
|/ | | | | | | | | | The GNU basename version does not work with strings which have a trailing slash. Use posix_basename instead. With this cp -r can properly work on source arguments which have a trailing slash, i.e. "cp /dir1/ dst". Reported-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2017-04-074-4/+124
|\
| * state: Allow to load without authentificationSascha Hauer2017-03-311-4/+12
| | | | | | | | | | | | | | Sometimes it's useful to be able to load a state even when it can't be authentificated. Add an option for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: state: allow loading state with -lSascha Hauer2017-03-311-4/+9
| | | | | | | | | | | | | | At least for testing purposes it's useful to be able to manually load a state. Add -l option for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: implement keystore commandSascha Hauer2017-03-313-0/+107
| | | | | | | | | | | | The keystore command provides access to the barebox keystore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2017-04-071-0/+4
|\ \
| * | mtd: when creating bitflips the offset has to be page alignedSascha Hauer2017-03-301-0/+4
| |/ | | | | | | | | | | | | | | mtd_peb_create_bitflips() assumes the offset is page aligned. Enforce this and in the nand_bitlfip command print a warning if it's not aligned. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-04-074-12/+21
|\ \
| * | commands: digest: show area info only if necessaryAntony Pavlov2017-04-061-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Area info "0x00000000 ... 0xffffffffffffffff" in digest commands output is something strange and misleading, e.g. barebox@barebox sandbox:/ md5sum logo/barebox-logo-240.png d3226a0eba3fd49af6bd190b077a3466 logo/barebox-logo-240.png 0x00000000 ... 0xffffffffffffffff Also skipping area info in the barebox digets commands output for every file makes it more similar to traditional *nix digest commands output. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: usbgadget: provide fallback to global variablesOleksij Rempel2017-03-311-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | usbgadget autostarter is providing now a global variable to configure fastboot. We can use is as fallback for the cmd_usbgadget as well. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | poweroff: Allow to register poweroff handlersSascha Hauer2017-03-302-6/+2
| |/ | | | | | | | | | | | | | | | | | | Allow to register handlers for poweroff. This allows to have multiple poweroff implementations in a single binary. The implementation is close to the restart handlers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/led'Sascha Hauer2017-04-072-26/+72
|\ \
| * | led-trigger: Allow multiple led triggers of the same typeSascha Hauer2017-03-301-25/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to have a static array of trigger types which, allows only one led per trigger. While this is enough for panic and heartbeat, it falls short when multiple leds are associated to the default-on trigger. The default-on trigger is used to turn on a led statically from devicetree and may be used multiple times. This patch reworks the led triggers so that a trigger struct is allocated dynamically when needed and put onto a list. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | led: Add blink/flash to led commandSascha Hauer2017-03-301-1/+43
| |/ | | | | | | | | | | | | | | | | The LED framework now supports blinking/flashing LEDs, so add this functionality to the led command. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2017-04-073-0/+126
|\ \
| * | i.MX: hab: Add HAB fusebox related convenience functions / commandSascha Hauer2017-04-043-0/+126
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Secure boot with HAB requires handling of the super root key hash and actually locking down the device. The related information is stored in the i.MX fusebox device (IIM on older SoCs, OCOTP on newer SoCs). This patch adds several convenience functions to store and read the super root key hash and to lock down a SoC. Also we add a command to do this from the command line. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | add seed commandOleksij Rempel2017-03-303-0/+51
| | | | | | | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: add prng deviceOleksij Rempel2017-03-301-0/+29
|/ | | | | | | this should provide easy access to get_random_bytes() interfaces. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/video'Sascha Hauer2017-03-131-0/+1
|\
| * fb: introduce flush for virtual framebufferBastian Stender2017-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | Some drivers need an explicit sync method to flush the virtual framebuffer to the display. It is called fb_flush(). fb_flush() gets called on fbc_putc, on fb_close and in the pattern cycle in the fbtest command. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb'Sascha Hauer2017-03-131-6/+13
|\ \
| * | usb: gadget: properly release f_multi_optsSascha Hauer2017-03-091-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usbgadget commands uses statically allocated f_multi_opts and passes this to usb_multi_register(). These f_multi_opts are of course no longer valid when we leave the usbgadget command. Luckily we do not use the data after we left the usbgadget command, so this never has been a problem. However, f_multi_opts has some allocated members which we can not free anymore on gadget unregistration because we no longer have the pointer to them. Fix this by adding a release function to struct f_multi_opts. This way we can allocate all memory dynamically and properly free it when not used anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2017-03-131-2/+6
|\ \ \
| * | | console_countdown: add possibility to abort countdown by external commandsMarc Kleine-Budde2017-03-101-2/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes it possible to abort a console countdown by an external command, for example when fastboot is used. This requires additional modifications in the external commands, a call to "console_countdown_abort()" has to be inserted. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/efi'Sascha Hauer2017-03-132-2/+2
|\ \ \ | |_|/ |/| |
| * | efi: move x86 efi boot support to x86 archJean-Christophe PLAGNIOL-VILLARD2017-02-272-2/+2
| |/ | | | | | | | | | | | | prepare to drop the efi arch as efi boot up is not arch sepecific Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>