[U-Boot] [PATCH 00/26] binman: Allow reading of images to list contents

Simon Glass sjg at chromium.org
Tue Jul 2 00:24:29 UTC 2019


This series adds features to allow binman to read its own images. Using
an 'FDT map' inside the image (basically a cut-down copy of the input
config with some pieces added) it can reverse-engineer the image and
figure out what is where.

So far the only user of this feature is a new 'list' command, which allows
listing the entries in an image.

Other improvements along the way include:
- Support for FDT map
- Support for an image header, which points to the FDT map
- Ability to deal with entries which change size after packing
- Additional error checking and FDT features for CBFS
- Convert from OptionParser to ArgumentParser

Future work will allow reading files from the image, but I've decided to
put that in the next series.


Simon Glass (26):
  binman: Simplify the entry test
  binman: Update future features
  binman: Update help for new features
  binman: Add an FDT map
  binman: Add an image header
  binman: Allow cbfstool to be optional with tests
  binman: Convert to use ArgumentParser
  binman: Move compression into the Entry base class
  binman: Drop an unused arg in Entry.Lookup()
  binman: Allow easy importing of entry modules
  binman: Fix up ProcessUpdateContents error and comments
  binman: Call ProcessUpdateContents() consistently
  binman: Add a return value to ProcessContentsUpdate()
  binman: Add a control for post-pack entry expansion
  binman: Allow entries to expand after packing
  binman: Allow device-tree entries to be compressed
  binman: Provide the actual data address for cbfs files
  binman: Use the cbfs memlen field only for uncompressed length
  binman: Add a comment about CBFS test structure
  binman: Support FDT update for CBFS
  binman: Detect bad CBFS file types
  binman: Allow listing the entries in an image
  binman: Support reading in firmware images
  binman: Support locating an image header
  binman: Support reading an image into an Image object
  binman: Support listing an image

 .travis.yml                                   |   3 +-
 test/run                                      |   5 +-
 tools/binman/README                           |  62 ++-
 tools/binman/README.entries                   |  57 +++
 tools/binman/binman.py                        |  43 +-
 tools/binman/bsection.py                      |  27 +-
 tools/binman/cbfs_util.py                     |  42 +-
 tools/binman/cbfs_util_test.py                |  49 ++-
 tools/binman/cmdline.py                       |  90 ++--
 tools/binman/control.py                       | 159 +++++--
 tools/binman/entry.py                         | 115 ++++-
 tools/binman/entry_test.py                    |  32 +-
 tools/binman/etype/__init__.py                |   0
 tools/binman/etype/_testing.py                |  14 +-
 tools/binman/etype/blob.py                    |  40 +-
 tools/binman/etype/blob_dtb.py                |  10 +-
 tools/binman/etype/cbfs.py                    |  57 ++-
 tools/binman/etype/fdtmap.py                  | 129 ++++++
 tools/binman/etype/fmap.py                    |   2 +-
 tools/binman/etype/image_header.py            |  99 +++++
 tools/binman/etype/section.py                 |  14 +-
 tools/binman/etype/u_boot_with_ucode_ptr.py   |   8 +-
 tools/binman/ftest.py                         | 407 ++++++++++++++++--
 tools/binman/image.py                         |  59 ++-
 tools/binman/state.py                         |  26 +-
 tools/binman/test/115_fdtmap.dts              |  13 +
 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 +
 tools/binman/test/121_entry_expand.dts        |  20 +
 tools/binman/test/122_entry_expand_twice.dts  |  21 +
 .../binman/test/123_entry_expand_section.dts  |  22 +
 tools/binman/test/124_compress_dtb.dts        |  14 +
 tools/binman/test/125_cbfs_update.dts         |  21 +
 tools/binman/test/126_cbfs_bad_type.dts       |  17 +
 tools/binman/test/127_list.dts                |  33 ++
 tools/binman/test/128_decode_image.dts        |  36 ++
 tools/binman/test/128_decode_image_no_hdr.dts |  33 ++
 tools/binman/test/129_list_fdtmap.dts         |  36 ++
 tools/patman/test_util.py                     |   6 +-
 42 files changed, 1672 insertions(+), 236 deletions(-)
 create mode 100644 tools/binman/etype/__init__.py
 create mode 100644 tools/binman/etype/fdtmap.py
 create mode 100644 tools/binman/etype/image_header.py
 create mode 100644 tools/binman/test/115_fdtmap.dts
 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
 create mode 100644 tools/binman/test/121_entry_expand.dts
 create mode 100644 tools/binman/test/122_entry_expand_twice.dts
 create mode 100644 tools/binman/test/123_entry_expand_section.dts
 create mode 100644 tools/binman/test/124_compress_dtb.dts
 create mode 100644 tools/binman/test/125_cbfs_update.dts
 create mode 100644 tools/binman/test/126_cbfs_bad_type.dts
 create mode 100644 tools/binman/test/127_list.dts
 create mode 100644 tools/binman/test/128_decode_image.dts
 create mode 100644 tools/binman/test/128_decode_image_no_hdr.dts
 create mode 100644 tools/binman/test/129_list_fdtmap.dts

-- 
2.22.0.410.gd8fdbe21b5-goog



More information about the U-Boot mailing list