Skip to content

binman: Simple templating feature and mkimage conversion

Simon Glass u-boot 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest20 patches 22 repliesIn review
  2. v420 patches 4 repliesSuperseded
  3. v319 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v112 patches13 repliesSuperseded

Changes in v5 from the cover letter

- Drop method implementations for which the entry_Section one is enough

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20binman: Correct coverage gap in controltools/binman/control.py+1 -10 replies
2/20binman: Init align_default in entry_Sectiontools/binman/etype/section.py+1 -01 reply
3/20binman: Use GetEntries() to obtain section contentstools/binman/etype/section.py+9 -91 reply
4/20binman: Read _multiple_data_files in the correct placetools/binman/etype/mkimage.py+2 -11 reply
5/20binman: Allow disabling symbol writingtools/binman/binman.rst tools/binman/entry.py tools/binman/etype/blob_phase.py +2 more+64 -51 reply
6/20stm32mp15: Avoid writing symbols in SPLarch/arm/dts/stm32mp15-u-boot.dtsi+1 -01 reply
7/20binman: Update elf to return number of written symbolstools/binman/elf.py tools/binman/elf_test.py+16 -51 reply
8/20binman: Add more detail on how ObtainContents() workstools/binman/entry.py tools/binman/etype/section.py+34 -11 reply
9/20binman: Convert mkimage to Entry_sectiontools/binman/entry.py tools/binman/etype/mkimage.py tools/binman/ftest.py +1 more+130 -801 reply
10/20binman: Provide a way to specify the fdt-list directlytools/binman/entries.rst tools/binman/etype/fit.py tools/binman/ftest.py +1 more+85 -01 reply
11/20binman: Drop __bss_size variable in bss_data.ctools/binman/test/bss_data.c+1 -21 reply
12/20binman: Correct handling of zero bss sizetools/binman/elf_test.py tools/binman/etype/u_boot_spl_bss_pad.py tools/binman/etype/u_boot_tpl_bss_pad.py +7 more+69 -41 reply
13/20dtoc: Support copying the contents of a node into anothertools/dtoc/fdt.py tools/dtoc/test/dtoc_test_copy.dts tools/dtoc/test_fdt.py+266 -31 reply
14/20dtoc: Allow inserting a list of nodes into anothertools/dtoc/fdt.py tools/dtoc/test/dtoc_test_copy.dts tools/dtoc/test_fdt.py+74 -11 reply
15/20binman: Support simple templatestools/binman/binman.rst tools/binman/control.py tools/binman/etype/section.py +2 more+165 -14 replies
16/20binman: Support templating with multiple imagestools/binman/control.py tools/binman/ftest.py tools/binman/test/287_template_multi.dts+42 -21 reply
17/20binman: Add a test for templating in a FITtools/binman/ftest.py tools/binman/test/288_template_fit.dts+44 -01 reply
18/20binman: Support templates at any leveltools/binman/control.py tools/binman/ftest.py tools/binman/test/289_template_section.dts+63 -21 reply
19/20binman: Support writing symbols inside a mkimage imagetools/binman/entry.py tools/binman/etype/mkimage.py tools/binman/ftest.py +1 more+127 -21 reply
20/20binman: Reduce state.SetInt and bintool cmd to debug leveltools/binman/bintool.py tools/binman/state.py+3 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 00/20] binman: Simple templating feature and mkimage conversion

This series converts the mkimage entry type to be a section, i.e. based on the entry_Section class. This makes it more consistent in its behaviour, e.g. allowing symbol writing and expanded entries.

A simple templating feature is also introduced, to reduce duplication when a set of entries must be used in multiple images.

In this version the nodes from the template are placed before any other nodes, meaning that the template sets the node order. This seems more consistent than other mechanisms.

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

Changes in v5:
- Drop method implementations for which the entry_Section one is enough

Changes in v4:
- Avoid copying phandle nodes
- Support copying over properties from each template node
- Make sure phandles are not copied
- Copy over properties from the top-level template node
- Add new patch to reduce state.SetInt and bintool cmd to debug level

Changes in v3:
- Add new patch for elf to return number of written symbols
- Add new patch with more detail on how ObtainContents() works
- Fix up some tests which now need SPL and TPL
- Avoid calling ObtainContents() when not needed
- Fix 'specific' typo
- Add a new devicetree file especially for node copying
- Correct logic for merging nodes in order
- Tidy up some comments
- Adjust to use the new example file
- Drop duplicate dts-v1 header
- Add new test case for templating in a FIT
- Add new patch to support writing symbols inside a mkimage image

Changes in v2:
- Drop now-unnecessary methods in mkimage etype
- Correct ordering of template nodes
- Fix 'preseverd' and 'inserter' typos

Marek Vasut (1):
binman: Convert mkimage to Entry_section

Simon Glass (19):
binman: Correct coverage gap in control
binman: Init align_default in entry_Section
binman: Use GetEntries() to obtain section contents
binman: Read _multiple_data_files in the correct place
binman: Allow disabling symbol writing
stm32mp15: Avoid writing symbols in SPL
binman: Update elf to return number of written symbols
binman: Add more detail on how ObtainContents() works
binman: Provide a way to specify the fdt-list directly
binman: Drop __bss_size variable in bss_data.c
binman: Correct handling of zero bss size
dtoc: Support copying the contents of a node into another
dtoc: Allow inserting a list of nodes into another
binman: Support simple templates
binman: Support templating with multiple images
binman: Add a test for templating in a FIT
binman: Support templates at any level
binman: Support writing symbols inside a mkimage image
binman: Reduce state.SetInt and bintool cmd to debug level

 arch/arm/dts/stm32mp15-u-boot.dtsi         |   1 +
 tools/binman/binman.rst                    |  94 +++++++++
 tools/binman/bintool.py                    |   2 +-
 tools/binman/control.py                    |  34 +++-
 tools/binman/elf.py                        |  13 +-
 tools/binman/elf_test.py                   |  13 +-
 tools/binman/entries.rst                   |   6 +
 tools/binman/entry.py                      |  11 +-
 tools/binman/etype/blob_phase.py           |   5 +
 tools/binman/etype/fit.py                  |   9 +
 tools/binman/etype/mkimage.py              | 136 ++++++-------
 tools/binman/etype/section.py              |  54 +++--
 tools/binman/etype/u_boot_spl_bss_pad.py   |   2 +-
 tools/binman/etype/u_boot_tpl_bss_pad.py   |   2 +-
 tools/binman/etype/u_boot_vpl_bss_pad.py   |   2 +-
 tools/binman/ftest.py                      | 218 ++++++++++++++++++++-
 tools/binman/state.py                      |   4 +-
 tools/binman/test/282_symbols_disable.dts  |  25 +++
 tools/binman/test/283_mkimage_special.dts  |  24 +++
 tools/binman/test/284_fit_fdt_list.dts     |  58 ++++++
 tools/binman/test/285_spl_expand.dts       |  13 ++
 tools/binman/test/286_template.dts         |  42 ++++
 tools/binman/test/287_template_multi.dts   |  27 +++
 tools/binman/test/288_template_fit.dts     |  37 ++++
 tools/binman/test/289_template_section.dts |  52 +++++
 tools/binman/test/290_mkimage_sym.dts      |  27 +++
 tools/binman/test/Makefile                 |   5 +-
 tools/binman/test/bss_data.c               |   3 +-
 tools/binman/test/bss_data_zero.c          |  16 ++
 tools/binman/test/bss_data_zero.lds        |  15 ++
 tools/binman/test/embed_data.lds           |   1 +
 tools/dtoc/fdt.py                          | 141 ++++++++++++-
 tools/dtoc/test/dtoc_test_copy.dts         |  88 +++++++++
 tools/dtoc/test_fdt.py                     | 113 +++++++++++
 34 files changed, 1184 insertions(+), 109 deletions(-)
 create mode 100644 tools/binman/test/282_symbols_disable.dts
 create mode 100644 tools/binman/test/283_mkimage_special.dts
 create mode 100644 tools/binman/test/284_fit_fdt_list.dts
 create mode 100644 tools/binman/test/285_spl_expand.dts
 create mode 100644 tools/binman/test/286_template.dts
 create mode 100644 tools/binman/test/287_template_multi.dts
 create mode 100644 tools/binman/test/288_template_fit.dts
 create mode 100644 tools/binman/test/289_template_section.dts
 create mode 100644 tools/binman/test/290_mkimage_sym.dts
 create mode 100644 tools/binman/test/bss_data_zero.c
 create mode 100644 tools/binman/test/bss_data_zero.lds
 create mode 100644 tools/dtoc/test/dtoc_test_copy.dts
Signature · 1 line
2.41.0.455.g037347b96a-goog