Commit Graph

100742 Commits

Author SHA1 Message Date
Simon Glass
da3d0a1501 doc: Enable quiet mode for sphinx builds
The sphinx output is very noisy. Add -q to SPHINXOPTS so that only
warnings and errors are shown.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-29 08:57:49 -07:00
Simon Glass
b31d8c2479 Merge branch 'exti' into 'master'
fs: ext4l: Complete read-only filesystem support (Part I)

See merge request u-boot/u-boot!345
2025-12-27 21:20:01 +00:00
Simon Glass
8349f9f700 fs: ext4l: Add statfs support
Implement ext4l_statfs() to return filesystem statistics using the
ext4 superblock. The function returns block size, total block count,
and free block count.

Add unit test to verify the statfs implementation returns valid data.

Cover-letter:
fs: ext4l: Complete read-only filesystem support (Part I)
This series completes read-only support for the ext4l filesystem driver,
which is a port of the Linux ext4 driver to U-Boot.

The ext4l driver provides more complete ext4 support than the existing
ext4 driver, including proper handling of extents, directory hashing,
and other ext4 features.

Changes include:

Sandbox infrastructure:
- Fix IRQ macros and buffer_head includes for sandbox builds

Core fixes:
- Fix path lookup by implementing proper dentry operations
- Fix fscrypt_match_name to do actual name comparison

Filesystem operations:
- Add directory listing (opendir/readdir/closedir)
- Add file existence check (exists)
- Add file size query (size)
- Add file read support (read)
- Add UUID query (uuid)
- Add filesystem statistics (statfs)

New command:
- Add fsinfo command to display filesystem statistics

Testing:
- Add comprehensive unit tests for all operations
- Enable fsuuid command for sandbox testing
END

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:43 -07:00
Simon Glass
a6b1cd23a7 cmd: Add fsinfo command
Add the fsinfo command to display filesystem statistics including block
size, total blocks, used blocks, and free blocks. Both raw byte counts
and human-readable sizes are shown.

Example output:
  => fsinfo mmc 0:1
  Block size: 4096 bytes
  Total blocks: 16384 (67108864 bytes, 64 MiB)
  Used blocks: 2065 (8458240 bytes, 8.1 MiB)
  Free blocks: 14319 (58650624 bytes, 55.9 MiB)

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:43 -07:00
Simon Glass
fd4b07ff95 fs: Add statfs method to the filesystem interface
Add infrastructure for obtaining filesystem statistics. This includes:

- struct fs_statfs to hold block size, total blocks, and free blocks
- statfs method in struct fstype_info
- fs_statfs() wrapper function
- fs_statfs_unsupported() stub for filesystems without support

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:43 -07:00
Simon Glass
73848983f5 ext4l: Add uuid() support
The filesystem uuid method is not implemented.

Add ext4l_uuid() which returns the filesystem UUID as a string and
wire it into the filesystem operations table. Add a test.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:43 -07:00
Simon Glass
5180ac32d7 ext4l: Add read() support
Add ext4l_read() function to read file contents. The function resolves
the path to an inode, then reads the file block by block using
ext4_bread() and copies the data to the output buffer.

Signed-off-by: Simon Glass <sjg@chromium.org>

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:43 -07:00
Simon Glass
8810a02743 ext4l: Add size() support
Add ext4l_size() function to retrieve the size of a file or directory.
Wire it into the filesystem operations table in fs_legacy.c.

Signed-off-by: Simon Glass <sjg@chromium.org>

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:43 -07:00
Simon Glass
0e9c88b170 ext4l: Add exists() support
Implement ext4l_exists() to check if a file or directory exists on the
filesystem. This uses ext4l_resolve_path() to look up the path and
returns 1 if found, 0 otherwise.

Wire the function into fs_legacy.c and add a basic test.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:42 -07:00
Simon Glass
b9558d8a06 ext4l: Add open/read/close directory
Implement directory-iteration for the ext4l filesystem driver, allowing
callers to iterate through directory entries one at a time.

Add ext4l_opendir() which opens a directory and returns a stream handle,
ext4l_readdir() which returns the next directory entry, and
ext4l_closedir() which closes the stream and frees resources.

The implementation uses a struct dir_context to capture single entries
from ext4_readdir(), with logic to skip previously returned entries
since the htree code may re-emit them.

Update struct file to include a position.

Wire these functions into fs_legacy.c for the ext4l filesystem type.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:42 -07:00
Simon Glass
9806965e3e test: ext4l: Handle variable console output in tests
Directory entries appear in hash order and mount messages may appear
multiple times during probe operations.

Update tests to skip remaining output after finding expected content.

We could perhaps refine this with more powerful matching, but that is
left for another day.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:35:42 -07:00
Simon Glass
ac579a0ecb ext4l: Fix comment formatting
Add blank line after function doc titles per kernel-doc style.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:24:26 -07:00
Simon Glass
17648696b1 cmd: Enable fsuuid command for sandbox
The fsuuid command is useful for testing filesystem UUID support.

Enable it by default for sandbox builds.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:24:26 -07:00
Simon Glass
725c0ed93b ext4l: Fix path lookup by implementing dentry operations
The fscrypt_match_name stub macro always returns 1, causing every
directory entry to match regardless of name. Also d_splice_alias is
a no-op that returns NULL, so the inode found by ext4_lookup is
never associated with the dentry.

Fix fscrypt_match_name to properly compare name lengths and contents.
Fix d_splice_alias, d_instantiate and d_instantiate_new to set
d->d_inode.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:24:26 -07:00
Simon Glass
ff74bdbef3 sandbox: Convert IRQ macros to static inline functions
Convert the local_irq_* macros to static inline functions to avoid
"unused variable 'flags'" warnings when building with the atomic
operations from asm-generic/atomic.h.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:24:26 -07:00
Simon Glass
1b4240fda6 linux: buffer_head: Include atomic.h directly
The comment about atomic_t being expected from the including file is
outdated. Include asm-generic/atomic.h directly to provide the atomic_t
type definition.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:24:26 -07:00
Simon Glass
9db339213d buildman: Fix flaky test_kconfig_change test properly
The previous fix using -T4 is insufficient because queue-based job
distribution does not guarantee one board per thread. Even with 4
threads and 4 boards, a faster thread can finish its board and grab
another from the queue, causing .config to leak between boards in
the same thread's work directory.

Fix by using -P (per-board-out-dir) which gives each board its own
output directory, completely preventing .config leakage regardless
of thread scheduling.

Fixes: 17618b5975 ("buildman: Fix flaky test_kconfig_change test")
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 13:24:09 -07:00
Simon Glass
6f3065ed6f CLAUDE.md: Add note about test-declaration placement
Test declarations should immediately follow the closing brace of the
function they declare, with no blank line in between.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-12-27 11:46:58 -07:00
Simon Glass
d71f2f8e9b Merge branch 'cig' into 'master'
CI: Tidy up riscv targets

See merge request u-boot/u-boot!350
2025-12-27 18:45:57 +00:00
Heinrich Schuchardt
39a8134605 CI: test qemu-riscv64_smode[_acpi]
QEMU comes with its own OpenSBI. For running RISC-V virtual machine
using one of qemu-riscv64_smode_defconfig or
qemu-riscv64_smode_acpi_defconfig is the natural choice.

Add the riscv64 smode configurations to the test scope.

Series-to: concept
Cover-letter:
CI: Tidy up riscv targets
There are some smode options for the QEMU builds, along with some
associated hooks.

This eries pulls these in from upstream, since the previous attempt has
broken qemu-riscv64
END

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
(cherry picked from 703efbb1a5)
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 11:26:54 -07:00
Simon Glass
545acab06c travis-ci: add qemu-riscv64_smode* test environments
Provide test environments for running
qemu-riscv64_smode and qemu-riscv64_smode_acpi.

These use the OpenSBI implementation provided by QEMU and
pass main u-boot as -kernel parameter.

ACPI is enabled for both boards. We still expect the boards to use
QEMU's device-tree as control device-tree.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
(cherry picked from d94ebdd2c823ce8776723184cda960dcd2954711)
Remove the rva23s64 CPU since we don't have that in our QEMU:
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 11:09:13 -07:00
Simon Glass
073cddf846 Revert "test: hooks: Update qemu-riscv64 config for S-mode with OpenSBI"
This reverts commit 5f66188fd5.
2025-12-27 10:14:32 -07:00
Simon Glass
63578a8298 Merge branch 'cif' into 'master'
patman: Update Commit to include the message

See merge request u-boot/u-boot!349
2025-12-27 14:10:59 +00:00
Simon Glass
39a4396362 patman: Update Commit to include the message
There is in fact a 'msg' member for Commit, set up by the
Patchstream._close_commit() function. Declare it in the docs and set it
to empty when the Commit is created.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-27 04:51:56 -07:00
Simon Glass
58667e0511 Merge branch 'cie' into 'master'
test: pytest and hook improvements

See merge request u-boot/u-boot!348
2025-12-27 03:37:54 +00:00
Simon Glass
e16a9fa8b5 test: pytest: Add --quiet-hooks option
Add a --quiet-hooks option to suppress display of hook commands to
stdout while still logging them to the HTML log file. This reduces
console noise during test runs.

Cover-letter:
test: pytest and hook improvements
This series includes several improvements to the pytest infrastructure
and test hook configurations:

- Fix the timing check in conftest to properly check if timing is enabled
- Add a --quiet-hooks option to suppress hook command display
- Add and update ellesmere hook config files for various QEMU boards
- Update qemu-riscv64 config for S-mode with OpenSBI
END

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-26 20:22:28 -07:00
Simon Glass
b5b75c768e test: hooks: Add more ellesmere config files
Add configuration files for qemu-riscv32_smode, qemu-riscv64_smode,
qemu-riscv64_smode_acpi, qemu_arm64_acpi, and qemu_arm64_lwip boards.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-26 20:09:09 -07:00
Simon Glass
5f66188fd5 test: hooks: Update qemu-riscv64 config for S-mode with OpenSBI
Update the qemu-riscv64 hook config to use OpenSBI as the BIOS and load
U-Boot as the kernel, which is required for S-mode operation.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-26 20:09:09 -07:00
Simon Glass
227cc00fd8 test: hooks: Add missing ellesmere config files
Add configuration files for qemu-arm-sbsa, qemu-ppce500, and
qemu-xtensa-dc233c boards.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-26 20:09:09 -07:00
Simon Glass
af5b84be61 test: pytest: Fix timing check in conftest
The check uses hasattr() to see if the 'timing' attribute exists, but
does not check if it is actually enabled. Fix this by checking the
attribute value instead.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-26 20:09:02 -07:00
Heinrich Schuchardt
e1a1046c61 bloblist: adjust default bloblist size after reloc
If neither CONFIG_BLOBLIST_FIXED NOR CONFIG_BLOBLIST_ALLOC is set,
currently CONFIG_BLOBLIST_SIZE_RELOC defaults to 0 except if
* CONFIG_ARM=y && CONFIG_EFI_LOADER=y && GENERATE_ACPI_TABLE=y.

A size of zero never makes sense for a bloblist.

When using QFW we need more than 64 KiB to host the ACPI table.
In this case CONFIG_BLOBLIST_ALLOC is used.

Set a reasonable default.

Remove the CONFIG_BLOBLIST_SIZE_RELOC in ARM QEMU defconfigs which are
not compatible with ACPI tables passed from QEMU.

Reported-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Fixes: 6f9b015c13 ("common: Enable BLOBLIST_TABLES on arm")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
(cherry picked from commit 559f11e66c)
2025-12-26 19:58:15 -07:00
Simon Glass
075a61cda9 Merge branch 'cid' into 'master'
gitlab-ci: Use full clone for trigger_snap_builds job

See merge request u-boot/u-boot!347
2025-12-25 22:44:39 +00:00
Simon Glass
b42338d541 gitlab-ci: Use full clone for trigger_snap_builds job
The push to GitHub fails because the shallow clone is missing objects
that the remote references. Disable shallow cloning for this job by
setting GIT_DEPTH to 0

Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-25 15:38:52 -07:00
Simon Glass
54292f831b Merge branch 'checkpatch' into 'master'
checkpatch: Sync with Linux v6.18

See merge request u-boot/u-boot!344
2025-12-25 21:35:23 +00:00
Simon Glass
bca5edfcf6 checkpatch: Allow AI Co-developed-by without matching Signed-off-by
When a patch is co-developed with an AI assistant, the Co-developed-by
tag typically uses a noreply email address. Since Signed-off-by requires
a real person with a valid email address, skip the name/email mismatch
warning when the Co-developed-by email contains "noreply@".

Cover-letter:
checkpatch: Sync with Linux v6.18
This series syncs checkpatch.pl with Linux v6.18 and adds several
U-Boot-specific improvements:

- Fix patman's checkpatch message parsing for consecutive messages
- Allow test macros (UNIT_TEST, etc.) immediately after function close
- Allow AI Co-developed-by tags without requiring matching Signed-off-by
END

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-25 14:31:00 -07:00
Simon Glass
6ad7f66b1c checkpatch: Allow test macros immediately after function close
U-Boot test declarations (e.g., FS_TEST, UNIT_TEST) should immediately
follow the closing brace of the test function with no blank line.

Add an exception to the blank-line-after-declaration check for *TEST
macros, and add a new check that warns if there IS a blank line before
a test declaration macro.

Update the patman test to handle duplicate warnings now that message
parsing correctly separates consecutive checkpatch messages.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-25 14:31:00 -07:00
Simon Glass
925c5ee5da patman: Fix checkpatch message parsing for consecutive messages
Checkpatch.pl doesn't always output blank lines between messages. The
current parser splits on '\n\n' which fails to separate consecutive
messages, causing "Internal error: some problems lost" warnings.

Fix by splitting on message-starting patterns (ERROR:, WARNING:, CHECK:,
etc.) instead of blank lines.

Add a test that verifies consecutive messages are parsed correctly.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-25 14:31:00 -07:00
Simon Glass
8a12c56e54 checkpatch: Sync with Linux v6.18
Update checkpatch.pl from Linux v6.18, adding U-Boot-specific checks:

- Add --u-boot option to enable U-Boot-specific warnings
- Add debug/printf to $logFunctions
- Add u_boot_struct_name() for driver struct naming conventions
- Add u_boot_line() with checks for uclass, livetree API, commands,
  IS_ENABLED usage, strl* functions, CONFIG symbols, barred includes,
  fdt/initrd relocation, skip_board_fixup, and driver model schema

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-25 14:31:00 -07:00
Simon Glass
50bce11e2b Merge branch 'cherry-a0df7f39a47' into 'master'
[pickman] Merge tag 'u-boot-imx-master-20250116' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

See merge request u-boot/u-boot!286
2025-12-25 21:28:30 +00:00
Sébastien Szymanski
ce5a3f405b imx: fdt: fix cooling-device property corruption
The function disable_thermal_cpu_nodes() corrupts the cooling-device
property.
For example, booting an i.MX93 devices with only one A55 core (IMX93x1)
with the cooling-device property set to:

$ dtc -I dtb foo.dtb | grep cooling-device
cooling-device = <0x08 0xffffffff 0xffffffff 0x09 0xffffffff 0xffffffff>;

Linux shows the following error at boot:

[    1.715189] OF: /thermal-zones/cpu-thermal/cooling-maps/map0: could not find phandle 1083699869
[    1.723977] thermal_sys: Add a cooling_device property with at least one device
[    1.731285] thermal thermal_zone0: binding zone cpu-thermal with cdev thermal-devfreq-0 failed:-2

because the cooling-device property in the device tree passed to the
kernel is

$ dtc -I dtb /sys/firmware/fdt | grep cooling-device
cooling-device = <0x4097f29d 0x00 0xb05aef9d>;

The issue is because the wrong variable type is passed to the function
fdt_setprop() called in the function disable_thermal_cpu_nodes(). With
the variable type fixed, the error at boot is gone and the property is
properly set:

$ dtc -I dtb /sys/firmware/fdt | grep cooling-device
cooling-device = <0x08 0xffffffff 0xffffffff>;

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2025-12-25 11:20:50 -07:00
Alexander Sverdlin
23c383df4d configs: capricorn_cxg3: Enable CMD_WDT
Capricorn boards have WDT (WDT_SIEMENS_PMIC) and U-Boot is not configured
to trigger the WDT. Enable the "wdt" command to be able to stop the WDT
from the command line.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2025-12-25 11:20:50 -07:00
Yannic Moog
fa518088ba doc: phytec: imx8mm: add OP-TEE documentation
Add instructions on how to build and package OP-TEE for the
phycore-imx8mm based boards. The build instructions are identical for
phyGATE-Tauri-L and phyBOARD-Polis.
Also fix missig '-' for TF-A build instructions.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
2025-12-25 11:20:50 -07:00
Yannic Moog
e0f23b523d doc: phytec: imx8mp: add OP-TEE documentation
Add documentation for the phyBOARD-Pollux i.MX 8M Plus on OP-TEE
integration.
Also add missing '-' to TF-A build instruction while at it.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
2025-12-25 11:20:50 -07:00
Yannic Moog
37de2de1fe phycore-imx8mm_defconfig: add optee load address
The phyCORE i.MX 8M Mini expects 0x56000000 address to load optee.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
2025-12-25 11:20:44 -07:00
Yannic Moog
a779dcdb79 imx8mm-phygate-tauri-l_defconfig: add optee load address
The phyGATE-Tauri-L expects 0x56000000 address to load optee.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
2025-12-25 11:20:23 -07:00
Yannic Moog
b86a5eedb2 phycore-imx8mp_defconfig: add optee load address
The phyBOARD-Pollux expects 0x56000000 address to load optee.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
2025-12-25 11:20:23 -07:00
Yannic Moog
a6cdef48a3 arm: imx8m: add OP-TEE node
Add tee node in SoC u-boot device trees. Use a kconfig entry to specify
load and entry addresses for the op-tee image in the respective
defconfig.
Default IMX8M_OPTEE_LOAD_ADDR is supplied. To keep it simple, the same
addresses are used for each SoC as are defined in upstream tf-a
(BL32_BASE) [1].

[1] https://github.com/ARM-software/arm-trusted-firmware/tree/master/plat/imx/imx8m

Signed-off-by: Yannic Moog <y.moog@phytec.de>
2025-12-25 11:20:23 -07:00
Peng Fan
0a55967f4f gpio: adp5585: Update compatible string
i.MX93-11x11-EVK has switched to use upstream device tree, and use
"adi,adp5585". Since i.MX93-11x11-EVK is the only user of this driver,
so it is safe to drop "adp5585".

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-12-25 11:20:23 -07:00
Peng Fan
b01330301d imx: imx93-11x11-evk: drop duplicated nodes
The upstream dts already has the lpi2c2 subnodes, so drop the duplicated
ones in u-boot dtsi.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-12-25 11:20:23 -07:00
Peng Fan
c222f4cf6f imx: imx8mq_evk: Switch to BOOTSTD
Move env to imx8mq_evk.env
Switch to support BOOTSTD with a bsp bootcmd as fallback.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-12-25 11:20:23 -07:00