[PATCH v2 00/28] binman: Support compression of sections

Simon Glass sjg at chromium.org
Tue Oct 27 00:39:58 CET 2020


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

Changes in v2:
- Add a patch to update the entry docs
- Add new patch to drop unused return variable for _DoTestFile()
- Add new tests for skip-at-start sections
- Use unittest.skip() to skip testDual()
- Update testSkipAtStartSectionPad() for new behaviour
- Update testSkipAtStartSectionPad which now works as expected
- Renumber the test .dts files to make space for three inserted earlier
- Update testSkipAtStartSectionPad() to check section.data
- Renumber the test .dts files to make space for three inserted earlier

Simon Glass (28):
  binman: Update the entry docs
  binman: Drop unused return variable for _DoTestFile()
  binman: Add tests for skip-at-start sections
  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                   |  25 +-
 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                         | 409 +++++++++++++++++-
 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_skip_at_start.dts       |  19 +
 tools/binman/test/178_skip_at_start_pad.dts   |  21 +
 .../test/179_skip_at_start_section_pad.dts    |  22 +
 tools/binman/test/180_section_pad.dts         |  27 ++
 tools/binman/test/181_section_align.dts       |  34 ++
 tools/binman/test/182_compress_image.dts      |  14 +
 tools/binman/test/183_compress_image_less.dts |  14 +
 .../binman/test/184_compress_section_size.dts |  17 +
 tools/binman/test/185_compress_section.dts    |  16 +
 tools/binman/test/186_compress_extra.dts      |  37 ++
 24 files changed, 885 insertions(+), 106 deletions(-)
 create mode 100644 tools/binman/test/177_skip_at_start.dts
 create mode 100644 tools/binman/test/178_skip_at_start_pad.dts
 create mode 100644 tools/binman/test/179_skip_at_start_section_pad.dts
 create mode 100644 tools/binman/test/180_section_pad.dts
 create mode 100644 tools/binman/test/181_section_align.dts
 create mode 100644 tools/binman/test/182_compress_image.dts
 create mode 100644 tools/binman/test/183_compress_image_less.dts
 create mode 100644 tools/binman/test/184_compress_section_size.dts
 create mode 100644 tools/binman/test/185_compress_section.dts
 create mode 100644 tools/binman/test/186_compress_extra.dts

-- 
2.29.0.rc2.309.g374f81d7ae-goog



More information about the U-Boot mailing list