5 Commits

Author SHA1 Message Date
Tom Rini
e482fdbbca Revert "Merge patch series "mkimage: Detect FIT image load address overlaps and fix related test/DTS issues""
This reverts commit 4d84fa1261eb27d57687f2e4c404a78b8653c183, reversing
changes made to b82a1fa7ddc7f3be2f3b75898d5dc44c34420bdd.

I had missed some feedback on this series from earlier, and we have
since had reports of regressions due to this as well. For now, revert
this.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-09-24 07:50:44 -06:00
Aristo Chen
8f3d3510e3 test: Add test case for FIT image load address overlap detection
Add a new test case to verify that mkimage properly detects and reports
memory region overlaps in FIT image configurations.

The test creates a FIT image with kernel and FDT components that have
the same load address (0x40000), which should trigger the overlap
detection logic and cause mkimage to fail with an appropriate error
message.

Test verifies:
- mkimage returns non-zero exit code when overlap is detected
- Error message contains "Error: Overlap detected:"
- Error message identifies the specific overlapping components
  (kernel@1 and fdt@1)

This test ensures the overlap detection feature works correctly and
prevents deployment of FIT images with conflicting memory layouts
that could cause runtime failures.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
2025-09-23 13:35:22 -06:00
Tom Rini
12a94b894d test: py: test_fit_mkimage_validate: Only run either test on sandbox
Both of these tests are only valid for sandbox (and require dtc) so both
tests need the pytest annotations.

Fixes: 93d09d3bd8ea ("test: fit: add test case for invalid default configuration reference")
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-08-04 18:23:13 -06:00
Aristo Chen
93d09d3bd8 test: fit: add test case for invalid default configuration reference
Recent changes to mkimage introduced a validation step to ensure that
the 'default' property under the /configurations node in a FIT image
references a valid configuration subnode. If the referenced node is
missing, mkimage will now return an error.

This patch adds a Python test case to verify that mkimage correctly
fails when the 'default' configuration does not exist. The test creates
a minimal ITS with an invalid default reference and checks that mkimage
produces the expected error message.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
2025-07-23 13:12:16 -06:00
Aristo Chen
21f75eb7af test: py: add mkimage test for undefined image references in FIT configs
Add a test case to verify that mkimage correctly rejects a FIT source
that references a non-existent image from a configuration node.

This test introduces a minimal ITS that defines a valid kernel image
but references a missing "fdt" image under the /configurations section.
The test asserts that mkimage fails with a clear error message, as
introduced in the new validation logic.

This helps ensure the validation logic behaves correctly and prevents
regressions in future FIT enhancements.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
2025-06-26 08:12:54 -06:00