[PATCH v4 00/20] binman: Simple templating feature and mkimage conversion
Simon Glass
sjg at chromium.org
Tue Jul 11 21:26:50 CEST 2023
Hi Jan,
On Tue, 11 Jul 2023 at 13:21, Jan Kiszka <jan.kiszka at siemens.com> wrote:
>
> On 11.07.23 16:59, Simon Glass wrote:
> > 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 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 | 110 ++++++++---
> > 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, 1196 insertions(+), 71 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
> >
>
> Testing against the IOT2050 use case, and all works smoothly now, thanks
> a lot!
OK, that is good. Thank you for all your research, design thoughts and
testing. I believe this will make firmware packaging more maintainable
in the future as things get more and more complex.
Regards,
Simon
More information about the U-Boot
mailing list