mbox series

[00/25] binman: Support compression of sections

Message ID 20201019024138.3804540-1-sjg@chromium.org
Headers show
Series binman: Support compression of sections | expand


Simon Glass Oct. 19, 2020, 2:41 a.m. UTC
This series includes a number of improvements and refactors to support
compressing entire sections. This is sometimes useful when a section
contains a number of entries which are accessed as a whole and are best
compressed together.

Most of the effort here is clarifying what is in a section and what is
added by its parent (i.e. padding). But the opportunity is taken to tidy
up and somewhat simplify some of the section-handling code. Also some new
tests are added to reduce the amount of undefined behaviour.

This series is available at u-boot-dm/binman-working

Simon Glass (25):
  binman: Give a sensible error if no command is given
  binman: Fix return from u-boot-ucode if there is no DT
  binman: Remove references to 'image' in entry_Section
  binman: Expand the error message for breaching a section
  binman: Move CompressData() into Entry base class
  binman: Use 'files-compress' to set compression for files
  binman: Update testPackExtra with more checks
  binman: Expand docs and test for padding
  binman: Expand docs and test for alignment
  binman: Move section-building code into a function
  binman: Refactor _BuildSectionData()
  binman: Move section padding to the parent
  binman: Make section padding consistent with other entries
  binman: Store the original data before compression
  binman: Set section contents in GetData()
  binman: Avoid reporting image-pos with compression
  binman: Drop Entry.CheckOffset()
  binman: Move sort and expand to the main Pack() function
  binman: Drop the Entry.CheckSize() method
  binman: Call CheckSize() from the section's Pack() method
  binman: Drop CheckEntries()
  binman: Update CheckEntries() for compressed sections
  binman: Use the actual contents in CheckSize()
  binman: Support compression of sections
  binman: Avoid calculated section data repeatedly

 tools/binman/README                           |  72 ++--
 tools/binman/README.entries                   |  15 +-
 tools/binman/cmdline.py                       |   1 +
 tools/binman/control.py                       |   4 +-
 tools/binman/entry.py                         |  65 +++-
 tools/binman/etype/blob.py                    |   7 -
 tools/binman/etype/cbfs.py                    |   6 +-
 tools/binman/etype/files.py                   |   7 +-
 tools/binman/etype/section.py                 | 167 +++++++--
 tools/binman/etype/u_boot_ucode.py            |   1 +
 tools/binman/ftest.py                         | 347 +++++++++++++++++-
 tools/binman/image.py                         |   2 +-
 tools/binman/test/009_pack_extra.dts          |   2 +-
 tools/binman/test/085_files_compress.dts      |   2 +-
 tools/binman/test/177_section_pad.dts         |  27 ++
 tools/binman/test/178_section_align.dts       |  34 ++
 tools/binman/test/179_compress_image.dts      |  14 +
 tools/binman/test/180_compress_image_less.dts |  14 +
 .../binman/test/181_compress_section_size.dts |  17 +
 tools/binman/test/182_compress_section.dts    |  16 +
 tools/binman/test/183_compress_extra.dts      |  37 ++
 21 files changed, 753 insertions(+), 104 deletions(-)
 create mode 100644 tools/binman/test/177_section_pad.dts
 create mode 100644 tools/binman/test/178_section_align.dts
 create mode 100644 tools/binman/test/179_compress_image.dts
 create mode 100644 tools/binman/test/180_compress_image_less.dts
 create mode 100644 tools/binman/test/181_compress_section_size.dts
 create mode 100644 tools/binman/test/182_compress_section.dts
 create mode 100644 tools/binman/test/183_compress_extra.dts