summaryrefslogtreecommitdiffstats
path: root/commands
Commit message (Collapse)AuthorAgeFilesLines
...
| * | 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>
* | memcmp: fix comparison on short readUwe Kleine-König2017-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | read() might return less than $count bytes which is only an upper limit. The user is supposed to repeat the command to fill a buffer completely. So use the convenience wrapper read_full in memcmp. This fixes memcmp on /dev/nand0 on an Armada XP. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands/mmc_extcsd: Relicense under GPLv2+Sascha Hauer2017-03-011-1/+1
|/ | | | | | | | GPLv3 is incompatible with the projects license. Relicense file under GPLv2+ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Daniel Schultz <d.schultz@phytec.de>
* output: use '[0m' to reset colorsMichael Olbrich2017-01-241-1/+1
| | | | | | | | | '[m' is supposed to have the same effect as '[0m'. However, some EFI implementations seem to ignore '[m', so use '[0m' everywhere to avoid rendering issues. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootchooser: fix help messageJan Luebbe2017-01-131-2/+2
| | | | | | | The descriptions of -a and -p were mismatched. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/truncate'Sascha Hauer2017-01-111-1/+1
|\
| * commands: ubi: ubiupdatevol: Open device with O_TRUNCTeresa Remmet2017-01-111-1/+1
| | | | | | | | | | | | | | | | Static ubi volumes should be opend with O_TRUNC as the device file size equals the content. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | menu: sanitize menu_add_titleSascha Hauer2017-01-101-1/+1
| | | | | | | | | | | | | | | | passing a string to menu_add_title() which then gets free by this function is just plain ugly. Pass it a const char * which gets duplicated in menu_add_title() when necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | docs: fix typos in memcmp help textMoritz Warning2017-01-101-2/+2
| | | | | | | | | | Signed-off-by: Moritz Warning <moritzwarning@web.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: i2c: Listen for CTRL-C when probingAndrey Smirnov2017-01-101-1/+1
|/ | | | | | | | | Allow I2C bus probing to be interrupted early by sending CTRL-C. This is usefull when calling the tool without any arguments and one of the busses is misconfigured (waiting for 100+ failures is pretty inconvenient). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: add clock command completionSascha Hauer2016-11-081-0/+5
| | | | | | This adds tab completion for the clk_* commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: spi: fix chip select validationStefan Lengfeld2016-11-081-2/+2
| | | | | | | | | The chip selects are numbered 0..(max chip selects - 1). Chip select with number <max chip selects> is invalid. Fix the check for that. Using the out of bound chip select may hang your board. Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: Add completion for nv and globalvar commandsSascha Hauer2016-10-182-0/+4
| | | | | | | | The 'nv' command is often used to create a nv variable for an existing global variable, so add a command completion function for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot: add '-w' parameter to usage help textYegor Yefremov2016-10-121-1/+1
| | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubi'Sascha Hauer2016-10-101-9/+107
|\
| * mtd: ubi: commands: added the new command 'ubirename'.Giorgio Dal Molin2016-09-271-0/+77
| | | | | | | | | | Signed-off-by: Giorgio Dal Molin <iw3gtf@arcor.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: ubi: commands: use function API to access ubi volumesSascha Hauer2016-09-271-9/+30
| | | | | | | | | | | | We have a function API to manipulate ubi volumes, use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-10-101-1/+3
|\ \
| * | convert users to %pI4Sascha Hauer2016-09-221-1/+3
| |/ | | | | | | | | | | | | Convert users of ip_to_string() and print_IPaddr() to %pI4 and remove the now unused functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | boot: add framework for redundant boot scenariosMarc Kleine-Budde2016-09-223-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several use cases where a redundant Linux system is needed. The barebox bootchooser framework provides the building blocks to model different use cases without the need to start from the scratch over and over again. The bootchooser works on abstract boot targets, each with a set of properties and implements an algorithm which selects the highest priority target to boot. See the documentation contained in this patch for more information. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | global: Make 'global' command behaviour consistent to 'nv'Sascha Hauer2016-09-221-18/+17
|/ | | | | | | | | | | | The 'nv' command can add/remove multiple variables. Implement that for the 'global' command aswell. Also with the 'nv' command the -r option is for removal of variables, not for "set match". Looking at the users of "global -r" the only user uses the command for removal of variables and not for "Setting multiple variables to the same value" as stated in the command help text. Let "global -r" remove variables aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: exit on invalid optionEnrico Jorns2016-09-1617-6/+30
| | | | | | | | | | Barebox commands should not perform any action and return 0 if an invalid parameter was given. This might cause undetected unintended behvaior when calling commands with wrong options, either manually or from a script. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2016-09-132-1/+3
|\
| * commands: saveenv: exit on invalid optionEnrico Jorns2016-09-051-0/+2
| | | | | | | | | | | | | | | | Saveenv should not perform any actions if an invalid parameter was given. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands/Kconfig: fix typo in CMD_OF_FIXUP_STATUS helpChristian Hemp2016-08-221-1/+1
| | | | | | | | | | | | | | The command is of_fixup_status and not of_fixup_node. Signed-off-by: Christian Hemp <c.hemp@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/menu'Sascha Hauer2016-09-131-4/+19
|\ \
| * | rework menu so that it can support multiline titlesAleksey Kuleshov2016-09-051-4/+19
| |/ | | | | | | | | Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: ubiupdatevol: confirm success with return value 0Ulrich Ölmann2016-09-061-2/+3
| | | | | | | | | | | | | | | | | | Treat the write() case analogously to the read() case and do not return the number of most recently written bytes as the status of sucessful command execution. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: ubiupdatevol: store return value of read() in a signed intUlrich Ölmann2016-09-061-2/+1
| | | | | | | | | | | | | | With an unsigned int test for errors from read() can never become true. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: usbgadget: Fix -d option help textSascha Hauer2016-08-291-1/+1
|/ | | | | | | The -d option disables any currently active gadget, it does not necessarily have to be a serial gadget. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/nv'Sascha Hauer2016-08-031-17/+26
|\
| * nv: Allow to set/remove multiple variables with one commandSascha Hauer2016-07-221-13/+15
| | | | | | | | | | | | | | | | It's convenient to set/remove multiple nv variables in one go. With this patch we iterate over the remaining nonopts instead of expecting exactly one nonopt. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nv: Add option to explicitly save nv variablesSascha Hauer2016-07-221-4/+11
| | | | | | | | | | | | | | | | | | We now have code to save the nv variables without saving the rest of the environment. This gives us the possibility to explicitly save the nv variables. This patch adds an option to the 'nv' command for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/boot'Sascha Hauer2016-08-033-390/+28
|\ \
| * | boot: Print a message when a boot target string does not lead to a boot targetSascha Hauer2016-07-261-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | When doing a 'boot friesel net' one expects a message when 'friesel' does not give any bootable results and thus 'net' is booted. This patch adds this message. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | boot command: Explicitly complain when boot target list is emptySascha Hauer2016-07-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | When no targets to boot are found it can happen that the boot command just returns silently. Explicitly print a message in this case to give a clue what might went wrong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | boot: Move code to common/Sascha Hauer2016-07-262-327/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Normally code in commands/ shall only do the option parsing whereas the functionality shall be in common/ to make the code usable from C aswell. Do this in the boot code aswell, move it to common/boot.c and add the function prototypes to include/boot.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>