[PATCH v2 16/28] binman: Make section padding consistent with other entries

Simon Glass sjg at chromium.org
Fri Oct 30 04:33:54 CET 2020


At present padding of sections is inconsistent with other entry types, in
that different pad bytes are used.

When a normal entry is padded by its parent, the parent's pad byte is
used. But for sections, the section's pad byte is used.

Adjust logic to always do this the same way.

Note there is still a special case in entry_Section.GetPaddedData() where
an image is padded with the pad byte of the top-level section. This is
necessary since otherwise there would be no way to set the pad byte of
the image, without adding a top-level section to every image.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2:
- Renumber the test .dts files to make space for three inserted earlier

 tools/binman/etype/section.py           |  4 +--
 tools/binman/ftest.py                   | 23 +++++++++++++++++
 tools/binman/test/180_section_pad.dts   | 27 ++++++++++++++++++++
 tools/binman/test/181_section_align.dts | 34 +++++++++++++++++++++++++
 4 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 tools/binman/test/180_section_pad.dts
 create mode 100644 tools/binman/test/181_section_align.dts

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list