summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2021-08-04cmd:Elaborate 'blkcache' cmd HELP statementAdarsh Babu Kalepalli
HELP description is provided for ‘configure’ sub-command of ‘blkcache’. Signed-off-by: Adarsh Babu Kalepalli <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-08-02Merge https://source.denx.de/u-boot/custodians/u-boot-x86Tom Rini
- Fixed broken ICH SPI driver in software sequencer mode - Added "m25p,fast-read" to SPI flash node for x86 boards - Drop ROM_NEEDS_BLOBS and BUILD_ROM for x86 ROM builds - Define a default TSC timer frequency for all x86 boards - x86 MTRR MSR programming codes bug fixes - x86 "hob" command bug fixes - Don't program MTRR for DRAM for FSP1 - Move INIT_PHASE_END_FIRMWARE to FSP2 - Use external graphics card by default on Intel Crown Bay - tangier: Fix DMA controller IRQ polarity in CSRT
2021-08-02global: Convert simple_strtoul() with decimal to dectoul()Simon Glass
It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <[email protected]>
2021-08-02global: Convert simple_strtoul() with hex to hextoul()Simon Glass
It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <[email protected]>
2021-08-02x86: cmd: hob: Fix display of resource type for system memoryBin Meng
The resource type for system memory is currently displayed as "unknown", which is wrong. Fixes: 51af144eb7a0 ("x86: Allow showing details about a HOB entry") Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass <[email protected]>
2021-08-02x86: cmd: hob: Fix the command usage and help messagesBin Meng
At present the hob command usage and help messages are messed up in a single line. They should be separated. This was a regression introduced when [seq] and [-v] were added to the command. Fixes: d11544dfa9f4 ("x86: hob: Add way to show a single hob entry") Fixes: 51af144eb7a0 ("x86: Allow showing details about a HOB entry") Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass <[email protected]>
2021-08-01fdt: Show the type of devicetree with fdt addrSimon Glass
It seems useful to show whether the address of the Control or Working devicetree is being shown. Add support for this. Drop the confusing 0x prefix since the command itself only accepts hex. Signed-off-by: Simon Glass <[email protected]>
2021-08-01fdt: Tidy up the code a bit with fdt addrSimon Glass
Clean up the code a little before changing it. Signed-off-by: Simon Glass <[email protected]>
2021-07-28i2c: Rename CONFIG_SYS_I2C to CONFIG_SYS_I2C_LEGACYSimon Glass
It is quite confusing that CONFIG_SYS_I2C selects the legacy I2C and CONFIG_DM_I2C selects the current I2C. The deadline to migrate I2C is less than a year away. Also we want to have a CONFIG_I2C for U-Boot proper just like we have CONFIG_SPL_I2C for SPL, so we can simplify the Makefile rules. Rename this symbol so it is clear it is going away. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2021-07-28Rename DRIVERS_MISC_SUPPORT to DRIVERS_MISCSimon Glass
Rename these options so that CONFIG_IS_ENABLED can be used with them. Signed-off-by: Simon Glass <[email protected]>
2021-07-27cmd: setexpr: add format string handlingRoland Gaudig
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-27cmd: printf: add helper functions from busyboxRoland Gaudig
Import the following helper functions from Busybox-1.33.1 which are required by printf.c: process_escape_sequence from libbb/process_escape_sequence.c, skip_whitespace from libbb/skip_whitespace.c, overlapping_strcpy from libbb/safe_strncpy.c src-url: https://git.busybox.net/busybox/ commit bcc5b0e6caca6c7602a6a41f "Bump version to 1.33.1" version: 1.33.1 Signed-off-by: Roland Gaudig <[email protected]>
2021-07-27cmd: printf: import busybox-1.33.1 printf.cRoland Gaudig
Import printf.c from the Busybox project, which provides Bash like format string handling. src-url: https://git.busybox.net/busybox/ commit bcc5b0e6caca6c7602a6a41f "Bump version to 1.33.1" version: 1.33.1 Signed-off-by: Roland Gaudig <[email protected]>
2021-07-23command: Fix SMC and HVC maximum number of argumentsSiew Chin Lim
smc and hvc commands take upto 8 user input arguments, the maximum number of arguments of the U_BOOT_CMD macro should set to 9. Besides, fix the typo (arg7 -> arg6) in hvc command's help message. Signed-off-by: Siew Chin Lim <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-23cmd: part: Correct error handlingAnders Dellien
As 'part_get_info_by_name' now returns more status codes than just -1 to indicate failure, we need to update the return value check. Signed-off-by: Anders Dellien <[email protected]> Reviewed-by: Sean Anderson <[email protected]>
2021-07-23cmd: pinmux: support pin name in status commandPatrick Delaunay
Allow pin name parameter for pimux staus command, as gpio command to get status of one pin. The possible usage of the command is: > pinmux dev pinctrl > pinmux status > pinmux status -a > pinmux status <pin-name> Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-23cmd: pinmux: update result of do_statusPatrick Delaunay
Update the result of do_status and always returns a CMD_RET_ value (-ENOSYS was a possible result of show_pinmux). This patch also adds pincontrol name in error messages (dev->name) and treats correctly the status sub command when pin-controller device is not selected. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-18treewide: Test on CONFIG_USB_HOST (or CONFIG_CMD_USB) not CONFIG_USBTom Rini
As the logic here is only used when we have a USB host controller, test on CONFIG_USB_HOST rather than CONFIG_USB in general. This lets us move towards using CONFIG_USB only as a menu symbol to say that we have some form of USB, and then USB_HOST or USB_GADGET depending on the role that USB plays within the build. Signed-off-by: Tom Rini <[email protected]>
2021-07-07usb: Add correct depends for CMD_USB_MASS_STORAGETom Rini
We cannot build this without USB_GADGET_DOWNLOAD support enabled, add the appropriate depends line. Signed-off-by: Tom Rini <[email protected]>
2021-07-06cmd: net: add a 'net list' command to list network devsTim Harvey
In a system with multiple network controllers it can be difficult to know the names of the various devices available. This is especially true for USB ether devices as they do not display device names upon detection. This is being added as a net sub-system in case other commands may want to be added or moved here. Note that this is only enabled for DM_ETH Example: U-Boot > net net - NET sub-system Usage: net list - list available devices U-Boot > net list eth0 : ethernet@2188000 00:d0:12:98:f5:47 active eth1 : e1000#0 00:d0:12:98:f5:48 eth2 : asix_eth 8c:ae:4c:f5:84:9d eth3 : asix_eth 8c:ae:4c:f9:41:e3 Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-07-05env: efi: fix a wrong address dereferenceAKASHI Takahiro
Probably, a pointer to a variable in an inner block should not be exposed to an outer block. Fixes: c70f44817d46 ("efi_loader: simplify 'printenv -e'") Signed-off-by: AKASHI Takahiro <[email protected]> [trini: Don't make guid const now] Signed-off-by: Tom Rini <[email protected]>
2021-07-05Merge branch 'next'Tom Rini
2021-06-30Revert "TEST: USB_HOST not USB"Tom Rini
This reverts commit 4e1903a645453deab5ec5dd1cf4f0061469b99c3. This local commit was not intended to be pushed out. Signed-off-by: Tom Rini <[email protected]>
2021-06-30TEST: USB_HOST not USBTom Rini
Signed-off-by: Tom Rini <[email protected]>
2021-06-28Merge tag 'v2021.07-rc5' into nextTom Rini
Prepare v2021.07-rc5 # gpg: Signature made Mon 28 Jun 2021 03:39:36 PM EDT # gpg: using RSA key 1A3C7F70E08FAB1707809BBF147C39FF9634B72C # gpg: Good signature from "Thomas Rini <[email protected]>" [ultimate] # Conflicts: # configs/am64x_evm_r5_defconfig
2021-06-28efidebug: correct display of BootOrderHeinrich Schuchardt
Display the number of the boot option and not its index. Fixes: 2ecee31017bf ("efi_loader: use efi_create_indexed_name()") Signed-off-by: Heinrich Schuchardt <[email protected]>
2021-06-24cmd: mtd: expand <name> argument definition in command helpMarek Behún
The <name> argument can now also be MTD's DM device name or OF path. Mention this is command help. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Tested-by: Patrice Chotard <[email protected]> Reviewed-by: Jagan Teki <[email protected]> Cc: Priyanka Jain <[email protected]> Cc: Simon Glass <[email protected]> Cc: Heiko Schocher <[email protected]> Cc: Patrick Delaunay <[email protected]>
2021-06-24cmd: mtd: print device OF path in listingMarek Behún
Print MTD's device OF path in the output of `mtd list` command. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Tested-by: Patrice Chotard <[email protected]> Reviewed-by: Jagan Teki <[email protected]> Cc: Priyanka Jain <[email protected]> Cc: Simon Glass <[email protected]> Cc: Heiko Schocher <[email protected]> Cc: Patrick Delaunay <[email protected]>
2021-06-22mmc: Update environment variable with active partitionReuben Dowle
This patch allows uboot scripts make choices about where to boot from based on the active mmc boot partition. This allows having two copies of kernel, filesystems etc, and choosing which to boot from based off of the active bootloader partition. Signed-off-by: Reuben Dowle <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2021-06-18cmd: pxe_utils: sysboot: fix crash if either board or soc are not set.Dimitri John Ledkov
If the environment does not have "soc" or "board" set, and fdtdir option is specified in extlinux.conf, the bootloader will crash whilst dereferencing a null pointer. Add a guard against null soc or board. Fixes a crash of qemu-riscv64_smode configuration, which does not have CONFIG_SYS_SOC defined. Signed-off-by: Dimitri John Ledkov <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-06-11cmd: ti: pd: Add debug command for K3 power domainsTero Kristo
Add support command for debugging K3 power domains. This is useful with the HSM rearch setup, where power domains are directly controlled by SPL instead of going through the TI SCI layer. The debugging support is only available in the u-boot codebase though, so the raw register access power domain layer must be enabled on u-boot side for this to work. By default, u-boot side uses the TI SCI layer, and R5 SPL only uses the direct access methods. Signed-off-by: Tero Kristo <[email protected]> Signed-off-by: Tero Kristo <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2021-06-11clk: add support for setting clk rate from cmdlineTero Kristo
Add new clk subcommand "clk setfreq", for setting up a clock rate directly from u-boot cmdline. This is handy for any debugging purposes towards clocks. Acked-by: Lukasz Majewski <[email protected]> Signed-off-by: Tero Kristo <[email protected]> Signed-off-by: Tero Kristo <[email protected]>
2021-06-11clk: fix clock tree dump to properly dump out every registered clockTero Kristo
Some clocks are not associated to a DM node, so just parsing the DM is not enough. This is especially true for root clocks, which typically don't have any parents. Instead, fetch every registered UCLASS_CLK instance, and dump these out. Signed-off-by: Tero Kristo <[email protected]> Signed-off-by: Tero Kristo <[email protected]>
2021-06-09cmd: Add dependency for ums commandPatrick Delaunay
Add the missing dependency for the command ums: - CONFIG_BLK: call of blk_* functions in usb_mass_storage.c - CONFIG_USB_GADGET: required to select CONFIG_USB_FUNCTION_MASS_STORAGE Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2021-05-25efi_loader: simplify accessing variablesHeinrich Schuchardt
Use efi_get_variable_int() instead of EFI_CALL(RT->get_variable()). Use efi_set_variable_int() instead of EFI_CALL(efi_set_variable()). Signed-off-by: Heinrich Schuchardt <[email protected]> Tested-by: Ilias Apalodimas <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2021-05-25efi_loader: use efi_create_indexed_name()Heinrich Schuchardt
Simplify the creation of indexed variable names like 'Boot0000' by using function efi_create_indexed_name(). Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2021-05-25efi_loader: simplify show_efi_boot_order()Heinrich Schuchardt
To print a UTF-16 string use %ls instead of converting string to UTF-8. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2021-05-25efi_loader: simplify show_efi_boot_opt_data()Heinrich Schuchardt
To print a UTF-16 string use %ls instead of converting string to UTF-8. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2021-05-24stackprot: Make our test a bit more complexTom Rini
With better compiler optimizations available, a compiler may see we do nothing with our buffer after calling memset and omit the call, thus causing us to not smash the stack. Add a comment to explain why we now also have a printf call, so that the test will pass as the memset will not be omitted. Reported-by: Marek Behún <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2021-05-16cmd: mvebu: Rename rx_training to mvebu_comphy_rx_trainingStefan Roese
Rename the misleading cmd "rx_training" to "mvebu_comphy_rx_training" to avoid confusion and mixup with DDR3/4 training. This makes it clear, that this command is platform specific and handles the COMPHY RX training. Also depend this cmd on ARMADA_8K and not TARGET_MVEBU_ARMADA_8K to make is available for OcteonTX2 CN913x. Signed-off-by: Stefan Roese <[email protected]> Cc: Pali Rohár <[email protected]> Cc: Marek Behun <[email protected]> Cc: Kostya Porotchkin <[email protected]> Cc: Nadav Haklai <[email protected]> Acked-by: Marek Behún <[email protected]> Acked-by: Pali Rohár <[email protected]>
2021-05-13cmd: add support for a new "extension" commandKory Maincent
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 <[email protected]> Reviewed-by: Maxime Ripard <[email protected]>
2021-05-13fdt_support: move fdt_valid from cmd_fdt.c to fdt_support.cKory Maincent
Move the fdt_valid function to fdt_support. This changes allow to be able to test the validity of a devicetree in other c files. Update code syntax. Signed-off-by: Kory Maincent <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Maxime Ripard <[email protected]>
2021-05-10x86: Correct regwidth prompt in cbsysinfoSimon Glass
This should be 'regwidth', not 'baud'. Fix it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2021-05-07Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
2021-05-05cmd/exception: support ebreak exception on RISC-VHeinrich Schuchardt
The ebreak instruction should generate a breakpoint exception. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2021-05-04cmd: gpt: Add option to write GPT partitions to environment variableFarhan Ali
This change would enhance the existing 'gpt read' command to allow (optionally) writing of the read GPT partitions to an environment variable in the UBOOT partitions layout format. This would allow users to easily change the overall partition settings by editing said variable and then using the variable in the 'gpt write' and 'gpt verify' commands. Signed-off-by: Farhan Ali <[email protected]> Cc: Simon Glass <[email protected]> Cc: Heinrich Schuchardt <[email protected]> Cc: Corneliu Doban <[email protected]> Cc: Rayagonda Kokatanur <[email protected]> Cc: Rasmus Villemoes <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-04-29Merge tag 'xilinx-for-v2021.07-rc2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2021.07-rc2 xilinx: - Enable saving variables based on bootmode - Cleanup usb dfu setup and wire it up with usb bootmode - Fix bootscript address logic - Remove GD references (spi, Versal) - Enable capsule update clk: - Small Kconfig fix net: - Fix gmii2rgmii bridge binding usb: - Propagate error (dfu gadget)
2021-04-29phy: marvell: add RX training commandIgal Liberman
This patch adds support for running RX training using new command called "rx_training" Usage: rx_training - rx_training <cp id> <comphy id> RX training allows to improve link quality (for SFI mode) by running training sequence between us and the link partner, this allows to reach better link quality then using static configuration. Change-Id: I818fe67ccaf19a87af50d4c34a9db7d6802049a5 Signed-off-by: Igal Liberman <[email protected]> Signed-off-by: Marcin Wojtas <[email protected]>
2021-04-29cmd/mvebu: fix the bubt commandKonstantin Porotchkin
- fix the dependency for MMC boot (add XENON to MVEBU_MMC) - fix the bubt destination assignment (missing # in "else" case) Signed-off-by: Konstantin Porotchkin <[email protected]> Signed-off-by: Stefan Roese <[email protected]>
2021-04-23cmd: dfu: Propagate error if dfu gadget failsMichal Simek
On systems without usb gadget dfu core fails which was reported by error but command itself returns pass which breaks any usage in a script. That's why propagate error from run_usb_dnl_gadget(). Fixes: 16297cfb2a20 ("usb: new board-specific USB init interface") Signed-off-by: Michal Simek <[email protected]>