binman: Add more tests for image header position
authorSimon Glass <sjg@chromium.org>
Sat, 20 Jul 2019 18:23:55 +0000 (12:23 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 29 Jul 2019 15:38:06 +0000 (09:38 -0600)
commiteba1f0cc942947722f70029c033b915113cec1ba
tree389003da6941977c16b6edd1e7afdecec5ea3d93
parent7400107e467da52c7e6772b677f69f4464f6d2ce
binman: Add more tests for image header position

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 <sjg@chromium.org>
tools/binman/entry.py
tools/binman/etype/image_header.py
tools/binman/etype/section.py
tools/binman/ftest.py
tools/binman/test/135_fdtmap_hdr_middle.dts [new file with mode: 0644]
tools/binman/test/136_fdtmap_hdr_startbad.dts [new file with mode: 0644]
tools/binman/test/137_fdtmap_hdr_endbad.dts [new file with mode: 0644]
tools/binman/test/138_fdtmap_hdr_nosize.dts [new file with mode: 0644]