From: Quentin Schulz Date: Wed, 3 Dec 2025 16:19:34 +0000 (+0100) Subject: boot/fit: declare (and use) new constant for conf's compatible prop X-Git-Tag: archive/raspbian/2021.01+dfsg-5+rpi1+deb11u3^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b2916ce898af0e2a629829d4e7ffd9a25133530f;p=u-boot.git boot/fit: declare (and use) new constant for conf's compatible prop Fit conf node may have a compatible property[1] which stores the root compatible of the first blob in the fdt property of the node. This can be used to automatically select the proper conf node based on the compatible from the running U-Boot (matching the former's compatible with the latter)[2]. This adds (and uses) this constant for FIT node parsing. Note that this property may also appear in fpga image nodes[3] but that isn't done in this commit. [1] https://fitspec.osfw.foundation/#optional-properties compatible paragraph [2] https://fitspec.osfw.foundation/#select-a-configuration-to-boot [3] https://fitspec.osfw.foundation/#images-node 2.3.2 Conditionally mandatory property Signed-off-by: Quentin Schulz (cherry picked from commit 3059eb0c27dd1b4a40a06bda4a47e10246185aca) Gbp-Pq: Name CVE-2026-46728-1.patch --- diff --git a/common/image-fit.c b/common/image-fit.c index 1b475224e..7d5bc4913 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1732,7 +1732,7 @@ int fit_conf_find_compat(const void *fit, const void *fdt) continue; /* If there's a compat property in the config node, use that. */ - if (fdt_getprop(fit, noffset, "compatible", NULL)) { + if (fdt_getprop(fit, noffset, FIT_COMPAT_PROP, NULL)) { fdt = fit; /* search in FIT image */ compat_noffset = noffset; /* search under config node */ } else { /* Otherwise extract it from the kernel FDT. */ diff --git a/include/image.h b/include/image.h index 8c152c5c5..81b4277ac 100644 --- a/include/image.h +++ b/include/image.h @@ -1029,6 +1029,7 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size, #define FIT_FPGA_PROP "fpga" #define FIT_FIRMWARE_PROP "firmware" #define FIT_STANDALONE_PROP "standalone" +#define FIT_COMPAT_PROP "compatible" #define FIT_MAX_HASH_LEN HASH_MAX_DIGEST_SIZE