summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2026-07-28cmd/mtd.c: fix do_mtd_io doesn't support 64bit user addressRomain Caritey
Signed-off-by: Romain Caritey <[email protected]>
2026-07-27cmd: nvedit_efi: use efi_auth_var_get_guid() for the default GUIDAristo Chen
do_env_set_efi() hand rolls the mapping from well known variable names to their default vendor GUID and has already drifted from the canonical name_type[] table in efi_var_common.c: it does not know "dbr", so "env set -e dbr" operates on the variable under EFI_GLOBAL_VARIABLE_GUID instead of the image security database GUID, silently creating a variable that nothing will ever consume. Convert the variable name to UTF-16 before selecting the GUID and let efi_auth_var_get_guid() do the lookup. That function knows all authenticated variables including "dbr" and falls back to EFI_GLOBAL_VARIABLE_GUID for any other name, so behaviour is unchanged for "db", "dbx", "dbt" and non-authenticated variables. Future additions to the table now apply to the shell command automatically. Since the conversion now happens before the value parsing loop, free the UTF-16 name at the common exit label so the error path there does not leak it. Also drop the unmap_sysmem() call right after efi_set_variable_int(): the common exit path already unmaps the value for the -i case and frees it otherwise, so the value was unmapped twice. On sandbox the second call triggers a spurious "Address not mapped" warning for addresses that get a tagged mapping. Signed-off-by: Aristo Chen <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2026-07-23cmd: mbr: return false instead of NULL from bool found_key()Naveen Kumar Chaudhary
found_key() is declared to return bool but returns NULL when strdup() fails. NULL is a pointer constant; while it happens to convert to zero (i.e. false) it is a type mismatch that trips stricter compilers/static analysers. Return false to match the declared return type. Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
2026-07-23cmd: pstore: bound path formatting with snprintf to avoid stack overflowNaveen Kumar Chaudhary
pstore_save() writes four different filenames into a fixed 256-byte stack buffer 'path' using sprintf() with "%s" fed from argv[3] (the user-supplied mount directory). The U-Boot command line buffer (CONFIG_SYS_CBSIZE) is typically 1024 or 2048 bytes, so a directory path in argv[3] can easily exceed 240 characters and overflow 'path', corrupting the surrounding stack frame including the return address. Replace the four sprintf(path, ...) call sites with snprintf() using sizeof(path) as the bound. The neighbouring sprintf() calls into the 'addr' and 'length' buffers are left as-is; they write fixed-width numeric conversions whose maximum length is bounded by the size of ulong/u32 in hex and cannot overflow those buffers. Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
2026-07-23cmd: strings: interpret second argument as a byte countNaveen Kumar Chaudhary
The help text advertises "<addr> [byte count]" but do_strings() stores argv[2] directly into last_addr and the loop condition tests "addr < last_addr", i.e. it treats the value as an absolute end address. When invoked as documented (e.g. "strings 0x40000000 0x100") the loop condition fails immediately because the supplied count is far below start_addr, and the command prints nothing. Compute last_addr as start_addr + hextoul(argv[2], NULL) so the argument is used as a length in bytes, matching the help. The existing repeat-mode fixup (last_addr = addr + (last_addr - start_addr)) continues to preserve the same byte-count window across CMD_FLAG_REPEAT. Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
2026-07-23cmd: date: Handle -ENOSYS return from dm_rtc_reset()Marek Vasut
In case dm_rtc_reset() returns -ENOSYS, it means the .reset callback in RTC driver is not implemented, likely because the callback is not needed. Handle the -ENOSYS return code as success and proceed, else the 'date reset' invocation incorrectly prints a bogus warning: "## Failed to set date after RTC reset". Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-07-22Merge patch series "i3c: dw: fix slave device setup and probe issues"Tom Rini
Pranav Tilak <[email protected]> says: This series fixes several issues in the DW I3C master driver and related infrastructure that prevented I3C read/write operations, and enables I3C support for Versal Gen 2. Link: https://lore.kernel.org/r/[email protected]
2026-07-22cmd: i3c: fix list and current needing pre-selected controllerPranav Tilak
The !currdev guard in do_i3c() was placed before the list and current handlers, causing both to fail when no controller is pre-selected. Move the guard to only protect device_list, write and read which actually need a controller. Fixes: b875409da737 ("cmd: Add i3c command support.") Signed-off-by: Pranav Tilak <[email protected]> Reviewed-by: Dinesh Maniyam <[email protected]>
2026-07-21cmd: read: fix unsigned overflow bypassing range checkNaveen Kumar Chaudhary
The bounds check in do_rw() was written as: if (cnt + blk > limit) with cnt and blk declared as uint (unsigned int) and limit as ulong. C's usual arithmetic conversions are applied per binary operator, so "cnt + blk" is evaluated entirely in unsigned int and wraps modulo 2^32 before the result is widened for the comparison against limit. With cnt = 0xFFFFFFFF and blk = 1 the sum wraps to 0 and the guard passes, allowing blk_dread()/blk_dwrite() to be issued with a 4 GiB transfer count that runs past the partition (or, when no partition is selected, the entire device). Rewrite the check as two comparisons that do not overflow: if (blk > limit || cnt > limit - blk) The subtraction is performed in ulong (limit's type), so no truncation occurs, and the two sub-conditions cover both "start block past end" and "count would push us past end" failure modes. Signed-off-by: Naveen Kumar Chaudhary <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-07-21Merge patch series "some string cleanup, and a tweak of the "config" command"Tom Rini
Rasmus Villemoes <[email protected]> says: This started by me wanting something like what patch 8 does. That wasn't too hard, except we had no strcasestr(), and also our regex engine (which I didn't really want to pull into the mix anyway) doesn't have a flag that requests case-insensitive matching. So I wanted to add strcasestr(), but then I stumbled on a bunch of stuff that should be cleaned up in str-land. Link: https://lore.kernel.org/r/[email protected]
2026-07-21cmd: config: allow simple filtering of outputRasmus Villemoes
When doing development, it can be quite useful to enable CONFIG_CMD_CONFIG, so that one can always check whether a config knob one has just enabled has actually made it to target. Because sometimes, one doesn't flash the right binary, or maybe one has just done CONFIG_FOO=y in some config fragment, but that had no effect because one would also have to do CONFIG_BAR=y. However, 2400+ lines of text are rather hard to read through. One probably uses a terminal emulator with capturing enabled, but searching back through the capture file is a little tedious, and one easily ends up finding something that doesn't pertain to the most recent 'config' command invocation. So make it possible to limit the output to those lines containing a given string. Like the search functionality in menuconfig, make it case insensitive, because it is much more convenient to type "config pinctrl" than "config PINCTRL". Since enabling CONFIG_CMD_CONFIG by itself adds over 10K of data, and that increases with every U-Boot release even if one doesn't add any new features to one's own defconfig (because the .config grows lots of "is not set"), I don't see any point in guarding this by some CONFIG_CMD_CONFIG_GREP. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-07-14Merge tag 'mmc-for-2026.10-rc1' of ↵Tom Rini
https://git.u-boot-project.org/u-boot/custodians/u-boot-mmc CI: https://git.u-boot-project.org/u-boot/custodians/u-boot-mmc/-/pipelines/614 - Add PMBUS regulator, thermal and test - Add regulator helper to set voltage within an acceptable range - Update dw_mmc to use in-spec voltage range for vqmmc - Fix regulator_enable/disable() macros - Clear LPUART OR STAT in tstc to avoid hang - Add MAINTAINERS entry for SDHCI
2026-07-13cmd: fdt: keep control FDT during checksignJames Hilliard
The fdt checksign command accepts an optional address for an FDT containing public keys. It currently installs that blob as gd->fdt_blob before verifying the FIT configuration. This breaks verification with DM-backed crypto drivers which have not probed yet, since the later probe path expects gd->fdt_blob to remain U-Boot's control FDT. For example, an ECDSA verifier can be bound from the control FDT but fail to probe after fdt checksign points gd->fdt_blob at the key-only DTB. Add a FIT config verification helper that takes the key blob explicitly and use it from fdt checksign. This keeps gd->fdt_blob unchanged while still allowing the command to verify against an external key DTB. Signed-off-by: James Hilliard <[email protected]>
2026-07-13pmbus: add PMBus 1.x framework, CLI, and bindingVincent Jardin
Add U-Boot's PMBus 1.x layer: the decoder/transport library, the pmbus CLI command and a generic DT binding. The subsequent commits provide the UCLASS_REGULATOR adapter and per-chip drivers. U-Boot's PMBus support is not a hwmon clone of Linux's drivers/hwmon/pmbus/. Linux owns the runtime side (polling, sysfs, alert IRQs, fan loops). U-Boot owns the boot-time side in order to, - identify the PMBus regulators a board carries: MFR_ID/ MFR_MODEL/MFR_REVISION + sanity checks. - print telemetry (VIN/VOUT/IIN/IOUT/POUT/TEMP) so an operator can confirm rail voltages and faults before the kernel - decode any chip alerts (STATUS_VOUT/STATUS_IOUT/STATUS_INPUT/ STATUS_TEMPERATURE/STATUS_CML) so a boot log shows why the previous boot failed or the board had been power cycled because of an outage (typically over temperature or under current). Out of scope by design: no periodic polling, no sysfs, no fan-speed control loop, no PMBUS_VIRT_* sensor virtualisation, no caching. If a use case needs any of those, the answer should be "wait until Linux comes up". It shall remain a thin layer. The constants and structural shape (command codes, status bit names, sensor-class enum, format enum, struct pmbus_driver_info) are mirrored from Linux drivers/hwmon/pmbus/pmbus.h verbatim. The decoders/encoders are reimplemented from the PMBus 1.3 specification because the surrounding hwmon context (struct pmbus_data, sysfs caching, hwmon publication) does not apply. The main benefits: - One framework + CLI for any board carrying PMBus regulators: no per-board PMBus implementation required anymore. - Boards call pmbus_print_telemetry() / pmbus_print_status_word() directly from boot init for a snapshot, sharing all decode + format-dispatch with the CLI. - Linux-compatible constants and DT binding so porting an existing drivers/hwmon/pmbus/ chip is mechanical. - Boot-time AVS/VID rail trim reuses the same decoders and encoders as the CLI and the regulator path: no duplicate math. Signed-off-by: Vincent Jardin <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-07-10cmd: x86: zboot: remove duplicate zboot_setup() call in do_zboot_setupNaveen Kumar Chaudhary
do_zboot_setup() invokes zboot_setup() twice: once with proper error reporting, and again immediately afterwards with no diagnostic. The second call re-runs the entire boot parameter setup on the already-populated zero page, which is at best wasted work and at worst leaves the structure in an unexpected state. Drop the stray second invocation; the first call already covers both success and failure handling. Fixes: cb19931ee56 ("x86: zboot: Drop intermediate zboot_setup() function") Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
2026-07-10cmd: upl: fix off-by-one argc check in do_upl_readNaveen Kumar Chaudhary
do_upl_read() guards against missing arguments with "argc < 1", but argc always counts argv[0] (the command name) so that condition is never true. The function then unconditionally dereferences argv[1], which is out of bounds when the user runs "upl read" with no address argument and feeds garbage into hextoul()/map_sysmem(). Use "argc < 2" so the address argument is actually required. Fixes: 264f4b0b34c ("upl: Add a command") Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
2026-07-10cmd: ini: avoid NULL deref when loadaddr/filesize env vars are unsetNaveen Kumar Chaudhary
When the user runs "ini <section>" without explicit address or size arguments, do_ini() falls back to env_get("loadaddr") and env_get("filesize") and passes the results straight to hextoul(). env_get() returns NULL for an undefined variable and hextoul() does not tolerate a NULL pointer, so on a board without these variables set the command dereferences NULL. Fetch the strings into locals first, reject the NULL case with CMD_RET_USAGE, and only then convert to numeric values. Fixes: c167cc02033 ("Add a new "ini" command") Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
2026-07-10cmd: host: fix duplicate device_unbind and wrong error message in unbindNaveen Kumar Chaudhary
do_host_unbind()'s error handler for device_unbind() prints the misleading message "Cannot attach file" and then calls device_unbind() a second time on the same device, both of which look like copy-paste mistakes left over from neighbouring code. Remove the duplicate device_unbind() call and report the correct failure with the device name. Fixes: 952018117ab ("dm: sandbox: Switch over to using the new host uclass") Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
2026-07-10cmd: clone: report destination block number on dest write errorNaveen Kumar Chaudhary
The error path of the destination blk_dwrite() prints srcblk, which refers to the source device's block counter and is unrelated to the write that just failed. This produces misleading diagnostics that point at the wrong block on the wrong device when a clone aborts on a write error. Print destblk so the message identifies the block that actually failed, mirroring the existing "Src read error @blk %ld" message above which correctly uses srcblk. Fixes: 4a4830cf915 ("cmd: add clone command") Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
2026-07-10treewide: Kconfig: use bool instead of tristateAnshul Dalal
U-Boot does not support modules, so having tristate options is useless. Therefore this patch does a blind replace of all tristate options to bool tree-wide. Signed-off-by: Anshul Dalal <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Siddharth Vadapalli <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]> Reviewed-by: Romain Gantois <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-07-09Merge tag 'i2c-updates-for-2026.10-rc1' of ↵Tom Rini
https://git.u-boot-project.org/u-boot/custodians/hs/u-boot-i2c i2c updates for 2026.10-rc1 - i2c: designware: fix i2c probe error from Coben It would be good to have some Testers... - i2c: nx_i2c: updates from Peng - Added License information - use dev_read_addr_ptr() - cmd: kconfig: i2c: add missing I2C API dependency from Julien
2026-07-09cmd: kconfig: i2c: add missing I2C API dependencyJulien Stephan
CMD_I2C relies on either the Driver Model I2C API or the legacy I2C API, but its Kconfig currently does not enforce either dependency. As a result, enabling CMD_I2C without DM_I2C or SYS_I2C_LEGACY can lead to link errors due to unresolved i2c_* symbols. Require either DM_I2C or SYS_I2C_LEGACY to prevent unsupported configurations while preserving support for legacy platforms. Signed-off-by: Julien Stephan <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2026-07-08cmd: ubi: allow creating volume with all free spaces in ubi_create_volWeijie Gao
Although the ubi command itself supports creating volume with all free spaces, the api ubi_create_vol() does not. Since negative size is invalid, this patch replaces negative size with all free space size in ubi_create_vol(). Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2026-07-08cmd: ubi: export more APIs to publicWeijie Gao
Export the following functions to public: - ubi_detach(): this is paired with ubi_part(). One may call this function to completely clean up the ubi subsystem after using ubi_part(). - ubi_{create,find,remove}_vol: this is a set of functions for volume management. The original ubi_remove_vol is renamed to __ubi_remove_vol to allow the new ubi_remove_vol() being used as a wrapper for __ubi_remove_vol() with volume name. Also, comments are added for all exported functions. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2026-07-08cmd: ubi: reorganize command messagesWeijie Gao
This patch moves normal subcommand messages into the main command function. This will allow current and potential api functions being called with clean output on success. A new function ubi_require_volume() is added for finding and printing error message if volume not found. The original ubi_find_volume() will be silent for being an api function. To avoid ubi_require_volume() being called twice for volume read/remove, some changes are required: - The parameter of ubi_remove_vol() is changed to accept 'struct ubi_volume *' directly. - The original ubi_volume_read() is renamed to __ubi_volume_read, with its first parameter changed to accept also 'struct ubi_volume *' directly. - A new ubi_volume_read() is added to wrap __ubi_volume_read() to accept volume name as its first parameter. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2026-07-08cmd: ubi: change all positive error return value to negativeWeijie Gao
Change all return value using errno codes to negative. This makes it consistent with the linux ubi layer. Also, to follow the standard definition of U-Boot command, in the do_ubi() command handler, the return value is converted to CMD_RET_FAILURE for error returning, and CMD_RET_USAGE for incorrect usage. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2026-07-08cmd: ubi: change the type of parameter dynamic to boolWeijie Gao
This patch changes the type of the 'dynamic' parameter of ubi_create_vol() to bool as it's used as a boolean. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2026-07-08cmd: ubifs: mark string parameters with constWeijie Gao
File name and volume name should be const as they will not be modified in these functions. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2026-07-08cmd: ubi: use void * for buf parameter in ubi_volume_readWeijie Gao
Use void * to avoid explicit type casting as what ubi_volume_write has done already. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2026-07-08cmd: ubi: mark read-only function parameters with constWeijie Gao
Parameters like part/volume name and buffer for writing are not being modified by the callee functions and should be marked const. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2026-07-06Merge branch 'next'Tom Rini
2026-07-03drivers: sysreset: revert support for args in requestQuentin Schulz
This reverts: - commit e49c84f7bb7b ("doc: usage: cmd: reset: specify when the -edl option is available") - commit 1076feb8a3f9 ("cmd: boot: fix edl being shown when not supported") - commit 63c806ba0e12 ("qcom_defconfig: enable psci based sysreset") - commit ef06c5d76ff4 ("cmd: boot: Add '-edl' option to reset command documentation") - commit 32825eaddc37 ("sysreset: Implement PSCI based reset to EDL mode for QCOM SoCs") - commit fcb48b89813b ("drivers: sysreset: Add sysreset op that can take arguments") There was a conflict reverting commit 63c806ba0e12 ("qcom_defconfig: enable psci based sysreset") due to commit 02ef1859b44f ("configs: Resync with savedefconfig"), but the conflict resolution was trivial. The args support for the sysreset uclass contains a logic bug. The first sysreset device implementing the request_arg callback will consume the args, not support the specified arg and thus return -EPROTONOSUPPORT which will stop the iteration over all sysreset devices. This is an issue if one has multiple sysreset devices and each with support for different (valid) args. If a sysreset device implements a -dummy argument and another -foo and a user calls reset -dummy from the U-Boot CLI, it'll depend on which sysreset device will be attempted first. If it is the one implementing -foo, it'll return it doesn't support the argument with -EPROTONOSUPPORT in which case the device implementing -dummy will never be attempted and instead we'll do a cold reset which is very likely not what's expected from the user. Casey suggested[1] we revert this and start from scratch again with a different implementation instead. [1] https://lore.kernel.org/u-boot/[email protected]/ Acked-by: Casey Connolly <[email protected]> Signed-off-by: Quentin Schulz <[email protected]>
2026-06-26cmd: fastboot: Add keyed abort optionSam Day
Works the same as CONFIG_CMD_UMS_ABORT_KEYED does: any keypress will abort fastboot mode (rather than only ctrl-c). Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Casey Connolly <[email protected]> Signed-off-by: Sam Day <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-06-25Kconfig: cmd: restyleJohan Jonker
Restyle all Kconfigs for "cmd": Menu entries : no space left Menu attributes: 1 TAB Help text : 1 TAB + 2 spaces Replace '---help---' by 'help' Signed-off-by: Johan Jonker <[email protected]>
2026-06-24treewide: move bi_dram[] from bd to gdIlias Apalodimas
Currently, the bi_dram[] information is stored in the board info structure (bd). Because bd is only valid after reserve_board(), dram_init_banksize() must be called late in the initialization process. This limitation is problematic, as it forces us to rely on a variety of bespoke functions to determine board RAM, bank memory sizes, and other early setup requirements. By moving bi_dram[] into the global data (gd), we can run it earlier. This is particularly convenient since boards define their own dram_init_banksize() routines, which do not always rely on parsing Device Tree (DT) memory nodes. Additionally, U-Boot defaults to relocating to the top of the first memory bank. While boards currently use custom functions to override this behavior, having the DRAM bank information available earlier in gd makes relocating to a different bank trivial and standardizes the process. Reviewed-by: Anshul Dalal <[email protected]> Tested-by: Michal Simek <[email protected]> # Versal Gen 2 Vek385 Tested-by: Anshul Dalal <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]> Tested-by: Christophe Leroy (CS GROUP) <[email protected]>
2026-06-23net: lwip: introduce net_lwip_eth_stop() functionDavid Lechner
Add a introduce net_lwip_eth_stop() function and use that to stop the network interface after each command that uses the network. This makes the behavior the same as the legacy net code and avoids potential issues with the network interface being left in an active state after a command finishes. The start/stop is reference-counted since there is at least one command (dhcp) that calls another command (tftp) to avoid starting and stopping the network interface multiple times in a single command. Signed-off-by: David Lechner <[email protected]> Reviewed-by: Jerome Forissier <[email protected]>
2026-06-10bootmenu: fix incorrect menu quitting logicWeijie Gao
The last entry of bootmenu is always set for exiting the menu, and its command is set to an empty string. When user selects to quit the menu, bootmenu will try to run this empty command. However run_command() with empty cmd string will return failure, and the return value will be overridden to BOOTMENU_RET_FAIL, not the expected BOOTMENU_RET_QUIT. This patch adds a default success value to the cmd_ret variable, and makes sure run_command() is called only when the menu command is not empty. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2026-06-09cmd: mmc: fix help and parameter verification with MMC_SPEED_MODE_SET not setMarkus Niebel
Currently help and parameter scanning does not check whether the feature is enabled or not. This leads to wrong expectations based on help output and no clear sign why the mmc dev and mmc rescan do not enforce the supplied mode. Fixes: 19f7a34a4642 ("mmc: Add support for enumerating MMC card in a given mode using mmc command") Signed-off-by: Markus Niebel <[email protected]> Signed-off-by: Alexander Stein <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-06-05cmd: date: validate date using rtc_month_days()Markus Niebel
The old check accepted day 0 as well as Feb 29th in non-leap years. With this change, both day and month 0 are rejected, and the local day limit logic is now handled by rtc_month_days(), which correctly accounts for month length and leap years. In the 'MMDDhhmm' format case, tm_year is not initialized by mk_date(). The leap-year calculation in rtc_month_days() therefore depends on the value provided by the caller, which do_date() does, via dm_rtc_get(). This is pre-existing behaviour, but is now made more explicit. Signed-off-by: Markus Niebel <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Alexander Sverdlin <[email protected]> Signed-off-by: Alexander Feilke <[email protected]>
2026-06-05cmd_date: make mk_date() staticAlexander Feilke
Use static as this function is not used externally. Signed-off-by: Alexander Feilke <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-05-25cros_ec: Sync ec_commands.h from upstream Chrome OS ECSimon Glass
Sync include/ec_commands.h from upstream commit 4f3d17aa34 ("skywalker: set SLEEP_TIMEOUT_MS to 50 seconds"). The new file makes two build assumptions that do not hold for U-Boot. It hides '<stdint.h>' from __KERNEL__ builds, leaving UINT16_MAX (used by EC_RES_MAX) undefined for U-Boot; widen the gate to '!defined(__KERNEL__) || defined(__UBOOT__)' It gates '<linux/limits.h>' on '#ifdef __KERNEL__'; the matching '#else' branch defines BIT()/BIT_ULL()/GENMASK()/GENMASK_ULL() locally, assuming kernel headers provide those macros otherwise. U-Boot defines __KERNEL__ too but has no <linux/limits.h>. Nest a '!defined(__UBOOT__)' check around the include so the __UBOOT__ path stays in the __KERNEL__ branch (no local BIT/GENMASK defines), which avoids redefinition warnings against U-Boot's linux/bitops.h. Pull in linux/bitops.h up front for U-Boot so the file's own BIT() and GENMASK() uses still resolve. Adapt callers to two interface changes. The 'ec_current_image' enum tag is now 'ec_image' (EC_IMAGE_* constants unchanged); rename it in affected files to match. The VBNV-context interface was dropped upstream, but it still used in lab Chromebooks; keep those constants and structs in cros_ec.h Likewise, MEC_EMI_BASE and MEC_EMI_SIZE are a U-Boot-local addition to ec_commands.h that the upstream sync removes; preserve them in cros_ec.h next to the VBNV block, and switch the only consumer (arch/x86/cpu/apollolake/cpu_spl.c) to include cros_ec.h Signed-off-by: Simon Glass <[email protected]>
2026-05-25Merge tag 'v2026.07-rc3' into nextTom Rini
Prepare v2026.07-rc3
2026-05-22virtio: cmd: Depend on VIRTIO_BLKDaniel Palmer
The virtio command is calling virtio blk functions but currently depends on CONFIG_VIRTIO only. This means disabling CONFIG_VIRTIO_BLK causes the final link to fail. Since CONFIG_VIRTIO_BLK depends on CONFIG_VIRTIO switch to depending on just CONFIG_VIRTIO_BLK Reviewed-by: Kuan-Wei Chiu <[email protected]> Reviewed-by: Angelo Dureghello <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Daniel Palmer <[email protected]>
2026-05-18cmd: ufetch: only show comma separator if there was a previous featureQuentin Schulz
Currently, if NET is disabled, the next feature to be printed will start with a comma and a space which is not pretty. Add the comma and whitespace only when a previous feature has already been shown. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Casey Connolly <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-05-18cmd: ufetch: show net feature when NET_LWIP is selectedQuentin Schulz
We've had a new lwIP networking stack for a couple of years already, so let's show there is a "net" feature if it's selected. Since NET_LEGACY || NET_LWIP is the same as NET, let's check on NET. Reported-by: Simon Glass <[email protected]> Closes: https://lore.kernel.org/u-boot/CAFLszTgZC1FGy8965pHiG-u=FhrguftRv41ghQ_Qb_RRXx6tyg@mail.gmail.com/ Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Casey Connolly <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-05-18cmd: boot: fix edl being shown when not supportedQuentin Schulz
edl is implemented in the sysreset_ops.request_arg callback of the qcom-psci sysreset driver. That callback is only called from sysreset_request_arg() which is compiled only when CONFIG_SYSRESET_CMD_RESET_ARGS=y. Therefore, only show the edl option if that symbol is enabled. It is in a separate if block because any option but -w will only be handled when CONFIG_SYSRESET_CMD_RESET_ARGS=y as seen with the implementation in do_reset() in drivers/sysreset/sysreset-uclass.c. Fixes: ef06c5d76ff4 ("cmd: boot: Add '-edl' option to reset command documentation") Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-05-12cmd: part: support lookup by UUIDDario Binacchi
The 'part' command currently allows looking up a partition only by its number or name. Extend the 'number', 'start', and 'size' subcommands to support looking up the partition via its UUID. Unlike names, UUIDs guarantee unique partition identification, avoiding ambiguity. The logic is updated to check if the provided string is a valid UUID before falling back to a name-based search. The help strings for these subcommands are updated accordingly. Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-05-01efi_loader: centralize messaging for efi_init_obj_listHeinrich Schuchardt
If efi_init_obj_list() fails we cannot use the UEFI sub-system. * Instead of having messages for this everywhere write an error message in efi_init_obj_list(). * Always use (ret != EFI_SUCCESS) when checking the return value of efi_init_obj_list(). * Remove the return code from the error message as it does not help users to understand which initialization went wrong. Signed-off-by: Heinrich Schuchardt <[email protected]>
2026-05-01cmd/bootefi: move efi_init_obj_list() to the start of do_bootefiHeinrich Schuchardt
None of the bootefi commands can be executed if the EFI sub-system cannot be initialized. Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2026-04-29Merge branch 'master' of git://source.denx.de/u-boot-usbTom Rini
- Fix UMS and eMMC HW partition selection