aboutsummaryrefslogtreecommitdiff
path: root/cmd/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2024-01-26cmd: provide command to display SMBIOS informationHeinrich Schuchardt1-0/+1
U-Boot can either generated an SMBIOS table or copy it from a prior boot stage, e.g. QEMU. Provide a command to display the SMBIOS information. Currently only type 1 and 2 are translated to human readable text. Other types may be added later. Currently only a hexdump and the list of strings is provided for these. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-12-28cli: Enables using modern hush parser as command line parserFrancis Laniel1-1/+1
If one defines HUSH_MODERN_PARSER, it is then possible to use modern parser with: => cli get old => cli set modern => cli get modern Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
2023-12-28cmd: Add new cli commandFrancis Laniel1-0/+2
This command can be used to print the current parser with 'cli get'. It can also be used to set the current parser with 'cli set'. For the moment, only one value is valid for set: old. Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
2023-11-28Merge patch series "cmd: add scmi command"Tom Rini1-0/+1
To quote the author: "Scmi" command will be re-introduced per Michal's request. The functionality is the same as I put it in my patch set of adding SCMI base protocol support, but made some tweak to make UT, "ut dm scmi_cmd," more flexible and tolerable when enabling/disabling a specific SCMI protocol for test purpose. Each commit may have some change history inherited from the preceding patch series. Test ==== The patch series was tested on the following platforms: * sandbox
2023-11-28cmd: add scmi command for SCMI firmwareAKASHI Takahiro1-0/+1
This command, "scmi", may provide a command line interface to various SCMI protocols. It supports at least initially SCMI base protocol and is intended mainly for debug purpose. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
2023-11-07env: Move env_set() out of cmd/nvedit.c and in to env/common.cTom Rini1-3/+1
Inside of env/common.c we already have our helper env_set_xxx functions, and even have a comment that explains why env_set() itself wasn't moved. We now handle that move. This requires that we rename the previous _do_env_set() to env_do_env_set() and note it as an internal env function. Add comments about this function to explain why we do this when we add the prototype. Add a new function, env_inc_id() to allow for the counter to be updated by both commands and callers, and document this as well by the prototype. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-24rockchip: cmd: add rkmtd commandJohan Jonker1-0/+1
The command rkmtd creates a virtual block device to transfer Rockchip boot block data to and from NAND with block orientated tools like "ums" and "rockusb". It uses the Rockchip MTD driver to scan for boot blocks and copies data from the first block in a GPT formated virtual disk. Data must be written in U-boot "idbloader.img" format and start at partition "loader1" offset 64. The data header is parsed for length and offset. When the last sector is received it erases up to 5 erase blocks on NAND and writes bootblocks in a pattern depending on the NAND ID. Data is then verified. When a block turns out bad the block header is discarded. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-16cmd/ti: Update Kconfig logic and Makefile recursion logicTom Rini1-2/+5
- Add some dependencies to CMD_DDR3 as this is only valid on some platforms (which tend to select it as well). - The proper gate for going in to cmd/ti is not CONFIG_TI_COMMON_CMD_OPTIONS as nothing under there is controlled by that symbol but the general TI architecture options. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-16cmd: move mac commandHeinrich Schuchardt1-1/+0
Board specific implementations of the 'mac' command differ concerning the supported sub-commands. Move the Freescale specific mac command definition to the board code. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-11cli: Add a command to show cmdline historySimon Glass1-0/+1
There is a function for this but it is never used. Showing the history is a useful feature, so add a new 'history' command. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-08arm_ffa: introduce armffa commandAbdellatif El Khlifi1-0/+1
Provide armffa command showcasing the use of the U-Boot FF-A support armffa is a command showcasing how to invoke FF-A operations. This provides a guidance to the client developers on how to call the FF-A bus interfaces. The command also allows to gather secure partitions information and ping these partitions. The command is also helpful in testing the communication with secure partitions. For more details please refer to the command documentation [1]. A Sandbox test is provided for the armffa command. [1]: doc/usage/cmd/armffa.rst Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-07-24Revert "Merge branch '2023-07-24-introduce-FF-A-suppport'"Tom Rini1-1/+0
This reverts commit d927d1a80843e1c3e2a3f0b8f6150790bef83da1, reversing changes made to c07ad9520c6190070513016fdb495d4703a4a853. These changes do not pass CI currently. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-24arm_ffa: introduce armffa commandAbdellatif El Khlifi1-0/+1
Provide armffa command showcasing the use of the U-Boot FF-A support armffa is a command showcasing how to invoke FF-A operations. This provides a guidance to the client developers on how to call the FF-A bus interfaces. The command also allows to gather secure partitions information and ping these partitions. The command is also helpful in testing the communication with secure partitions. For more details please refer to the command documentation [1]. [1]: doc/usage/cmd/armffa.rst Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-07-14expo: Add a configuration editorSimon Glass1-0/+1
Add a new 'cedit' command which allows editing configuration using an expo. The configuration items appear as menus on the display. This is extremely basic, only supporting menus and not providing any way to load or save the configuration. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-06cmd: Add 2048 gameSimon Glass1-0/+1
Add the 2048 game, a good demo of ANSI sequences and a way to waste a little time. Bring it it from Barebox, modified for code style. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-05cmd: blkmap: Add blkmap commandTobias Waldekranz1-0/+1
Add a frontend for the blkmap subsystem. In addition to the common block device operations, this allows users to create and destroy devices, and map in memory and slices of other block devices. With that we support two primary use-cases: - Being able to "distro boot" from a RAM disk. I.e., from an image where the kernel is stored in /boot of some filesystem supported by U-Boot. - Accessing filesystems not located on exact partition boundaries, e.g. when a filesystem image is wrapped in an FIT image and stored in a disk partition. Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-30cmd: pci: Add command to set MPS of all PCIe devicesStephen Carlson1-0/+1
Enable tuning of the PCI Express MPS (Maximum Payload Size) of each device. The Maximum Read Request Size is not altered. The SAFE method uses the largest MPS value supported by all devices in the system for each device. This method is the same algorithm as used by Linux pci=pcie_bus_safe. The PEER2PEER method sets all devices to the minimal (128 byte) MPS, which allows hot plug of devices later that might only support the minimum size, and ensures compatibility of DMA between two devices on the bus. Signed-off-by: Stephen Carlson <stcarlso@linux.microsoft.com>
2023-03-25efi: Support showing tablesSimon Glass1-1/+1
Add a command (for the app and payload) to display the tables provided by EFI. Note that for the payload the tables should always be present, so an error message is unnecessary and would bloat the code. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-25efi: Split out table-listing code into a new fileSimon Glass1-1/+1
This code is used with EFI_LOADER but is also useful (with some modifications) for the EFI app and payload. Move it into a shared file. Show the address of the table so it can be examined if needed. Also show the table name as unknown if necessary. Our list of GUIDs is fairly small. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-17cmd: introduce 'write' commandRasmus Villemoes1-0/+1
It's almost no extra code to hook up a buddy to the 'read' command. In fact, since the command is passed its own 'struct cmd_tbl', we can use the exact same callback, and let it figure out for itself whether it was invoked as "read" or "write". Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-07video console: allow font size configuration at runtimeDzmitry Sankouski1-1/+1
Allow font size configuration at runtime for console_simple.c driver. This needed for unit testing different fonts. Configuring is done by `font` command, also used for font selection in true type console. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-07Drop dataflash_mmc_mux commandSimon Glass1-1/+0
This is not used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2023-02-07cmd: Drop mfsl commandSimon Glass1-1/+0
This is not used anywhere. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-06cmd: Add a SEAMA image load commandLinus Walleij1-0/+1
Add a command to load SEAMA (Seattle Image), a NAND flash on-flash storage format. This type of flash image is found in some D-Link routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L, DIR890L and DCH-M225, as well as in WD and NEC routers on the ath79 (MIPS), Broadcom BCM53xx, and RAMIPS platforms. This U-Boot command will read and decode a SEAMA image from raw NAND flash on any platform. As it is always using big endian format for the data decoding is always necessary on platforms such as ARM. The command is needed to read a SEAMA-encoded boot image on the D-Link DIR-890L router for boot from NAND flash in an upcoming port of U-Boot to the Broadcom Northstar (BCM4709, BCM53xx) architecture. A basic test and documentation is added as well. The test must be run on a target with NAND flash support and at least one resident SEAMA image in flash. Cc: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-01-10arm/mach-meson: move smc commands in cmd/mesonAlexey Romanov1-0/+3
It is incorrect to keep commands in the arch/ folder. Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20230110105650.54580-3-avromanov@sberdevices.ru [narmstrong: moved after cmd/sound in index.rst] Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2022-11-22eficonfig: add UEFI Secure Boot Key enrollment interfaceMasahisa Kojima1-0/+5
This commit adds the menu-driven UEFI Secure Boot Key enrollment interface. User can enroll PK, KEK, db and dbx by selecting file. Only the signed EFI Signature List(s) with an authenticated header, typically '.auth' file, is accepted. To clear the PK, KEK, db and dbx, user needs to enroll the null key signed by PK or KEK. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-10-31FWU: cmd: Add a command to read FWU metadataSughosh Ganu1-0/+1
Add a command to read the metadata as specified in the FWU specification and print the fields of the metadata. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-10-30video: Add commands to list and change fontsSimon Glass1-0/+1
Add a new 'font' command which allows the fonts to be listed as well as selecting a different font and size. Allow the test to run on sandbox, where multiple font/size combinations are supported, as well as sandbox_flattree, where they are not. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Move the console commands to cmd/Simon Glass1-0/+2
Move these commands and the implementation to the cmd/ directory, which is where most commands are kept. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> [agust: keep vidconsole_position_cursor() in vidconsole uclass] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2022-10-11cmd: add temperature commandRobert Marko1-0/+1
Currently, there is no way for users to check the readings from thermal sensors from U-boot console, only some boards print it during boot. So, lets add a simple "temperature" command that allows listing thermal uclass devices and getting their value. Note that the thermal devices are intenionally probed if list is used as almost always they will not get probed otherwise and there is no way for users to manually call probe on a certain device from console. Assumption is made that temperature is returned in degrees C and not milidegrees like in Linux as this is what most drivers seem to return. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11cmd: xxd: add new commandRoger Knecht1-0/+1
Add xxd command to print file content as hexdump to standard out Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Roger Knecht <rknecht@pm.me>
2022-10-11cmd: cat: add new commandRoger Knecht1-0/+1
Add cat command to print file content to standard out Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Roger Knecht <rknecht@pm.me>
2022-09-16cmd: Drop use of HAVE_BLOCK_DEVICESimon Glass1-1/+1
This condition is not needed for these commands, since BLK is enabled for all boards which use block devices and commands are not available in SPL, so even if SPL_BLK is not enabled, it doesn't affect commands. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-14Merge tag 'efi-next-2022-09-14' of ↵WIP/14Sep2022-nextTom Rini1-0/+1
https://source.denx.de/u-boot/custodians/u-boot-efi into next Pull request for efi next UEFI: Implement a command eficonfig to maintain Load Options and boot order via menus.
2022-09-14eficonfig: menu-driven addition of UEFI boot optionMasahisa Kojima1-0/+1
This commit add the "eficonfig" command. The "eficonfig" command implements the menu-driven UEFI boot option maintenance feature. This commit implements the addition of new boot option. User can select the block device volume having efi_simple_file_system_protocol and select the file corresponding to the Boot#### variable. User can also enter the description and optional_data of the BOOT#### variable in utf8. This commit adds "include/efi_config.h", it contains the common definition to be used from other menus such as UEFI Secure Boot key management. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
2022-09-13cyclic: Add 'cyclic list' and 'cyclic demo' commandsStefan Roese1-0/+1
This patch adds the cyclic command, which currently only supports the 'list' subcommand, to list all currently registered cyclic functions. Here an example: => cyclic list function: cyclic_demo, cpu-time: 7010 us, frequency: 99.80 times/s function: cyclic_demo2, cpu-time: 1 us, frequency: 1.13 times/s As you can see, the cpu-time is accounted, so that cyclic functions that take too long might be discovered. Additionally the frequency is logged. The 'cyclic demo' commands registers the cyclic_demo() function to be executed all 'cycletime_ms' milliseconds. The only thing this function does is delaying by 'delay_us' microseconds. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-02cmd: Add pause commandSamuel Dionne-Riel1-0/+1
This command is being introduced with the goal of allowing user-friendly "generic use case" U-Boot builds to pause until user input under some situations. The main use case would be when a boot failure happens, to pause until the user has had time to acknowledge the current state. Tested using: make && ./u-boot -v -T -c 'ut lib lib_test_hush_pause' Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com> Cc: Simon Glass <sjg@chromium.org>
2022-08-12vbe: Add a new vbe commandSimon Glass1-0/+1
Add a command to look at VBE methods and their status. Provide a test for all of this as well. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add a bootmeth commandSimon Glass1-0/+1
Add a 'bootmeth' command to handle listing and ordering of boot methods. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add a bootflow commandSimon Glass1-0/+1
Add a 'bootflow' command to handle listing and selection of bootflow. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add a bootdev commandSimon Glass1-0/+1
Add a 'bootdev' command to handle listing and selection of bootdevs. Disable standard boot for a few boards which otherwise run out of space. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-15fs/erofs: add filesystem commandsHuang Jianan1-0/+1
Add 'ls' and 'load' commands. Signed-off-by: Huang Jianan <jnhuang95@gmail.com>
2022-03-10event: Add a commandSimon Glass1-0/+1
Add a command to show the available events. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24cmd: Add Kconfig option for multiprocessor cmdsAshok Reddy Soma1-1/+1
Add Kconfig option(CONFIG_CMD_MP) to enable or disable multiprocessor commands. Compile cmd/mp.c based on CONFIG_CMD_MP. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2022-01-18common: remove bedbug debugger supportOvidiu Panait1-1/+0
Commit 98f705c9cefd ("powerpc: remove 4xx support") removed (in 2017) the last code that made use of bedbug debugger support. Since there aren't any boards left that define either CONFIG_CMD_BEDBUG or a real bedbug_init(), drop this feature from u-boot. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-15efi: Support the efi command in the appSimon Glass1-1/+1
At present the 'efi' command only works in the EFI payload. Update it to work in the app too, so the memory map can be examined. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-24cmd: kaslrseed: add command to generate value from hwrngChris Morgan1-0/+1
Allow the kaslr-seed value in the chosen node to be set from a hardware rng source. Tested on a Rockchip PX30 (Odroid Go Advance), you must have loaded the devicetree first and prepared it for editing. On my device the workflow goes as follows: setenv dtb_loadaddr "0x01f00000" load mmc 0:1 ${dtb_loadaddr} rk3326-odroid-go2.dtb fdt addr ${dtb_loadaddr} fdt resize kaslrseed and the output can be seen here: fdt print /chosen chosen { kaslr-seed = <0x6f61df74 0x6f7b996c>; stdout-path = "serial2:115200n8"; }; Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-11pxe: Move pxe_utils filesSimon Glass1-2/+2
Move the header file into the main include/ directory so we can use it from the bootmethod code. Move the C file into boot/ since it relates to booting. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-07-27cmd: setexpr: add format string handlingRoland Gaudig1-0/+1
Add format string handling operator to the setexpr command. It allows to use C or Bash like format string expressions to be evaluated with the result being stored inside the environment variable name. setexpr <name> fmt <format> [value]... The following example setexpr foo fmt "%d, 0x%x" 0x100 ff will result in $foo being set to "256, 0xff". Signed-off-by: Roland Gaudig <roland.gaudig@weidmueller.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-05-13cmd: add support for a new "extension" commandKory Maincent1-0/+1
This patch adds a new "extension" command, which aims at detecting extension boards connected to the hardware platform, and apply the Device Tree overlays that describe the hardware present on those extension boards. In order to enable this mechanism, board-specific code must implement the extension_board_scan() function that fills in a linked list of "struct extension", each describing one extension board. In addition, the board-specific code must select the SUPPORT_EXTENSION_SCAN Kconfig boolean. Based on this: - "extension scan" makes the generic code call the board-specific extension_board_scan() function to retrieve the list of detected extension boards. - "extension list" allows to list the detected extension boards. - "extension apply <number>|all" allows to apply the Device Tree overlay(s) corresponding to one, or all, extension boards The latter requires two environment variables to exist and set one variable to run: - extension_overlay_addr: the RAM address where to load the Device Tree overlays - extension_overlay_cmd: the U-Boot command to load one overlay. Indeed, the location and mechanism to load DT overlays is very setup specific. - extension_overlay_name: set by the command: the name of the DT which will be load during the execution. When calling the command described in the extension_overlay_cmd variable, the variable extension_overlay_name will be defined. So a typical extension_overlay_cmd will look like this: extension_overlay_cmd=load mmc 0:1 $extension_overlay_addr /boot/$extension_overlay_name Here is an example on how to use it: => run loadfdt => fdt addr $fdtaddr => setenv extension_overlay_addr 0x1000 => setenv extension_overlay_cmd 'load mmc 0:1 ${extension_overlay_addr} /boot/${extension_overlay_name}' => extension scan Found 1 extension board(s). => extension apply 0 519 bytes read in 3 ms (168.9 KiB/s) Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Maxime Ripard <maxime@cerno.tech>