summaryrefslogtreecommitdiffstats
path: root/commands/Kconfig
Commit message (Collapse)AuthorAgeFilesLines
* commands: smc: make command usable when ARM_PSCI is undefinedAhmad Fatoum2019-11-191-1/+1
| | | | | | | | | The smc command can be useful whenever PSCI is used, regardless of whether barebox provides the secure monitor or not. Have it depend on ARM_SMCCC instead. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: psci: factor out smc command into commands/Ahmad Fatoum2019-11-191-0/+15
| | | | | | | | | | | So far, the smc command was only usable when barebox also provides the secure monitor. It's useful to have it when barebox is a PSCI consumer as well to test whether the secure monitor works. Factor out the code into commands/ in preparation to do so. No functional change. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: passwd: suggest sandbox for offline password generationAhmad Fatoum2019-10-231-2/+4
| | | | | | | | | | | Users might want to generate the password while the target is offline. We don't provide a dedicated host tool for that, but barebox sandbox can be used. Document this possibility. While at it, remove a misplaced single quite and slash in the help text. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of-overlay'Sascha Hauer2019-10-171-0/+12
|\
| * commands: add of_overlay command for device tree overlaysMichael Tretter2019-09-161-0/+12
| | | | | | | | | | | | | | | | | | Add a new command "of_overlay" for applying device tree overlays, because it does not really fit into any other device tree related command and would create a mess with the command options. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/of'Sascha Hauer2019-10-171-0/+7
|\ \
| * | add of_diff commandSascha Hauer2019-09-121-0/+7
| |/ | | | | | | | | | | | | | | | | | | The of_diff command compares two device trees against each other and prints a diff-like result. This can be handy to find out the differences between the barebox live tree and the one we start the kernel with. Another usecase would be to examine the changes our of_fixup process introduces (of_diff - +) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mmc'Sascha Hauer2019-10-171-0/+11
|\ \
| * | mci: implement command to switch a mmc device to enhanced modeUwe Kleine-König2019-09-121-0/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command structure allows adding more subcommands and is designed to match the Linux program mmc from the mmc-utils. So later more commands can easily be added if need be. Compared to mmc-utils' mmc enh_area set <-y|-n|-c> <start KiB> <length KiB> <device> the command that is implemented here ( mmc enh_area [-c] <device> ) is easier to use (because you don't have to check the maximal allowed size by reading some registers and calculate the available size from them (which then must be calculated back to register values by the mmc command)) but less flexible as it doesn't allow all the crazy possibilities specified in the eMMC standard (yet?) but just creates an enhanced area with maximal size. In the future something like mmc enh_area -s 30k <device> could be used to not use the maximal but an explicit size. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / commands: ubsan: remove redundant dependsAhmad Fatoum2019-10-141-1/+1
|/ | | | | | | | the config is already in an if COMMAND_SUPPORT clause, so no need to depend on it as well. Remove the redundancy. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: add intentionally UB triggering ubsan commandAhmad Fatoum2019-09-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | For testing whether ubsan works, triggering undefined behavior to detect is a nice development aid. Port the Linux test_ubsan module to barebox as a command. barebox@Embest MarS Board i.MX6Dual:/ ubsan shift ERROR: ================================================================================ ERROR: UBSAN: Undefined behaviour in commands/ubsan.c:53:7 ERROR: shift exponent -1 is negative WARNING: [<4fd77325>] (unwind_backtrace+0x1/0x68) from [<4fd5bc0f>] (ubsan_epilogue.isra.6+0x7/0x20) WARNING: [<4fd5bc0f>] (ubsan_epilogue.isra.6+0x7/0x20) from [<4fd5bf8d>] (__ubsan_handle_shift_out_of_bounds+0x49/0xb8) WARNING: [<4fd5bf8d>] (__ubsan_handle_shift_out_of_bounds+0x49/0xb8) from [<4fd51ed7>] (test_ubsan_shift_out_of_bounds+0x23/0x2c) WARNING: [<4fd51ed7>] (test_ubsan_shift_out_of_bounds+0x23/0x2c) from [<4fd51fd7>] (do_ubsan+0x3b/0x54) WARNING: [<4fd51fd7>] (do_ubsan+0x3b/0x54) from [<4fd03a4d>] (execute_command+0x21/0x48) WARNING: [<4fd03a4d>] (execute_command+0x21/0x48) from [<4fd09591>] (run_list_real+0x5b5/0x610) WARNING: [<4fd09591>] (run_list_real+0x5b5/0x610) from [<4fd08ed9>] (parse_stream_outer+0x105/0x164) WARNING: [<4fd08ed9>] (parse_stream_outer+0x105/0x164) from [<4fd097b1>] (run_shell+0x35/0x64) WARNING: [<4fd097b1>] (run_shell+0x35/0x64) from [<4fd00d43>] (run_init+0x8f/0x168) WARNING: [<4fd00d43>] (run_init+0x8f/0x168) from [<4fd00e35>] (start_barebox+0x19/0x54) WARNING: [<4fd00e35>] (start_barebox+0x19/0x54) from [<4fd75843>] (barebox_non_pbl_start+0xc7/0x108) WARNING: [<4fd75843>] (barebox_non_pbl_start+0xc7/0x108) from [<4fd00005>] (__bare_init_start+0x1/0xc) ERROR: ================================================================================ Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: add blobgen frameworkSteffen Trumtrar2019-04-121-0/+10
| | | | | | | | | | | This adds a framework for en/decrypting data blobs. Some SoCs have support for hardware crypto engines that can en/decrypt using keys that a tied to the SoC and are visible for the crypto hardware only. With this patch it's possible to encrypt confidential data using these keys and to decrypt it later for usage. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* crc: import crc_itu_t() from kernelSascha Hauer2019-03-041-1/+1
| | | | | | | | Our cyc_crc16() function is the same function as crc_itu_t() in the Linux kernel. Import and use crc_itu_t() from the Kernel for consistency. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: Move /dev/mem driver to drivers/miscAndrey Smirnov2019-01-291-11/+6
| | | | | | | | | With all other code gone from commands/mem.c, move it into driver/misc, where it fits better. While at it, expose it directly via a Kconfig options instead of relying on CONFIG_COMPILE_MEMORY Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usbgadget: autostart: add DFU supportLadislav Michl2018-10-291-1/+0
| | | | | | | | | | | Use global variable dfu_function to autostart DFU. As similar code is used to start multifunction gadget using command, move common code to common/usbgadget.c and consolidate it. It turned out that '-s' option of usbgadget command does nothing, so remove its help text and make it function as '-a'. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: dhcp: add parameter for private dataOleg.Karfich@wago.com2018-09-041-2/+3
| | | | | Signed-off-by: Oleg Karfich <oleg.karfich@wago.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: aarch64: disable 32bit boot commandsSascha Hauer2018-04-041-2/+2
| | | | | | | | The 32bit boot support is full of legacy cruft. While it should be possible to merge the aarch64 support there, a fresh start looks more promising. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/Kconfig: fix copy'n'paste error in CMD_GPIO helpUlrich Ölmann2018-01-251-1/+1
| | | | | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/Kconfig: Fix tpyoUwe Kleine-König2018-01-221-1/+1
| | | | | | | s/Pring/Print/ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: Add ip_route_add commandSascha Hauer2017-12-151-0/+10
| | | | | | | | | | The ip_route_get command is used to retrieve the network device used to reach a given IP address. This is useful for informational purposes and also for the network boot which wants to get the linux.bootargs parameter of the network device used for nfsroot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2017-04-071-0/+6
|\
| * commands: implement keystore commandSascha Hauer2017-03-311-0/+6
| | | | | | | | | | | | The keystore command provides access to the barebox keystore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-04-071-5/+0
|\ \
| * | poweroff: Allow to register poweroff handlersSascha Hauer2017-03-301-5/+0
| |/ | | | | | | | | | | | | | | | | | | 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/imx'Sascha Hauer2017-04-071-0/+5
|\ \
| * | i.MX: hab: Add HAB fusebox related convenience functions / commandSascha Hauer2017-04-041-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 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-301-0/+6
|/ | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* efi: move x86 efi boot support to x86 archJean-Christophe PLAGNIOL-VILLARD2017-02-271-1/+1
| | | | | | | 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>
* boot: add framework for redundant boot scenariosMarc Kleine-Budde2016-09-221-0/+5
| | | | | | | | | | | | | | | 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>
* 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/boot'Sascha Hauer2016-08-031-0/+1
|\
| * boot: Move code to common/Sascha Hauer2016-07-261-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | commands: fbtest: select IMAGE_RENDERERLucas Stach2016-07-251-0/+1
|/ | | | | | | 2D_PRIMITIVES needs IMAGE_RENDERER. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* GUI: Add fbtest commandAndrey Smirnov2016-06-301-0/+9
| | | | | | | | Add 'fbtest' - a command to produce test patterns on a screen Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/bootm'Sascha Hauer2016-06-141-84/+2
|\
| * bootm: Move bootm options to common/KconfigSascha Hauer2016-05-101-84/+2
| | | | | | | | | | | | | | | | | | | | | | | | bootm has a C API, so the bootm options have to depend on the option providing the bootm code (CONFIG_BOOTM), not on the option providing the command (CONFIG_CMD_BOOTM). Fixing the dependencies makes it possible to fully use bootm from C without enabling the bootm command support. This also removes the CMD_ prefix from the options which means we have to update the defconfigs aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: Add 'hwmon' commandAndrey Smirnov2016-05-181-0/+8
|/ | | | | | | | Add 'hwmon' command which allows to display the readings of all hardware monitoring sensors registered with Barebox. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubiformat'Sascha Hauer2016-05-091-3/+1
|\
| * commands: ubiformat: move code to common/Sascha Hauer2016-04-261-3/+1
| | | | | | | | | | | | | | This is the final step to separate the ubiformat code from the command. With this the ubiformat code gains a C API. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-05-091-6/+5
|\ \
| * | Kconfig: Create Kconfig symbol for NVVARSascha Hauer2016-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvvar support not only needs globalvar, but also persistent environment storage. Add a separate default-y option which depends on ENV_HANDLING for this case. Make the option visible to let the user decide whether he wants to have this option and add a help text to make this decision easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Kconfig: Make ENV_HANDLING visibleSascha Hauer2016-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | ENV_HANDLING is usable even without explicit loadenv/saveenv command support. Instead of selecting this option from loadenv/saveenv, make this option visible. loadenv/saveenv can then depend on ENV_HANDLING rather than selecting it. This reduces Kconfig dependencies hassles. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Kconfig: Make GLOBALVAR visibleSascha Hauer2016-04-281-3/+2
| |/ | | | | | | | | | | | | | | | | Currently global environment variables are only enabled when the "global" command is enabled. In fact, they could be used even with the "global" command disabled, so make the GLOBALVAR option visible. While at it, add a help text for this option. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / move FLEXIBLE_BOOTARGS from commands/ to common/Sascha Hauer2016-04-251-13/+0
|/ | | | | | | | FLEXIBLE_BOOTARGS also works without command support being enabled. Move this option from commands/Kconfig to common/Kconfig so that it doesn't depend on COMMAND_SUPPORT. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: Create nand_bitflip commandSascha Hauer2016-04-061-0/+17
| | | | | | | | | | | | | | | | | | | This adds a command to flip bits in a Nand flash. This is useful for testing purposes to check if flipped bits are corrected and if the driver returns the correct number of bitflips. The command writes a configurable number of bitflips to a single Nand page. If the -r option is not given the results are reproducible, so calling the same command twice will revert the bitflips. The command uses the raw read/write Nand operations which are probably less tested than the regular read/write operations, so the command may produce surprising results. As of writing the command has been tested with the GPMI Nand driver and the imx-nand driver with fixes posted. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove now unused libmtdSascha Hauer2016-04-061-1/+0
| | | | | | | The only user of libmtd was ubiformat which now uses the mtd-peb API, so remove the now unused libmtd. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: Add of_fixup_statusTeresa Remmet2016-03-011-0/+16
| | | | | | | | of_fixup_status enables or disables the status property of a given node with a device tree fixup. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: add initial FIT supportJan Luebbe2016-01-261-0/+25
| | | | | | | | | | | | | | | This implementation is inspired by U-Boot's FIT support. Instead of using libfdt (which does not exist in barebox), configuration signatures are verified by using a simplified DT parser based on barebox's own code. Currently, only signed configurations with hashed images are supported, as the other variants are less useful for verified boot. Compatible FIT images can be created using U-Boot's mkimage tool. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* readline: Kconfig: fix typoWjatscheslaw Stoljarski2015-11-231-2/+2
| | | | | Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: Add MMC ext. CSD register toolDaniel Schultz2015-09-241-0/+16
| | | | | | | This tools can read/write to the extended CSD register of MMC devices. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>