[U-Boot] [PATCH v2 06/31] binman: Add an image header

sjg at google.com sjg at google.com
Thu Jul 18 01:58:59 UTC 2019


It is useful to be able to quickly locate the FDT map in the image. An
easy way to do this is with a pointer at the start or end of the image.

Add an 'image header' entry, which places a magic number followed by a
pointer to the FDT map. This can be located at the start or end of the
image, or at a chosen location.

As part of this, update GetSiblingImagePos() to detect missing siblings.

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

Changes in v2:
- Update test to use _DoReadFileRealDtb() helper

 tools/binman/README                          |  5 +-
 tools/binman/README.entries                  | 19 +++++
 tools/binman/entry.py                        | 11 +++
 tools/binman/etype/image_header.py           | 76 ++++++++++++++++++++
 tools/binman/ftest.py                        | 47 +++++++++++-
 tools/binman/test/116_fdtmap_hdr.dts         | 17 +++++
 tools/binman/test/117_fdtmap_hdr_start.dts   | 19 +++++
 tools/binman/test/118_fdtmap_hdr_pos.dts     | 19 +++++
 tools/binman/test/119_fdtmap_hdr_missing.dts | 16 +++++
 tools/binman/test/120_hdr_no_location.dts    | 16 +++++
 10 files changed, 242 insertions(+), 3 deletions(-)
 create mode 100644 tools/binman/etype/image_header.py
 create mode 100644 tools/binman/test/116_fdtmap_hdr.dts
 create mode 100644 tools/binman/test/117_fdtmap_hdr_start.dts
 create mode 100644 tools/binman/test/118_fdtmap_hdr_pos.dts
 create mode 100644 tools/binman/test/119_fdtmap_hdr_missing.dts
 create mode 100644 tools/binman/test/120_hdr_no_location.dts

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list