Skip to content

mkimage: validate default configuration reference

Aristo Chen u-boot 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v13 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3arm: k3-am65-iot2050: Fix invalid default configuration referencearch/arm/dts/k3-am65-iot2050-boot-image.dtsi+2 -20 replies
2/3tools: fit_image: validate existence of default configuration nodetools/fit_image.c+10 -00 replies
3/3test: fit: add test case for invalid default configuration referencetest/py/tests/test_fit_mkimage_validate.py+45 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] mkimage: validate default configuration reference

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.

### Changes in v2
- Modify the order of the commits, code is not changed

Aristo Chen (3):
arm: k3-am65-iot2050: Fix invalid default configuration reference
tools: fit_image: validate existence of default configuration node
test: fit: add test case for invalid default configuration reference

 arch/arm/dts/k3-am65-iot2050-boot-image.dtsi |  4 +-
 test/py/tests/test_fit_mkimage_validate.py   | 45 ++++++++++++++++++++
 tools/fit_image.c                            | 10 +++++
 3 files changed, 57 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0