summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
12 dayspowerpc: fix call to cpu_init_rMichael Walle
Commit 6c171f7a184c ("common: board: make initcalls static") broke the call to cpu_init_r. That is because PPC is already defined to 1, see: powerpc-linux-gnu-gcc -dM -E - < /dev/null This will conflict with the CONFIG_IS_ENABLED(PPC). Change it to IS_ENABLED(CONFIG_PPC). Fixes: 6c171f7a184c ("common: board: make initcalls static") Signed-off-by: Michael Walle <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-04common: memsize: fix occasionally failing alias probingEmanuele Ghidoli
probe_ram_size_by_alias() detects whether a probe address still aliases a lower address by writing through one address and reading through the other. On i.MX95 this occasionally reported a false non-alias when the alias read happened immediately after the write. A memory barrier alone, mb(), was tested but did not make the failure go away. This suggests that ordering the CPU accesses is not sufficient for this probe, likely because the issue is in the path to the memory controller rather than in the core itself. Read the written address back before checking the alias address. This appears to force the write to become observable at the probe address before using the alias read to decide whether the tested address range exists. If the readback does not match the written pattern, restore the saved value and continue with the next check. This keeps the probe robust for addresses that do not reliably retain the test pattern. Fixes: 0977448b45e2 ("common: memsize: add RAM size probe based on alias detection") Signed-off-by: Emanuele Ghidoli <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-05-04bloblist: fix pointer comparison in bloblist_apply_blobs()Michal Simek
The rec_from_blob() function returns a pointer, but the code was comparing it using "rec <= 0" which is incorrect for pointer types. Pointers should be compared using "== NULL" or "!= NULL". Addresses-Coverity-ID: CID 645841: Incorrect expression (BAD_COMPARE) Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Raymond Mao <[email protected]>
2026-04-27Merge patch series "net: migrate NO_NET out of the networking stack choice"Tom Rini
Quentin Schulz <[email protected]> says: This migrates the net options away from the main Kconfig to net/Kconfig, rename the current NET option to NET_LEGACY to really highlight what it is and hopefully encourage more people to use lwIP, add a new NET menuconfig (but keep NO_NET as an alias to NET=n for now) which then allows us to replace all the "if legacy_stack || lwip_stack" checks with "if net_support" which is easier to read and maintain. The only doubt I have is wrt SYS_RX_ETH_BUFFER which seems to be needed for now even when no network is configured? Likely due to include/net-common.h with PKTBUFSRX? No change in behavior is intended. Only change in defconfig including other defconfigs where NO_NET=y or NET is not set, in which case NO_NET is not set or NET=y should be set in the top defconfig. Similar change required for config fragments. See commit log in patch adding NET menuconfig for details. This was tested based on 70fd0c3bb7c2 ("x86: there is no CONFIG_UBOOT_ROMSIZE_KB_12288"), from within the GitLab CI container trini/u-boot-gitlab-ci-runner:noble-20251013-23Jan2026 and set up similarly as in "build all platforms in a single job" GitLab CI job. #!/usr/bin/env bash set -o pipefail set -eux ARGS="-BvelPEWM --reproducible-builds --step 0" ./tools/buildman/buildman -o ${O} --force-build $ARGS -CE $* ./tools/buildman/buildman -o ${O} $ARGS -Ssd $* O=../build/u-boot/ ../u-boot.sh -b master^..b4/net-kconfig |& tee ../log.txt I can't really decipher the log.txt, but there's no line starting with + which would be an error according to tools/buildman/builder.py help text. Additionally, because I started the script with set -e set and because buildman has an exit code != 0 when it fails to build a board, and I have the summary printed (which is the second buildman call), I believe it means all builds passed. The summary is the following: aarch64: (for 537/537 boards) all +0.0 rodata +0.0 uniphier_v8 : all +1 rodata +1 u-boot: add: 0/0, grow: 1/0 bytes: 1/0 (1) function old new delta data_gz 10640 10641 +1 arm: (for 733/733 boards) all -0.0 rodata -0.0 uniphier_v7 : all -1 rodata -1 u-boot: add: 0/0, grow: 0/-1 bytes: 0/-1 (-1) function old new delta data_gz 11919 11918 -1 opos6uldev : all -3 rodata -3 u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3) function old new delta data_gz 18778 18775 -3 uniphier_ld4_sld8: all -3 rodata -3 u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3) function old new delta data_gz 11276 11273 -3 stemmy : all -20 rodata -20 u-boot: add: 0/0, grow: 0/-1 bytes: 0/-20 (-20) function old new delta data_gz 15783 15763 -20 As far as I could tell this data_gz is an automatically generated array when CONFIG_CMD_CONFIG is enabled. It is the compressed .config stored in binary form. Because I'm changing the name of symbols, replacing a menu with a menuconfig, additional text makes it to .config and the "# Networking" section in .config disappears. Here is the diff for the 5 defconfigs listed above, generated with: for f in build/*-m; do diff --unified=0 $f/.config $(dirname $f)/$(basename -a -s '-m' $f)/.config done (-m is the build directory for master, and without the suffix, it's the top commit of this series) """ --- build/opos6uldev-m/.config 2026-04-20 10:53:49.804528526 +0200 +++ build/opos6uldev/.config 2026-04-20 11:03:37.430242767 +0200 @@ -970,4 +969,0 @@ - -# -# Networking -# @@ -975,0 +972 @@ +CONFIG_NET_LEGACY=y --- build/stemmy-m/.config 2026-04-20 11:01:33.653698123 +0200 +++ build/stemmy/.config 2026-04-20 11:04:53.452577311 +0200 @@ -733,4 +732,0 @@ - -# -# Networking -# @@ -738,2 +733,0 @@ -# CONFIG_NET is not set -# CONFIG_NET_LWIP is not set --- build/uniphier_ld4_sld8-m/.config 2026-04-20 11:00:41.605469071 +0200 +++ build/uniphier_ld4_sld8/.config 2026-04-20 11:04:22.226439899 +0200 @@ -997,4 +996,0 @@ - -# -# Networking -# @@ -1002,0 +999 @@ +CONFIG_NET_LEGACY=y --- build/uniphier_v7-m/.config 2026-04-20 10:53:04.019307319 +0200 +++ build/uniphier_v7/.config 2026-04-20 11:03:01.688085486 +0200 @@ -1004,4 +1003,0 @@ - -# -# Networking -# @@ -1009,0 +1006 @@ +CONFIG_NET_LEGACY=y --- build/uniphier_v8-m/.config 2026-04-20 10:43:05.614441175 +0200 +++ build/uniphier_v8/.config 2026-04-20 10:41:03.214852130 +0200 @@ -875,4 +874,0 @@ - -# -# Networking -# @@ -880,0 +877 @@ +CONFIG_NET_LEGACY=y """ This is fine: - Networking menu doesn't exist anymore so "#\n# Networking\n#\n" won't be in .config anymore. - opos6uldev, uniphier_ld4_sld8, uniphier_v7 and uniphier_v8 all have (old) CONFIG_NET enabled, (new) CONFIG_NET will still be set but CONFIG_NET_LEGACY also needs to be defined now to reflect the stack choice (even if default), - stemmy has CONFIG_NO_NET set, which means CONFIG_NET and CONFIG_NET_LWIP are not reachable anymore hence why they don't need to be part of .config, GitLab CI was run on this series (well, not exactly, but it's only changes to the git logs that were made): https://source.denx.de/u-boot/contributors/qschulz/u-boot/-/pipelines/29849 It passes. Link: https://lore.kernel.org/r/[email protected]
2026-04-27simplify NET_LEGACY || NET_LWIP condition with NET conditionQuentin Schulz
Since the move to make NET a menuconfig and NO_NET a synonym of NET=n, when NET is enabled, NET_LEGACY || NET_LWIP is necessarily true, so let's simplify the various checks across the codebase. SPL_NET_LWIP doesn't exist but SPL_NET_LEGACY is an alias for SPL_NET so the proper symbol is still defined in SPL whenever needed. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2026-04-27rename NET to NET_LEGACYQuentin Schulz
Highlight that NET really is the legacy networking stack by renaming the option to NET_LEGACY. This requires us to add an SPL_NET_LEGACY alias to SPL_NET as otherwise CONFIG_IS_ENABLED(NET_LEGACY) will not work for SPL. The "depends on !NET_LWIP" for SPL_NET clearly highlights that it is using the legacy networking app so this seems fine to do. This also has the benefit of removing potential confusion on NET being a specific networking stack instead of "any" network stack. Signed-off-by: Quentin Schulz <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2026-04-27Merge patch series "Add support for DT overlays handoff"Tom Rini
Raymond Mao <[email protected]> says: The series include refactoring on bloblist and fdtdec to support handoff of multiple DT overlays and applying them into the DT base during setup. All changes are aligned to the spec update for supporting DT overlay handoff[1]. Notes for testing: Currently DT overlay is not yet enabled in TF-A, but with the test patches I provided for TF-A and OP-TEE build, importing a DT overlay blob file from QEMU to TF-A reserved memory is supported. Follow below instructions to build and run for test: $ repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml Replace your local qemu_v8.xml with [2], which contains all necessary changes in both TF-A and OP-TEE build. $ repo sync $ cd build $ make toolchains $ make ARM_FIRMWARE_HANDOFF=y all Copy and rename your DT overlay blob as 'qemu_v8.dtb' into out/bin $ make ARM_FIRMWARE_HANDOFF=y run-only [1] Add Transfer Entry for Devicetree Overlay https://github.com/FirmwareHandoff/firmware_handoff/pull/74 [2] https://github.com/raymo200915/optee_manifest/blob/dt_overlay_handoff/qemu_v8.xml Link: https://lore.kernel.org/r/[email protected]
2026-04-27bloblist: add API for applying blobs with specified tagRaymond Mao
Add an API to search for the blobs with specified tag and use the hook function to apply the blob data. Add a helper function to return the inline header size as according to recent spec[1] updates, the actual data can be following an inline header instead of following the TE header immediately. [1] Firmware Handoff spec: https://github.com/FirmwareHandoff/firmware_handoff Signed-off-by: Raymond Mao <[email protected]> Reviewed-by: Tom Rini <[email protected]> Tested-by: Michal Simek <[email protected]>
2026-04-27bloblist: fix a potential negative size for memmoveRaymond Mao
It causes a panic when blob is shrunk and 'new_alloced' is less than 'next_ofs'. The data area that needs to be moved should end up at 'hdr->used_size'. Fixes: 1fe59375498f ("bloblist: Support resizing a blob") Signed-off-by: Raymond Mao <[email protected]> Reviewed-by: Tom Rini <[email protected]> Tested-by: Michal Simek <[email protected]>
2026-04-27bloblist: add helper functionsRaymond Mao
Add two helper functions for: 1. marking a blob void 2. getting blob record from a given blob data pointer. Signed-off-by: Raymond Mao <[email protected]> Reviewed-by: Tom Rini <[email protected]> Tested-by: Michal Simek <[email protected]>
2026-04-27bloblist: add blob type for DT overlayRaymond Mao
Add blob type for DT overlay according to the update of Firmware Handoff spec[1]. Add an inline header to represent the 'subtype' in a DT overlay blob payload. [1] Add Transfer Entry for Devicetree Overlay https://github.com/FirmwareHandoff/firmware_handoff/pull/74 Signed-off-by: Raymond Mao <[email protected]> Reviewed-by: Tom Rini <[email protected]> Tested-by: Michal Simek <[email protected]>
2026-04-24common: update: Fix TFTP return value handlingMarek Vasut
The net_loop() returns 1 on success, but update_load() returns 0 on success. Do not assign rv which is the return value of update_load() to net_loop(), instead assign net_loop() return value to a temporary variable and then update rv only if the temporary variable is negative. This way the update_load() now correctly returns 0 on tftp success and 1 only on failure. Signed-off-by: Marek Vasut <[email protected]>
2026-04-22cli: flush stdin before enabling cliGregor Herburger
Currently there is no possibility to flush stdin after autocommands are executed. If in the bootcmd the stdin is changed, e.g. from nulldev to serial, it could happen that junk characters sit in the fifo and appear on the cli. Add a option to clear stdin before starting the CLI. Signed-off-by: Gregor Herburger <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-04-22console: add console_flush_stdin()Gregor Herburger
Add a common helper console_flush_stdin() to drain all pending characters from stdin. This consolidates the open-coded while (tstc()) getchar() pattern that appeared in multiple places across the tree. Signed-off-by: Gregor Herburger <[email protected]> Reviewed-by: Alexander Sverdlin <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-04-21common: memsize: add RAM size probe based on alias detectionEmanuele Ghidoli
Add probe_ram_size_by_alias() to detect RAM size by checking whether a write to one address aliases to another address. Compared to get_ram_size(), this function allows the caller to: - limit probing to a small set of required accesses - avoid touching reserved or already used memory regions - handle non-linear alias patterns On the iMX95 SoC, when used with LPDDR5, accesses beyond the end of an 8GB DDR configuration do not alias to the expected linear wrap-around addresses. Instead, the aliased addresses appear to follow a pattern related to the DDRC bank and bank-group addresses mapping. Experimentally, the observed pattern is: Write Read y00000000 -> x0001c000 y00004000 -> x00018000 y00008000 -> x00014000 y0000c000 -> x00010000 y00010000 -> x0000c000 y00014000 -> x00008000 y00018000 -> x00004000 y0001c000 -> x00000000 This helper makes it possible to probe RAM size by explicitly specifying the probed address and the expected alias address for each size check. Signed-off-by: Emanuele Ghidoli <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-04-21Merge patch series "Linux compat improvements and CCF prep"Tom Rini
Casey Connolly <[email protected]> says: This series implements various improvements to Linux header compatibility, largely in preparation for a full port of Linux CCF but many of these changes would also be helpful when porting other drivers. Beside the basic header/compat stuff there are a few larger patches: Patch 1 adds the "%pOF" format specifier to vsprintf, this behaves the same as it does in Linux printing the name of the ofnode, but notably it expects an ofnode pointer rather than a device_node. Patch 2 adds an option to skip doing a full DM scan pre-relocation. Some platforms like Qualcomm don't actually need devices to be probed prior to relocation, it is also quite slow to scan the entire FDT before caches are up. This option gets us to main loop 30-50% faster. Unfortunately it isn't possible to totally skip DM since U-Boot will panic if it can't find a serial port, but the serial uclass code will bind the serial port itself by reading /chosen/stdout-path, however any dependencies like clocks won't be found so this should only be enabled if the serial driver gracefully handles missing clocks. Patch 3 adds [k]strdup_const(), this works the same as the Linux version saving a small amount of memory by avoiding duplicating strings stored in .rodata, this is particularly useful for CCF. Patch 4 adds 64-bit versions of some 32-bit ofnode utilities functions, making it possible to parse 64-bit arrays. Patch 6 provides a simple implementation of kref, this will be used by CCF. Patch 9 adds devm_krealloc() support to devres, it relies on storing allocation sizes in the devres struct which will add a small overhead. Link: https://lore.kernel.org/r/[email protected]
2026-04-21common: add an option to skip DM pre-relocationCasey Connolly
For some platforms like Qualcomm, it isn't necessary to perform a full DM init and scan prior to relocation, it's also particularly slow since it runs with dcache disabled and prior to building the livetree. The only device which needs to be probed pre-reloc is the serial port (otherwise U-Boot will panic), however this can be found through /chosen/stdout-path. Therefore we can avoid scanning the entire FDT and binding devices, instead just binding the serial port and clock driver on-demand. This decreases the total time from power on to reaching the interactive U-Boot shell be about 50% (from ~2.8s to 1.8s). Signed-off-by: Casey Connolly <[email protected]>
2026-04-17event: Introduce EVT_POST_PREBOOT eventMichal Simek
Add a new EVT_POST_PREBOOT event type which is fired in main_loop() after the preboot command has been executed. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2026-04-17event: Check return value from event_notify_null()Michal Simek
event_notify_null() returns int but its return value is not checked in run_main_loop() and in fwu_mdata tests. Add proper error checking to all unchecked call sites. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2026-04-07spl: Remove unused CONFIG_SPL_FRAMEWORK_BOARD_INIT_F optionTom Rini
The option CONFIG_SPL_FRAMEWORK_BOARD_INIT_F enables a simple board_init_f function in SPL. This however is never enabled, so remove this function and option. Signed-off-by: Tom Rini <[email protected]>
2026-04-07spl: env: Correct dependencies for SPL_SAVEENV and MMCTom Rini
The SPL_SAVEENV functionality, when working with an MMC device, can only work with SPL_MMC_WRITE enabled. This however only works with SPL_MMC also being enabled. Update the dependencies to show that if we have enabled SPL_ENV_IS_IN_MMC then we select SPL_MMC_WRITE and make SPL_ENV_IS_IN_MMC depends on SPL_MMC. Signed-off-by: Tom Rini <[email protected]>
2026-03-30console: Prefer currently selected serial console as stdio deviceMarek Vasut
Adjust the scan for default console stdio device to prefer the currently selected serial device. This is useful in combination with CONFIG_SERIAL_PROBE_ALL=y, in which case the system would instantiate all serial devices as stdio devices in the order in which they are listed in control DT. The currently selected serial device may not be the first device listed in DT, in which case the current console_init_r() implementation unexpectedly switches to another serial console after listing stderr using "Err:" line, and just before showing U-Boot shell, which is not the desired behavior. The scan now iterates over the entire list of stdio devices. If the current iterator stdio device is the current serial device, or there is no input or output stdio device assigned to the input or output stream yet, then the current iterator stdio device is assigned to that stream. This way, the first suitable stdio device is assigned to the stream, but the current serial console stdio device can override that assignment. As a small optimization, if the current iterator stdio device is the current serial device and both input and output streams as assigned, then the loop can terminate, because the current serial device has a chance to be used as a stdio device at this point. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-03-30SPL: Rework logic around SPL_BLK_FS (and SPL_NVME)Tom Rini
As exposed by "make randconfig", we have an issue around SPL_BLK_FS. This is functionally a library type symbol that should be selected when required and select what it needs. Have SPL_BLK_FS select SPL_FS_LOADER and then SPL_NVME will now correctly select SPL_FS_LOADER via SPL_BLK_FS. Signed-off-by: Tom Rini <[email protected]>
2026-03-27arm: relocate: Introduce data-only relocation modeMarek Vasut
Introduce new mode of relocation which relocates only data, not code. This is mainly meant to relocate data to read-write portion of the RAM, while the code remains in read-only portion of the RAM from which it is allowed to execute. This split configuration is present on various secure cores. The result of the relocation is U-Boot running at its original address, data relocated to the end of DRAM, but with added read-write area offset. The U-Boot binary area is not reserved from the end of the DRAM in this relocation mode, because U-Boot itself is not relocated. Signed-off-by: Marek Vasut <[email protected]>
2026-03-26Merge patch series "Introduce SQUASHFS support in SPL"Tom Rini
Richard Genoud <[email protected]> says: SquashFS has support in U-Boot, but not in SPL. This series adds the possibility for the SPL to load files from SquashFS partitions. This is useful, for instance, when there's a SquashFS rootfs containing U-Boot binary. NB: falcon mode is not supported yet. Link: https://lore.kernel.org/r/[email protected]
2026-03-26spl: mmc: support squashfsRichard Genoud
spl_mmc_do_fs_boot supports now loading an image from squashfs. Also, convert #if defined(CONFIG_SPL_xx) to if (CONFIG_IS_ENABLED(xx)) Signed-off-by: Richard Genoud <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Reviewed-by: João Marcos Costa <[email protected]>
2026-03-26spl: add squashfs supportRichard Genoud
Implement spl_load_image_sqfs() in spl code. This will be used in MMC to read a file from a squashfs partition. Also, loosen squashfs read checks on file size by not failing when a bigger size than the actual file size is requested. (Just read the file) This is needed for FIT loading, because the length is ALIGNed. Signed-off-by: Richard Genoud <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Reviewed-by: João Marcos Costa <[email protected]>
2026-03-18Merge patch series "led: remove legacy API"Tom Rini
Quentin Schulz <[email protected]> says: This migrates the last user of the legacy LED API, IMX233-OLinuXino and net/bootp.c, to the modern LED framework. I do have concern about being able to use BOOTP in SPL? In which case, I should probably add an additional check on CONFIG_IS_ENABLED(LED) in addition to IS_ENABLED(CONFIG_LED_BOOT)? I haven't tested this as I do not own an IMX233-OLinuXino, so please give this a try if you own this device. Then, since there's no user left of this legacy API, it is entirely removed. Link: https://lore.kernel.org/r/[email protected]
2026-03-18led: remove legacy APIQuentin Schulz
No user of the legacy LED API anymore (except Sunxi with the PinePhone but that is now a Sunxi-specific implementation), so let's remove anything related. Signed-off-by: Quentin Schulz <[email protected]>
2026-03-16Merge tag 'u-boot-dfu-20260316' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu into next u-boot-dfu-20260316 DFU: * Make DFU_WRITE_ALT symbol available outside of DFU * Fix PCI subclass_code warning in spl_dfu Usb Gadget: * Mark udc_disconnect() as static
2026-03-13spl: Remake SPL elf from binMichal Simek
On Xilinx MB-V there is a need to use ELF file for SPL which is placed in BRAM (Block RAM) because tools for placing code to bitstream requires to use ELF. That's why introduce SPL_REMAKE_ELF similar to REMAKE_ELF option as was originally done by commit f4dc714aaa2d ("arm64: Turn u-boot.bin back into an ELF file after relocate-rela"). There is already generic and simple linker script (arch/u-boot-elf.lds) which can be also used without any modification. Signed-off-by: Michal Simek <[email protected]>
2026-03-13spl: spi: fix loss of spl_load() error on soft resetDimitrios Siganos
When CONFIG_SPI_FLASH_SOFT_RESET is enabled, spi_nor_remove() is called after spl_load() to switch the flash back to legacy SPI mode. However, the return value of spi_nor_remove() unconditionally overwrites the return value of spl_load(), discarding any load error. Fix this by preserving the spl_load() error and only propagating the spi_nor_remove() error as a fallback. Also log a message when spi_nor_remove() fails, since in the case where spl_load() already failed its error would otherwise be silently discarded. Signed-off-by: Dimitrios Siganos <[email protected]>
2026-03-13Merge tag 'u-boot-ufs-20260313' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-ufs into next - ufs_hba_ops callbacks cleanup - Rockchip UFS reset support - UFS support in SPL
2026-03-12common: spl: spl_dfu.c: Fix warning associated with PCI subclass_codeSiddharth Vadapalli
The subclass_code member of the pci_ep_header structure is a 1-byte field. The macro PCI_CLASS_MEMORY_RAM is a concetation of baseclass_code and subclass_code as follows: PCI_BASE_CLASS_MEMORY: 0x05 Subclass Code for RAM: 0x00 PCI_CLASS_MEMORY_RAM: 0x0500 Hence, instead of extracting it via an implicity type conversion from int to u8 which throws a warning, explicitly mask the bits to extract the subclass_code. Fixes: cde77583cf0b ("spl: Add support for Device Firmware Upgrade (DFU) over PCIe") Signed-off-by: Siddharth Vadapalli <[email protected]> Tested-by: Anshul Dalal <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> # am62x_evm_a53 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-03-12spl: Make UFS available for SPL buildsAlexey Charkov
Add minimal infrastructure to build SPL images with support for UFS storage devices. This also pulls in SCSI support and charset functions, which are dependencies of the UFS code. With this, only a fixed offset is supported for loading the next image, which should be specified in CONFIG_SPL_UFS_RAW_U_BOOT_SECTOR as the number of 4096-byte sectors into the UFS block device. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Alexey Charkov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2026-03-09Merge tag 'v2026.04-rc4' into nextTom Rini
Prepare v2026.04-rc4
2026-03-03menu: Move shortcut-key handling to bootmenu_loop()Simon Glass
The bootmenu_conv_key() function is shared with expo subsystem for key input. Adding alphanumeric-to-BKEY_SHORTCUT conversion there causes expo to swallow typed characters instead of inserting them as text, since BKEY_SHORTCUT falls in the range that expo treats as a command key rather than passing through. Move the shortcut-key detection into bootmenu_loop() where it is only used in the bootmenu context. Fixes: 8c986521c3c9 ("cmd: bootmenu: permit to select bootmenu entry with a shortcut") Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2026-03-02common/memsize.c: Fix get_ram_size() original data restoreStefan Eichenberger
The get_ram_size() function fails to restore the original RAM data when the data cache is enabled. This issue was observed on an AM625 R5 SPL with 512MB of RAM and is a regression that became visible with commit bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled"). Observed boot failure messages: Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices Authentication passed Starting ATF on ARM64 core... The system then hangs. This indicates that without a data cache flush, data in the cache is not coherent with RAM, preventing the system from booting. This was verified by printing the content of this address when the issue occurs. Add a data cache flush after each restore operation to resolve this issue. Fixes: bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled") Fixes: 1c64b98c1ec4 ("common/memsize.c: Fix get_ram_size() when cache is enabled") Signed-off-by: Stefan Eichenberger <[email protected]> Reviewed-by: Emanuele Ghidoli <[email protected]> Tested-by: Francesco Dolcini <[email protected]> # Toradex Verdin AM62
2026-02-23Merge tag 'v2026.04-rc3' into nextTom Rini
Prepare v2026.04-rc3
2026-02-20spl: fix stack placement in spl_relocate_stack_gd()Ronald Wahl
Currently when CONFIG_SPL_STACK_R and CONFIG_SPL_SYS_MALLOC_SIMPLE is enabled then spl_relocate_stack_gd() will setup a layout where the stack lays inside the heap and grows down to heap start. Also the global data is part of the heap. This can lead to corruption of stack and global data. The current layout is: 0x0 +-------------+ . . . . gd->malloc_base +- - - - - - -+ | |\ | HEAP/STACK | \ | | } SPL_STACK_R_MALLOC_SIMPLE_LEN gd->start_addr_sp +- - - - - - -+ / (gd->malloc_limit) | GLOBAL DATA |/ CONFIG_SPL_STACK_R_ADDR +-------------+ The above broken layout was actually introduced with commit adc421e4cee8 ("arm: move gd handling outside of C code"). This commit changes the layout so that the stack is below the heap and the global data. It is now similar to the one before relocation: 0x0+-------------+ . . . . +- - - - - - -+ | | | STACK | | | gd->start_addr_sp +-------------+ | GLOBAL DATA | gd->malloc_base +-------------+ | |\ | HEAP | } SPL_STACK_R_MALLOC_SIMPLE_LEN | |/ (gd->malloc_limit) CONFIG_SPL_STACK_R_ADDR +-------------+ Fixes: adc421e4cee8 ("arm: move gd handling outside of C code") Cc: Tom Rini <[email protected]> Cc: Anshul Dalal <[email protected]> Cc: Leo Yu-Chi Liang <[email protected]> Cc: Dhruva Gole <[email protected]> Cc: Simon Glass <[email protected]> Cc: Albert ARIBAUD <[email protected]> Signed-off-by: Ronald Wahl <[email protected]>
2026-02-18test: cmd: Add test for zip/unzip/gzwrite commandsMarek Vasut
Add simple test for zip/unzip/gzwrite commands. The test works as follows. First, create three buffers with a bit of space between each of them, fill them with random data, then compress data in buffer 1 into buffer 2, decompress data in buffer 2 either directly into buffer 3 or into MMC 1 and then read them back into buffer 3, and finally compare buffer 1 and buffer 3, they have to be identical. The buffers are filled with random data to detect out of bounds writes. Test for various sizes, both small and large and unaligned. The test uses ut_assert_skip_to_line() to skip over gzwrite progress bar. Since the progress bar updates fill up the console record buffer, increase the size of it to compensate. Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2026-02-17Merge patch series "treewide: Clean up usage of DECLARE_GLOBAL_DATA_PTR"Tom Rini
Peng Fan (OSS) <[email protected]> says: This patch set primarily removes unused DECLARE_GLOBAL_DATA_PTR instances. Many files declare DECLARE_GLOBAL_DATA_PTR and include asm/global_data.h even though gd is never used. In these cases, asm/global_data.h is effectively treated as a proxy header, which is not a good practice. Following the Include What You Use principle, files should include only the headers they actually depend on, rather than relying on global_data.h indirectly. This approach is also adopted in Linux kernel [1]. The first few patches are prepartion to avoid building break after remove the including of global_data.h. A script is for filtering the files: list=`find . -name "*.[ch]"` for source in ${list} do result=`sed -n '/DECLARE_GLOBAL_DATA_PTR/p' ${source}` if [ "${result}" == "DECLARE_GLOBAL_DATA_PTR;" ]; then echo "Found in ${source}" result=`sed -n '/\<gd\>/p' ${source}` result2=`sed -n '/\<gd_/p' ${source}` result3=`sed -n '/\<gd->/p' ${source}` if [ "${result}" == "" ] && [ "${result2}" == "" ] && [ "${result3}" == "" ];then echo "Cleanup ${source}" sed -i '/DECLARE_GLOBAL_DATA_PTR/{N;/\n[[:space:]]*$/d;s/.*\n//;}' ${source} sed -i '/DECLARE_GLOBAL_DATA_PTR/d' ${source} sed -i '/global_data.h/d' ${source} git add ${source} fi fi done [1] https://lpc.events/event/17/contributions/1620/attachments/1228/2520/Linux%20Kernel%20Header%20Optimization.pdf CI: https://github.com/u-boot/u-boot/pull/865 Link: https://lore.kernel.org/r/[email protected]
2026-02-17treewide: Clean up DECLARE_GLOBAL_DATA_PTR usagePeng Fan
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
2026-02-17common: cli_hush: Include vsprintf.hPeng Fan
sprintf is used in this file, so include header vsprintf.h. Signed-off-by: Peng Fan <[email protected]>
2026-02-14Replace TARGET namespace and cleanup properlyTien Fong Chee
TARGET namespace is for machines / boards / what-have-you that building U-Boot for. Simply replace from TARGET to ARCH make things more clear and proper for ALL SoCFPGA. Signed-off-by: Brian Sune <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]> # Conflicts: # drivers/ddr/altera/Makefile
2026-02-06net: Stop conflating return value with file size in net_loop()Yuya Hamamachi
The net_loop() currently conflates return value with file size at the end of successful transfer, in NETLOOP_SUCCESS state. The return type of net_loop() is int, which makes this practice workable for file sizes below 2 GiB, but anything above that will lead to overflow and bogus negative return value from net_loop(). The return file size is only used by a few sites in the code base, which can be easily fixed. Change the net_loop() return value to always be only a return code, in case of error the returned value is the error code, in case of successful transfer the value is 0 or 1 instead of 0 or net_boot_file_size . This surely always fits into a signed integer. By keeping the return code 0 or 1 in case of successful transfer, no conditionals which depended on the old behavior are broken, but all the sites had to be inspected and updated accordingly. Fix the few sites which depend on the file size by making them directly use the net_boot_file_size variable value. This variable is accessible to all of those sites already, because they all include net-common.h . Signed-off-by: Yuya Hamamachi <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2026-01-27fit: Rework SPL_LOAD_FIT_ADDRESS slightlyTom Rini
Options which deal with memory locations and have a default value of 0x0 are dangerous, as that is often not a valid memory location. Rework SPL_LOAD_FIT_ADDRESS as follows: - Add SPL_HAS_LOAD_FIT_ADDRESS to guard prompting the question as the case of loading a FIT image does not strictly require setting an address and allows for a malloc()'d area to be used. - For SPL_RAM_SUPPORT, select the new guard symbol if SPL_LOAD_FIT is enabled because in that case an address must be provided. - Update defconfigs for these new changes. Largely this means some defconfigs need to enable SPL_HAS_LOAD_FIT_ADDRESS to maintain their current status. In the case of sandbox, we also need to set SPL_LOAD_FIT_ADDRESS to 0x0. Signed-off-by: Tom Rini <[email protected]>
2026-01-19Update links to doc/develop/falcon.rstJ. Neuschäfer
README.falcon was converted to ReST/HTML in 2023. Signed-off-by: J. Neuschäfer <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2026-01-16spl: fix incorrect dependency for SPL_NETQuentin Schulz
When SPL_NET is included, scripts/Makefile.xpl includes net/. However, in this directory, the Makefile only compiles things if CONFIG_NET or CONFIG_NET_LWIP is defined (it doesn't use $(PHASE_)). Therefore, at least one networking stack needs to be enabled for SPL_NET=y to do anything meaningful. In certain cases (e.g. am62px_evm_r5_ethboot_defconfig + NO_NET=y via menuconfig), it is possible to fail the build with undefined references (since include/net-common.h does check with CONFIG_IS_ENABLED(NET) which would be true for SPL_NET, but the implementation wouldn't be compiled). Fix this oversight by making sure a network stack (and the legacy one) is available when selecting SPL_NET. Fixes: 8cb330355bd5 ("net: introduce alternative implementation as net/lwip/") Reviewed-by: Jerome Forissier <[email protected]> Signed-off-by: Quentin Schulz <[email protected]>
2025-12-31Merge patch series "configs: Remove default malloc length for K3 R5 SPL"Tom Rini
This series from Andrew Davis <[email protected]> makes a number of the TI K3 CONFIG symbols have consistent values in SPL, as they are things determined by the SoC and not the board design. Link: https://lore.kernel.org/r/[email protected]