diff options
| author | Aristo Chen <[email protected]> | 2025-09-14 10:59:30 +0000 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-09-23 13:35:22 -0600 |
| commit | 588094f2c8ec9a4f7d2dcda11ffae8db8462149c (patch) | |
| tree | 083b7e3c1e1e1ff89f87ae5f029ad4b75767ad8e /tools/mkimage.c | |
| parent | cbc4da1dce3f8dd828a2e613676fdceefd87e1ea (diff) | |
tools: mkimage: detect overlapping load regions in FIT configurations
This patch adds a validation step in mkimage to detect memory region
overlaps between images specified in the same configuration of a
FIT image. If any overlaps are found, the tool prints an error and
aborts the build.
This helps prevent runtime memory corruption caused by conflicting
load addresses between images.
Signed-off-by: Aristo Chen <[email protected]>
Diffstat (limited to 'tools/mkimage.c')
| -rw-r--r-- | tools/mkimage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c index 361711c53b2..3f28918f5cf 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -520,7 +520,8 @@ int main(int argc, char **argv) retval = tparams->fflag_handle(¶ms); if (retval != EXIT_SUCCESS) { - if (retval == FDT_ERR_NOTFOUND) { + if (retval == FDT_ERR_NOTFOUND || + retval == FDT_ERR_BADSTRUCTURE) { // Already printed error, exit cleanly exit(EXIT_FAILURE); } |
