Skip to content

fit: print conf node compatibles + use property string constants

Quentin Schulz u-boot 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20250409-fit-compat-ebe94f690b08

Versions newest first

  1. v2 Latest4 patches 7 repliesIn review
  2. v1 RFC4 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- rebased on top of next,
- removed RFC status so it gets some attention,

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4boot/fit: use constants for property stringsboot/common_fit.c boot/image-fit.c+3 -31 reply
2/4lib: rsa: use FIT_ALGO_PROP constant instead of "algo" in FITlib/rsa/rsa-verify.c+1 -11 reply
3/4boot/fit: declare (and use) new constant for conf's compatible propboot/image-fit.c include/image.h+2 -11 reply
4/4boot/fit: print all configuration node compatiblesboot/image-fit.c+11 -03 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH next v2 0/4] fit: print conf node compatibles + use property string constants

This does a bit of "cleanup" by reusing constants for some FIT properties instead of having the same string in multiple places.

Additionally, this adds a new constant for the compatible property in FIT configuration nodes[1] which is useful for FIT images with multiple FIT configuration nodes to support multiple devices in the same blob. U-Boot will try to figure out which node to select based on that compatible[2].

However, if this property is missing (and the first blob in the fdt property of the configuration node is uncompressed), the compatible from the root node of the associated kernel FDT will be used for the autoselection mechanism. For now, I only print the property if it exists, but maybe it'd make sense to expose the fallback one if it's missing. I guess we can implement that later on if desired.

[1] https://fitspec.osfw.foundation/#optional-properties compatible paragraph
[2] https://fitspec.osfw.foundation/#select-a-configuration-to-boot

---
Changes in v2:
- rebased on top of next,
- removed RFC status so it gets some attention,

---
Quentin Schulz (4):
boot/fit: use constants for property strings
lib: rsa: use FIT_ALGO_PROP constant instead of "algo" in FIT boot/fit: declare (and use) new constant for conf's compatible prop boot/fit: print all configuration node compatibles

 boot/common_fit.c    |  4 ++--
 boot/image-fit.c     | 15 +++++++++++++--
 include/image.h      |  1 +
 lib/rsa/rsa-verify.c |  2 +-
 4 files changed, 17 insertions(+), 5 deletions(-)

---
base-commit: dca19206acf2af2d339087bb62aa0b8ee1b0e326
change-id: 20250409-fit-compat-ebe94f690b08

Best regards,

Signature · 1 line
Quentin Schulz <[email protected]>