]> git.ipfire.org Git - thirdparty/u-boot.git/commit
bootstd: efi: Handle prior-stage FDT in network path
authorSimon Glass <sjg@chromium.org>
Sun, 5 Apr 2026 11:34:32 +0000 (05:34 -0600)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 17 Apr 2026 06:09:41 +0000 (08:09 +0200)
commitee4bcfc65971730dc2fe137877e620f19a2f8e93
treed68b4cf41fd61d72a5bf897e66f069ec80542c2d
parent586e4f340afe53daf9dc80f6e13216f0ce7d1c8c
bootstd: efi: Handle prior-stage FDT in network path

When CONFIG_OF_HAS_PRIOR_STAGE is enabled and fdtfile is not set,
efi_get_distro_fdt_name() returns -EALREADY to indicate the prior-stage
FDT should be used. The block-device EFI path handles this by setting
BOOTFLOWF_USE_PRIOR_FDT, but the network path treats it as an error,
causing the bootflow to stay in 'base' state with a -EALREADY error.

This also means fdt_addr_r is required even when no FDT download is
needed, giving a spurious  -EINVAL error.

Fix this by calling efi_get_distro_fdt_name() before checking
fdt_addr_r, and handling -EALREADY by setting BOOTFLOWF_USE_PRIOR_FDT
to skip the FDT download, matching the block-device behaviour.

THere is no test for this at present, since sandbox does not enable
CONFIG_OF_HAS_PRIOR_STAGE and lacks infra for network-based EFI boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/bootmeth_efi.c