The positioning does not currently work correctly if at the end of an
image with no fixed size. Also if the header is in the middle of an image
it can cause a gap in the image since the header position is normally at
the image end, so entries after it are placed after the end of the image.

Fix these problems and add more tests to cover these cases.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 tools/binman/entry.py                         | 15 +++++++++++
 tools/binman/etype/image_header.py            | 16 ++++++++++--
 tools/binman/etype/section.py                 |  9 +++++++
 tools/binman/ftest.py                         | 25 +++++++++++++++++++
 tools/binman/test/135_fdtmap_hdr_middle.dts   | 16 ++++++++++++
 tools/binman/test/136_fdtmap_hdr_startbad.dts | 16 ++++++++++++
 tools/binman/test/137_fdtmap_hdr_endbad.dts   | 16 ++++++++++++
 tools/binman/test/138_fdtmap_hdr_nosize.dts   | 16 ++++++++++++
 8 files changed, 127 insertions(+), 2 deletions(-)
 create mode 100644 tools/binman/test/135_fdtmap_hdr_middle.dts
 create mode 100644 tools/binman/test/136_fdtmap_hdr_startbad.dts
 create mode 100644 tools/binman/test/137_fdtmap_hdr_endbad.dts
 create mode 100644 tools/binman/test/138_fdtmap_hdr_nosize.dts

Applied to u-boot-dm, thanks!
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to