Commit Graph

100931 Commits

Author SHA1 Message Date
Henrik Grimler
95f8a22e2a mmc: s5p_sdhci: add samsung,exynos4210-sdhci compatible
the Exynos4210 devices in u-boot uses samsung,exynos4412-sdhci as
sdhci compatible in their DTSes, while the upstream DTSes uses
samsung,exynos4210-sdhci.

Add samsung,exynos4210-sdhci compatible string for s5p_sdhci driver as
well so that it can be used with upstream DTSes.

Signed-off-by: Henrik Grimler <henrik@grimler.se>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-07-24 12:35:35 +08:00
Henrik Grimler
4381d7bb33 mmc: s5p_sdhci: remove duplicated card detect code
The common sdhci infrastructure is already parsing the cd-gpios
property, since commit 451931ea70 ("mmc: sdhci: Read cd-gpio from
devicetree"). The s5p code is therefore duplicated, and also broken
since it assumes that the GPIO value is inverted, while the sdhci code
correctly follows the ACTIVE_LOW/ACTIVE_HIGH flag specified in the
device tree.

This fix was originally authored by Simon Shields:
https://github.com/fourkbomb/u-boot/commit/2eac9dea7903

The change has been tested on exynos4210-i9100, a device similar to
exynos4210-trats.

Signed-off-by: Henrik Grimler <henrik@grimler.se>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-07-24 12:35:34 +08:00
Greg Malysa
3532f1f5ed block: Remove blk_find_first/next
In [0], Andrew noted a code quality issue in the implementation of
blk_find_first and blk_find_next. This led to the observation that the
logic of these functions was also likely incorrect, and based on a quick
check it seemed the functions were unused outside of test code, which
did not exercise the potential failure case, so we felt they should be
removed. In [1], a test patch which illustrates the failure in sandbox
is provided for reference.

Because a more thorough check agrees that these functions are unused,
they are currently incorrect, and fixed/removable flags on block devices
prior to probe are unreliable, just remove these functions instead of
fixing them. All potential users should have used blk_first_device_err
instead anyway.

CI results at [2].

[0] https://patchwork.ozlabs.org/project/uboot/patch/20250714-blk-uclass-v1-1-d21428c5f762@linaro.org/
[1] https://gist.github.com/gmalysa/b05e73a5c14bc18c5741a0e0e06a2992
[2] https://gitlab.com/gmalysa/lnxdsp-u-boot/-/pipelines/1931210857

Signed-off-by: Greg Malysa <malysagreg@gmail.com>
Reviewed-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-23 17:37:14 -06:00
Michal Simek
cf13f33d3a sysreset: psci: Fix SPL dependency
SYSRESET_PSCI should select SPL_ARM_PSCI_FW only when SPL_SYSRESET is
enabled/required. This change saves 1.6kB on Xilinx ZynqMP Kria platform.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-07-23 17:37:11 -06:00
Andrew Goodbody
25d3e0509c cmd: gpt: Fix off by 1 errors
The buffer for a name to be copied into must also contain the
terminating 0 byte but strlen returns the length of the string without
counting that 0 byte. Adjust the length checks to take this into
account.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-23 17:37:08 -06:00
Andrew Goodbody
d29c1092eb abuf: Remove code that prevented test code running
When abuf was introduced some test code was prevented from running using
a 'return 0' early in the functions. A comment said it crashed on
sandbox due to a 'bug' in realloc. Some time later a bug in abuf_realloc
was fixed but this test code was never enabled.

Remove the early 'return 0' instances so that the test code can run.
Also remove some checks that relied on the implementation details of the
U-Boot memory code as these can fail on sandbox which uses system memory
code. Besides that this code should be testing abuf implementation not
the underlying memory code which has its own tests.
Finally use a new #define for the allocs that are meant to fail to
ensure they do fail on all CI platforms.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-23 17:37:05 -06:00
Tom Rini
71c96a8b2a Azure: Temporarily switch to GitHub mirror of u-boot-test-hooks
In order to unblock this CI workflow for the moment, switch to using a
mirror of u-boot-test-hooks on GitHub rather than source.denx.de.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-23 13:36:37 -06:00
Tom Rini
67c791dcdf patman: Update test for Anatolij's new email address
This test was failing due to matching on Anatolij's old email address.
Switch to the new one.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-23 13:36:37 -06:00
Tom Rini
d0b9b9a80f Merge patch series "mkimage: validate default configuration reference"
Aristo Chen <jj251510319013@gmail.com> says:

This patch series introduces a validation step in `mkimage` to ensure that
the `default` property under the `/configurations` node in a FIT image
references a valid subnode. If the referenced node does not exist, mkimage
now prints an error and fails early. This helps prevent runtime failures
when U-Boot attempts to boot using an undefined configuration.

The first patch implements the validation logic in `fit_image.c`. The second
patch fixes an invalid default configuration reference exposed by this new
check in the `k3-am65-iot2050-boot-image.dtsi`. The final patch adds a test
case to verify that mkimage correctly fails when an invalid default
configuration is present in the ITS file.

This series improves the robustness of FIT image generation and helps
catch malformed image trees during build time.

Link: https://lore.kernel.org/r/20250715130317.3886-1-aristo.chen@canonical.com
2025-07-23 13:12:22 -06:00
Aristo Chen
93d09d3bd8 test: fit: add test case for invalid default configuration reference
Recent changes to mkimage introduced a validation step to ensure that
the 'default' property under the /configurations node in a FIT image
references a valid configuration subnode. If the referenced node is
missing, mkimage will now return an error.

This patch adds a Python test case to verify that mkimage correctly
fails when the 'default' configuration does not exist. The test creates
a minimal ITS with an invalid default reference and checks that mkimage
produces the expected error message.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
2025-07-23 13:12:16 -06:00
Aristo Chen
edb4bf3868 tools: fit_image: validate existence of default configuration node
When a FIT image declares a default configuration via the
'configurations/default' property, it must reference a valid subnode
under the /configurations node. If the named default does not exist,
U-Boot will fail to boot the image when no explicit configuration is
provided.

This patch adds a validation step in mkimage to check that the
referenced default configuration node is present. If not, mkimage will
print an error and abort.

This helps catch malformed or outdated ITS files early at build time
instead of deferring failure to runtime.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
2025-07-23 13:12:16 -06:00
Aristo Chen
f7b03695d4 arm: k3-am65-iot2050: Fix invalid default configuration reference
mkimage introduced a validation step to ensure that the 'default'
property under the /configurations node in a FIT image refers to a
valid subnode. This exposed an issue in the
k3-am65-iot2050-boot-image.dtsi, where the 'default' property was set to
"ti/k3-am6528-iot2050-basic" and "ti/k3-am6528-iot2050-basic-pg2", which
do not correspond to actual configuration node names.

This patch updates both /configurations nodes to reference the correct
subnode.

Without this fix, mkimage will fail with an error:
"ERROR: Default configuration 'ti/k3-am6528-iot2050-basic' not found
under /configurations"

An upcoming commit will validate the if the default configuration exists

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
2025-07-23 13:12:16 -06:00
Tom Rini
a9aed78a6d Merge patch series "bootstd: rauc: Small fixes"
Martin Schwan <m.schwan@phytec.de> says:

Fix some small bugs that I noticed during testing.

Link: https://lore.kernel.org/r/20250714-wip-bootmeth-rauc-fixes-v1-0-69d2b80e7606@phytec.de
2025-07-22 13:53:23 -06:00
Martin Schwan
f271b06270 bootstd: rauc: Only scan all partitions instead of boot files
Only scan for the existence of all required partitions of a RAUC system,
instead of searching for boot script files in all of them.

Previously, it might have occurred, that a slot did not contain required
files and RAUC already marked the corresponding slot as bad (not
suitable for booting). In that case, scanning for a non-existence boot
script would result in an error (and thus not booting anything), which
was different behavior compared to the legacy RAUC boot.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
2025-07-22 13:53:17 -06:00
Martin Schwan
84cef694e7 bootstd: rauc: Fix segfault occurring during private struct access
Fix a potential segmentation fault, by not accessing the member of a
null pointer to a private slot's name field.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
2025-07-22 13:53:17 -06:00
Martin Schwan
a7d1214d2c bootstd: rauc: Fix potential memory leak
Fix a potential memory leak, by checking the return value of realloc
first, before assigning it to the private list of slots.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
2025-07-22 13:53:17 -06:00
Holger Brunck
ef7bb0ee1f km: pg-wcom-ls1021xa: update MAINTAINERS
The mainainers for these boards have changed.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
2025-07-22 13:53:03 -06:00
Tomas Alvarez Vanoli
f1b5cb6f50 km: pg-wcom-ls102xa: call qrio deblock cfg earlier
Move the call to configure the qrio i2c deblock pins earlier.
Before this, the call was happening after the first attempt to deblock
the SDP EEPROM, which resulted in a not correct sequence.

Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2025-07-22 13:53:03 -06:00
Holger Brunck
cec0a39b58 km: pg-wcom-ls102xa: add netdev in board env file
Upcoming boards will have different ethernet interfaces. So we move this
variable out of the common code.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2025-07-22 13:53:03 -06:00
Holger Brunck
6175371f66 arm: ls1021a-pg-wcom: add i2c mux node and eeprom
We are now using the DM code for the i2c mux and to read out the
inventory eeprom. Therefore we need to add the nodes to the specific DTS
files.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2025-07-22 13:53:03 -06:00
Holger Brunck
97e71c09bd km: drop KM_RESERVED_PRAM
This variable is unused since we dropped the support for the Kirkwood
boards.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2025-07-22 13:53:03 -06:00
Tomas Alvarez Vanoli
b408cca7b7 km: qrio: fix set_gpio read/modify/write
Setting GPIO by reading the value of the GPRT register, toggling the
correct bit and then writing it causes input values to transfer to the
output. Here's how (example):

1) set gpio 17 and 18 as input.
2) set gpio 17 output value to 0 (read gprt, change 17 to 0, write).
3) set gpio 18 output value to 0 (read gprt, change 18 to 0, write).

The problem here is that because we set 17 as input, and it's a pull-up,
when we read gprt in step 3, the bit 17 will be 1 and not 0.
Instead of doing read/write/modify, the solution is to keep track
internally of the user set GPIOs, and replace the read step with this
static variable.

Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2025-07-22 13:52:01 -06:00
Andrew Goodbody
23d2c182d4 fastboot: Fix off by 1 error
strlen only reports length of string not including terminating 0 byte
but this has to be included in length of receiving buffer on copy so
adjust length check to be correct.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-07-22 11:30:14 -06:00
Ariel D'Alessandro
afca60620a drivers: fastboot: Add support for SPI flash memory
Fastboot currently supports MMC and NAND flash devices. Similarly,
extend the support to SPI flash memories.

Note that in this initial implementation, partitions on the device are
not supported yet, but raw partitions can be set in U-Boot environment.

To define a raw partition descriptor, add an environment variable
similar to the MMC case:

```
fastboot_raw_partition_<raw partition name>=<offset> <size>
```

for example:

```
fastboot_raw_partition_boot=0x0 0x1000000
```

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-07-22 11:30:14 -06:00
Bryan Brattlof
babae80169 include: env: ti_common: remove bootm_size
As the size of 64b ARM kernels, DTs, vendor firmware, and initial ram
disks continues to grow, the 256MB size limit set aside for image
processing by the bootm command has become too small for some K3
reference boards.

For ARMv7 removing this limit could introduce issues so move the
bootm_size variable to ti_armv7_keystone2.env and remove the limit for
any board using a TI K3 SoC.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2025-07-22 11:30:14 -06:00
Yannic Moog
187ac12927 binman: Fix typing for python >= 3.7
To get the [] annotation working with python 3.7 and 3.8, import
annotations.

Reported-by: Tim Harvey <tharvey@gateworks.com>
Fixes: 21bc3433a4 ("binman: rework dropping absent entries from packaged image")
Reviewed-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Tested-by: Tim Harvey <tharvey@gateworks.com>
2025-07-22 11:30:03 -06:00
Andrew Goodbody
b9db211e39 lmb: Remove unreachable code
Code after a break is unreachable so remove it.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-07-22 11:29:33 -06:00
Holger Brunck
01548afc43 arm: fix lmb region reservation when PRAM is defined
PRAM usage is not taken into account when reserving lmb for ARM
architecture, this means that predefined PRAM region is marked as
reserved by the architecture and cannot be used by other users.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2025-07-22 11:29:31 -06:00
Francesco Dolcini
50ef42c948 board: toradex: Fix variant (wifi/non-wifi) selection
Do not dereference NULL, when "variant" env variable is not present.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2025-07-22 11:28:04 -06:00
Gokul Praveen
7d41363977 configs: KASLR OPTEE RNG support for K3 devices
KASLR, or Kernel Address Space Layout Randomization, is a security
feature in the Linux kernel that randomizes the memory location
where the kernel is loaded during boot.

OP-TEE RNG is a Random Number Generator (RNG) component within the
Open Portable Trusted Execution Environment (OP-TEE) which provides
a random number to U-BOOT and U-BOOT provides this random number
as seed value to the LINUX kernel for KASLR.

Add KASLR OPTEE RNG support across K3 devices by enabling the required
configs.

Signed-off-by: Gokul Praveen <g-praveen@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
2025-07-22 10:16:06 -06:00
Anatolij Gustschin
f2f451d9d6 MAINTAINERS: Update email of Anatolij Gustschin
Use new email for community work. Also remove my
capricorn SoM maintainer entry since I do not
have access to this hardware anymore.

Signed-off-by: Anatolij Gustschin <ag.dev.uboot@gmail.com>
2025-07-21 09:22:21 -06:00
Tom Rini
c99f6d9167 Merge tag 'doc-202510-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request doc-202510-rc1

Documentation:

* describe Dragonwing IQ8 board building/flashing
* move PXE README into HTML documentation
* PXE: mention extlinux.conf and sysboot
* correct references in x86-fit-boot.rst
2025-07-19 08:38:31 -06:00
Tom Rini
7c85ee1f49 Merge tag 'i2c-for-2025.10-take2' of https://source.denx.de/u-boot/custodians/u-boot-i2c
i2c updates for v2025.10

- i2c Kconfig updates from Tom
  - add some driver dependencies
  - added missing include delay.h in iproc_i2c.c

- i2c: muxes: Add PCA9541 i2c arbitrator driver
  from Padmarao Begari

- pca954x: add pca9545 support
  from Frank Wunderlich

- cmd: i2c: fix build when CFG_SYS_I2C_NOPROBES defined with DM_I2C
  From Holger Brunck
2025-07-19 08:38:11 -06:00
Fiona Klute
4caf13f9a6 doc: PXE: mention extlinux.conf and sysboot
These use the same format as PXE boot.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Cc: Tom Rini <trini@konsulko.com>
2025-07-19 12:37:40 +02:00
Fiona Klute
773830f4d9 doc: PXE usage: move environment variables to a separate section
This works better with RST formatting, and avoids duplication.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Cc: Tom Rini <trini@konsulko.com>
2025-07-19 12:37:36 +02:00
Fiona Klute
80bf3ad511 doc: move PXE README into usage documentation
This is only a reformatting, with a few grammar fixes (capitalization,
and a missing "is" and "be" added each).

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Cc: Tom Rini <trini@konsulko.com>
2025-07-19 12:37:27 +02:00
Heinrich Schuchardt
579f253384 doc: correct references in x86-fit-boot.rst
Correct the references for

* the x86 boot protocol description
* the FIT file format

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-07-19 12:36:53 +02:00
Balaji Selvanathan
9fe50b5a0a doc: board: qualcomm: document Dragonwing IQ8 board building/flashing
Introducing documentation support for Qualcomm Dragonwing IQ8 QCS8300
board. Documents the build and flashing steps.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
2025-07-19 12:35:20 +02:00
Mark Kettenis
bd0ade7d09 kbuild: Don't mandate gcc as the host compiler
Systems that use clang may not have gcc installed.  Set
HOSTCC to cc and HOSTCXX to c++ like we did before to make those
systems work again.

Fixes: 5f520875bd ("kbuild: Bump the build system to 5.1")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2025-07-18 12:22:24 -06:00
Tom Rini
15d99b3bf5 python: requirements.txt: Update a few modules for security issues
The GitHub dependabot tool has reported a number of issues recently with
some modules that we use. While unlikely to be exploitable in the way we
use them, update various libraries to the latest.

Reported-by: GitHub dependabot
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-18 12:22:20 -06:00
Tom Rini
bf9a78f109 misc: Remove DS4510 driver
As no platforms use this driver anymore and it's not been converted from
to DM_I2C for use, remove it.

Fixes: ed7fe2bee1 ("ppc: Remove xpedite boards")
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-18 12:22:17 -06:00
Tom Rini
bdf443ffd5 drivers: misc: Remove pca9551_led driver
This driver has not been converted to DM_I2C and the last platform that
used it was removed as well. Remove the driver.

Fixes: 4bbcec08eb ("arm: Remove mx6dlarm2 board")
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-18 12:22:13 -06:00
Tom Rini
786e1f6dea sandbox: Add dummy sync()
In order to compile more drivers, add an empty sync() function.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-18 12:22:11 -06:00
Tom Rini
a05c01c8e6 input: Tighten dependency requirements for TEGRA_KEYBOARD
This driver requires headers which only exist on Tegra. Express that
requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-18 12:22:09 -06:00
Tom Rini
14d20133a8 misc: Tighten requirements on IHS_FPGA driver
This driver requires that the gdsys legacy driver option also be enabled
in order to build. Express that requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-18 12:22:05 -06:00
Tom Rini
0f83825802 Merge tag 'u-boot-imx-master-20250717' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/27088

- Add support for the i.MX95 B0 version.
- Enable standard boot for phycore-imx8mp.
- Kconfig fixes for i.MX MMC and FSL_SEC_MON.
- Support 4Gb single die variant of the i.MX8MM Venice board.
2025-07-17 11:42:46 -06:00
Tom Rini
31b5df2e8b Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/27087

- Board: mpfs_icicle: Fix board_fit_config_name_match and disable
  DEBUG_UART
- Board: Add SD card support to the Beagle-V-Fire
- Board: Add support for TH1520-integrated GMACs
2025-07-17 11:39:50 -06:00
Tom Rini
d63b99748f Merge tag 'mmc-2025-07-16' of https://source.denx.de/u-boot/custodians/u-boot-mmc
Drop unused kona_sdhci driver
Tighten config dependencies and a minor cleanup
2025-07-17 11:39:07 -06:00
Tom Rini
fee5f4b619 mmc: Remove unused kona_sdhci driver
As no platforms use this driver anymore, remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-07-17 11:39:07 -06:00
Tom Rini
f57b4a94c5 mmc: Tighten some mmc driver dependencies
A large number of mmc drivers cannot build without access to some
platform specific header files. Express those requirements in Kconfig as
well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-07-17 11:39:07 -06:00