Skip to content

binman: Support devicetree update in all entries

Simon Glass u-boot 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest27 patches 0 repliesNew
  2. v221 patches 0 repliesSuperseded
  3. v120 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Add new patch to support symbols in u-boot-spl-nodtb
- Add new patch to drop unnecessary 'type' property in tests
- Add new patch to use the fake SPL/TPL only if requested
- Add new patch to drop an unnecessary field in output_fdt_info
- Add new patch to move the comment for GetFdts() to the base class
- Add new patch to use standard filenames for SPL/TPL devicetree
- Update sizes for new behaviour
- Fix x86 docs which refer to this
- Update entry docs
- Make a symlink to the entry docs

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27binman: Allow extracting to current directorytools/binman/control.py+1 -10 replies
1/27binman: Allow extracting to current directory+0 -00 replies
2/27binman: Document ExpandEntries() in the base classtools/binman/entry.py tools/binman/etype/section.py+11 -60 replies
2/27binman: Document ExpandEntries() in the base class+0 -00 replies
3/27binman: Update entry help for files-aligntools/binman/README.entries+1 -00 replies
3/27binman: Update entry help for files-align+0 -00 replies
4/27binman: Tidy up underscores in entry documentationtools/binman/README.entries tools/binman/etype/blob.py tools/binman/etype/u_boot.py +4 more+22 -240 replies
4/27binman: Tidy up underscores in entry documentation+0 -00 replies
5/27binman: Correct the documentation for u-boot-spl-bss-padtools/binman/README.entries tools/binman/etype/u_boot_spl_bss_pad.py+20 -140 replies
5/27binman: Correct the documentation for u-boot-spl-bss-pad+0 -00 replies
6/27binman: Support symbols in u-boot-spl-nodtbtools/binman/README.entries tools/binman/etype/u_boot_spl_nodtb.py tools/binman/ftest.py +3 more+81 -210 replies
6/27binman: Support symbols in u-boot-spl-nodtb+0 -00 replies
7/27binman: Add support for u-boot-tpl-nodtbtools/binman/README.entries tools/binman/etype/u_boot_tpl_nodtb.py tools/binman/ftest.py +1 more+83 -00 replies
7/27binman: Add support for u-boot-tpl-nodtb+0 -00 replies
8/27binman: Add support for u-boot-tpl-bss-badtools/binman/README.entries tools/binman/etype/u_boot_tpl_bss_pad.py tools/binman/ftest.py +1 more+101 -00 replies
8/27binman: Add support for u-boot-tpl-bss-bad+0 -00 replies
9/27binman: Drop unnecessary 'type' property in teststools/binman/test/149_symbols_tpl.dts tools/binman/test/155_symbols_tpl_x86.dts+0 -20 replies
9/27binman: Drop unnecessary 'type' property in tests+0 -00 replies
10/27binman: Use the fake SPL/TPL only if requestedtools/binman/state.py+15 -80 replies
10/27binman: Use the fake SPL/TPL only if requested+0 -00 replies
11/27binman: Drop unnecessary field in output_fdt_infotools/binman/state.py+10 -120 replies
11/27binman: Drop unnecessary field in output_fdt_info+0 -00 replies
12/27binman: Move the comment for GetFdts() to the base classtools/binman/entry.py tools/binman/etype/blob_dtb.py+1 -100 replies
12/27binman: Move the comment for GetFdts() to the base class+0 -00 replies
13/27binman: Use standard filenames for SPL/TPL devicetreetools/binman/state.py tools/patman/tools.py+16 -130 replies
13/27binman: Use standard filenames for SPL/TPL devicetree+0 -00 replies
14/27binman: Allow using an an 'expanded' entry typetools/binman/entry.py tools/binman/entry_test.py+63 -90 replies
14/27binman: Allow using an an 'expanded' entry type+0 -00 replies
15/27binman: Allow a way to select expanded entriestools/binman/cmdline.py tools/binman/ftest.py+16 -60 replies
15/27binman: Allow a way to select expanded entries+0 -00 replies
16/27binman: Plumb expanded entries through fullytools/binman/control.py tools/binman/etype/section.py tools/binman/image.py+36 -80 replies
16/27binman: Plumb expanded entries through fully+0 -00 replies
17/27binman: Automatically expand phase binaries into sectionstools/binman/README tools/binman/README.entries tools/binman/etype/blob_phase.py +13 more+571 -180 replies
17/27binman: Automatically expand phase binaries into sections+0 -00 replies
18/27Makefile: Pass new entry args to binmanMakefile+8 -00 replies
18/27Makefile: Pass new entry args to binman+0 -00 replies
19/27x86: Make use of binman expanded entriesarch/x86/dts/u-boot.dtsi+1 -100 replies
19/27x86: Make use of binman expanded entries+0 -00 replies
20/27x86: dts: Drop unused CONFIG_SPLarch/x86/dts/u-boot.dtsi+1 -50 replies
20/27x86: dts: Drop unused CONFIG_SPL+0 -00 replies
21/27doc: Move UEFI under develop/doc/arch/x86.rst doc/develop/index.rst doc/develop/uefi/index.rst +4 more+7 -141 reply
21/27doc: Move UEFI under develop/+0 -00 replies
22/27doc: Move driver model docs under develop/doc/develop/driver-model/bind.rst doc/develop/driver-model/debugging.rst doc/develop/driver-model/design.rst +17 more+5 -110 replies
22/27doc: Move driver model docs under develop/+0 -00 replies
23/27binman: doc: Add documentation to htmldocsdoc/develop/index.rst doc/develop/package/binman.rst doc/develop/package/index.rst +8 more+294 -2450 replies
23/27binman: doc: Add documentation to htmldocs+0 -00 replies
24/27binman: Rearrange documentation into headingstools/binman/binman.rst+266 -2570 replies
24/27binman: Rearrange documentation into headings+0 -00 replies
25/27binman: Incorporate entry documentationtools/binman/cmdline.py tools/binman/entries.rst tools/binman/etype/cbfs.py +7 more+87 -770 replies
25/27binman: Incorporate entry documentation+0 -00 replies
26/27binman: Drop repetitive heading for each entrytools/binman/entries.rst tools/binman/etype/atf_bl31.py tools/binman/etype/blob.py +17 more+57 -570 replies
26/27binman: Drop repetitive heading for each entry+0 -00 replies
27/27binman: Update various pieces of the documentationdoc/develop/package/entries.rst tools/binman/binman.rst+45 -390 replies
27/27binman: Update various pieces of the documentation+0 -00 replies

Reviews trailers per patch

2 of 54 patches have a Reviewed-by or Acked-by.

PatchHeinrich Schuchardt
1/27
1/27
2/27
2/27
3/27
3/27
4/27
4/27
5/27
5/27
6/27
6/27
7/27
7/27
8/27
8/27
9/27
9/27
10/27
10/27
11/27
11/27
12/27
12/27
13/27
13/27
14/27
14/27
15/27
15/27
16/27
16/27
17/27
17/27
18/27
18/27
19/27
19/27
20/27
20/27
21/27R-b R-b
21/27R-b R-b
22/27
22/27
23/27
23/27
24/27
24/27
25/27
25/27
26/27
26/27
27/27
27/27

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/27] binman: Support devicetree update in all entries

U-Boot's various phase binaries actually comprise two or three pieces. For example, u-boot.bin has the executable followed by a devicetree.

With binman we want to be able to update that devicetree with full image information so that it is accessible to the executable. This is tricky if it is not clear where the devicetree starts.

At present this is handled manually, by creating two separate nodes in the binman definition, u-boot-nodtb and u-boot-dtb, so that binman sees them separately and can easily update the devicetree. But this is not very convenient.

Of course we could try to detect the devicetree in the binary, which is easy enough for binman to do. But this approach rapidly gets out of hand. When listing an existing image, should we show the devicetree separately? If we don't then binman cannot extract it by itself, only the whole binary. With SPL and TPL we may have BSS padding and this is harder to detect reliably. Also, a design goal of binman is to provide full information about what is in the image. The detection approach goes against that.

So instead it seems best to convert these multi-part binaries into a section with the component parts inside. We can do this automatically without affecting the operation of binman very much.

One implementation option for this feature would be to update the entries to behave in two different ways, i.e. either to act as a section containing sub-entries, or as a simple blob. However this is tricky because each entry has to use a particular base class. It is not reasonably possible for an entry to choose between using one base class (e.g. blob) or another (e.g. section), depending on a flag.

Instead, the approach taken in this series is to replace an entry type with an expanded version, so 'u-boot' becomes 'u-boot-expanded', for example. The new entry is a section containing two or three sub-entries.

A similar approach could be take to reduce the complexity of the x86 binman definition. The microcode is either in TPL, SPL or U-Boot proper, so an entryarg could control which of those is expanded to include microcode. That possibility is left for future consideration.

Changes in v3:
- Add new patch to support symbols in u-boot-spl-nodtb
- Add new patch to drop unnecessary 'type' property in tests
- Add new patch to use the fake SPL/TPL only if requested
- Add new patch to drop an unnecessary field in output_fdt_info
- Add new patch to move the comment for GetFdts() to the base class
- Add new patch to use standard filenames for SPL/TPL devicetree
- Update sizes for new behaviour
- Fix x86 docs which refer to this
- Update entry docs
- Make a symlink to the entry docs

Changes in v2:
- Move UEFI under develop/ instead
- Add new patch to move driver model docs under develop/
- Put binman docs in doc/develop and FIT in doc/usage
- Rename README.rst to binman.rst and use a symlink

Simon Glass (27):
binman: Allow extracting to current directory
binman: Document ExpandEntries() in the base class
binman: Update entry help for files-align
binman: Tidy up underscores in entry documentation
binman: Correct the documentation for u-boot-spl-bss-pad
binman: Support symbols in u-boot-spl-nodtb
binman: Add support for u-boot-tpl-nodtb
binman: Add support for u-boot-tpl-bss-bad
binman: Drop unnecessary 'type' property in tests
binman: Use the fake SPL/TPL only if requested
binman: Drop unnecessary field in output_fdt_info
binman: Move the comment for GetFdts() to the base class
binman: Use standard filenames for SPL/TPL devicetree
binman: Allow using an an 'expanded' entry type
binman: Allow a way to select expanded entries
binman: Plumb expanded entries through fully
binman: Automatically expand phase binaries into sections
Makefile: Pass new entry args to binman
x86: Make use of binman expanded entries
x86: dts: Drop unused CONFIG_SPL
doc: Move UEFI under develop/
doc: Move driver model docs under develop/
binman: doc: Add documentation to htmldocs
binman: Rearrange documentation into headings
binman: Incorporate entry documentation
binman: Drop repetitive heading for each entry
binman: Update various pieces of the documentation

 Makefile                                      |   8 +
 arch/x86/dts/u-boot.dtsi                      |  17 +-
 doc/arch/x86.rst                              |   4 +-
 doc/{ => develop}/driver-model/bind.rst       |   0
 doc/{ => develop}/driver-model/debugging.rst  |   0
 doc/{ => develop}/driver-model/design.rst     |   0
 doc/{ => develop}/driver-model/ethernet.rst   |   0
 doc/{ => develop}/driver-model/fdt-fixup.rst  |   0
 .../driver-model/fs_firmware_loader.rst       |   0
 doc/{ => develop}/driver-model/i2c-howto.rst  |   0
 doc/{ => develop}/driver-model/index.rst      |   4 +
 doc/{ => develop}/driver-model/livetree.rst   |   0
 doc/{ => develop}/driver-model/migration.rst  |   0
 doc/{ => develop}/driver-model/of-plat.rst    |   0
 doc/{ => develop}/driver-model/pci-info.rst   |   0
 .../driver-model/pmic-framework.rst           |   0
 .../driver-model/remoteproc-framework.rst     |   0
 .../driver-model/serial-howto.rst             |   0
 .../driver-model/soc-framework.rst            |   0
 doc/{ => develop}/driver-model/spi-howto.rst  |   0
 doc/{ => develop}/driver-model/usb-info.rst   |   0
 doc/develop/index.rst                         |  10 +
 doc/develop/package/binman.rst                |   1 +
 doc/develop/package/entries.rst               |   1 +
 doc/develop/package/index.rst                 |  19 +
 doc/{ => develop}/uefi/index.rst              |   4 +
 doc/{ => develop}/uefi/iscsi.rst              |   0
 doc/{ => develop}/uefi/u-boot_on_efi.rst      |   0
 doc/{ => develop}/uefi/uefi.rst               |   0
 doc/index.rst                                 |  23 -
 doc/usage/fit.rst                             |   8 +
 doc/usage/index.rst                           |   1 +
 tools/binman/README.rst                       |   1 +
 tools/binman/{README => binman.rst}           | 959 ++++++++++--------
 tools/binman/cmdline.py                       |   5 +-
 tools/binman/control.py                       |  28 +-
 tools/binman/{README.entries => entries.rst}  | 336 ++++--
 tools/binman/entry.py                         |  73 +-
 tools/binman/entry_test.py                    |  12 +
 tools/binman/etype/atf_bl31.py                |   2 +-
 tools/binman/etype/blob.py                    |   4 +-
 tools/binman/etype/blob_dtb.py                |   9 -
 tools/binman/etype/blob_ext.py                |   2 +-
 tools/binman/etype/blob_phase.py              |  51 +
 tools/binman/etype/cbfs.py                    |  12 +-
 tools/binman/etype/fdtmap.py                  |  30 +-
 tools/binman/etype/files.py                   |   2 +-
 tools/binman/etype/fit.py                     |  21 +-
 tools/binman/etype/intel_cmc.py               |   2 +-
 tools/binman/etype/intel_fsp.py               |   2 +-
 tools/binman/etype/intel_fsp_m.py             |   2 +-
 tools/binman/etype/intel_fsp_s.py             |   2 +-
 tools/binman/etype/intel_fsp_t.py             |   2 +-
 tools/binman/etype/intel_ifwi.py              |  10 +-
 tools/binman/etype/intel_me.py                |   2 +-
 tools/binman/etype/intel_mrc.py               |   2 +-
 tools/binman/etype/intel_refcode.py           |   2 +-
 tools/binman/etype/intel_vbt.py               |   2 +-
 tools/binman/etype/intel_vga.py               |   2 +-
 tools/binman/etype/mkimage.py                 |   4 +-
 tools/binman/etype/scp.py                     |   2 +-
 tools/binman/etype/section.py                 |  15 +-
 tools/binman/etype/text.py                    |   6 +-
 tools/binman/etype/u_boot.py                  |   8 +-
 tools/binman/etype/u_boot_dtb_with_ucode.py   |   4 +-
 tools/binman/etype/u_boot_expanded.py         |  24 +
 tools/binman/etype/u_boot_nodtb.py            |   8 +-
 tools/binman/etype/u_boot_spl.py              |   3 +
 tools/binman/etype/u_boot_spl_bss_pad.py      |  17 +-
 tools/binman/etype/u_boot_spl_expanded.py     |  45 +
 tools/binman/etype/u_boot_spl_nodtb.py        |  24 +-
 tools/binman/etype/u_boot_tpl.py              |   3 +
 tools/binman/etype/u_boot_tpl_bss_pad.py      |  44 +
 tools/binman/etype/u_boot_tpl_expanded.py     |  45 +
 tools/binman/etype/u_boot_tpl_nodtb.py        |  42 +
 tools/binman/etype/u_boot_with_ucode_ptr.py   |   2 +-
 tools/binman/ftest.py                         | 268 ++++-
 tools/binman/image.py                         |  17 +-
 tools/binman/index.rst                        |   9 +
 tools/binman/setup.py                         |   2 +-
 tools/binman/state.py                         |  71 +-
 tools/binman/test/053_symbols.dts             |   2 +-
 tools/binman/test/149_symbols_tpl.dts         |   1 -
 tools/binman/test/155_symbols_tpl_x86.dts     |   1 -
 tools/binman/test/192_symbols_nodtb.dts       |  26 +
 tools/binman/test/192_u_boot_tpl_nodtb.dts    |  13 +
 tools/binman/test/193_tpl_bss_pad.dts         |  19 +
 tools/binman/test/194_fdt_incl.dts            |  17 +
 tools/binman/test/195_fdt_incl_tpl.dts        |  13 +
 tools/binman/test/u_boot_binman_syms.c        |   2 +-
 tools/patman/tools.py                         |   8 +-
 91 files changed, 1697 insertions(+), 745 deletions(-)
 rename doc/{ => develop}/driver-model/bind.rst (100%)
 rename doc/{ => develop}/driver-model/debugging.rst (100%)
 rename doc/{ => develop}/driver-model/design.rst (100%)
 rename doc/{ => develop}/driver-model/ethernet.rst (100%)
 rename doc/{ => develop}/driver-model/fdt-fixup.rst (100%)
 rename doc/{ => develop}/driver-model/fs_firmware_loader.rst (100%)
 rename doc/{ => develop}/driver-model/i2c-howto.rst (100%)
 rename doc/{ => develop}/driver-model/index.rst (68%)
 rename doc/{ => develop}/driver-model/livetree.rst (100%)
 rename doc/{ => develop}/driver-model/migration.rst (100%)
 rename doc/{ => develop}/driver-model/of-plat.rst (100%)
 rename doc/{ => develop}/driver-model/pci-info.rst (100%)
 rename doc/{ => develop}/driver-model/pmic-framework.rst (100%)
 rename doc/{ => develop}/driver-model/remoteproc-framework.rst (100%)
 rename doc/{ => develop}/driver-model/serial-howto.rst (100%)
 rename doc/{ => develop}/driver-model/soc-framework.rst (100%)
 rename doc/{ => develop}/driver-model/spi-howto.rst (100%)
 rename doc/{ => develop}/driver-model/usb-info.rst (100%)
 create mode 120000 doc/develop/package/binman.rst
 create mode 120000 doc/develop/package/entries.rst
 create mode 100644 doc/develop/package/index.rst
 rename doc/{ => develop}/uefi/index.rst (51%)
 rename doc/{ => develop}/uefi/iscsi.rst (100%)
 rename doc/{ => develop}/uefi/u-boot_on_efi.rst (100%)
 rename doc/{ => develop}/uefi/uefi.rst (100%)
 create mode 100644 doc/usage/fit.rst
 create mode 120000 tools/binman/README.rst
 rename tools/binman/{README => binman.rst} (64%)
 rename tools/binman/{README.entries => entries.rst} (82%)
 create mode 100644 tools/binman/etype/blob_phase.py
 create mode 100644 tools/binman/etype/u_boot_expanded.py
 create mode 100644 tools/binman/etype/u_boot_spl_expanded.py
 create mode 100644 tools/binman/etype/u_boot_tpl_bss_pad.py
 create mode 100644 tools/binman/etype/u_boot_tpl_expanded.py
 create mode 100644 tools/binman/etype/u_boot_tpl_nodtb.py
 create mode 100644 tools/binman/index.rst
 create mode 100644 tools/binman/test/192_symbols_nodtb.dts
 create mode 100644 tools/binman/test/192_u_boot_tpl_nodtb.dts
 create mode 100644 tools/binman/test/193_tpl_bss_pad.dts
 create mode 100644 tools/binman/test/194_fdt_incl.dts
 create mode 100644 tools/binman/test/195_fdt_incl_tpl.dts
Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog